vue-data-ui 3.25.5 → 3.25.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-UfoQuPMf.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-ta2JoIjx.js → package-B-3S5q00.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-DlWT702n.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
- package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
- package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
- package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
- package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
- package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
- package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
- package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
- package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
- package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
- package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
- package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
- package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-BzwMl-in.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
- package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
- package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
- package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
- package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
- package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
- package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
- package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
- package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
- package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
- package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
- package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
- package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
- package/dist/vue-ui-table-CiccGbRB.js +1352 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
- package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
- package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
- package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
- package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
- package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
- package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,1733 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Lt as i, Pt as a, S as o, X as s, Yt as c, Z as l, Zt as u, i as d, jt as f, lt as ee, nt as te, q as ne, r as re, t as ie, w as ae } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as oe, t as se } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ce } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as le } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as ue, t as de } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as fe } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as pe } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as me } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as he } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as ge } from "./img-DhGApYG0.js";
|
|
12
|
+
import { n as _e } from "./Title-CPHi-evi.js";
|
|
13
|
+
import { t as ve } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import { l as ye, t as be } from "./useResponsive-ZtArZtUf.js";
|
|
15
|
+
import { t as xe } from "./BaseIcon-D8R6_sKH.js";
|
|
16
|
+
import { t as Se } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as Ce } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
18
|
+
import { t as we } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as Te } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as Ee } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as De } from "./Legend-X4kF4PvW.js";
|
|
22
|
+
import { t as Oe } from "./usePanZoom-CYU3B4T3.js";
|
|
23
|
+
import { t as ke } from "./vue_ui_treemap-DoEtkRN6.js";
|
|
24
|
+
import { Fragment as Ae, Teleport as je, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Me, createTextVNode as Ne, createVNode as Pe, defineAsyncComponent as Fe, guardReactiveProps as v, mergeProps as Ie, nextTick as Le, normalizeClass as Re, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as ze, onMounted as Be, openBlock as x, ref as S, renderList as Ve, renderSlot as C, resolveDynamicComponent as He, shallowRef as w, toDisplayString as Ue, toRefs as We, unref as T, useCssVars as Ge, useSlots as Ke, watch as qe, withCtx as E, withKeys as Je, withModifiers as Ye } from "vue";
|
|
25
|
+
//#region src/treemap.js
|
|
26
|
+
function Xe(e, t) {
|
|
27
|
+
let n = e.length;
|
|
28
|
+
if (n === 0) throw Error(`Max aspect ratio cannot be computed: ${e} is an empty array`);
|
|
29
|
+
{
|
|
30
|
+
let r = Infinity, i = -Infinity, a = 0;
|
|
31
|
+
for (let t = 0; t < n; t += 1) {
|
|
32
|
+
let n = e[t].normalizedValue;
|
|
33
|
+
n < r && (r = n), n > i && (i = n), a += n;
|
|
34
|
+
}
|
|
35
|
+
return Math.max(t ** 2 * i / a ** 2, a ** 2 / (t ** 2 * r));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function Ze(e) {
|
|
39
|
+
let { xOffset: t, yOffset: n, width: r, height: i } = e;
|
|
40
|
+
return {
|
|
41
|
+
x0: t,
|
|
42
|
+
y0: n,
|
|
43
|
+
x1: t + r,
|
|
44
|
+
y1: n + i
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function Qe(e, t, n) {
|
|
48
|
+
if (e.length === 0) return !0;
|
|
49
|
+
{
|
|
50
|
+
let r = e.concat(t);
|
|
51
|
+
return Xe(e, n) >= Xe(r, n);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function $e(e) {
|
|
55
|
+
let t = [], n = e.length;
|
|
56
|
+
for (let r = 0; r < n; r += 1) {
|
|
57
|
+
let n = e[r], i = n.length;
|
|
58
|
+
for (let e = 0; e < i; e += 1) t.push(n[e]);
|
|
59
|
+
}
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
function et(e, t) {
|
|
63
|
+
return st({
|
|
64
|
+
...t,
|
|
65
|
+
children: e
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function tt(e) {
|
|
69
|
+
return (e.x1 - e.x0) * (e.y1 - e.y0);
|
|
70
|
+
}
|
|
71
|
+
function nt(e, t) {
|
|
72
|
+
let { width: n, height: r, xOffset: i, yOffset: a } = at(t), o = e.length, s = e.map((e) => e.normalizedValue || 0).reduce((e, t) => e + t, 0), c = s / r, l = s / n, u = i, d = a, f = [];
|
|
73
|
+
if (n >= r) {
|
|
74
|
+
for (let t = 0; t < o; t += 1) {
|
|
75
|
+
let n = e[t], r = d + n.normalizedValue / c, i = {
|
|
76
|
+
x0: u,
|
|
77
|
+
y0: d,
|
|
78
|
+
x1: u + c,
|
|
79
|
+
y1: r
|
|
80
|
+
}, a = Object.assign({}, n, i);
|
|
81
|
+
d = r, f.push(a);
|
|
82
|
+
}
|
|
83
|
+
return f;
|
|
84
|
+
}
|
|
85
|
+
for (let t = 0; t < o; t += 1) {
|
|
86
|
+
let n = e[t], r = u + n.normalizedValue / l, i = {
|
|
87
|
+
x0: u,
|
|
88
|
+
y0: d,
|
|
89
|
+
x1: r,
|
|
90
|
+
y1: d + l
|
|
91
|
+
}, a = Object.assign({}, n, i);
|
|
92
|
+
u = r, f.push(a);
|
|
93
|
+
}
|
|
94
|
+
return f;
|
|
95
|
+
}
|
|
96
|
+
function rt(e) {
|
|
97
|
+
let t = at(e), n = t.width, r = t.height;
|
|
98
|
+
return Math.min(n, r);
|
|
99
|
+
}
|
|
100
|
+
function it(e, t) {
|
|
101
|
+
let n = e.length, r = t / e.map((e) => e.value ?? 0).reduce((e, t) => e + t, 0), i = [], a, o;
|
|
102
|
+
for (let t = 0; t < n; t += 1) o = e[t], a = Object.assign({}, o, { normalizedValue: o.value * (r || 0) }), i.push(a);
|
|
103
|
+
return i;
|
|
104
|
+
}
|
|
105
|
+
function at(e) {
|
|
106
|
+
let { x0: t, y0: n, x1: r, y1: i } = e;
|
|
107
|
+
return {
|
|
108
|
+
xOffset: t,
|
|
109
|
+
yOffset: n,
|
|
110
|
+
width: r - t,
|
|
111
|
+
height: i - n
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function ot(e, t, n, r) {
|
|
115
|
+
let i = e, a = t, o = n, s = r;
|
|
116
|
+
for (;;) {
|
|
117
|
+
let e = i.length;
|
|
118
|
+
if (e === 0) {
|
|
119
|
+
let e = nt(a, o);
|
|
120
|
+
return s.concat(e);
|
|
121
|
+
}
|
|
122
|
+
let t = rt(o), n = i[0], r = i.slice(1, e);
|
|
123
|
+
if (Qe(a, n, t)) {
|
|
124
|
+
let e = a.concat(n);
|
|
125
|
+
i = r, a = e, o = o, s = s;
|
|
126
|
+
} else {
|
|
127
|
+
let e = a.length, t = 0;
|
|
128
|
+
for (let n = 0; n < e; n += 1) t += a[n].normalizedValue;
|
|
129
|
+
let n = D(o, t), r = nt(a, o), c = s.concat(r);
|
|
130
|
+
i = i, a = [], o = n, s = c;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function st(e) {
|
|
135
|
+
if (e.children === void 0 || !e.children.length) return [e];
|
|
136
|
+
{
|
|
137
|
+
let t = ot(it(e.children, tt(e)), [], e, []), n = t.length, r = [];
|
|
138
|
+
for (let e = 0; e < n; e += 1) r.push(st(t[e]));
|
|
139
|
+
return $e(r);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function D(e, t) {
|
|
143
|
+
let { width: n, height: r, xOffset: i, yOffset: a } = at(e);
|
|
144
|
+
if (n >= r) {
|
|
145
|
+
let e = t / r, o = n - e;
|
|
146
|
+
return Ze({
|
|
147
|
+
xOffset: i + e,
|
|
148
|
+
yOffset: a,
|
|
149
|
+
width: o,
|
|
150
|
+
height: r
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
{
|
|
154
|
+
let e = t / n, o = r - e;
|
|
155
|
+
return Ze({
|
|
156
|
+
xOffset: i,
|
|
157
|
+
yOffset: a + e,
|
|
158
|
+
width: n,
|
|
159
|
+
height: o
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/components/vue-ui-treemap.vue
|
|
165
|
+
var ct = /* @__PURE__ */ e({ default: () => Lt }), lt = ["id"], ut = ["id"], dt = ["id"], ft = [
|
|
166
|
+
"tabindex",
|
|
167
|
+
"onClick",
|
|
168
|
+
"onKeydown",
|
|
169
|
+
"data-last-crumb",
|
|
170
|
+
"onMouseenter",
|
|
171
|
+
"onFocus"
|
|
172
|
+
], pt = { class: "vue-ui-treemap-crumb-unit" }, mt = { class: "vue-ui-treemap-crumb-unit-label" }, ht = {
|
|
173
|
+
key: 0,
|
|
174
|
+
style: {
|
|
175
|
+
width: "24px",
|
|
176
|
+
display: "flex",
|
|
177
|
+
"align-items": "center"
|
|
178
|
+
}
|
|
179
|
+
}, gt = {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
182
|
+
}, _t = { style: { position: "relative" } }, vt = [
|
|
183
|
+
"xmlns",
|
|
184
|
+
"aria-describedby",
|
|
185
|
+
"viewBox"
|
|
186
|
+
], yt = { key: 0 }, bt = [
|
|
187
|
+
"x",
|
|
188
|
+
"y",
|
|
189
|
+
"height",
|
|
190
|
+
"width",
|
|
191
|
+
"fill",
|
|
192
|
+
"rx",
|
|
193
|
+
"stroke",
|
|
194
|
+
"stroke-width",
|
|
195
|
+
"onClick",
|
|
196
|
+
"onMouseenter",
|
|
197
|
+
"onMouseleave"
|
|
198
|
+
], xt = ["id"], St = [
|
|
199
|
+
"x",
|
|
200
|
+
"y",
|
|
201
|
+
"width",
|
|
202
|
+
"height"
|
|
203
|
+
], Ct = ["clip-path"], wt = ["transform"], Tt = ["transform"], Et = [
|
|
204
|
+
"x",
|
|
205
|
+
"y",
|
|
206
|
+
"fill",
|
|
207
|
+
"font-size",
|
|
208
|
+
"font-family",
|
|
209
|
+
"font-weight"
|
|
210
|
+
], Dt = { key: 0 }, Ot = [
|
|
211
|
+
"x",
|
|
212
|
+
"y",
|
|
213
|
+
"height",
|
|
214
|
+
"width"
|
|
215
|
+
], kt = {
|
|
216
|
+
style: {
|
|
217
|
+
width: "100%",
|
|
218
|
+
height: "100%",
|
|
219
|
+
overflow: "hidden"
|
|
220
|
+
},
|
|
221
|
+
class: "vue-ui-treemap-cell"
|
|
222
|
+
}, At = {
|
|
223
|
+
key: 0,
|
|
224
|
+
"data-dom-to-png-ignore": "",
|
|
225
|
+
class: "reset-wrapper"
|
|
226
|
+
}, jt = {
|
|
227
|
+
key: 1,
|
|
228
|
+
style: {
|
|
229
|
+
position: "absolute",
|
|
230
|
+
top: "100%",
|
|
231
|
+
left: "0",
|
|
232
|
+
width: "100%"
|
|
233
|
+
},
|
|
234
|
+
"data-dom-to-png-ignore": "",
|
|
235
|
+
"aria-hidden": "true"
|
|
236
|
+
}, Mt = {
|
|
237
|
+
key: 6,
|
|
238
|
+
class: "vue-data-ui-watermark"
|
|
239
|
+
}, Nt = ["id"], Pt = ["onClick"], Ft = { style: {
|
|
240
|
+
display: "flex",
|
|
241
|
+
"align-items": "center"
|
|
242
|
+
} }, It = 4, Lt = /*#__PURE__*/ ve({
|
|
243
|
+
__name: "vue-ui-treemap",
|
|
244
|
+
props: {
|
|
245
|
+
config: {
|
|
246
|
+
type: Object,
|
|
247
|
+
default() {
|
|
248
|
+
return {};
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
dataset: {
|
|
252
|
+
type: Array,
|
|
253
|
+
default() {
|
|
254
|
+
return [];
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
emits: [
|
|
259
|
+
"selectLegend",
|
|
260
|
+
"selectDatapoint",
|
|
261
|
+
"copyAlt"
|
|
262
|
+
],
|
|
263
|
+
setup(e, { expose: ve, emit: Xe }) {
|
|
264
|
+
Ge((e) => ({ v7b33232b: Ci.value }));
|
|
265
|
+
let Ze = Fe(() => import("./DataTable-oiM9uWrQ.js")), Qe = Fe(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), $e = Fe(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), tt = Fe(() => import("./Tooltip-hhrkQ3Lk.js")), nt = Fe(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), rt = Fe(() => import("./PackageVersion-UfoQuPMf.js").then((e) => e.t)), it = Fe(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_treemap: at } = ce(), { isThemeValid: ot, warnInvalidTheme: st } = pe(), D = e, ct = Xe, Lt = Ke(), Rt = p(() => !!D.dataset && D.dataset.length), zt = p(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), O = S(ne()), Bt = S(!1), Vt = S(""), Ht = S(!1), Ut = S(0), k = S([]), A = w(null), Wt = w(null), Gt = w(null), Kt = w(null), qt = w(null), Jt = S(0), Yt = S(0), Xt = S(0), j = S([]), Zt = S(null), Qt = S(!1), $t = S(null), en = S(null), tn = S(null), nn = S(/* @__PURE__ */ new Map()), M = S(null), rn = S({
|
|
266
|
+
x: 0,
|
|
267
|
+
y: 0
|
|
268
|
+
}), an = S("pointer"), on = S(!1), N = S(gn()), P = p(() => N.value.userOptions), F = p(() => N.value.style.chart.tooltip), I = p(() => N.value.style.chart.legend), L = p(() => N.value.style.chart.layout.labels), R = p(() => N.value.style.chart.layout), z = p(() => N.value.style.chart);
|
|
269
|
+
oe({
|
|
270
|
+
config: () => N.value,
|
|
271
|
+
dataset: () => D.dataset,
|
|
272
|
+
component: "VueUiTreemap",
|
|
273
|
+
rules: [
|
|
274
|
+
se.emptyArray,
|
|
275
|
+
{
|
|
276
|
+
test: (e) => e.length === 1 && e[0]?.children && e[0].children.length < 6 && e[0].children.length > 0 || e.flatMap((e) => e?.children?.length ?? 0).reduce((e, t) => e + t, 0) < 6,
|
|
277
|
+
message: [
|
|
278
|
+
"👀 The number of data points is < 6. Consider:",
|
|
279
|
+
"",
|
|
280
|
+
"▶️ Using another type of chart instead to better show proportions: VueUiDonut, VueUiWaffle"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
test: (e) => e.length === 1 && e[0]?.children && e[0].children.length === 0,
|
|
285
|
+
message: [
|
|
286
|
+
"👀 There is a series defined in the dataset but it has no children items.",
|
|
287
|
+
"",
|
|
288
|
+
"▶️ Add children items to your series."
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
});
|
|
293
|
+
let { transitionEnabled: sn } = he({
|
|
294
|
+
config: () => N.value.transitions,
|
|
295
|
+
dataset: () => D.dataset
|
|
296
|
+
}), B = p(() => N.value.userOptions.useCursorPointer), cn = p(() => u({
|
|
297
|
+
defaultConfig: {
|
|
298
|
+
userOptions: { show: !1 },
|
|
299
|
+
style: { chart: {
|
|
300
|
+
backgroundColor: "#999999",
|
|
301
|
+
layout: {
|
|
302
|
+
labels: { showDefaultLabels: !1 },
|
|
303
|
+
rects: { stroke: "#6A6A6A" }
|
|
304
|
+
},
|
|
305
|
+
legend: { backgroundColor: "transparent" }
|
|
306
|
+
} }
|
|
307
|
+
},
|
|
308
|
+
userConfig: N.value.skeletonConfig ?? {}
|
|
309
|
+
})), { loading: ln, FINAL_DATASET: un, manualLoading: dn } = ue({
|
|
310
|
+
...We(D),
|
|
311
|
+
FINAL_CONFIG: N,
|
|
312
|
+
prepareConfig: gn,
|
|
313
|
+
skeletonDataset: D.config?.skeletonDataset ?? [{
|
|
314
|
+
name: "_",
|
|
315
|
+
value: 53,
|
|
316
|
+
color: "#CACACA90",
|
|
317
|
+
children: [
|
|
318
|
+
{
|
|
319
|
+
name: "_",
|
|
320
|
+
value: 21
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "_",
|
|
324
|
+
value: 13
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "_",
|
|
328
|
+
value: 8
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "_",
|
|
332
|
+
value: 5
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: "_",
|
|
336
|
+
value: 3
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: "_",
|
|
340
|
+
value: 2
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "_",
|
|
344
|
+
value: 1
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
}],
|
|
348
|
+
skeletonConfig: u({
|
|
349
|
+
defaultConfig: N.value,
|
|
350
|
+
userConfig: cn.value
|
|
351
|
+
})
|
|
352
|
+
}), { userOptionsVisible: fn, setUserOptionsVisibility: pn, keepUserOptionState: mn } = Te({ config: N.value }), { svgRef: hn } = Ee({ config: z.value.title });
|
|
353
|
+
function gn() {
|
|
354
|
+
let e = fe({
|
|
355
|
+
userConfig: D.config,
|
|
356
|
+
defaultConfig: at
|
|
357
|
+
}), t = e.theme;
|
|
358
|
+
if (!t) return e;
|
|
359
|
+
if (!ot.value(e)) return st(e), e;
|
|
360
|
+
let n = fe({
|
|
361
|
+
userConfig: ke[t] || D.config,
|
|
362
|
+
defaultConfig: e
|
|
363
|
+
}), r = fe({
|
|
364
|
+
userConfig: D.config,
|
|
365
|
+
defaultConfig: n
|
|
366
|
+
});
|
|
367
|
+
return {
|
|
368
|
+
...r,
|
|
369
|
+
customPalette: r.customPalette.length ? r.customPalette : c[t] || i
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
qe(() => D.config, (e) => {
|
|
373
|
+
ln.value || (N.value = gn()), fn.value = !N.value.userOptions.showOnChartHover, Jt.value += 1, Yt.value += 1, Xt.value += 1, V.value.showTable = N.value.table.show, V.value.showTooltip = F.value.show, V.value.showZoom = z.value.zoom?.show ?? !1;
|
|
374
|
+
}, { deep: !0 });
|
|
375
|
+
let { isPrinting: _n, isImaging: vn, generatePdf: yn, generateImage: bn } = le({
|
|
376
|
+
elementId: `treemap_${O.value}`,
|
|
377
|
+
fileName: z.value.title.text || "vue-ui-treemap",
|
|
378
|
+
options: N.value.userOptions.print
|
|
379
|
+
}), xn = p(() => N.value.userOptions.show && !z.value.title.text), Sn = p(() => ae(N.value.customPalette)), V = S({
|
|
380
|
+
showTable: N.value.table.show,
|
|
381
|
+
showTooltip: F.value.show,
|
|
382
|
+
showZoom: z.value.zoom?.show ?? !1
|
|
383
|
+
});
|
|
384
|
+
qe(N, () => {
|
|
385
|
+
V.value = {
|
|
386
|
+
showTable: N.value.table.show,
|
|
387
|
+
showTooltip: F.value.show,
|
|
388
|
+
showZoom: z.value.zoom?.show ?? !1
|
|
389
|
+
};
|
|
390
|
+
}, { immediate: !0 });
|
|
391
|
+
let Cn = S({
|
|
392
|
+
height: z.value.height,
|
|
393
|
+
width: z.value.width
|
|
394
|
+
});
|
|
395
|
+
function wn(e) {
|
|
396
|
+
let t = A.value, n = Cn.value.height;
|
|
397
|
+
return !t || !n ? e : e * (n / t.getBoundingClientRect().height);
|
|
398
|
+
}
|
|
399
|
+
function Tn() {
|
|
400
|
+
if (!Zt.value || X.value.length <= 1) return 0;
|
|
401
|
+
let e = Zt.value, t = getComputedStyle(e);
|
|
402
|
+
return wn(e.offsetHeight + parseFloat(t.marginTop || "0") + parseFloat(t.marginBottom || "0") + parseFloat(t.paddingTop || "0") + parseFloat(t.paddingBottom || "0"));
|
|
403
|
+
}
|
|
404
|
+
let H = p(() => {
|
|
405
|
+
let e = z.value.padding, t = Cn.value.width, n = Cn.value.height, r = Tn(), i = e.left, a = t - e.right, o = e.top, s = n - e.bottom - r;
|
|
406
|
+
return {
|
|
407
|
+
left: i,
|
|
408
|
+
top: o,
|
|
409
|
+
right: a,
|
|
410
|
+
bottom: s,
|
|
411
|
+
width: a - i,
|
|
412
|
+
height: Math.max(0, s - o),
|
|
413
|
+
vbWidth: t,
|
|
414
|
+
vbHeight: n - r,
|
|
415
|
+
offsetY: r
|
|
416
|
+
};
|
|
417
|
+
}), U = S(l(un.value)), W = S(U.value), En = w(/* @__PURE__ */ new Map());
|
|
418
|
+
qe([U, () => N.value], () => {
|
|
419
|
+
tn.value = null, nn.value = /* @__PURE__ */ new Map();
|
|
420
|
+
}, { deep: !0 }), qe(() => k.value, () => {
|
|
421
|
+
tn.value = null, nn.value = /* @__PURE__ */ new Map(), An(), Xt.value += 1, Yt.value += 1;
|
|
422
|
+
}, { deep: !0 }), qe([() => Cn.value.width, () => Cn.value.height], () => {
|
|
423
|
+
nn.value = /* @__PURE__ */ new Map();
|
|
424
|
+
});
|
|
425
|
+
function Dn(e) {
|
|
426
|
+
Array.isArray(e) && e.forEach((e, t) => {
|
|
427
|
+
e.id ||= ne(), e.sourceColor === void 0 && (e.sourceColor = o(e.color) || null);
|
|
428
|
+
let n = e.sourceColor || En.value.get(e.id) || Sn.value[t] || i[t] || i[t % i.length];
|
|
429
|
+
n = o(n), En.value.set(e.id, n), e.color = n, On(e, n);
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function On(e, t) {
|
|
433
|
+
Array.isArray(e.children) && e.children.forEach((n) => {
|
|
434
|
+
n.id ||= ne(), n.parentId = e.id, n.sourceColor === void 0 && (n.sourceColor = o(n.color) || null);
|
|
435
|
+
let r = n.sourceColor || t;
|
|
436
|
+
n.color = r, On(n, r);
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
function kn(e) {
|
|
440
|
+
let t = Y(e);
|
|
441
|
+
for (; t?.parentId;) t = Y(t.parentId);
|
|
442
|
+
return t?.id ?? null;
|
|
443
|
+
}
|
|
444
|
+
function An() {
|
|
445
|
+
let e = U.value.filter((e) => !k.value.includes(e.id));
|
|
446
|
+
if (!j.value.length) {
|
|
447
|
+
W.value = e;
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
let t = j.value[j.value.length - 1], n = Y(t);
|
|
451
|
+
if (!n) {
|
|
452
|
+
j.value = [], W.value = e;
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
let r = kn(n.id);
|
|
456
|
+
if (r && k.value.includes(r)) {
|
|
457
|
+
j.value = [], W.value = e;
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
W.value = [n];
|
|
461
|
+
}
|
|
462
|
+
qe(() => un.value, () => {
|
|
463
|
+
U.value = l(un.value), Dn(U.value), An(), Xt.value += 1, Yt.value += 1;
|
|
464
|
+
}, {
|
|
465
|
+
deep: !0,
|
|
466
|
+
immediate: !0,
|
|
467
|
+
flush: "post"
|
|
468
|
+
});
|
|
469
|
+
let jn = w(null), Mn = w(null);
|
|
470
|
+
Be(() => {
|
|
471
|
+
Qt.value = !0, Pn();
|
|
472
|
+
});
|
|
473
|
+
let Nn = p(() => N.value.debug);
|
|
474
|
+
Be(() => {
|
|
475
|
+
Lt["chart-background"] && Nn.value && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
476
|
+
});
|
|
477
|
+
function Pn() {
|
|
478
|
+
if (a(D.dataset) && te({
|
|
479
|
+
componentName: "VueUiTreemap",
|
|
480
|
+
type: "dataset",
|
|
481
|
+
debug: Nn.value
|
|
482
|
+
}), Dn(U.value), a(D.dataset) || (dn.value = N.value.loading), N.value.responsive) {
|
|
483
|
+
let e = ye(() => {
|
|
484
|
+
let { width: e, height: t } = be({
|
|
485
|
+
chart: A.value,
|
|
486
|
+
title: z.value.title.text ? Wt.value : null,
|
|
487
|
+
legend: I.value.show ? Gt.value : null,
|
|
488
|
+
source: Kt.value,
|
|
489
|
+
noTitle: qt.value
|
|
490
|
+
});
|
|
491
|
+
requestAnimationFrame(() => {
|
|
492
|
+
Cn.value.width = e, Cn.value.height = t - 12;
|
|
493
|
+
});
|
|
494
|
+
});
|
|
495
|
+
jn.value && (Mn.value && jn.value.unobserve(Mn.value), jn.value.disconnect()), jn.value = new ResizeObserver(e), Mn.value = A.value.parentNode, jn.value.observe(Mn.value);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
ze(() => {
|
|
499
|
+
jn.value && (Mn.value && jn.value.unobserve(Mn.value), jn.value.disconnect());
|
|
500
|
+
});
|
|
501
|
+
let Fn = p(() => W.value.map((e, t) => ({
|
|
502
|
+
...e,
|
|
503
|
+
color: o(e.color) || Sn.value[t] || i[t] || i[t % i.length]
|
|
504
|
+
})).filter((e) => !k.value.includes(e.id))), In = p(() => U.value.filter((e) => !k.value.includes(e.id)).map((e) => e.value || 0).reduce((e, t) => e + t, 0)), Ln = p({
|
|
505
|
+
get() {
|
|
506
|
+
let e = [...Fn.value];
|
|
507
|
+
return R.value.sorted && (e = [...Fn.value].sort((e, t) => t.value - e.value)), e.map((e) => ({ ...e }));
|
|
508
|
+
},
|
|
509
|
+
set(e) {
|
|
510
|
+
return e;
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
function Rn(e, t) {
|
|
514
|
+
return e.value / t;
|
|
515
|
+
}
|
|
516
|
+
function zn(e, t, n) {
|
|
517
|
+
let r = R.value.rects.colorRatio - Rn(t, n);
|
|
518
|
+
return f(e, r < 0 ? 0 : r);
|
|
519
|
+
}
|
|
520
|
+
function Bn(e) {
|
|
521
|
+
return Array.isArray(e.children) && e.children.length > 0;
|
|
522
|
+
}
|
|
523
|
+
function Vn(e) {
|
|
524
|
+
return [...e].sort((e, t) => {
|
|
525
|
+
let n = Bn(e), r = Bn(t);
|
|
526
|
+
if (n !== r) return n - r;
|
|
527
|
+
let i = Number(e.value) || 0;
|
|
528
|
+
return (Number(t.value) || 0) - i;
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
function Hn(e, t, n, r, a) {
|
|
532
|
+
return Vn(e).map((e, s) => {
|
|
533
|
+
let c = e.sourceColor || o(e.color) || o(t) || Sn.value[s] || i[s] || i[s % i.length], l = e.sourceColor ? e.sourceColor : zn(c, e, r), u = Rn(e, r), d = a ?? e.parentId ?? e.id, f = Array.isArray(e.children) && e.children.length && e.children.reduce((e, t) => e + (Number(t.value) || 0), 0) || 1;
|
|
534
|
+
return {
|
|
535
|
+
...e,
|
|
536
|
+
color: l,
|
|
537
|
+
proportion: u,
|
|
538
|
+
parentName: n,
|
|
539
|
+
rootId: d,
|
|
540
|
+
children: Array.isArray(e.children) && e.children.length ? Hn(e.children, c, e.name, f, d) : void 0
|
|
541
|
+
};
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
function Un(e) {
|
|
545
|
+
let t = nr(e), n = Wn(e), r = t * .55, i = t * .55, a = t * 1.05, o = t * 1.05, s = t * .35, c = n ? a + o + s : t * .45, l = e.x0 + r, u = e.x1 - r, d = e.y0 + c, f = e.y1 - i;
|
|
546
|
+
return u <= l || f <= d ? null : {
|
|
547
|
+
x0: l,
|
|
548
|
+
y0: d,
|
|
549
|
+
x1: u,
|
|
550
|
+
y1: f
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
function Wn(e) {
|
|
554
|
+
return L.value.hideUnderProportion === 0 || Gn(e);
|
|
555
|
+
}
|
|
556
|
+
function Gn(e) {
|
|
557
|
+
let t = Number(L.value.hideUnderProportion);
|
|
558
|
+
return !Number.isFinite(t) || t <= 0 || e.proportion > t;
|
|
559
|
+
}
|
|
560
|
+
function Kn(e, t, n = 0, r = null) {
|
|
561
|
+
if (!Array.isArray(e) || !e.length) return [];
|
|
562
|
+
let i = e.map((e) => {
|
|
563
|
+
let { children: t, ...n } = e;
|
|
564
|
+
return { ...n };
|
|
565
|
+
}), a = new Map(e.map((e) => [e.id, Array.isArray(e.children) ? e.children : []])), o = new Map(e.map((e) => [e.id, e])), s = et(i, t), c = [];
|
|
566
|
+
for (let e of s) {
|
|
567
|
+
let t = a.get(e.id) || [], i = o.get(e.id), s = {
|
|
568
|
+
...e,
|
|
569
|
+
depth: n,
|
|
570
|
+
parentId: r ?? e.parentId ?? null,
|
|
571
|
+
color: i?.color ?? e.color ?? null,
|
|
572
|
+
children: t,
|
|
573
|
+
isVisibleNode: !0,
|
|
574
|
+
showLabel: Wn(e)
|
|
575
|
+
};
|
|
576
|
+
if (c.push(s), t.length) {
|
|
577
|
+
let r = Un(s);
|
|
578
|
+
r && c.push(...Kn(t, r, n + 1, e.id));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return c;
|
|
582
|
+
}
|
|
583
|
+
let qn = p(() => {
|
|
584
|
+
let e = W.value.length ? W.value : Ln.value, t = e.map((e) => Number(e.value) || 0).reduce((e, t) => e + t, 0) || 1;
|
|
585
|
+
return Kn(e.map((e, n) => {
|
|
586
|
+
let r = e.children ? e.children.reduce((e, t) => e + (Number(t.value) || 0), 0) : e.value, { children: a, ...s } = e, c = e.sourceColor || o(e.color) || En.value.get(e.id) || Sn.value[n] || i[n] || i[n % i.length], l = e.sourceColor ? e.sourceColor : zn(c, e, t);
|
|
587
|
+
return {
|
|
588
|
+
...s,
|
|
589
|
+
id: e.id || ne(),
|
|
590
|
+
parentId: e.parentId ?? null,
|
|
591
|
+
name: e.name,
|
|
592
|
+
value: e.value,
|
|
593
|
+
color: l,
|
|
594
|
+
proportion: (Number(e.value) || 0) / t,
|
|
595
|
+
children: Array.isArray(e.children) && e.children.length ? Hn(e.children, c, e.name, r || 1) : void 0
|
|
596
|
+
};
|
|
597
|
+
}), {
|
|
598
|
+
x0: H.value.left,
|
|
599
|
+
y0: H.value.top,
|
|
600
|
+
x1: H.value.left + H.value.width,
|
|
601
|
+
y1: H.value.top + H.value.height
|
|
602
|
+
});
|
|
603
|
+
}), G = p(() => qn.value);
|
|
604
|
+
function Jn(e) {
|
|
605
|
+
return (Z.value && Z.value.id === e.id ? R.value.rects.selected.strokeWidth : R.value.rects.strokeWidth) * Rr.value;
|
|
606
|
+
}
|
|
607
|
+
function K({ y0: e, y1: t }) {
|
|
608
|
+
return t - e <= 0 ? 1e-4 : Math.round((t - e) * 1e4) / 1e4;
|
|
609
|
+
}
|
|
610
|
+
function q({ x0: e, x1: t }) {
|
|
611
|
+
return t - e <= 0 ? 1e-4 : Math.round((t - e) * 1e4) / 1e4;
|
|
612
|
+
}
|
|
613
|
+
function Yn() {
|
|
614
|
+
let e = L.value, t = Number(e.minFontSize), n = Number(e.fontSize), r = Math.max(0, Math.min(Number.isFinite(t) ? t : 0, Number.isFinite(n) ? n : 0));
|
|
615
|
+
return {
|
|
616
|
+
lowerBound: r,
|
|
617
|
+
upperBound: Math.max(r, Number.isFinite(n) ? n : r)
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
function Xn(e) {
|
|
621
|
+
let t = Math.min(4, Math.max(e * .25, .5));
|
|
622
|
+
return {
|
|
623
|
+
paddingX: t,
|
|
624
|
+
paddingTop: t
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
function Zn(e, t) {
|
|
628
|
+
let { paddingX: n, paddingTop: r } = Xn(t), i = t * 1.1;
|
|
629
|
+
return {
|
|
630
|
+
x: e.x0 + n,
|
|
631
|
+
y: e.y0 + r,
|
|
632
|
+
width: Math.max(q(e) - n * 2, 0),
|
|
633
|
+
height: Math.max(K(e) - r * 2, 0),
|
|
634
|
+
lineHeight: i
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function Qn(e, t) {
|
|
638
|
+
return d(L.value.formatter, e.value, s({
|
|
639
|
+
p: L.value.prefix,
|
|
640
|
+
v: e.value,
|
|
641
|
+
s: L.value.suffix,
|
|
642
|
+
r: F.value.roundingValue
|
|
643
|
+
}), {
|
|
644
|
+
datapoint: e,
|
|
645
|
+
seriesIndex: t
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
function $n(e, t) {
|
|
649
|
+
let n = Qn(e, t);
|
|
650
|
+
return Array.isArray(e.children) && e.children.length ? [`${e.name} (${n})`] : [`${e.name}`, n].filter((e) => `${e}`.length);
|
|
651
|
+
}
|
|
652
|
+
function er(e, t, n) {
|
|
653
|
+
let r = $n(e, n), i = Zn(e, t);
|
|
654
|
+
return !r.length || i.width <= 0 || i.height <= 0 || r.length * i.lineHeight > i.height ? !1 : r.every((e, n) => hi(e, t, n === 0 ? 500 : 400) <= i.width);
|
|
655
|
+
}
|
|
656
|
+
function tr(e, t, n, r) {
|
|
657
|
+
let i = $n(e, t), a = Math.max(1, ...i.map((e) => String(e).length)), o = Math.min(18, Math.max(10, Math.ceil(a * .7))), s = Math.max(1, i.length), c = Math.max(q(e) - 1, 1e-4), l = Math.max(K(e) - 1, 1e-4), u = c / (o * .58), d = l / (s * 1.35);
|
|
658
|
+
return Math.max(n, Math.min(r, u, d));
|
|
659
|
+
}
|
|
660
|
+
function nr(e, t) {
|
|
661
|
+
let { lowerBound: n, upperBound: r } = Yn(), i = Math.max(1e-4, Math.min(q(e), K(e))), a = Math.max(n, Math.min(r, i * .9)), o = Math.min(a, tr(e, t, n, r));
|
|
662
|
+
if (er(e, o, t) || !er(e, n, t)) return o;
|
|
663
|
+
let s = n, c = o, l = n;
|
|
664
|
+
for (let n = 0; n < 8; n += 1) {
|
|
665
|
+
let n = (s + c) / 2;
|
|
666
|
+
er(e, n, t) ? (l = n, s = n) : c = n;
|
|
667
|
+
}
|
|
668
|
+
let u = Math.max(n, o * .7);
|
|
669
|
+
return l >= u ? l : o;
|
|
670
|
+
}
|
|
671
|
+
function rr(e) {
|
|
672
|
+
Ht.value = e, Ut.value += 1;
|
|
673
|
+
}
|
|
674
|
+
let J = p(() => ({
|
|
675
|
+
x: 0,
|
|
676
|
+
y: 0,
|
|
677
|
+
width: H.value.vbWidth,
|
|
678
|
+
height: H.value.vbHeight
|
|
679
|
+
}));
|
|
680
|
+
function Y(e, t = U.value) {
|
|
681
|
+
for (let n of t) {
|
|
682
|
+
if (n.id === e) return n;
|
|
683
|
+
if (n.children) {
|
|
684
|
+
let t = Y(e, n.children);
|
|
685
|
+
if (t) return t;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return null;
|
|
689
|
+
}
|
|
690
|
+
function ir(e) {
|
|
691
|
+
let t = [], n = Y(e);
|
|
692
|
+
for (; n && n.parentId;) {
|
|
693
|
+
let e = Y(n.parentId);
|
|
694
|
+
if (!e) break;
|
|
695
|
+
t.unshift(e.id), n = e;
|
|
696
|
+
}
|
|
697
|
+
return t;
|
|
698
|
+
}
|
|
699
|
+
let ar = p(() => j.value.length > 0);
|
|
700
|
+
function or() {
|
|
701
|
+
W.value = U.value.slice(), j.value = [], ct("selectDatapoint", void 0);
|
|
702
|
+
}
|
|
703
|
+
function sr() {
|
|
704
|
+
return j.value[j.value.length - 1] ?? null;
|
|
705
|
+
}
|
|
706
|
+
function cr(e, t, n) {
|
|
707
|
+
j.value = [...ir(e.id), e.id], W.value = [e], N.value.events.datapointClick && N.value.events.datapointClick({
|
|
708
|
+
datapoint: t ?? e,
|
|
709
|
+
seriesIndex: n
|
|
710
|
+
}), ct("selectDatapoint", t ?? e);
|
|
711
|
+
}
|
|
712
|
+
function lr(e, t) {
|
|
713
|
+
let n = sr();
|
|
714
|
+
if (!n) {
|
|
715
|
+
or();
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
let r = Y(n);
|
|
719
|
+
if (!r?.parentId) {
|
|
720
|
+
N.value.events.datapointClick && N.value.events.datapointClick({
|
|
721
|
+
datapoint: e,
|
|
722
|
+
seriesIndex: t
|
|
723
|
+
}), or();
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
let i = Y(r.parentId);
|
|
727
|
+
if (!i) {
|
|
728
|
+
or();
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
j.value = [...ir(i.id), i.id], W.value = [i], N.value.events.datapointClick && N.value.events.datapointClick({
|
|
732
|
+
datapoint: e,
|
|
733
|
+
seriesIndex: t
|
|
734
|
+
}), ct("selectDatapoint", e);
|
|
735
|
+
}
|
|
736
|
+
function ur(e, t) {
|
|
737
|
+
if (!e) {
|
|
738
|
+
or();
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
let n = Y(e.id);
|
|
742
|
+
if (n) {
|
|
743
|
+
if (sr() === n.id) {
|
|
744
|
+
lr(e, t);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
cr(n, e, t);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function dr(e) {
|
|
751
|
+
return e ? sr() === e.id : !1;
|
|
752
|
+
}
|
|
753
|
+
let X = p(() => {
|
|
754
|
+
let e = [{
|
|
755
|
+
id: null,
|
|
756
|
+
label: "All"
|
|
757
|
+
}];
|
|
758
|
+
if (j.value.length > 0) {
|
|
759
|
+
let t = Y(j.value[j.value.length - 1]), n = [];
|
|
760
|
+
for (; t;) n.unshift(t), t = t.parentId ? Y(t.parentId) : null;
|
|
761
|
+
for (let t of n) e.push({
|
|
762
|
+
id: t.id,
|
|
763
|
+
label: t.name,
|
|
764
|
+
node: t
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
return e;
|
|
768
|
+
}), Z = w(null), fr = p(() => U.value.map((e, t) => ({
|
|
769
|
+
...e,
|
|
770
|
+
color: o(e.color) || Sn.value[t] || i[t] || i[t % i.length],
|
|
771
|
+
shape: "square"
|
|
772
|
+
})).sort((e, t) => t.value - e.value).map((e, t) => {
|
|
773
|
+
let n = e.value / U.value.map((e) => e.value).reduce((e, t) => e + t, 0);
|
|
774
|
+
return {
|
|
775
|
+
...e,
|
|
776
|
+
proportion: n,
|
|
777
|
+
isSegregated: k.value.includes(e.id),
|
|
778
|
+
segregate: () => gr(e),
|
|
779
|
+
opacity: k.value.includes(e.id) ? .5 : 1,
|
|
780
|
+
display: `${e.name}${I.value.showPercentage || I.value.showValue ? ": " : ""}${I.value.showValue ? d(L.value.formatter, e.value, s({
|
|
781
|
+
p: L.value.prefix,
|
|
782
|
+
v: e.value,
|
|
783
|
+
s: L.value.suffix,
|
|
784
|
+
r: I.value.roundingValue
|
|
785
|
+
}), { datapoint: e }) : ""}${I.value.showPercentage ? k.value.includes(e.id) ? `${I.value.showValue ? " (" : ""}- %${I.value.showValue ? ")" : ""}` : `${I.value.showValue ? " (" : ""}${isNaN(e.value / In.value) ? "-" : (e.value / In.value * 100).toFixed(I.value.roundingPercentage)}%${I.value.showValue ? ")" : ""}` : ""}`
|
|
786
|
+
};
|
|
787
|
+
})), pr = p(() => ({
|
|
788
|
+
cy: "treemap-div-legend",
|
|
789
|
+
backgroundColor: I.value.backgroundColor,
|
|
790
|
+
color: I.value.color,
|
|
791
|
+
fontSize: I.value.fontSize,
|
|
792
|
+
paddingBottom: 12,
|
|
793
|
+
fontWeight: I.value.bold ? "bold" : ""
|
|
794
|
+
})), mr = p(() => k.value.length === fr.value.length);
|
|
795
|
+
function hr() {
|
|
796
|
+
k.value.length ? k.value = [] : fr.value.forEach((e) => {
|
|
797
|
+
k.value.push(e.id);
|
|
798
|
+
}), ct("selectLegend", U.value.filter((e) => !k.value.includes(e.id)));
|
|
799
|
+
}
|
|
800
|
+
function gr(e) {
|
|
801
|
+
Z.value = null, k.value.includes(e.id) ? k.value = k.value.filter((t) => t !== e.id) : k.value.length < D.dataset.length - 1 && k.value.push(e.id), ct("selectLegend", U.value.filter((e) => !k.value.includes(e.id)));
|
|
802
|
+
}
|
|
803
|
+
function _r(e) {
|
|
804
|
+
return U.value.length ? U.value.find((t) => t.name === e) || (Nn.value && console.warn(`VueUiTreemap - Series name not found "${e}"`), null) : (Nn.value && console.warn("VueUiTreemap - There are no series to show."), null);
|
|
805
|
+
}
|
|
806
|
+
function vr(e) {
|
|
807
|
+
let t = _r(e);
|
|
808
|
+
t !== null && k.value.includes(t.id) && gr({ id: t.id });
|
|
809
|
+
}
|
|
810
|
+
function yr(e) {
|
|
811
|
+
let t = _r(e);
|
|
812
|
+
t !== null && (k.value.includes(t.id) || gr({ id: t.id }));
|
|
813
|
+
}
|
|
814
|
+
function br({ datapoint: e, seriesIndex: t }) {
|
|
815
|
+
Z.value = null, Bt.value = !1, M.value = null, an.value = "pointer", N.value.events.datapointLeave && N.value.events.datapointLeave({
|
|
816
|
+
datapoint: e,
|
|
817
|
+
seriesIndex: t
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
let xr = S(null);
|
|
821
|
+
function Sr({ datapoint: e, seriesIndex: t, triggerMode: r = "pointer" }) {
|
|
822
|
+
if (mr.value || r === "pointer" && Mr.value) return;
|
|
823
|
+
N.value.events.datapointEnter && N.value.events.datapointEnter({
|
|
824
|
+
datapoint: e,
|
|
825
|
+
seriesIndex: t
|
|
826
|
+
}), M.value = t, an.value = r, Z.value = e, xr.value = {
|
|
827
|
+
datapoint: e,
|
|
828
|
+
seriesIndex: t,
|
|
829
|
+
config: N.value,
|
|
830
|
+
series: Fn.value
|
|
831
|
+
};
|
|
832
|
+
let i = F.value.customFormat;
|
|
833
|
+
if (n(i) && ee(() => i({
|
|
834
|
+
seriesIndex: t,
|
|
835
|
+
datapoint: e,
|
|
836
|
+
series: Fn.value,
|
|
837
|
+
config: N.value
|
|
838
|
+
}))) Vt.value = i({
|
|
839
|
+
seriesIndex: t,
|
|
840
|
+
datapoint: e,
|
|
841
|
+
series: Fn.value,
|
|
842
|
+
config: N.value
|
|
843
|
+
});
|
|
844
|
+
else {
|
|
845
|
+
let n = "";
|
|
846
|
+
n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, n += `<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="${e.color}"/></svg>`, n += `<b>${d(L.value.formatter, e.value, s({
|
|
847
|
+
p: L.value.prefix,
|
|
848
|
+
v: e.value,
|
|
849
|
+
s: L.value.suffix,
|
|
850
|
+
r: F.value.roundingValue
|
|
851
|
+
}), {
|
|
852
|
+
datapoint: e,
|
|
853
|
+
seriesIndex: t
|
|
854
|
+
})}</b>`, Vt.value = `<div>${n}</div>`;
|
|
855
|
+
}
|
|
856
|
+
Bt.value = !0;
|
|
857
|
+
}
|
|
858
|
+
let Q = p(() => ({
|
|
859
|
+
head: G.value.map((e) => ({
|
|
860
|
+
name: e.name,
|
|
861
|
+
color: e.color
|
|
862
|
+
})),
|
|
863
|
+
body: G.value.map((e) => e.value)
|
|
864
|
+
}));
|
|
865
|
+
function Cr(e = null) {
|
|
866
|
+
Le(() => {
|
|
867
|
+
let n = Q.value.head.map((e, t) => [
|
|
868
|
+
[e.name],
|
|
869
|
+
[Q.value.body[t]],
|
|
870
|
+
[isNaN(Q.value.body[t] / In.value) ? "-" : Q.value.body[t] / In.value * 100]
|
|
871
|
+
]), i = [
|
|
872
|
+
[z.value.title.text],
|
|
873
|
+
[z.value.title.subtitle.text],
|
|
874
|
+
[
|
|
875
|
+
[""],
|
|
876
|
+
["val"],
|
|
877
|
+
["%"]
|
|
878
|
+
]
|
|
879
|
+
].concat(n), a = r(i);
|
|
880
|
+
e ? e(a) : t({
|
|
881
|
+
csvContent: a,
|
|
882
|
+
title: z.value.title.text || "vue-ui-treemap"
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
let wr = p(() => {
|
|
887
|
+
let e = [
|
|
888
|
+
N.value.table.columnNames.series,
|
|
889
|
+
N.value.table.columnNames.value,
|
|
890
|
+
N.value.table.columnNames.percentage
|
|
891
|
+
], t = Q.value.head.map((e, t) => {
|
|
892
|
+
let n = d(L.value.formatter, Q.value.body[t], s({
|
|
893
|
+
p: L.value.prefix,
|
|
894
|
+
v: Q.value.body[t],
|
|
895
|
+
s: L.value.suffix,
|
|
896
|
+
r: N.value.table.td.roundingValue
|
|
897
|
+
}));
|
|
898
|
+
return [
|
|
899
|
+
{
|
|
900
|
+
color: e.color,
|
|
901
|
+
name: e.name,
|
|
902
|
+
shape: "square"
|
|
903
|
+
},
|
|
904
|
+
n,
|
|
905
|
+
isNaN(Q.value.body[t] / In.value) ? "-" : s({
|
|
906
|
+
v: Q.value.body[t] / In.value * 100,
|
|
907
|
+
s: "%",
|
|
908
|
+
r: N.value.table.td.roundingPercentage
|
|
909
|
+
})
|
|
910
|
+
];
|
|
911
|
+
}), n = {
|
|
912
|
+
th: {
|
|
913
|
+
backgroundColor: N.value.table.th.backgroundColor,
|
|
914
|
+
color: N.value.table.th.color,
|
|
915
|
+
outline: N.value.table.th.outline
|
|
916
|
+
},
|
|
917
|
+
td: {
|
|
918
|
+
backgroundColor: N.value.table.td.backgroundColor,
|
|
919
|
+
color: N.value.table.td.color,
|
|
920
|
+
outline: N.value.table.td.outline
|
|
921
|
+
},
|
|
922
|
+
breakpoint: N.value.table.responsiveBreakpoint
|
|
923
|
+
};
|
|
924
|
+
return {
|
|
925
|
+
colNames: [N.value.table.columnNames.series, N.value.table.columnNames.value],
|
|
926
|
+
head: e,
|
|
927
|
+
body: t,
|
|
928
|
+
config: n
|
|
929
|
+
};
|
|
930
|
+
});
|
|
931
|
+
function Tr() {
|
|
932
|
+
return G.value;
|
|
933
|
+
}
|
|
934
|
+
function Er() {
|
|
935
|
+
V.value.showTable = !V.value.showTable;
|
|
936
|
+
}
|
|
937
|
+
function Dr() {
|
|
938
|
+
V.value.showTooltip = !V.value.showTooltip;
|
|
939
|
+
}
|
|
940
|
+
function Or() {
|
|
941
|
+
V.value.showZoom = !V.value.showZoom;
|
|
942
|
+
}
|
|
943
|
+
let kr = S(!1);
|
|
944
|
+
function Ar() {
|
|
945
|
+
kr.value = !kr.value;
|
|
946
|
+
}
|
|
947
|
+
let jr = p(() => !kr.value && V.value.showZoom), Mr = S(null), Nr = S(!1), { viewBox: $, resetZoom: Pr, isZoom: Fr, setInitialViewBox: Ir, scale: Lr } = Oe(hn, {
|
|
948
|
+
x: J.value.x,
|
|
949
|
+
y: J.value.y,
|
|
950
|
+
width: Math.max(10, J.value.width),
|
|
951
|
+
height: Math.max(10, J.value.height)
|
|
952
|
+
}, 1, jr), Rr = p(() => 1 / Lr.value), zr = p(() => Math.min(1, L.value.fontSizeZoomFactor / Math.max(Lr.value, 1e-4))), Br = p(() => `scale(${zr.value})`), Vr = p(() => V.value.showZoom || Fr.value);
|
|
953
|
+
qe([
|
|
954
|
+
() => J.value.x,
|
|
955
|
+
() => J.value.y,
|
|
956
|
+
() => J.value.width,
|
|
957
|
+
() => J.value.height
|
|
958
|
+
], () => {
|
|
959
|
+
Le(() => {
|
|
960
|
+
Ir({
|
|
961
|
+
x: J.value.x,
|
|
962
|
+
y: J.value.y,
|
|
963
|
+
width: Math.max(10, J.value.width),
|
|
964
|
+
height: Math.max(10, J.value.height)
|
|
965
|
+
});
|
|
966
|
+
});
|
|
967
|
+
}, { immediate: !0 });
|
|
968
|
+
function Hr(e) {
|
|
969
|
+
jr.value && (e.button === void 0 || e.button === 0) && (Mr.value = {
|
|
970
|
+
x: e.clientX,
|
|
971
|
+
y: e.clientY
|
|
972
|
+
}, Nr.value = !1);
|
|
973
|
+
}
|
|
974
|
+
function Ur(e) {
|
|
975
|
+
if (!jr.value || !Mr.value) return;
|
|
976
|
+
let t = e.clientX - Mr.value.x, n = e.clientY - Mr.value.y;
|
|
977
|
+
Math.hypot(t, n) > It && (Nr.value = !0);
|
|
978
|
+
}
|
|
979
|
+
function Wr() {
|
|
980
|
+
Mr.value = null, Nr.value && window.setTimeout(() => {
|
|
981
|
+
Nr.value = !1;
|
|
982
|
+
}, 0);
|
|
983
|
+
}
|
|
984
|
+
function Gr(e, t) {
|
|
985
|
+
Nr.value || ur(e, t);
|
|
986
|
+
}
|
|
987
|
+
let Kr = S(null);
|
|
988
|
+
function qr(e) {
|
|
989
|
+
Kr.value = e;
|
|
990
|
+
}
|
|
991
|
+
function Jr() {
|
|
992
|
+
Kr.value = null;
|
|
993
|
+
}
|
|
994
|
+
async function Yr({ scale: e = 2 } = {}) {
|
|
995
|
+
if (!A.value) return;
|
|
996
|
+
let { width: t, height: n } = A.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ge({
|
|
997
|
+
domElement: A.value,
|
|
998
|
+
base64: !0,
|
|
999
|
+
img: !0,
|
|
1000
|
+
scale: e
|
|
1001
|
+
});
|
|
1002
|
+
return {
|
|
1003
|
+
imageUri: i,
|
|
1004
|
+
base64: a,
|
|
1005
|
+
title: z.value.title.text,
|
|
1006
|
+
width: t,
|
|
1007
|
+
height: n,
|
|
1008
|
+
aspectRatio: r
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
let Xr = p(() => {
|
|
1012
|
+
let e = N.value.table.useDialog && !N.value.table.show, t = V.value.showTable;
|
|
1013
|
+
return {
|
|
1014
|
+
component: e ? it : $e,
|
|
1015
|
+
title: `${z.value.title.text}${z.value.title.subtitle.text ? `: ${z.value.title.subtitle.text}` : ""}`,
|
|
1016
|
+
props: e ? {
|
|
1017
|
+
backgroundColor: N.value.table.th.backgroundColor,
|
|
1018
|
+
color: N.value.table.th.color,
|
|
1019
|
+
headerColor: N.value.table.th.color,
|
|
1020
|
+
headerBg: N.value.table.th.backgroundColor,
|
|
1021
|
+
isFullscreen: Ht.value,
|
|
1022
|
+
fullscreenParent: A.value,
|
|
1023
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1024
|
+
isCursorPointer: B.value
|
|
1025
|
+
} : {
|
|
1026
|
+
hideDetails: !0,
|
|
1027
|
+
config: {
|
|
1028
|
+
open: t,
|
|
1029
|
+
maxHeight: 1e4,
|
|
1030
|
+
body: {
|
|
1031
|
+
backgroundColor: z.value.backgroundColor,
|
|
1032
|
+
color: z.value.color
|
|
1033
|
+
},
|
|
1034
|
+
head: {
|
|
1035
|
+
backgroundColor: z.value.backgroundColor,
|
|
1036
|
+
color: z.value.color
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
});
|
|
1042
|
+
qe(() => V.value.showTable, (e) => {
|
|
1043
|
+
N.value.table.show || (e && N.value.table.useDialog && $t.value ? $t.value.open() : "close" in $t.value && $t.value.close());
|
|
1044
|
+
});
|
|
1045
|
+
function Zr() {
|
|
1046
|
+
V.value.showTable = !1, en.value && en.value.setTableIconState(!1);
|
|
1047
|
+
}
|
|
1048
|
+
let Qr = p(() => fr.value.map((e) => ({
|
|
1049
|
+
...e,
|
|
1050
|
+
name: e.display
|
|
1051
|
+
}))), $r = p(() => z.value.backgroundColor), ei = p(() => z.value.title), { isCallbackImaging: ti, isCallbackSvg: ni, generateSvg: ri, onGenerateImage: ii } = me({
|
|
1052
|
+
svg: hn,
|
|
1053
|
+
title: ei,
|
|
1054
|
+
legend: I,
|
|
1055
|
+
legendItems: Qr,
|
|
1056
|
+
backgroundColor: $r,
|
|
1057
|
+
getSvgCallback: () => N.value.userOptions.callbacks.svg,
|
|
1058
|
+
generateImage: bn
|
|
1059
|
+
});
|
|
1060
|
+
function ai(e, t) {
|
|
1061
|
+
let n = nr(e, t), { paddingX: r, paddingTop: i } = Xn(n);
|
|
1062
|
+
return {
|
|
1063
|
+
fontSize: n,
|
|
1064
|
+
paddingX: r,
|
|
1065
|
+
paddingTop: i,
|
|
1066
|
+
lineHeight: n * 1.1
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
function oi(e) {
|
|
1070
|
+
return re(e.color ?? z.value.backgroundColor);
|
|
1071
|
+
}
|
|
1072
|
+
function si({ availableHeight: e, lineHeight: t, lineIndex: n }) {
|
|
1073
|
+
if (n === 0) return Infinity;
|
|
1074
|
+
let r = e / (n + 1);
|
|
1075
|
+
return r < 1e-4 ? -Infinity : t <= 0 ? Infinity : r / t;
|
|
1076
|
+
}
|
|
1077
|
+
function ci() {
|
|
1078
|
+
return Number(L.value.hideUnderProportion) === 0;
|
|
1079
|
+
}
|
|
1080
|
+
function li(e) {
|
|
1081
|
+
let t = zr.value;
|
|
1082
|
+
return e.alwaysShowAllLines ? `scale(${Math.min(t, e.allLinesScaleCap)})` : Br.value;
|
|
1083
|
+
}
|
|
1084
|
+
function ui({ rect: e, seriesIndex: t }) {
|
|
1085
|
+
if (!e || !L.value.showDefaultLabels || !Wn(e)) return null;
|
|
1086
|
+
let { fontSize: n, paddingX: r, paddingTop: i, lineHeight: a } = ai(e, t), o = oi(e), s = $n(e, t).map((e) => String(e ?? "")), c = Zn(e, n);
|
|
1087
|
+
if (!s.some(Boolean) || c.width <= 0 || c.height <= 0) return null;
|
|
1088
|
+
let l = ci(), u = l ? Math.max(1e-4, Math.min(1, c.height / Math.max(s.length * a, 1e-4))) : 1, d = `treemap_clip_${O.value}_${e.id}`, f = e.x0, ee = e.y0, te = Math.max(q(e), 0), ne = Math.max(K(e), 0);
|
|
1089
|
+
return {
|
|
1090
|
+
key: di(e),
|
|
1091
|
+
clipId: d,
|
|
1092
|
+
clipX: f,
|
|
1093
|
+
clipY: ee,
|
|
1094
|
+
clipWidth: te,
|
|
1095
|
+
clipHeight: ne,
|
|
1096
|
+
translate: `translate(${e.x0}, ${e.y0})`,
|
|
1097
|
+
alwaysShowAllLines: l,
|
|
1098
|
+
allLinesScaleCap: u,
|
|
1099
|
+
lines: s.map((t, s) => ({
|
|
1100
|
+
key: `${e.id}_${s}`,
|
|
1101
|
+
text: t,
|
|
1102
|
+
x: r,
|
|
1103
|
+
y: i + a * s,
|
|
1104
|
+
maxZoomFactor: si({
|
|
1105
|
+
availableHeight: c.height,
|
|
1106
|
+
lineHeight: a,
|
|
1107
|
+
lineIndex: s
|
|
1108
|
+
}),
|
|
1109
|
+
fill: o,
|
|
1110
|
+
fontSize: n,
|
|
1111
|
+
fontFamily: N.value.style.fontFamily,
|
|
1112
|
+
fontWeight: s === 0 ? 500 : 400
|
|
1113
|
+
}))
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
function di(e) {
|
|
1117
|
+
return `${e.id}`;
|
|
1118
|
+
}
|
|
1119
|
+
let fi = p(() => Lt.rect || ln.value || !L.value.showDefaultLabels || mr.value ? [] : G.value.map((e, t) => e.showLabel ? ui({
|
|
1120
|
+
rect: e,
|
|
1121
|
+
seriesIndex: t
|
|
1122
|
+
}) : null).filter(Boolean)), pi;
|
|
1123
|
+
function mi() {
|
|
1124
|
+
return typeof document > "u" ? null : (pi ||= document.createElement("canvas"), pi.getContext("2d"));
|
|
1125
|
+
}
|
|
1126
|
+
function hi(e, t, n = 400) {
|
|
1127
|
+
let r = mi();
|
|
1128
|
+
return r ? (r.font = `${n} ${t}px ${N.value.style.fontFamily}`, r.measureText(String(e)).width) : e.length * t * .6;
|
|
1129
|
+
}
|
|
1130
|
+
function gi(e) {
|
|
1131
|
+
let t = R.value.rects.borderRadius, n = q(e), r = K(e);
|
|
1132
|
+
return Math.min(t, Math.min(n, r) / 6);
|
|
1133
|
+
}
|
|
1134
|
+
async function _i() {
|
|
1135
|
+
if (ct("copyAlt", {
|
|
1136
|
+
config: N.value,
|
|
1137
|
+
dataset: G.value
|
|
1138
|
+
}), !N.value.userOptions.callbacks.altCopy) {
|
|
1139
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
await Promise.resolve(N.value.userOptions.callbacks.altCopy({
|
|
1143
|
+
config: N.value,
|
|
1144
|
+
dataset: G.value
|
|
1145
|
+
}));
|
|
1146
|
+
}
|
|
1147
|
+
function vi() {
|
|
1148
|
+
M.value = null, on.value = !0;
|
|
1149
|
+
}
|
|
1150
|
+
function yi() {
|
|
1151
|
+
M.value = null, an.value = "pointer", Bt.value = !1, Z.value = null, on.value = !1;
|
|
1152
|
+
}
|
|
1153
|
+
function bi(e) {
|
|
1154
|
+
if (!hn.value || kr.value || document.activeElement !== hn.value || !G.value.length || mr.value) return;
|
|
1155
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1156
|
+
if (!t && !n && !r && !i) return;
|
|
1157
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1158
|
+
M.value = null, an.value = "pointer", Bt.value = !1, Z.value = null;
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
if (r) {
|
|
1162
|
+
if (M.value === null) return;
|
|
1163
|
+
let e = G.value[M.value];
|
|
1164
|
+
if (!e) return;
|
|
1165
|
+
ur(e, M.value);
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
let a = M.value, o = Z.value ? G.value.findIndex((e) => e.id === Z.value.id) : null, s = a !== null && a >= 0 && a < G.value.length, c = o !== null && o >= 0 && o < G.value.length;
|
|
1169
|
+
s ? n ? (a += 1, a >= G.value.length && (a = 0)) : t && (--a, a < 0 && (a = G.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= G.value.length && (a = 0), a < 0 && (a = G.value.length - 1)) : a = n ? 0 : G.value.length - 1;
|
|
1170
|
+
let l = G.value[a];
|
|
1171
|
+
l && (xi(a), Sr({
|
|
1172
|
+
datapoint: l,
|
|
1173
|
+
seriesIndex: a,
|
|
1174
|
+
triggerMode: "keyboard"
|
|
1175
|
+
}));
|
|
1176
|
+
}
|
|
1177
|
+
function xi(e) {
|
|
1178
|
+
if (!Number.isFinite(e) || !hn.value) return;
|
|
1179
|
+
let t = G.value[e];
|
|
1180
|
+
if (!t) return;
|
|
1181
|
+
let n = t.x0 + q(t) / 2, r = t.y0 + K(t) / 2, i = hn.value.getBoundingClientRect();
|
|
1182
|
+
rn.value = {
|
|
1183
|
+
x: i.left + (n - $.value.x) / $.value.width * i.width,
|
|
1184
|
+
y: i.top + (r - $.value.y) / $.value.height * i.height
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
let Si = p(() => ({
|
|
1188
|
+
headers: wr.value?.colNames ?? [],
|
|
1189
|
+
rows: wr.value?.body ?? []
|
|
1190
|
+
})), Ci = p(() => z.value.color);
|
|
1191
|
+
return ve({
|
|
1192
|
+
getData: Tr,
|
|
1193
|
+
getImage: Yr,
|
|
1194
|
+
generateCsv: Cr,
|
|
1195
|
+
generateImage: bn,
|
|
1196
|
+
generateSvg: ri,
|
|
1197
|
+
generatePdf: yn,
|
|
1198
|
+
hideSeries: yr,
|
|
1199
|
+
showSeries: vr,
|
|
1200
|
+
toggleTable: Er,
|
|
1201
|
+
toggleTooltip: Dr,
|
|
1202
|
+
toggleZoom: Or,
|
|
1203
|
+
toggleAnnotator: Ar,
|
|
1204
|
+
toggleFullscreen: rr,
|
|
1205
|
+
resetZoom: Pr,
|
|
1206
|
+
copyAlt: _i
|
|
1207
|
+
}), (e, t) => (x(), g("div", {
|
|
1208
|
+
ref_key: "treemapChart",
|
|
1209
|
+
ref: A,
|
|
1210
|
+
class: Re(`vue-data-ui-component vue-ui-treemap ${Ht.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${N.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1211
|
+
style: b(`font-family:${N.value.style.fontFamily};width:100%; ${N.value.responsive ? "height: 100%;" : ""} text-align:center;background:${z.value.backgroundColor}`),
|
|
1212
|
+
id: `treemap_${O.value}`,
|
|
1213
|
+
onMouseenter: t[3] ||= () => T(pn)(!0),
|
|
1214
|
+
onMouseleave: t[4] ||= () => T(pn)(!1)
|
|
1215
|
+
}, [
|
|
1216
|
+
_("div", {
|
|
1217
|
+
id: `chart-instructions-${O.value}`,
|
|
1218
|
+
class: "sr-only"
|
|
1219
|
+
}, [_("p", null, Ue(N.value.a11y.translations.keyboardNavigation), 1)], 8, ut),
|
|
1220
|
+
Si.value?.rows?.length ? (x(), m(we, {
|
|
1221
|
+
key: 0,
|
|
1222
|
+
uid: O.value,
|
|
1223
|
+
head: Si.value.headers,
|
|
1224
|
+
body: Si.value.rows,
|
|
1225
|
+
notice: N.value.a11y.translations.tableAvailable,
|
|
1226
|
+
caption: N.value.a11y.translations.tableCaption
|
|
1227
|
+
}, null, 8, [
|
|
1228
|
+
"uid",
|
|
1229
|
+
"head",
|
|
1230
|
+
"body",
|
|
1231
|
+
"notice",
|
|
1232
|
+
"caption"
|
|
1233
|
+
])) : h("", !0),
|
|
1234
|
+
P.value.buttons.annotator ? (x(), m(T(Qe), {
|
|
1235
|
+
key: 1,
|
|
1236
|
+
svgRef: T(hn),
|
|
1237
|
+
backgroundColor: z.value.backgroundColor,
|
|
1238
|
+
color: z.value.color,
|
|
1239
|
+
active: kr.value,
|
|
1240
|
+
isCursorPointer: B.value,
|
|
1241
|
+
palette: P.value.annotatorPalette,
|
|
1242
|
+
onClose: Ar
|
|
1243
|
+
}, {
|
|
1244
|
+
"annotator-action-close": E(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1245
|
+
"annotator-action-color": E(({ color: t }) => [C(e.$slots, "annotator-action-color", y(v({ color: t })), void 0, !0)]),
|
|
1246
|
+
"annotator-action-draw": E(({ mode: t }) => [C(e.$slots, "annotator-action-draw", y(v({ mode: t })), void 0, !0)]),
|
|
1247
|
+
"annotator-action-undo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", y(v({ disabled: t })), void 0, !0)]),
|
|
1248
|
+
"annotator-action-redo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", y(v({ disabled: t })), void 0, !0)]),
|
|
1249
|
+
"annotator-action-delete": E(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", y(v({ disabled: t })), void 0, !0)]),
|
|
1250
|
+
_: 3
|
|
1251
|
+
}, 8, [
|
|
1252
|
+
"svgRef",
|
|
1253
|
+
"backgroundColor",
|
|
1254
|
+
"color",
|
|
1255
|
+
"active",
|
|
1256
|
+
"isCursorPointer",
|
|
1257
|
+
"palette"
|
|
1258
|
+
])) : h("", !0),
|
|
1259
|
+
xn.value ? (x(), g("div", {
|
|
1260
|
+
key: 2,
|
|
1261
|
+
ref_key: "noTitle",
|
|
1262
|
+
ref: qt,
|
|
1263
|
+
class: "vue-data-ui-no-title-space",
|
|
1264
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1265
|
+
}, null, 512)) : h("", !0),
|
|
1266
|
+
z.value.title.text ? (x(), g("div", {
|
|
1267
|
+
key: 3,
|
|
1268
|
+
ref_key: "chartTitle",
|
|
1269
|
+
ref: Wt,
|
|
1270
|
+
style: b(`width:100%;background:${z.value.backgroundColor};padding-bottom:6px`)
|
|
1271
|
+
}, [(x(), m(_e, {
|
|
1272
|
+
key: `title_${Jt.value}`,
|
|
1273
|
+
config: {
|
|
1274
|
+
title: {
|
|
1275
|
+
cy: "treemap-div-title",
|
|
1276
|
+
...z.value.title
|
|
1277
|
+
},
|
|
1278
|
+
subtitle: {
|
|
1279
|
+
cy: "treemap-div-subtitle",
|
|
1280
|
+
...z.value.title.subtitle
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}, null, 8, ["config"]))], 4)) : h("", !0),
|
|
1284
|
+
_("div", { id: `legend-top-${O.value}` }, null, 8, dt),
|
|
1285
|
+
P.value.show && Rt.value && (T(mn) || T(fn)) ? (x(), m(T(nt), {
|
|
1286
|
+
ref_key: "userOptionsRef",
|
|
1287
|
+
ref: en,
|
|
1288
|
+
key: `user_option_${Ut.value}`,
|
|
1289
|
+
backgroundColor: z.value.backgroundColor,
|
|
1290
|
+
color: z.value.color,
|
|
1291
|
+
isPrinting: T(_n),
|
|
1292
|
+
isImaging: T(vn),
|
|
1293
|
+
uid: O.value,
|
|
1294
|
+
hasTooltip: P.value.buttons.tooltip && F.value.show,
|
|
1295
|
+
hasPdf: P.value.buttons.pdf,
|
|
1296
|
+
hasXls: P.value.buttons.csv,
|
|
1297
|
+
hasImg: P.value.buttons.img,
|
|
1298
|
+
hasSvg: P.value.buttons.svg,
|
|
1299
|
+
hasTable: P.value.buttons.table,
|
|
1300
|
+
hasFullscreen: P.value.buttons.fullscreen,
|
|
1301
|
+
hasAltCopy: P.value.buttons.altCopy,
|
|
1302
|
+
isFullscreen: Ht.value,
|
|
1303
|
+
isTooltip: V.value.showTooltip,
|
|
1304
|
+
titles: { ...P.value.buttonTitles },
|
|
1305
|
+
chartElement: A.value,
|
|
1306
|
+
position: P.value.position,
|
|
1307
|
+
hasAnnotator: P.value.buttons.annotator,
|
|
1308
|
+
isAnnotation: kr.value,
|
|
1309
|
+
callbacks: P.value.callbacks,
|
|
1310
|
+
printScale: P.value.print.scale,
|
|
1311
|
+
tableDialog: N.value.table.useDialog,
|
|
1312
|
+
isCursorPointer: B.value,
|
|
1313
|
+
hasZoom: P.value.buttons.zoom,
|
|
1314
|
+
isZoom: V.value.showZoom,
|
|
1315
|
+
onToggleFullscreen: rr,
|
|
1316
|
+
onGeneratePdf: T(yn),
|
|
1317
|
+
onGenerateCsv: Cr,
|
|
1318
|
+
onGenerateImage: T(ii),
|
|
1319
|
+
onGenerateSvg: T(ri),
|
|
1320
|
+
onToggleTable: Er,
|
|
1321
|
+
onToggleTooltip: Dr,
|
|
1322
|
+
onToggleAnnotator: Ar,
|
|
1323
|
+
onToggleZoom: Or,
|
|
1324
|
+
onCopyAlt: _i,
|
|
1325
|
+
style: b({ visibility: T(mn) ? T(fn) ? "visible" : "hidden" : "visible" })
|
|
1326
|
+
}, Me({ _: 2 }, [
|
|
1327
|
+
e.$slots.menuIcon ? {
|
|
1328
|
+
name: "menuIcon",
|
|
1329
|
+
fn: E(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", y(v({
|
|
1330
|
+
isOpen: t,
|
|
1331
|
+
color: n
|
|
1332
|
+
})), void 0, !0)]),
|
|
1333
|
+
key: "0"
|
|
1334
|
+
} : void 0,
|
|
1335
|
+
e.$slots.optionTooltip ? {
|
|
1336
|
+
name: "optionTooltip",
|
|
1337
|
+
fn: E(() => [C(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1338
|
+
key: "1"
|
|
1339
|
+
} : void 0,
|
|
1340
|
+
e.$slots.optionPdf ? {
|
|
1341
|
+
name: "optionPdf",
|
|
1342
|
+
fn: E(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1343
|
+
key: "2"
|
|
1344
|
+
} : void 0,
|
|
1345
|
+
e.$slots.optionCsv ? {
|
|
1346
|
+
name: "optionCsv",
|
|
1347
|
+
fn: E(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1348
|
+
key: "3"
|
|
1349
|
+
} : void 0,
|
|
1350
|
+
e.$slots.optionImg ? {
|
|
1351
|
+
name: "optionImg",
|
|
1352
|
+
fn: E(() => [C(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1353
|
+
key: "4"
|
|
1354
|
+
} : void 0,
|
|
1355
|
+
e.$slots.optionSvg ? {
|
|
1356
|
+
name: "optionSvg",
|
|
1357
|
+
fn: E(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1358
|
+
key: "5"
|
|
1359
|
+
} : void 0,
|
|
1360
|
+
e.$slots.optionTable ? {
|
|
1361
|
+
name: "optionTable",
|
|
1362
|
+
fn: E(() => [C(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1363
|
+
key: "6"
|
|
1364
|
+
} : void 0,
|
|
1365
|
+
e.$slots.optionFullscreen ? {
|
|
1366
|
+
name: "optionFullscreen",
|
|
1367
|
+
fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", y(v({
|
|
1368
|
+
toggleFullscreen: t,
|
|
1369
|
+
isFullscreen: n
|
|
1370
|
+
})), void 0, !0)]),
|
|
1371
|
+
key: "7"
|
|
1372
|
+
} : void 0,
|
|
1373
|
+
e.$slots.optionAnnotator ? {
|
|
1374
|
+
name: "optionAnnotator",
|
|
1375
|
+
fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", y(v({
|
|
1376
|
+
toggleAnnotator: t,
|
|
1377
|
+
isAnnotator: n
|
|
1378
|
+
})), void 0, !0)]),
|
|
1379
|
+
key: "8"
|
|
1380
|
+
} : void 0,
|
|
1381
|
+
e.$slots.optionZoom ? {
|
|
1382
|
+
name: "optionZoom",
|
|
1383
|
+
fn: E(({ toggleZoom: t, isZoomLocked: n }) => [C(e.$slots, "optionZoom", y(v({
|
|
1384
|
+
toggleZoom: t,
|
|
1385
|
+
isZoomLocked: n
|
|
1386
|
+
})), void 0, !0)]),
|
|
1387
|
+
key: "9"
|
|
1388
|
+
} : void 0,
|
|
1389
|
+
e.$slots.optionAltCopy ? {
|
|
1390
|
+
name: "optionAltCopy",
|
|
1391
|
+
fn: E(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", y(v({ altCopy: t })), void 0, !0)]),
|
|
1392
|
+
key: "10"
|
|
1393
|
+
} : void 0,
|
|
1394
|
+
e.$slots["custom-menu-before"] ? {
|
|
1395
|
+
name: "custom-menu-before",
|
|
1396
|
+
fn: E(() => [C(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1397
|
+
key: "11"
|
|
1398
|
+
} : void 0,
|
|
1399
|
+
e.$slots["custom-menu-after"] ? {
|
|
1400
|
+
name: "custom-menu-after",
|
|
1401
|
+
fn: E(() => [C(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1402
|
+
key: "12"
|
|
1403
|
+
} : void 0
|
|
1404
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : h("", !0),
|
|
1405
|
+
X.value.length > 1 ? (x(), g("nav", {
|
|
1406
|
+
key: 5,
|
|
1407
|
+
class: "vue-ui-treemap-breadcrumbs",
|
|
1408
|
+
"data-dom-to-png-ignore": "",
|
|
1409
|
+
ref_key: "breadcrumbsNav",
|
|
1410
|
+
ref: Zt
|
|
1411
|
+
}, [(x(!0), g(Ae, null, Ve(X.value, (n, r) => (x(), g("span", {
|
|
1412
|
+
role: "button",
|
|
1413
|
+
tabindex: r < X.value.length - 1 ? 0 : void 0,
|
|
1414
|
+
key: n.id || "root",
|
|
1415
|
+
onClick: (e) => r === X.value.length - 1 ? () => {} : ur(n.node),
|
|
1416
|
+
onKeydown: [Je(Ye((e) => r === X.value.length - 1 ? void 0 : ur(n.node), ["prevent"]), ["enter"]), Je(Ye((e) => r === X.value.length - 1 ? void 0 : ur(n.node), ["prevent"]), ["space"])],
|
|
1417
|
+
class: "vue-ui-treemap-crumb",
|
|
1418
|
+
"data-last-crumb": r === X.value.length - 1,
|
|
1419
|
+
style: b({
|
|
1420
|
+
color: z.value.color,
|
|
1421
|
+
cursor: B.value ? "pointer" : "default"
|
|
1422
|
+
}),
|
|
1423
|
+
onMouseenter: (e) => qr(r),
|
|
1424
|
+
onMouseleave: Jr,
|
|
1425
|
+
onFocus: (e) => qr(r),
|
|
1426
|
+
onBlur: Jr
|
|
1427
|
+
}, [_("span", pt, [_("span", mt, [C(e.$slots, "breadcrumb-label", Ie({ ref_for: !0 }, {
|
|
1428
|
+
crumb: n,
|
|
1429
|
+
isRoot: r === 0,
|
|
1430
|
+
isFocus: Kr.value === r
|
|
1431
|
+
}), () => [r === 0 ? (x(), g("div", ht, [Pe(xe, {
|
|
1432
|
+
name: Kr.value === 0 ? "homeFilled" : "home",
|
|
1433
|
+
stroke: z.value.color
|
|
1434
|
+
}, null, 8, ["name", "stroke"])])) : (x(), g(Ae, { key: 1 }, [Ne(Ue(n.label), 1)], 64))], !0)]), r < X.value.length - 1 ? (x(), g("span", gt, [C(e.$slots, "breadcrumb-arrow", {}, () => [t[5] ||= Ne(" › ", -1)], !0)])) : h("", !0)])], 44, ft))), 128))], 512)) : h("", !0),
|
|
1435
|
+
_("div", _t, [
|
|
1436
|
+
(x(), g("svg", {
|
|
1437
|
+
ref_key: "svgRef",
|
|
1438
|
+
ref: hn,
|
|
1439
|
+
xmlns: T(ie),
|
|
1440
|
+
"aria-describedby": `chart-instructions-${O.value}`,
|
|
1441
|
+
class: Re({
|
|
1442
|
+
"vue-data-ui-fullscreen--on": Ht.value,
|
|
1443
|
+
"vue-data-ui-fulscreen--off": !Ht.value,
|
|
1444
|
+
"vue-data-ui-zoom-plus": !ar.value,
|
|
1445
|
+
"vue-data-ui-zoom-minus": ar.value,
|
|
1446
|
+
"vue-data-ui-no-transition": !T(sn),
|
|
1447
|
+
loading: T(ln)
|
|
1448
|
+
}),
|
|
1449
|
+
viewBox: `${T($).x} ${T($).y} ${T($).width <= 0 ? 10 : T($).width} ${T($).height <= 0 ? 10 : T($).height}`,
|
|
1450
|
+
style: b(`max-width:100%; overflow:${Vr.value ? "hidden" : "visible"}; background:transparent;color:${z.value.color}`),
|
|
1451
|
+
tabindex: "0",
|
|
1452
|
+
onFocus: vi,
|
|
1453
|
+
onBlur: yi,
|
|
1454
|
+
onKeydown: bi,
|
|
1455
|
+
onPointerdown: Hr,
|
|
1456
|
+
onPointermove: Ur,
|
|
1457
|
+
onPointerup: Wr,
|
|
1458
|
+
onPointercancel: Wr,
|
|
1459
|
+
onPointerleave: Wr
|
|
1460
|
+
}, [
|
|
1461
|
+
Pe(T(rt)),
|
|
1462
|
+
(x(!0), g(Ae, null, Ve(G.value, (e, t) => (x(), g("g", { key: `tgrad_${e.id}` }, [R.value.rects.gradient.show ? (x(), g("defs", yt, [Pe(Se, {
|
|
1463
|
+
t: "radial",
|
|
1464
|
+
id: `tgrad_${e.id}`,
|
|
1465
|
+
gradientTransform: "translate(-1, -1.000001) scale(2, 2)",
|
|
1466
|
+
stops: [[
|
|
1467
|
+
"18%",
|
|
1468
|
+
e.color,
|
|
1469
|
+
1
|
|
1470
|
+
], [
|
|
1471
|
+
"100%",
|
|
1472
|
+
T(f)(e.color, R.value.rects.gradient.intensity / 100),
|
|
1473
|
+
1
|
|
1474
|
+
]]
|
|
1475
|
+
}, null, 8, ["id", "stops"])])) : h("", !0)]))), 128)),
|
|
1476
|
+
_("g", null, [
|
|
1477
|
+
(x(!0), g(Ae, null, Ve(G.value, (e, t) => (x(), g("g", { key: `rect_${e.id}_${e.depth}` }, [_("rect", {
|
|
1478
|
+
x: e.x0,
|
|
1479
|
+
y: e.y0,
|
|
1480
|
+
height: K(e),
|
|
1481
|
+
width: q(e),
|
|
1482
|
+
fill: zt.value ? e.color ?? z.value.backgroundColor : R.value.rects.gradient.show ? mr.value ? z.value.backgroundColor : `url(#tgrad_${e.id})` : e.color ?? z.value.backgroundColor,
|
|
1483
|
+
rx: T(Lr) > 1 ? gi(e) * Rr.value : gi(e),
|
|
1484
|
+
stroke: Z.value && Z.value.id === e.id ? R.value.rects.selected.stroke : R.value.rects.stroke,
|
|
1485
|
+
"stroke-width": Jn(e),
|
|
1486
|
+
onClick: Ye((n) => Gr(e, t), ["stop"]),
|
|
1487
|
+
onMouseenter: () => Sr({
|
|
1488
|
+
datapoint: e,
|
|
1489
|
+
seriesIndex: t,
|
|
1490
|
+
triggerMode: "pointer"
|
|
1491
|
+
}),
|
|
1492
|
+
onMouseleave: (n) => br({
|
|
1493
|
+
datapoint: e,
|
|
1494
|
+
seriesIndex: t
|
|
1495
|
+
}),
|
|
1496
|
+
style: b(`opacity:${Z.value ? Z.value.id === e.id ? 1 : R.value.rects.selected.unselectedOpacity : 1}`),
|
|
1497
|
+
class: Re([
|
|
1498
|
+
"vue-ui-treemap-rect",
|
|
1499
|
+
T(sn) ? "vue-data-ui-transition" : "",
|
|
1500
|
+
dr(e) ? "vue-data-ui-zoom-minus" : "vue-data-ui-zoom-plus"
|
|
1501
|
+
])
|
|
1502
|
+
}, null, 46, bt)]))), 128)),
|
|
1503
|
+
(x(!0), g(Ae, null, Ve(fi.value, (e) => (x(), g("g", {
|
|
1504
|
+
key: e.key,
|
|
1505
|
+
style: { "pointer-events": "none" }
|
|
1506
|
+
}, [_("defs", null, [_("clipPath", {
|
|
1507
|
+
id: e.clipId,
|
|
1508
|
+
clipPathUnits: "userSpaceOnUse"
|
|
1509
|
+
}, [_("rect", {
|
|
1510
|
+
class: Re({ "vue-data-ui-transition": T(sn) }),
|
|
1511
|
+
x: e.clipX,
|
|
1512
|
+
y: e.clipY,
|
|
1513
|
+
width: e.clipWidth,
|
|
1514
|
+
height: e.clipHeight
|
|
1515
|
+
}, null, 10, St)], 8, xt)]), _("g", { "clip-path": `url(#${e.clipId})` }, [_("g", { transform: e.translate }, [_("g", {
|
|
1516
|
+
class: Re({ "vue-data-ui-transition": T(sn) }),
|
|
1517
|
+
transform: li(e)
|
|
1518
|
+
}, [(x(!0), g(Ae, null, Ve(e.lines, (t) => (x(), g(Ae, { key: t.key }, [t.text && (e.alwaysShowAllLines || zr.value <= t.maxZoomFactor) ? (x(), g("text", {
|
|
1519
|
+
key: 0,
|
|
1520
|
+
x: t.x,
|
|
1521
|
+
y: t.y,
|
|
1522
|
+
fill: t.fill,
|
|
1523
|
+
"font-size": t.fontSize,
|
|
1524
|
+
"font-family": t.fontFamily,
|
|
1525
|
+
"font-weight": t.fontWeight,
|
|
1526
|
+
class: Re({ "vue-data-ui-transition": T(sn) }),
|
|
1527
|
+
"text-anchor": "start",
|
|
1528
|
+
"dominant-baseline": "text-before-edge"
|
|
1529
|
+
}, Ue(t.text), 11, Et)) : h("", !0)], 64))), 128))], 10, Tt)], 8, wt)], 8, Ct)]))), 128)),
|
|
1530
|
+
e.$slots.rect ? (x(), g("g", Dt, [(x(!0), g(Ae, null, Ve(G.value, (t, n) => (x(), g("g", { key: `slot_${t.id}_${t.depth}` }, [(x(), g("foreignObject", {
|
|
1531
|
+
x: t.x0,
|
|
1532
|
+
y: t.y0,
|
|
1533
|
+
height: K(t),
|
|
1534
|
+
width: q(t),
|
|
1535
|
+
class: "vue-ui-treemap-cell-foreignObject",
|
|
1536
|
+
style: {
|
|
1537
|
+
"pointer-events": "none",
|
|
1538
|
+
overflow: "hidden"
|
|
1539
|
+
}
|
|
1540
|
+
}, [_("div", kt, [T(ln) ? h("", !0) : C(e.$slots, "rect", Ie({ ref_for: !0 }, {
|
|
1541
|
+
rect: {
|
|
1542
|
+
...t,
|
|
1543
|
+
height: K(t),
|
|
1544
|
+
width: q(t),
|
|
1545
|
+
isSelected: !Z.value || Z.value.id === t.id
|
|
1546
|
+
},
|
|
1547
|
+
shouldShow: Gn(t) || ar.value,
|
|
1548
|
+
fontSize: nr(t, n),
|
|
1549
|
+
isZoom: ar.value,
|
|
1550
|
+
textColor: T(re)(t.color)
|
|
1551
|
+
}), void 0, !0, 0)])], 8, Ot))]))), 128))])) : h("", !0)
|
|
1552
|
+
]),
|
|
1553
|
+
C(e.$slots, "svg", y(v({
|
|
1554
|
+
svg: H.value,
|
|
1555
|
+
isZoom: ar.value,
|
|
1556
|
+
rect: Z.value,
|
|
1557
|
+
config: N.value,
|
|
1558
|
+
isPrintingImg: T(_n) || T(vn) || T(ti),
|
|
1559
|
+
isPrintingSvg: T(ni)
|
|
1560
|
+
})), void 0, !0)
|
|
1561
|
+
], 46, vt)),
|
|
1562
|
+
T(Fr) ? (x(), g("div", At, [C(e.$slots, "reset-action", { reset: T(Pr) }, () => [_("button", {
|
|
1563
|
+
"data-cy-reset": "",
|
|
1564
|
+
tabindex: "0",
|
|
1565
|
+
role: "button",
|
|
1566
|
+
class: "vue-data-ui-refresh-button",
|
|
1567
|
+
style: b({
|
|
1568
|
+
background: z.value.backgroundColor,
|
|
1569
|
+
cursor: B.value ? "pointer" : "default"
|
|
1570
|
+
}),
|
|
1571
|
+
onClick: t[0] ||= (e) => T(Pr)(!0)
|
|
1572
|
+
}, [Pe(xe, {
|
|
1573
|
+
name: "refresh",
|
|
1574
|
+
stroke: z.value.color
|
|
1575
|
+
}, null, 8, ["stroke"])], 4)], !0)])) : h("", !0),
|
|
1576
|
+
e.$slots.hint ? (x(), g("div", jt, [C(e.$slots, "hint", y(v({
|
|
1577
|
+
hint: N.value.a11y.translations.keyboardNavigation,
|
|
1578
|
+
isVisible: on.value
|
|
1579
|
+
})), void 0, !0)])) : h("", !0)
|
|
1580
|
+
]),
|
|
1581
|
+
e.$slots.watermark ? (x(), g("div", Mt, [C(e.$slots, "watermark", y(v({ isPrinting: T(_n) || T(vn) || T(ti) || T(ni) })), void 0, !0)])) : h("", !0),
|
|
1582
|
+
_("div", { id: `legend-bottom-${O.value}` }, null, 8, Nt),
|
|
1583
|
+
Qt.value && (I.value.show || e.$slots.legend) ? (x(), m(je, {
|
|
1584
|
+
key: 7,
|
|
1585
|
+
to: I.value.position === "top" ? `#legend-top-${O.value}` : `#legend-bottom-${O.value}`
|
|
1586
|
+
}, [_("div", {
|
|
1587
|
+
ref_key: "chartLegend",
|
|
1588
|
+
ref: Gt
|
|
1589
|
+
}, [C(e.$slots, "legend", { legend: fr.value }, () => [I.value.show ? (x(), m(De, {
|
|
1590
|
+
key: `legend_${Xt.value}`,
|
|
1591
|
+
legendSet: fr.value,
|
|
1592
|
+
config: pr.value,
|
|
1593
|
+
id: `treemap_legend_${O.value}`,
|
|
1594
|
+
isCursorPointer: B.value,
|
|
1595
|
+
onClickMarker: t[1] ||= ({ legend: e }) => gr(e)
|
|
1596
|
+
}, {
|
|
1597
|
+
item: E(({ legend: e, index: t }) => [T(ln) ? h("", !0) : (x(), g("div", {
|
|
1598
|
+
key: 0,
|
|
1599
|
+
onClick: (t) => gr(e),
|
|
1600
|
+
style: b(`opacity:${k.value.includes(e.id) ? .5 : 1}`)
|
|
1601
|
+
}, Ue(e.display), 13, Pt))]),
|
|
1602
|
+
legendToggle: E(() => [fr.value.length > 2 && I.value.selectAllToggle.show && !T(ln) ? (x(), m(Ce, {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
backgroundColor: I.value.selectAllToggle.backgroundColor,
|
|
1605
|
+
color: I.value.selectAllToggle.color,
|
|
1606
|
+
fontSize: I.value.fontSize,
|
|
1607
|
+
checked: k.value.length > 0,
|
|
1608
|
+
isCursorPointer: B.value,
|
|
1609
|
+
onToggle: hr
|
|
1610
|
+
}, null, 8, [
|
|
1611
|
+
"backgroundColor",
|
|
1612
|
+
"color",
|
|
1613
|
+
"fontSize",
|
|
1614
|
+
"checked",
|
|
1615
|
+
"isCursorPointer"
|
|
1616
|
+
])) : h("", !0)]),
|
|
1617
|
+
_: 1
|
|
1618
|
+
}, 8, [
|
|
1619
|
+
"legendSet",
|
|
1620
|
+
"config",
|
|
1621
|
+
"id",
|
|
1622
|
+
"isCursorPointer"
|
|
1623
|
+
])) : h("", !0)], !0)], 512)], 8, ["to"])) : h("", !0),
|
|
1624
|
+
e.$slots.source ? (x(), g("div", {
|
|
1625
|
+
key: 8,
|
|
1626
|
+
ref_key: "source",
|
|
1627
|
+
ref: Kt,
|
|
1628
|
+
dir: "auto"
|
|
1629
|
+
}, [C(e.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
|
|
1630
|
+
Pe(T(tt), {
|
|
1631
|
+
teleportTo: F.value.teleportTo,
|
|
1632
|
+
show: V.value.showTooltip && Bt.value,
|
|
1633
|
+
backgroundColor: F.value.backgroundColor,
|
|
1634
|
+
color: F.value.color,
|
|
1635
|
+
fontSize: F.value.fontSize,
|
|
1636
|
+
borderRadius: F.value.borderRadius,
|
|
1637
|
+
borderColor: F.value.borderColor,
|
|
1638
|
+
borderWidth: F.value.borderWidth,
|
|
1639
|
+
backgroundOpacity: F.value.backgroundOpacity,
|
|
1640
|
+
position: F.value.position,
|
|
1641
|
+
offsetX: F.value.offsetX,
|
|
1642
|
+
offsetY: F.value.offsetY,
|
|
1643
|
+
parent: A.value,
|
|
1644
|
+
content: Vt.value,
|
|
1645
|
+
isFullscreen: Ht.value,
|
|
1646
|
+
isCustom: T(n)(F.value.customFormat),
|
|
1647
|
+
smooth: F.value.smooth,
|
|
1648
|
+
backdropFilter: F.value.backdropFilter,
|
|
1649
|
+
smoothForce: F.value.smoothForce,
|
|
1650
|
+
smoothSnapThreshold: F.value.smoothSnapThreshold,
|
|
1651
|
+
isA11yMode: an.value === "keyboard",
|
|
1652
|
+
a11yPosition: rn.value
|
|
1653
|
+
}, {
|
|
1654
|
+
"tooltip-before": E(() => [C(e.$slots, "tooltip-before", y(v({ ...xr.value })), void 0, !0)]),
|
|
1655
|
+
tooltip: E(() => [C(e.$slots, "tooltip", y(v({ ...xr.value })), void 0, !0)]),
|
|
1656
|
+
"tooltip-after": E(() => [C(e.$slots, "tooltip-after", y(v({ ...xr.value })), void 0, !0)]),
|
|
1657
|
+
_: 3
|
|
1658
|
+
}, 8, [
|
|
1659
|
+
"teleportTo",
|
|
1660
|
+
"show",
|
|
1661
|
+
"backgroundColor",
|
|
1662
|
+
"color",
|
|
1663
|
+
"fontSize",
|
|
1664
|
+
"borderRadius",
|
|
1665
|
+
"borderColor",
|
|
1666
|
+
"borderWidth",
|
|
1667
|
+
"backgroundOpacity",
|
|
1668
|
+
"position",
|
|
1669
|
+
"offsetX",
|
|
1670
|
+
"offsetY",
|
|
1671
|
+
"parent",
|
|
1672
|
+
"content",
|
|
1673
|
+
"isFullscreen",
|
|
1674
|
+
"isCustom",
|
|
1675
|
+
"smooth",
|
|
1676
|
+
"backdropFilter",
|
|
1677
|
+
"smoothForce",
|
|
1678
|
+
"smoothSnapThreshold",
|
|
1679
|
+
"isA11yMode",
|
|
1680
|
+
"a11yPosition"
|
|
1681
|
+
]),
|
|
1682
|
+
Rt.value && P.value.buttons.table ? (x(), m(He(Xr.value.component), Ie({ key: 9 }, Xr.value.props, {
|
|
1683
|
+
ref_key: "tableUnit",
|
|
1684
|
+
ref: $t,
|
|
1685
|
+
onClose: Zr
|
|
1686
|
+
}), Me({
|
|
1687
|
+
content: E(() => [(x(), m(T(Ze), {
|
|
1688
|
+
key: `table_${Yt.value}`,
|
|
1689
|
+
colNames: wr.value.colNames,
|
|
1690
|
+
head: wr.value.head,
|
|
1691
|
+
body: wr.value.body,
|
|
1692
|
+
config: wr.value.config,
|
|
1693
|
+
title: N.value.table.useDialog ? "" : Xr.value.title,
|
|
1694
|
+
withCloseButton: !N.value.table.useDialog,
|
|
1695
|
+
isCursorPointer: B.value,
|
|
1696
|
+
onClose: Zr
|
|
1697
|
+
}, {
|
|
1698
|
+
th: E(({ th: e }) => [_("div", Ft, Ue(e), 1)]),
|
|
1699
|
+
td: E(({ td: e }) => [Ne(Ue(e.name || e), 1)]),
|
|
1700
|
+
_: 1
|
|
1701
|
+
}, 8, [
|
|
1702
|
+
"colNames",
|
|
1703
|
+
"head",
|
|
1704
|
+
"body",
|
|
1705
|
+
"config",
|
|
1706
|
+
"title",
|
|
1707
|
+
"withCloseButton",
|
|
1708
|
+
"isCursorPointer"
|
|
1709
|
+
]))]),
|
|
1710
|
+
_: 2
|
|
1711
|
+
}, [N.value.table.useDialog ? {
|
|
1712
|
+
name: "title",
|
|
1713
|
+
fn: E(() => [Ne(Ue(Xr.value.title), 1)]),
|
|
1714
|
+
key: "0"
|
|
1715
|
+
} : void 0, N.value.table.useDialog ? {
|
|
1716
|
+
name: "actions",
|
|
1717
|
+
fn: E(() => [_("button", {
|
|
1718
|
+
tabindex: "0",
|
|
1719
|
+
class: "vue-ui-user-options-button",
|
|
1720
|
+
onClick: t[2] ||= (e) => Cr(P.value.callbacks.csv),
|
|
1721
|
+
style: b({ cursor: B.value ? "pointer" : "default" })
|
|
1722
|
+
}, [Pe(xe, {
|
|
1723
|
+
name: "fileCsv",
|
|
1724
|
+
stroke: Xr.value.props.color
|
|
1725
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1726
|
+
key: "1"
|
|
1727
|
+
} : void 0]), 1040)) : h("", !0),
|
|
1728
|
+
C(e.$slots, "skeleton", {}, () => [T(ln) ? (x(), m(de, { key: 0 })) : h("", !0)], !0)
|
|
1729
|
+
], 46, lt));
|
|
1730
|
+
}
|
|
1731
|
+
}, [["__scopeId", "data-v-5aaac293"]]);
|
|
1732
|
+
//#endregion
|
|
1733
|
+
export { ct as n, Lt as t };
|