vue-data-ui 3.15.12 → 3.16.1
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 +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- package/dist/components/arrow.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-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-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/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -0,0 +1,1723 @@
|
|
|
1
|
+
import { defineAsyncComponent as Ne, useSlots as Fl, onMounted as No, computed as k, ref as b, shallowRef as Ce, toRefs as Ll, watch as Be, onBeforeUnmount as Nl, openBlock as v, createElementBlock as A, unref as y, normalizeStyle as xe, normalizeClass as Zt, createElementVNode as E, toDisplayString as tt, createBlock as he, createCommentVNode as N, withCtx as M, renderSlot as C, normalizeProps as X, guardReactiveProps as j, createSlots as Bo, Fragment as ot, renderList as ht, withKeys as Ro, withModifiers as Jt, mergeProps as ft, createVNode as pt, createTextVNode as gt, Teleport as Bl, resolveDynamicComponent as Rl, nextTick as Do } from "vue";
|
|
2
|
+
import { j as yt, t as zo, m as Dl, p as G, n as zl, o as Vo, q as Vl, s as lt, k as mt, l as at, X as Qt, x as bt, W as wt, T as Ho, a0 as Hl, a1 as El, az as kt, aA as eo, U as Wl } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { t as Ul, u as Yl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Xl } from "./useConfig-DO94Aj5s.js";
|
|
5
|
+
import { u as jl, B as Kl } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
+
import { u as ql } from "./usePrinter-CEpYU3r5.js";
|
|
7
|
+
import { u as Gl } from "./useSvgExport-ByUukOZt.js";
|
|
8
|
+
import { u as to } from "./useNestedProp-Bf5XFbs8.js";
|
|
9
|
+
import { u as Zl } from "./useThemeCheck-D1ZYXUwG.js";
|
|
10
|
+
import { u as Jl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
+
import { u as Ql } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
+
import ea from "./img-LXxMLmCg.js";
|
|
13
|
+
import ta from "./Title-BeMKE1cj.js";
|
|
14
|
+
import oa from "./vue_ui_treemap-D9-AIkT-.js";
|
|
15
|
+
import la from "./Legend-CS7Xo5LK.js";
|
|
16
|
+
import Eo from "./BaseIcon-Cb3zzG6s.js";
|
|
17
|
+
import { A as aa } from "./A11yDataTable-KcVAX2cP.js";
|
|
18
|
+
import { B as na } from "./BaseLegendToggle-BQVIawmA.js";
|
|
19
|
+
import { _ as sa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
20
|
+
function Wo(r, p) {
|
|
21
|
+
const h = r.length;
|
|
22
|
+
if (h === 0)
|
|
23
|
+
throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);
|
|
24
|
+
{
|
|
25
|
+
let g = 1 / 0, f = -1 / 0, x = 0;
|
|
26
|
+
for (let P = 0; P < h; P += 1) {
|
|
27
|
+
const S = r[P].normalizedValue;
|
|
28
|
+
S < g && (g = S), S > f && (f = S), x += S;
|
|
29
|
+
}
|
|
30
|
+
return Math.max(
|
|
31
|
+
p ** 2 * f / x ** 2,
|
|
32
|
+
x ** 2 / (p ** 2 * g)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function Uo(r) {
|
|
37
|
+
const { xOffset: p, yOffset: h, width: g, height: f } = r;
|
|
38
|
+
return {
|
|
39
|
+
x0: p,
|
|
40
|
+
y0: h,
|
|
41
|
+
x1: p + g,
|
|
42
|
+
y1: h + f
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function ua(r, p, h) {
|
|
46
|
+
if (r.length === 0)
|
|
47
|
+
return !0;
|
|
48
|
+
{
|
|
49
|
+
const g = r.concat(p), f = Wo(
|
|
50
|
+
r,
|
|
51
|
+
h
|
|
52
|
+
), x = Wo(g, h);
|
|
53
|
+
return f >= x;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function ra(r) {
|
|
57
|
+
const p = [], h = r.length;
|
|
58
|
+
for (let g = 0; g < h; g += 1) {
|
|
59
|
+
const f = r[g], x = f.length;
|
|
60
|
+
for (let m = 0; m < x; m += 1)
|
|
61
|
+
p.push(f[m]);
|
|
62
|
+
}
|
|
63
|
+
return p;
|
|
64
|
+
}
|
|
65
|
+
function Yo(r, p) {
|
|
66
|
+
const h = {
|
|
67
|
+
...p,
|
|
68
|
+
children: r
|
|
69
|
+
};
|
|
70
|
+
return jo(h);
|
|
71
|
+
}
|
|
72
|
+
function ia(r) {
|
|
73
|
+
return (r.x1 - r.x0) * (r.y1 - r.y0);
|
|
74
|
+
}
|
|
75
|
+
function Xo(r, p) {
|
|
76
|
+
const { width: h, height: g, xOffset: f, yOffset: x } = oo(p), m = r.length, P = r.map(($) => $.normalizedValue || 0).reduce(($, V) => $ + V, 0), S = P / g, $e = P / h;
|
|
77
|
+
let ue = f, fe = x;
|
|
78
|
+
const Z = [];
|
|
79
|
+
if (h >= g) {
|
|
80
|
+
for (let $ = 0; $ < m; $ += 1) {
|
|
81
|
+
const V = r[$], pe = fe + V.normalizedValue / S, Te = {
|
|
82
|
+
x0: ue,
|
|
83
|
+
y0: fe,
|
|
84
|
+
x1: ue + S,
|
|
85
|
+
y1: pe
|
|
86
|
+
}, ge = Object.assign({}, V, Te);
|
|
87
|
+
fe = pe, Z.push(ge);
|
|
88
|
+
}
|
|
89
|
+
return Z;
|
|
90
|
+
} else {
|
|
91
|
+
for (let $ = 0; $ < m; $ += 1) {
|
|
92
|
+
const V = r[$], pe = ue + V.normalizedValue / $e, Te = {
|
|
93
|
+
x0: ue,
|
|
94
|
+
y0: fe,
|
|
95
|
+
x1: pe,
|
|
96
|
+
y1: fe + $e
|
|
97
|
+
}, ge = Object.assign({}, V, Te);
|
|
98
|
+
ue = pe, Z.push(ge);
|
|
99
|
+
}
|
|
100
|
+
return Z;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function ca(r) {
|
|
104
|
+
const p = oo(r), h = p.width, g = p.height;
|
|
105
|
+
return Math.min(h, g);
|
|
106
|
+
}
|
|
107
|
+
function da(r, p) {
|
|
108
|
+
const h = r.length, g = r.map((S) => S.value ?? 0).reduce((S, $e) => S + $e, 0), f = p / g, x = [];
|
|
109
|
+
let m, P;
|
|
110
|
+
for (let S = 0; S < h; S += 1)
|
|
111
|
+
P = r[S], m = Object.assign({}, P, {
|
|
112
|
+
normalizedValue: P.value * (f || 0)
|
|
113
|
+
}), x.push(m);
|
|
114
|
+
return x;
|
|
115
|
+
}
|
|
116
|
+
function oo(r) {
|
|
117
|
+
const { x0: p, y0: h, x1: g, y1: f } = r;
|
|
118
|
+
return {
|
|
119
|
+
xOffset: p,
|
|
120
|
+
yOffset: h,
|
|
121
|
+
width: g - p,
|
|
122
|
+
height: f - h
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function va(r, p, h, g) {
|
|
126
|
+
let f = r, x = p, m = h, P = g;
|
|
127
|
+
for (; ; ) {
|
|
128
|
+
const S = f.length;
|
|
129
|
+
if (S === 0) {
|
|
130
|
+
const Z = Xo(x, m);
|
|
131
|
+
return P.concat(Z);
|
|
132
|
+
}
|
|
133
|
+
const $e = ca(m), ue = f[0], fe = f.slice(1, S);
|
|
134
|
+
if (ua(x, ue, $e)) {
|
|
135
|
+
const Z = x.concat(ue);
|
|
136
|
+
f = fe, x = Z, m = m, P = P;
|
|
137
|
+
} else {
|
|
138
|
+
const Z = x.length;
|
|
139
|
+
let $ = 0;
|
|
140
|
+
for (let ge = 0; ge < Z; ge += 1)
|
|
141
|
+
$ += x[ge].normalizedValue;
|
|
142
|
+
const V = ha(m, $), pe = Xo(x, m), Te = P.concat(pe);
|
|
143
|
+
f = f, x = [], m = V, P = Te;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function jo(r) {
|
|
148
|
+
if (typeof r.children > "u" || !r.children.length)
|
|
149
|
+
return [r];
|
|
150
|
+
{
|
|
151
|
+
const p = da(
|
|
152
|
+
r.children,
|
|
153
|
+
ia(r)
|
|
154
|
+
), h = va(p, [], r, []), g = h.length, f = [];
|
|
155
|
+
for (let m = 0; m < g; m += 1)
|
|
156
|
+
f.push(jo(h[m]));
|
|
157
|
+
return ra(f);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function ha(r, p) {
|
|
161
|
+
const { width: h, height: g, xOffset: f, yOffset: x } = oo(r);
|
|
162
|
+
if (h >= g) {
|
|
163
|
+
const m = p / g, P = h - m, S = {
|
|
164
|
+
xOffset: f + m,
|
|
165
|
+
yOffset: x,
|
|
166
|
+
width: P,
|
|
167
|
+
height: g
|
|
168
|
+
};
|
|
169
|
+
return Uo(S);
|
|
170
|
+
} else {
|
|
171
|
+
const m = p / h, P = g - m, S = {
|
|
172
|
+
xOffset: f,
|
|
173
|
+
yOffset: x + m,
|
|
174
|
+
width: h,
|
|
175
|
+
height: P
|
|
176
|
+
};
|
|
177
|
+
return Uo(S);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const fa = ["id"], pa = ["id"], ga = ["id"], ya = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], ma = { class: "vue-ui-treemap-crumb-unit" }, ba = { class: "vue-ui-treemap-crumb-unit-label" }, wa = {
|
|
181
|
+
key: 0,
|
|
182
|
+
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
183
|
+
}, ka = {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
186
|
+
}, Ca = { style: { position: "relative" } }, xa = ["xmlns", "aria-describedby", "viewBox"], $a = { key: 0 }, Ta = ["id"], Sa = ["stop-color"], Aa = ["stop-color"], Ma = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], Pa = ["width", "height", "x", "y"], Oa = ["innerHTML"], _a = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Ia = ["innerHTML"], Fa = ["x", "y", "height", "width"], La = {
|
|
187
|
+
style: {
|
|
188
|
+
width: "100%",
|
|
189
|
+
height: "100%"
|
|
190
|
+
},
|
|
191
|
+
class: "vue-ui-treemap-cell"
|
|
192
|
+
}, Na = {
|
|
193
|
+
key: 0,
|
|
194
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
195
|
+
"data-dom-to-png-ignore": "",
|
|
196
|
+
"aria-hidden": "true"
|
|
197
|
+
}, Ba = {
|
|
198
|
+
key: 6,
|
|
199
|
+
class: "vue-data-ui-watermark"
|
|
200
|
+
}, Ra = ["id"], Da = ["onClick"], za = ["innerHTML"], Va = {
|
|
201
|
+
__name: "vue-ui-treemap",
|
|
202
|
+
props: {
|
|
203
|
+
config: {
|
|
204
|
+
type: Object,
|
|
205
|
+
default() {
|
|
206
|
+
return {};
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
dataset: {
|
|
210
|
+
type: Array,
|
|
211
|
+
default() {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
emits: ["selectLegend", "selectDatapoint", "copyAlt"],
|
|
217
|
+
setup(r, { expose: p, emit: h }) {
|
|
218
|
+
const g = Ne(() => import("./DataTable-DT2kIdQ6.js")), f = Ne(() => import("./PenAndPaper-Ct3qJ4lA.js")), x = Ne(() => import("./vue-ui-accordion-nvggWcGN.js")), m = Ne(() => import("./Tooltip-Bf-kM3_A.js")), P = Ne(() => import("./UserOptions-rW2fRf3V.js")), S = Ne(() => import("./PackageVersion-DPO-OOVI.js")), $e = Ne(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_treemap: ue } = Xl(), { isThemeValid: fe, warnInvalidTheme: Z } = Zl(), $ = r, V = h, pe = Fl();
|
|
219
|
+
No(() => {
|
|
220
|
+
pe["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
221
|
+
});
|
|
222
|
+
const Te = k(() => !!$.dataset && $.dataset.length), ge = k(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), le = b(yt()), Ue = b(!1), Ct = b(""), Ie = b(!1), lo = b(0), B = b([]), re = Ce(null), ao = Ce(null), no = Ce(null), so = Ce(null), uo = Ce(null), ro = b(0), xt = b(0), $t = b(0), I = b([]), Tt = b(null), io = b(!1), Ye = b(null), St = b(null), Xe = b(null), K = b(/* @__PURE__ */ new Map()), nt = b(!1), st = b(!1), ye = b(null), co = b({ x: 0, y: 0 }), je = b("pointer"), At = b(!1), t = b(Ot()), Se = k(() => t.value.userOptions.useCursorPointer), Ko = k(() => zo({
|
|
223
|
+
defaultConfig: {
|
|
224
|
+
userOptions: { show: !1 },
|
|
225
|
+
style: {
|
|
226
|
+
chart: {
|
|
227
|
+
backgroundColor: "#999999",
|
|
228
|
+
layout: {
|
|
229
|
+
labels: {
|
|
230
|
+
showDefaultLabels: !1
|
|
231
|
+
},
|
|
232
|
+
rects: {
|
|
233
|
+
stroke: "#6A6A6A"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
legend: {
|
|
237
|
+
backgroundColor: "transparent"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
userConfig: t.value.skeletonConfig ?? {}
|
|
243
|
+
})), { loading: Ae, FINAL_DATASET: Mt, manualLoading: qo } = jl({
|
|
244
|
+
...Ll($),
|
|
245
|
+
FINAL_CONFIG: t,
|
|
246
|
+
prepareConfig: Ot,
|
|
247
|
+
skeletonDataset: $.config?.skeletonDataset ?? [
|
|
248
|
+
{
|
|
249
|
+
name: "_",
|
|
250
|
+
value: 53,
|
|
251
|
+
color: "#CACACA90",
|
|
252
|
+
children: [
|
|
253
|
+
{ name: "_", value: 21 },
|
|
254
|
+
{ name: "_", value: 13 },
|
|
255
|
+
{ name: "_", value: 8 },
|
|
256
|
+
{ name: "_", value: 5 },
|
|
257
|
+
{ name: "_", value: 3 },
|
|
258
|
+
{ name: "_", value: 2 },
|
|
259
|
+
{ name: "_", value: 1 }
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
skeletonConfig: zo({
|
|
264
|
+
defaultConfig: t.value,
|
|
265
|
+
userConfig: Ko.value
|
|
266
|
+
})
|
|
267
|
+
}), { userOptionsVisible: Pt, setUserOptionsVisibility: vo, keepUserOptionState: ho } = Jl({ config: t.value }), { svgRef: Fe } = Ql({ config: t.value.style.chart.title });
|
|
268
|
+
function Ot() {
|
|
269
|
+
const e = to({
|
|
270
|
+
userConfig: $.config,
|
|
271
|
+
defaultConfig: ue
|
|
272
|
+
}), l = e.theme;
|
|
273
|
+
if (!l) return e;
|
|
274
|
+
if (!fe.value(e))
|
|
275
|
+
return Z(e), e;
|
|
276
|
+
const o = to({
|
|
277
|
+
userConfig: oa[l] || $.config,
|
|
278
|
+
defaultConfig: e
|
|
279
|
+
}), a = to({
|
|
280
|
+
userConfig: $.config,
|
|
281
|
+
defaultConfig: o
|
|
282
|
+
});
|
|
283
|
+
return {
|
|
284
|
+
...a,
|
|
285
|
+
customPalette: a.customPalette.length ? a.customPalette : Dl[l] || G
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
Be(() => $.config, (e) => {
|
|
289
|
+
Ae.value || (t.value = Ot()), Pt.value = !t.value.userOptions.showOnChartHover, ro.value += 1, xt.value += 1, $t.value += 1, J.value.showTable = t.value.table.show, J.value.showTooltip = t.value.style.chart.tooltip.show;
|
|
290
|
+
}, { deep: !0 });
|
|
291
|
+
const { isPrinting: _t, isImaging: It, generatePdf: fo, generateImage: po } = ql({
|
|
292
|
+
elementId: `treemap_${le.value}`,
|
|
293
|
+
fileName: t.value.style.chart.title.text || "vue-ui-treemap",
|
|
294
|
+
options: t.value.userOptions.print
|
|
295
|
+
}), Go = k(() => t.value.userOptions.show && !t.value.style.chart.title.text), ut = k(() => zl(t.value.customPalette)), J = b({
|
|
296
|
+
showTable: t.value.table.show,
|
|
297
|
+
showTooltip: t.value.style.chart.tooltip.show
|
|
298
|
+
});
|
|
299
|
+
Be(t, () => {
|
|
300
|
+
J.value = {
|
|
301
|
+
showTable: t.value.table.show,
|
|
302
|
+
showTooltip: t.value.style.chart.tooltip.show
|
|
303
|
+
};
|
|
304
|
+
}, { immediate: !0 });
|
|
305
|
+
const Le = b({
|
|
306
|
+
height: t.value.style.chart.height,
|
|
307
|
+
width: t.value.style.chart.width
|
|
308
|
+
});
|
|
309
|
+
function Zo(e) {
|
|
310
|
+
const l = re.value, o = Le.value.height;
|
|
311
|
+
if (!l || !o) return e;
|
|
312
|
+
const a = l.getBoundingClientRect();
|
|
313
|
+
return e * (o / a.height);
|
|
314
|
+
}
|
|
315
|
+
function Jo() {
|
|
316
|
+
if (!Tt.value || me.value.length <= 1) return 0;
|
|
317
|
+
const e = Tt.value, l = getComputedStyle(e), o = e.offsetHeight + parseFloat(l.marginTop || "0") + parseFloat(l.marginBottom || "0") + parseFloat(l.paddingTop || "0") + parseFloat(l.paddingBottom || "0");
|
|
318
|
+
return Zo(o);
|
|
319
|
+
}
|
|
320
|
+
const D = k(() => {
|
|
321
|
+
const e = t.value.style.chart.padding, l = Le.value.width, o = Le.value.height, a = Jo(), n = e.left, s = l - e.right, u = e.top, i = o - e.bottom - a;
|
|
322
|
+
return {
|
|
323
|
+
left: n,
|
|
324
|
+
top: u,
|
|
325
|
+
right: s,
|
|
326
|
+
bottom: i,
|
|
327
|
+
width: s - n,
|
|
328
|
+
height: Math.max(0, i - u),
|
|
329
|
+
vbWidth: l,
|
|
330
|
+
vbHeight: o - a,
|
|
331
|
+
offsetY: a
|
|
332
|
+
};
|
|
333
|
+
}), Y = b(Mt.value), Me = b(Y.value), go = Ce(/* @__PURE__ */ new Map());
|
|
334
|
+
Be(
|
|
335
|
+
[Y, () => t.value],
|
|
336
|
+
() => {
|
|
337
|
+
Xe.value = null, K.value = /* @__PURE__ */ new Map();
|
|
338
|
+
},
|
|
339
|
+
{ deep: !0 }
|
|
340
|
+
), Be(
|
|
341
|
+
() => B.value,
|
|
342
|
+
() => {
|
|
343
|
+
Xe.value = null, K.value = /* @__PURE__ */ new Map();
|
|
344
|
+
},
|
|
345
|
+
{ deep: !0 }
|
|
346
|
+
), Be(
|
|
347
|
+
[() => Le.value.width, () => Le.value.height],
|
|
348
|
+
() => {
|
|
349
|
+
K.value = /* @__PURE__ */ new Map();
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
function yo(e) {
|
|
353
|
+
Array.isArray(e) && e.forEach((l, o) => {
|
|
354
|
+
l.id || (l.id = yt());
|
|
355
|
+
let a = lt(l.color) || go.value.get(l.id) || ut.value[o] || G[o] || G[o % G.length];
|
|
356
|
+
a = lt(a), go.value.set(l.id, a), l.color = a, mo(l, a);
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
function mo(e, l) {
|
|
360
|
+
Array.isArray(e.children) && e.children.forEach((o) => {
|
|
361
|
+
o.id || (o.id = yt()), o.parentId = e.id, o.color = l, mo(o, l);
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function Qo() {
|
|
365
|
+
if (!I.value.length)
|
|
366
|
+
Me.value = Y.value.slice();
|
|
367
|
+
else {
|
|
368
|
+
const e = I.value[I.value.length - 1], l = te(e);
|
|
369
|
+
Me.value = l?.children?.slice() || [];
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
Be(
|
|
373
|
+
() => Mt.value,
|
|
374
|
+
() => {
|
|
375
|
+
Y.value = Mt.value, yo(Y.value), Qo(), $t.value += 1, xt.value += 1;
|
|
376
|
+
},
|
|
377
|
+
{ deep: !0, immediate: !0, flush: "post" }
|
|
378
|
+
);
|
|
379
|
+
const Pe = Ce(null), Re = Ce(null);
|
|
380
|
+
No(() => {
|
|
381
|
+
io.value = !0, tl();
|
|
382
|
+
});
|
|
383
|
+
const el = k(() => t.value.debug);
|
|
384
|
+
function tl() {
|
|
385
|
+
if (Vo($.dataset) && Vl({
|
|
386
|
+
componentName: "VueUiTreemap",
|
|
387
|
+
type: "dataset",
|
|
388
|
+
debug: el.value
|
|
389
|
+
}), yo(Y.value), Vo($.dataset) || (qo.value = t.value.loading), t.value.responsive) {
|
|
390
|
+
const e = Ul(() => {
|
|
391
|
+
const { width: l, height: o } = Yl({
|
|
392
|
+
chart: re.value,
|
|
393
|
+
title: t.value.style.chart.title.text ? ao.value : null,
|
|
394
|
+
legend: t.value.style.chart.legend.show ? no.value : null,
|
|
395
|
+
source: so.value,
|
|
396
|
+
noTitle: uo.value
|
|
397
|
+
});
|
|
398
|
+
requestAnimationFrame(() => {
|
|
399
|
+
Le.value.width = l, Le.value.height = o - 12;
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
Pe.value && (Re.value && Pe.value.unobserve(Re.value), Pe.value.disconnect()), Pe.value = new ResizeObserver(e), Re.value = re.value.parentNode, Pe.value.observe(Re.value);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
Nl(() => {
|
|
406
|
+
Pe.value && (Re.value && Pe.value.unobserve(Re.value), Pe.value.disconnect());
|
|
407
|
+
});
|
|
408
|
+
const Ke = k(() => Me.value.map((e, l) => ({
|
|
409
|
+
...e,
|
|
410
|
+
color: lt(e.color) || ut.value[l] || G[l] || G[l % G.length]
|
|
411
|
+
})).filter((e) => !B.value.includes(e.id))), De = k(() => Y.value.filter((e) => !B.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), Ft = k({
|
|
412
|
+
get() {
|
|
413
|
+
let e = [...Ke.value];
|
|
414
|
+
return t.value.style.chart.layout.sorted && (e = [...Ke.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
|
|
415
|
+
...l
|
|
416
|
+
}));
|
|
417
|
+
},
|
|
418
|
+
set(e) {
|
|
419
|
+
return e;
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
function bo(e, l) {
|
|
423
|
+
return e.value / l;
|
|
424
|
+
}
|
|
425
|
+
function ol(e, l, o) {
|
|
426
|
+
const a = t.value.style.chart.layout.rects.colorRatio - bo(l, o);
|
|
427
|
+
return bt(e, a < 0 ? 0 : a);
|
|
428
|
+
}
|
|
429
|
+
function wo(e) {
|
|
430
|
+
return Array.isArray(e.children) && e.children.length > 0;
|
|
431
|
+
}
|
|
432
|
+
function ll(e) {
|
|
433
|
+
return [...e].sort((l, o) => {
|
|
434
|
+
const a = wo(l), n = wo(o);
|
|
435
|
+
if (a !== n)
|
|
436
|
+
return a - n;
|
|
437
|
+
const s = Number(l.value) || 0;
|
|
438
|
+
return (Number(o.value) || 0) - s;
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
function ko(e, l, o, a, n) {
|
|
442
|
+
return ll(e).map((u, i) => {
|
|
443
|
+
const c = ol(
|
|
444
|
+
lt(l) || ut.value[i] || G[i] || G[i % G.length],
|
|
445
|
+
u,
|
|
446
|
+
a
|
|
447
|
+
), d = bo(u, a), w = n ?? u.parentId ?? u.id;
|
|
448
|
+
return {
|
|
449
|
+
...u,
|
|
450
|
+
color: c,
|
|
451
|
+
proportion: d,
|
|
452
|
+
parentName: o,
|
|
453
|
+
rootId: w,
|
|
454
|
+
children: Array.isArray(u.children) && u.children.length ? ko(
|
|
455
|
+
u.children,
|
|
456
|
+
c,
|
|
457
|
+
u.name,
|
|
458
|
+
a,
|
|
459
|
+
w
|
|
460
|
+
) : void 0
|
|
461
|
+
};
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
const Co = k(() => {
|
|
465
|
+
const e = Ft.value.map((n) => Number(n.value) || 0).reduce((n, s) => n + s, 0) || 1, l = Ft.value.map((n) => {
|
|
466
|
+
const s = n.children ? n.children.reduce((q, Oe) => q + (Number(Oe.value) || 0), 0) : n.value, { children: u, parentId: i, id: c, value: d, name: w, color: z, ...T } = n, H = n.id || yt();
|
|
467
|
+
return {
|
|
468
|
+
...T,
|
|
469
|
+
id: H,
|
|
470
|
+
name: n.name,
|
|
471
|
+
value: n.value,
|
|
472
|
+
color: n.color,
|
|
473
|
+
proportion: (Number(n.value) || 0) / e,
|
|
474
|
+
children: Array.isArray(n.children) && n.children.length ? ko(
|
|
475
|
+
n.children,
|
|
476
|
+
n.color,
|
|
477
|
+
n.name,
|
|
478
|
+
s || 1
|
|
479
|
+
) : void 0
|
|
480
|
+
};
|
|
481
|
+
});
|
|
482
|
+
if (I.value.length === 0) {
|
|
483
|
+
if (!Xe.value) {
|
|
484
|
+
const i = { x0: 0, y0: 0, x1: 1, y1: 1 };
|
|
485
|
+
Xe.value = Yo(l, i);
|
|
486
|
+
}
|
|
487
|
+
const n = {
|
|
488
|
+
x0: D.value.left,
|
|
489
|
+
y0: D.value.top,
|
|
490
|
+
x1: D.value.left + D.value.width,
|
|
491
|
+
y1: D.value.top + D.value.height
|
|
492
|
+
}, s = n.x1 - n.x0, u = n.y1 - n.y0;
|
|
493
|
+
return Xe.value.map((i) => ({
|
|
494
|
+
...i,
|
|
495
|
+
x0: n.x0 + i.x0 * s,
|
|
496
|
+
x1: n.x0 + i.x1 * s,
|
|
497
|
+
y0: n.y0 + i.y0 * u,
|
|
498
|
+
y1: n.y0 + i.y1 * u
|
|
499
|
+
}));
|
|
500
|
+
}
|
|
501
|
+
const a = {
|
|
502
|
+
x0: D.value.left,
|
|
503
|
+
y0: D.value.top,
|
|
504
|
+
x1: D.value.left + D.value.width,
|
|
505
|
+
y1: D.value.top + D.value.height
|
|
506
|
+
};
|
|
507
|
+
return Yo(l, a);
|
|
508
|
+
});
|
|
509
|
+
function al(e) {
|
|
510
|
+
const l = I.value.length ? I.value[I.value.length - 1] : null, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
511
|
+
for (const i of e) {
|
|
512
|
+
let c = rl(i.id);
|
|
513
|
+
if (l) {
|
|
514
|
+
const d = c.indexOf(l);
|
|
515
|
+
if (d >= 0)
|
|
516
|
+
c = c.slice(d);
|
|
517
|
+
else
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
c = c.filter((d) => {
|
|
521
|
+
const w = te(d);
|
|
522
|
+
return w && Array.isArray(w.children) && w.children.length;
|
|
523
|
+
}), c.length && (c.forEach((d, w) => {
|
|
524
|
+
const z = te(d);
|
|
525
|
+
if (!z) return;
|
|
526
|
+
let T = o.get(d);
|
|
527
|
+
T ? (T.x0 = Math.min(T.x0, i.x0), T.y0 = Math.min(T.y0, i.y0), T.x1 = Math.max(T.x1, i.x1), T.y1 = Math.max(T.y1, i.y1), T.depth = Math.min(T.depth, w)) : (T = {
|
|
528
|
+
id: d,
|
|
529
|
+
name: z.name,
|
|
530
|
+
value: z.value,
|
|
531
|
+
color: z.color,
|
|
532
|
+
x0: i.x0,
|
|
533
|
+
y0: i.y0,
|
|
534
|
+
x1: i.x1,
|
|
535
|
+
y1: i.y1,
|
|
536
|
+
depth: w
|
|
537
|
+
// depth from visible root
|
|
538
|
+
}, o.set(d, T));
|
|
539
|
+
let H = n.get(d);
|
|
540
|
+
H || (H = /* @__PURE__ */ new Set(), n.set(d, H)), H.add(i.id);
|
|
541
|
+
const q = s.get(d);
|
|
542
|
+
(q == null || w < q) && s.set(d, w);
|
|
543
|
+
}), a.set(i.id, c));
|
|
544
|
+
}
|
|
545
|
+
return {
|
|
546
|
+
wrappers: Array.from(o.values()).map((i) => ({
|
|
547
|
+
...i,
|
|
548
|
+
depth: s.get(i.id) ?? i.depth ?? 0,
|
|
549
|
+
childrenIds: Array.from(n.get(i.id) || [])
|
|
550
|
+
})),
|
|
551
|
+
ancestorsByLeaf: a
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
const Lt = k(() => al(Co.value)), nl = k(() => {
|
|
555
|
+
const e = Lt.value.wrappers;
|
|
556
|
+
return e.length ? e.filter((l) => sl(l)) : [];
|
|
557
|
+
});
|
|
558
|
+
function Nt(e) {
|
|
559
|
+
return ze(e) * 1.2;
|
|
560
|
+
}
|
|
561
|
+
function sl(e) {
|
|
562
|
+
const l = Nt(e);
|
|
563
|
+
return Q(e) < l * 1.1 ? !1 : (e.labelY0 = e.y0, !0);
|
|
564
|
+
}
|
|
565
|
+
const F = k(() => ul({
|
|
566
|
+
rects: Co.value,
|
|
567
|
+
wrappers: Lt.value.wrappers,
|
|
568
|
+
ancestorsByLeaf: Lt.value.ancestorsByLeaf
|
|
569
|
+
}));
|
|
570
|
+
function ul({ rects: e, wrappers: l, ancestorsByLeaf: o }) {
|
|
571
|
+
if (!l.length || !o) return e;
|
|
572
|
+
const a = new Map(l.map((n) => [n.id, n]));
|
|
573
|
+
return e.map((n) => {
|
|
574
|
+
const s = o.get(n.id);
|
|
575
|
+
if (!s || !s.length) return n;
|
|
576
|
+
let u = { ...n };
|
|
577
|
+
for (const i of s) {
|
|
578
|
+
const c = a.get(i);
|
|
579
|
+
if (!c) continue;
|
|
580
|
+
const d = Q(c), w = Nt(c);
|
|
581
|
+
if (d < w * 1.1) continue;
|
|
582
|
+
const z = ze(c), T = z * 1.2, H = z * 0.5, q = z * 0.5, Oe = T * 0.5, Je = ee(c) / 3, Qe = Math.min(H, Je), _e = d * 0.25, Ht = Math.min(q, _e), Wt = (typeof c.labelY0 == "number" ? c.labelY0 : c.y0) + w, ce = Math.max(u.x0, c.x0 + Qe), we = Math.min(u.x1, c.x1 - Qe), ke = Math.max(u.y0, Wt + Oe), Ut = Math.min(u.y1, c.y1 - Ht);
|
|
583
|
+
if (we <= ce || Ut <= ke)
|
|
584
|
+
break;
|
|
585
|
+
u = {
|
|
586
|
+
...u,
|
|
587
|
+
x0: ce,
|
|
588
|
+
y0: ke,
|
|
589
|
+
x1: we,
|
|
590
|
+
y1: Ut
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
return u;
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
function Q({ y0: e, y1: l }) {
|
|
597
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
598
|
+
}
|
|
599
|
+
function ee({ x0: e, x1: l }) {
|
|
600
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
601
|
+
}
|
|
602
|
+
function ze(e) {
|
|
603
|
+
const l = t.value.style.chart.layout.labels, o = l.fontSize, a = l.minFontSize, n = l.fontSize * 2, s = 0.5, u = 0.6, i = 1, c = 0.9;
|
|
604
|
+
let d = e.proportion;
|
|
605
|
+
if (!(typeof d == "number" && isFinite(d))) {
|
|
606
|
+
const q = Math.max(1e-6, ee(e) * Q(e)), Oe = Math.max(1e-6, D.value.width * D.value.height);
|
|
607
|
+
d = q / Oe;
|
|
608
|
+
}
|
|
609
|
+
const w = Math.pow(Math.min(1, Math.max(0, d)), s), z = u + (i - u) * w;
|
|
610
|
+
let T = o * z;
|
|
611
|
+
const H = Math.max(1e-4, Math.min(ee(e), Q(e)));
|
|
612
|
+
return T = Math.min(T, H * c), T = Math.max(a, Math.min(n, T)), T;
|
|
613
|
+
}
|
|
614
|
+
function xo(e) {
|
|
615
|
+
Ie.value = e, lo.value += 1;
|
|
616
|
+
}
|
|
617
|
+
const ie = k(() => ({
|
|
618
|
+
startX: 0,
|
|
619
|
+
startY: 0,
|
|
620
|
+
width: D.value.vbWidth,
|
|
621
|
+
height: D.value.vbHeight
|
|
622
|
+
}));
|
|
623
|
+
function te(e, l = Y.value) {
|
|
624
|
+
for (const o of l) {
|
|
625
|
+
if (o.id === e)
|
|
626
|
+
return o;
|
|
627
|
+
if (o.children) {
|
|
628
|
+
const a = te(e, o.children);
|
|
629
|
+
if (a)
|
|
630
|
+
return a;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
635
|
+
function rl(e) {
|
|
636
|
+
const l = [];
|
|
637
|
+
let o = te(e);
|
|
638
|
+
for (; o && o.parentId; ) {
|
|
639
|
+
const a = te(o.parentId);
|
|
640
|
+
if (!a) break;
|
|
641
|
+
l.unshift(a.id), o = a;
|
|
642
|
+
}
|
|
643
|
+
return l;
|
|
644
|
+
}
|
|
645
|
+
const Ve = k(() => I.value.length > 0);
|
|
646
|
+
function qe(e, l) {
|
|
647
|
+
if (!e) {
|
|
648
|
+
Me.value = Y.value.slice(), V("selectDatapoint", void 0), I.value = [];
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: l });
|
|
652
|
+
const o = te(e.id);
|
|
653
|
+
if (o && o.children?.length)
|
|
654
|
+
I.value.push(o.id), Me.value = o.children.slice(), V("selectDatapoint", e);
|
|
655
|
+
else if (e.parentId) {
|
|
656
|
+
I.value.push(e.parentId);
|
|
657
|
+
const a = te(e.parentId);
|
|
658
|
+
Me.value = a.children.slice(), V("selectDatapoint", e);
|
|
659
|
+
} else if (I.value.length > 0) {
|
|
660
|
+
I.value.pop();
|
|
661
|
+
const a = I.value[I.value.length - 1];
|
|
662
|
+
if (a) {
|
|
663
|
+
const n = te(a);
|
|
664
|
+
Me.value = n.children.slice();
|
|
665
|
+
} else
|
|
666
|
+
Me.value = Y.value.slice(), I.value = [], V("selectDatapoint", void 0);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
function il(e) {
|
|
670
|
+
return !!(te(e.id)?.children?.length || e.parentId);
|
|
671
|
+
}
|
|
672
|
+
const me = k(() => {
|
|
673
|
+
const e = [
|
|
674
|
+
{ id: null, label: "All" }
|
|
675
|
+
];
|
|
676
|
+
if (I.value.length > 0) {
|
|
677
|
+
let l = te(I.value[I.value.length - 1]);
|
|
678
|
+
const o = [];
|
|
679
|
+
for (; l; )
|
|
680
|
+
o.unshift(l), l = l.parentId ? te(l.parentId) : null;
|
|
681
|
+
for (const a of o)
|
|
682
|
+
e.push({
|
|
683
|
+
id: a.id,
|
|
684
|
+
label: a.name,
|
|
685
|
+
node: a
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
return e;
|
|
689
|
+
}), R = Ce(null), He = k(() => Y.value.map((e, l) => ({
|
|
690
|
+
...e,
|
|
691
|
+
color: lt(e.color) || ut.value[l] || G[l] || G[l % G.length],
|
|
692
|
+
shape: "square"
|
|
693
|
+
})).sort((e, l) => l.value - e.value).map((e, l) => {
|
|
694
|
+
const o = e.value / Y.value.map((a) => a.value).reduce((a, n) => a + n, 0);
|
|
695
|
+
return {
|
|
696
|
+
...e,
|
|
697
|
+
proportion: o,
|
|
698
|
+
opacity: B.value.includes(e.id) ? 0.5 : 1,
|
|
699
|
+
display: `${e.name}${t.value.style.chart.legend.showPercentage || t.value.style.chart.legend.showValue ? ": " : ""}${t.value.style.chart.legend.showValue ? mt(
|
|
700
|
+
t.value.style.chart.layout.labels.formatter,
|
|
701
|
+
e.value,
|
|
702
|
+
at({
|
|
703
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
704
|
+
v: e.value,
|
|
705
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
706
|
+
r: t.value.style.chart.legend.roundingValue
|
|
707
|
+
}),
|
|
708
|
+
{ datapoint: e }
|
|
709
|
+
) : ""}${t.value.style.chart.legend.showPercentage ? B.value.includes(e.id) ? `${t.value.style.chart.legend.showValue ? " (" : ""}- %${t.value.style.chart.legend.showValue ? ")" : ""}` : `${t.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / De.value) ? "-" : (e.value / De.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)}%${t.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
710
|
+
};
|
|
711
|
+
})), cl = k(() => ({
|
|
712
|
+
cy: "treemap-div-legend",
|
|
713
|
+
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
714
|
+
color: t.value.style.chart.legend.color,
|
|
715
|
+
fontSize: t.value.style.chart.legend.fontSize,
|
|
716
|
+
paddingBottom: 12,
|
|
717
|
+
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
718
|
+
})), Ee = k(() => B.value.length === He.value.length);
|
|
719
|
+
function dl() {
|
|
720
|
+
B.value.length ? B.value = [] : He.value.forEach((e) => {
|
|
721
|
+
B.value.push(e.id);
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
function rt(e) {
|
|
725
|
+
R.value = null, B.value.includes(e.id) ? B.value = B.value.filter((l) => l !== e.id) : B.value.length < $.dataset.length - 1 && B.value.push(e.id), V("selectLegend", Ft.value);
|
|
726
|
+
}
|
|
727
|
+
function $o(e) {
|
|
728
|
+
if (!Y.value.length)
|
|
729
|
+
return t.value.debug && console.warn("VueUiTreemap - There are no series to show."), null;
|
|
730
|
+
const l = Y.value.find((o) => o.name === e);
|
|
731
|
+
return l || (t.value.debug && console.warn(`VueUiTreemap - Series name not found "${e}"`), null);
|
|
732
|
+
}
|
|
733
|
+
function vl(e) {
|
|
734
|
+
const l = $o(e);
|
|
735
|
+
l !== null && B.value.includes(l.id) && rt({ id: l.id });
|
|
736
|
+
}
|
|
737
|
+
function hl(e) {
|
|
738
|
+
const l = $o(e);
|
|
739
|
+
l !== null && (B.value.includes(l.id) || rt({ id: l.id }));
|
|
740
|
+
}
|
|
741
|
+
function fl({ datapoint: e, seriesIndex: l }) {
|
|
742
|
+
R.value = null, Ue.value = !1, ye.value = null, je.value = "pointer", t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: l });
|
|
743
|
+
}
|
|
744
|
+
const Bt = b(null);
|
|
745
|
+
function To({ datapoint: e, seriesIndex: l, triggerMode: o = "pointer" }) {
|
|
746
|
+
if (Ee.value) return;
|
|
747
|
+
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: l }), ye.value = l, je.value = o, R.value = e, Bt.value = { datapoint: e, seriesIndex: l, config: t.value, series: Ke.value };
|
|
748
|
+
const a = t.value.style.chart.tooltip.customFormat;
|
|
749
|
+
if (Ho(a) && Wl(() => a({
|
|
750
|
+
seriesIndex: l,
|
|
751
|
+
datapoint: e,
|
|
752
|
+
series: Ke.value,
|
|
753
|
+
config: t.value
|
|
754
|
+
})))
|
|
755
|
+
Ct.value = a({
|
|
756
|
+
seriesIndex: l,
|
|
757
|
+
datapoint: e,
|
|
758
|
+
series: Ke.value,
|
|
759
|
+
config: t.value
|
|
760
|
+
});
|
|
761
|
+
else {
|
|
762
|
+
let n = "";
|
|
763
|
+
n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.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>${mt(
|
|
764
|
+
t.value.style.chart.layout.labels.formatter,
|
|
765
|
+
e.value,
|
|
766
|
+
at({
|
|
767
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
768
|
+
v: e.value,
|
|
769
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
770
|
+
r: t.value.style.chart.tooltip.roundingValue
|
|
771
|
+
}),
|
|
772
|
+
{ datapoint: e, seriesIndex: l }
|
|
773
|
+
)}</b>`, Ct.value = `<div>${n}</div>`;
|
|
774
|
+
}
|
|
775
|
+
Ue.value = !0;
|
|
776
|
+
}
|
|
777
|
+
const be = k(() => {
|
|
778
|
+
const e = F.value.map((o) => ({
|
|
779
|
+
name: o.name,
|
|
780
|
+
color: o.color
|
|
781
|
+
})), l = F.value.map((o) => o.value);
|
|
782
|
+
return { head: e, body: l };
|
|
783
|
+
});
|
|
784
|
+
function Rt(e = null) {
|
|
785
|
+
Do(() => {
|
|
786
|
+
const l = be.value.head.map((n, s) => [[
|
|
787
|
+
n.name
|
|
788
|
+
], [be.value.body[s]], [isNaN(be.value.body[s] / De.value) ? "-" : be.value.body[s] / De.value * 100]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), a = Hl(o);
|
|
789
|
+
e ? e(a) : El({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
const We = k(() => {
|
|
793
|
+
const e = [
|
|
794
|
+
t.value.table.columnNames.series,
|
|
795
|
+
t.value.table.columnNames.value,
|
|
796
|
+
t.value.table.columnNames.percentage
|
|
797
|
+
], l = be.value.head.map((n, s) => {
|
|
798
|
+
const u = mt(
|
|
799
|
+
t.value.style.chart.layout.labels.formatter,
|
|
800
|
+
be.value.body[s],
|
|
801
|
+
at({
|
|
802
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
803
|
+
v: be.value.body[s],
|
|
804
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
805
|
+
r: t.value.table.td.roundingValue
|
|
806
|
+
})
|
|
807
|
+
);
|
|
808
|
+
return [
|
|
809
|
+
{
|
|
810
|
+
color: n.color,
|
|
811
|
+
name: n.name,
|
|
812
|
+
shape: "square"
|
|
813
|
+
},
|
|
814
|
+
u,
|
|
815
|
+
isNaN(be.value.body[s] / De.value) ? "-" : at({
|
|
816
|
+
v: be.value.body[s] / De.value * 100,
|
|
817
|
+
s: "%",
|
|
818
|
+
r: t.value.table.td.roundingPercentage
|
|
819
|
+
})
|
|
820
|
+
];
|
|
821
|
+
}), o = {
|
|
822
|
+
th: {
|
|
823
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
824
|
+
color: t.value.table.th.color,
|
|
825
|
+
outline: t.value.table.th.outline
|
|
826
|
+
},
|
|
827
|
+
td: {
|
|
828
|
+
backgroundColor: t.value.table.td.backgroundColor,
|
|
829
|
+
color: t.value.table.td.color,
|
|
830
|
+
outline: t.value.table.td.outline
|
|
831
|
+
},
|
|
832
|
+
breakpoint: t.value.table.responsiveBreakpoint
|
|
833
|
+
};
|
|
834
|
+
return {
|
|
835
|
+
colNames: [
|
|
836
|
+
t.value.table.columnNames.series,
|
|
837
|
+
t.value.table.columnNames.value
|
|
838
|
+
],
|
|
839
|
+
head: e,
|
|
840
|
+
body: l,
|
|
841
|
+
config: o
|
|
842
|
+
};
|
|
843
|
+
});
|
|
844
|
+
function pl() {
|
|
845
|
+
return F.value;
|
|
846
|
+
}
|
|
847
|
+
function So() {
|
|
848
|
+
J.value.showTable = !J.value.showTable;
|
|
849
|
+
}
|
|
850
|
+
function Ao() {
|
|
851
|
+
J.value.showTooltip = !J.value.showTooltip;
|
|
852
|
+
}
|
|
853
|
+
const Ge = b(!1);
|
|
854
|
+
function Dt() {
|
|
855
|
+
Ge.value = !Ge.value;
|
|
856
|
+
}
|
|
857
|
+
const it = b(null);
|
|
858
|
+
function Mo(e) {
|
|
859
|
+
it.value = e;
|
|
860
|
+
}
|
|
861
|
+
function Po() {
|
|
862
|
+
it.value = null;
|
|
863
|
+
}
|
|
864
|
+
async function gl({ scale: e = 2 } = {}) {
|
|
865
|
+
if (!re.value) return;
|
|
866
|
+
const { width: l, height: o } = re.value.getBoundingClientRect(), a = l / o, { imageUri: n, base64: s } = await ea({ domElement: re.value, base64: !0, img: !0, scale: e });
|
|
867
|
+
return {
|
|
868
|
+
imageUri: n,
|
|
869
|
+
base64: s,
|
|
870
|
+
title: t.value.style.chart.title.text,
|
|
871
|
+
width: l,
|
|
872
|
+
height: o,
|
|
873
|
+
aspectRatio: a
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
const Ze = k(() => {
|
|
877
|
+
const e = t.value.table.useDialog && !t.value.table.show, l = J.value.showTable;
|
|
878
|
+
return {
|
|
879
|
+
component: e ? $e : x,
|
|
880
|
+
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
881
|
+
props: e ? {
|
|
882
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
883
|
+
color: t.value.table.th.color,
|
|
884
|
+
headerColor: t.value.table.th.color,
|
|
885
|
+
headerBg: t.value.table.th.backgroundColor,
|
|
886
|
+
isFullscreen: Ie.value,
|
|
887
|
+
fullscreenParent: re.value,
|
|
888
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
889
|
+
isCursorPointer: Se.value
|
|
890
|
+
} : {
|
|
891
|
+
hideDetails: !0,
|
|
892
|
+
config: {
|
|
893
|
+
open: l,
|
|
894
|
+
maxHeight: 1e4,
|
|
895
|
+
body: {
|
|
896
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
897
|
+
color: t.value.style.chart.color
|
|
898
|
+
},
|
|
899
|
+
head: {
|
|
900
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
901
|
+
color: t.value.style.chart.color
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
});
|
|
907
|
+
Be(() => J.value.showTable, (e) => {
|
|
908
|
+
t.value.table.show || (e && t.value.table.useDialog && Ye.value ? Ye.value.open() : "close" in Ye.value && Ye.value.close());
|
|
909
|
+
});
|
|
910
|
+
function Oo() {
|
|
911
|
+
J.value.showTable = !1, St.value && St.value.setTableIconState(!1);
|
|
912
|
+
}
|
|
913
|
+
const yl = k(() => He.value.map((e) => ({
|
|
914
|
+
...e,
|
|
915
|
+
name: e.display
|
|
916
|
+
}))), ml = k(() => t.value.style.chart.backgroundColor), bl = k(() => t.value.style.chart.legend), wl = k(() => t.value.style.chart.title), { exportSvg: kl, getSvg: Cl } = Gl({
|
|
917
|
+
svg: Fe,
|
|
918
|
+
title: wl,
|
|
919
|
+
legend: bl,
|
|
920
|
+
legendItems: yl,
|
|
921
|
+
backgroundColor: ml
|
|
922
|
+
});
|
|
923
|
+
async function _o({ isCb: e }) {
|
|
924
|
+
st.value = !0, await Do();
|
|
925
|
+
try {
|
|
926
|
+
if (e) {
|
|
927
|
+
const { blob: l, url: o, text: a, dataUrl: n } = await Cl();
|
|
928
|
+
await Promise.resolve(t.value.userOptions.callbacks.svg({ blob: l, url: o, text: a, dataUrl: n }));
|
|
929
|
+
} else
|
|
930
|
+
await Promise.resolve(kl());
|
|
931
|
+
} finally {
|
|
932
|
+
st.value = !1;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
function xl(e) {
|
|
936
|
+
if (e?.stage === "start") {
|
|
937
|
+
nt.value = !0;
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
940
|
+
if (e?.stage === "end") {
|
|
941
|
+
nt.value = !1;
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
po();
|
|
945
|
+
}
|
|
946
|
+
function $l(e) {
|
|
947
|
+
const o = ze(e) * 0.6;
|
|
948
|
+
return Math.max(0, ee(e) - 2 * o);
|
|
949
|
+
}
|
|
950
|
+
function Io({ rect: e, seriesIndex: l, isTitle: o = !1 }) {
|
|
951
|
+
const a = t.value.style.chart.layout.labels.name.show, n = t.value.style.chart.layout.labels.value.show;
|
|
952
|
+
if (!a && !n) return "";
|
|
953
|
+
const s = I.value.length === 0, u = s ? `${e.id}:${o ? "title" : "rect"}` : null;
|
|
954
|
+
if (s && K.value.has(u))
|
|
955
|
+
return K.value.get(u);
|
|
956
|
+
const i = Math.max(2, ze(e) / 3), c = Math.max(8, ze(e)), d = c * 1.2, w = Math.max(0, ee(e) - i * 2), z = Math.max(0, Q(e) - i * 2);
|
|
957
|
+
if (w <= 2 || z <= c * 0.8)
|
|
958
|
+
return s && u && K.value.set(u, ""), "";
|
|
959
|
+
const T = t.value.style.fontFamily, H = t.value.style.chart.layout.labels.name.bold ? "600" : "400", q = t.value.style.chart.layout.labels.value.bold ? "600" : "400", Oe = o ? t.value.style.chart.layout.rects.group.label.adaptColorToBackground ? t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? wt(bt(e.color, 0.4)) : wt(t.value.style.chart.backgroundColor) : t.value.style.chart.layout.rects.group.label.color : wt(e.color), Vt = a ? String(e.name ?? "") : "", Je = n ? mt(
|
|
960
|
+
t.value.style.chart.layout.labels.formatter,
|
|
961
|
+
e.value ?? 0,
|
|
962
|
+
at({
|
|
963
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
964
|
+
v: e.value ?? 0,
|
|
965
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
966
|
+
r: t.value.style.chart.layout.labels.rounding
|
|
967
|
+
}),
|
|
968
|
+
{ datapoint: e, seriesIndex: l }
|
|
969
|
+
) : "", Qe = o ? $l(e) : w;
|
|
970
|
+
function _e(L, ae = c, et = "400") {
|
|
971
|
+
const oe = document.createElementNS(Qt, "svg");
|
|
972
|
+
oe.setAttribute("width", "0"), oe.setAttribute("height", "0"), oe.style.position = "absolute", oe.style.visibility = "hidden", oe.style.pointerEvents = "none";
|
|
973
|
+
const ne = document.createElementNS(Qt, "text");
|
|
974
|
+
ne.setAttribute("font-size", String(ae)), ne.setAttribute("font-family", T), ne.setAttribute("font-weight", String(et)), ne.textContent = L || "", oe.appendChild(ne), document.body.appendChild(oe);
|
|
975
|
+
const ct = ne.getComputedTextLength();
|
|
976
|
+
return document.body.removeChild(oe), ct;
|
|
977
|
+
}
|
|
978
|
+
if (o) {
|
|
979
|
+
let L = "";
|
|
980
|
+
if (a && (L = Vt), n && (L = L ? `${L} (${Je})` : Je), !L)
|
|
981
|
+
return s && u && K.value.set(u, ""), "";
|
|
982
|
+
let ae = L;
|
|
983
|
+
if (_e(ae, c, H) > Qe) {
|
|
984
|
+
let U = ae;
|
|
985
|
+
for (; U.length && _e(U + "…", c, H) > Qe; )
|
|
986
|
+
U = U.slice(0, -1);
|
|
987
|
+
ae = U ? U + "…" : "";
|
|
988
|
+
}
|
|
989
|
+
if (!ae)
|
|
990
|
+
return s && u && K.value.set(u, ""), "";
|
|
991
|
+
const et = Nt(e), oe = typeof e.depth == "number" ? e.depth : 0, ne = et * 1.4, ct = typeof e.labelY0 == "number" ? e.labelY0 : e.y0 + oe * ne, jt = e.x0 + i + c / 2, W = ct + i + c, se = `<text
|
|
992
|
+
x="${jt}"
|
|
993
|
+
y="${W}"
|
|
994
|
+
font-size="${c}"
|
|
995
|
+
font-family="${kt(T)}"
|
|
996
|
+
font-weight="${H}"
|
|
997
|
+
fill="${kt(Oe)}"
|
|
998
|
+
paint-order="stroke"
|
|
999
|
+
stroke="transparent"
|
|
1000
|
+
stroke-width="0"
|
|
1001
|
+
style="transition: all 0.2s ease-in-out;"
|
|
1002
|
+
>
|
|
1003
|
+
${eo(ae)}
|
|
1004
|
+
</text>`;
|
|
1005
|
+
return s && u && K.value.set(u, se), se;
|
|
1006
|
+
}
|
|
1007
|
+
const Ht = n ? 1 : 0, Et = Math.max(0, Math.floor(z / d) - Ht);
|
|
1008
|
+
if (Et <= 0 && !n)
|
|
1009
|
+
return s && u && K.value.set(u, ""), "";
|
|
1010
|
+
function Wt(L, ae, et, oe, ne, ct) {
|
|
1011
|
+
const jt = String(L).split(/\s+/).filter(Boolean), W = [];
|
|
1012
|
+
let se = "";
|
|
1013
|
+
function U(_) {
|
|
1014
|
+
return _e(_, et, oe) <= ae;
|
|
1015
|
+
}
|
|
1016
|
+
function _l(_) {
|
|
1017
|
+
if (U(_)) return [_];
|
|
1018
|
+
const de = [];
|
|
1019
|
+
let O = 0;
|
|
1020
|
+
for (; O < _.length; ) {
|
|
1021
|
+
let ve = 1, qt = _.length - O, Gt = 1;
|
|
1022
|
+
for (; ve <= qt; ) {
|
|
1023
|
+
const vt = ve + qt >> 1, Il = _.slice(O, O + vt);
|
|
1024
|
+
U(Il) ? (Gt = vt, ve = vt + 1) : qt = vt - 1;
|
|
1025
|
+
}
|
|
1026
|
+
de.push(_.slice(O, O + Gt)), O += Gt;
|
|
1027
|
+
}
|
|
1028
|
+
return de;
|
|
1029
|
+
}
|
|
1030
|
+
const dt = jt.flatMap((_) => _l(_));
|
|
1031
|
+
let Kt = !1;
|
|
1032
|
+
for (let _ = 0; _ < dt.length; _ += 1) {
|
|
1033
|
+
const de = dt[_], O = se ? se + " " + de : de;
|
|
1034
|
+
if (U(O))
|
|
1035
|
+
se = O;
|
|
1036
|
+
else {
|
|
1037
|
+
if (se)
|
|
1038
|
+
W.push(se);
|
|
1039
|
+
else {
|
|
1040
|
+
let ve = de;
|
|
1041
|
+
for (; ve.length && !U(ve); ) ve = ve.slice(0, -1);
|
|
1042
|
+
ve && W.push(ve);
|
|
1043
|
+
}
|
|
1044
|
+
if (se = "", W.length === ne) {
|
|
1045
|
+
Kt = !0;
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
_ === dt.length - 1 && se && W.length < ne && W.push(se);
|
|
1050
|
+
}
|
|
1051
|
+
if (W.length && W.join(" ") !== dt.join(" ") && (Kt = !0), Kt && W.length > 0) {
|
|
1052
|
+
let _ = W[W.length - 1];
|
|
1053
|
+
if (!U(_)) {
|
|
1054
|
+
let O = _;
|
|
1055
|
+
for (; O.length && !U(O); ) O = O.slice(0, -1);
|
|
1056
|
+
_ = O;
|
|
1057
|
+
}
|
|
1058
|
+
let de = _ + "…";
|
|
1059
|
+
if (!U(de)) {
|
|
1060
|
+
let O = _;
|
|
1061
|
+
for (; O.length && !U(O + "…"); )
|
|
1062
|
+
O = O.slice(0, -1);
|
|
1063
|
+
de = O + "…";
|
|
1064
|
+
}
|
|
1065
|
+
W[W.length - 1] = de;
|
|
1066
|
+
}
|
|
1067
|
+
return W;
|
|
1068
|
+
}
|
|
1069
|
+
const ce = a ? Wt(
|
|
1070
|
+
Vt,
|
|
1071
|
+
w,
|
|
1072
|
+
c,
|
|
1073
|
+
H,
|
|
1074
|
+
Et
|
|
1075
|
+
) : [];
|
|
1076
|
+
let we = c, ke = String(Je);
|
|
1077
|
+
if (n) {
|
|
1078
|
+
for (; _e(ke, we, q) > w && we > Math.max(8, c * 0.75); )
|
|
1079
|
+
we -= 1;
|
|
1080
|
+
if (_e(ke, we, q) > w) {
|
|
1081
|
+
let L = ke;
|
|
1082
|
+
for (; L.length && _e(L + "…", we, q) > w; )
|
|
1083
|
+
L = L.slice(0, -1);
|
|
1084
|
+
if (ke = L ? L + "…" : "", !ke.length)
|
|
1085
|
+
return s && u && K.value.set(u, ""), "";
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
if (ce.length * d + (n ? d : 0) > z) {
|
|
1089
|
+
for (; ce.length && ce.length * d + (n ? d : 0) > z; )
|
|
1090
|
+
ce.pop();
|
|
1091
|
+
if (!ce.length && (!n || d > z))
|
|
1092
|
+
return s && u && K.value.set(u, ""), "";
|
|
1093
|
+
}
|
|
1094
|
+
const Yt = e.x0 + i, Ol = e.y0 + i + c, Xt = [];
|
|
1095
|
+
a && ce.forEach((L, ae) => {
|
|
1096
|
+
Xt.push(`
|
|
1097
|
+
<tspan
|
|
1098
|
+
x="${Yt}"
|
|
1099
|
+
dy="${ae === 0 ? 0 : d}"
|
|
1100
|
+
font-weight="${H}"
|
|
1101
|
+
>
|
|
1102
|
+
${eo(L)}
|
|
1103
|
+
</tspan>`);
|
|
1104
|
+
}), n && Xt.push(`
|
|
1105
|
+
<tspan
|
|
1106
|
+
x="${Yt}"
|
|
1107
|
+
dy="${ce.length ? d : 0}"
|
|
1108
|
+
font-weight="${q}"
|
|
1109
|
+
font-size="${we}"
|
|
1110
|
+
>
|
|
1111
|
+
${eo(ke)}
|
|
1112
|
+
</tspan>`);
|
|
1113
|
+
const Lo = `<text
|
|
1114
|
+
x="${Yt}"
|
|
1115
|
+
y="${Ol}"
|
|
1116
|
+
font-size="${c}"
|
|
1117
|
+
font-family="${kt(T)}"
|
|
1118
|
+
fill="${kt(Oe)}"
|
|
1119
|
+
paint-order="stroke"
|
|
1120
|
+
stroke="transparent"
|
|
1121
|
+
stroke-width="0"
|
|
1122
|
+
style="transition: all 0.2s ease-in-out;"
|
|
1123
|
+
>
|
|
1124
|
+
${Xt.join("")}
|
|
1125
|
+
</text>`;
|
|
1126
|
+
return s && u && K.value.set(u, Lo), Lo;
|
|
1127
|
+
}
|
|
1128
|
+
function Tl(e) {
|
|
1129
|
+
const l = t.value.style.chart.layout.rects.borderRadius, o = ee(e), a = Q(e);
|
|
1130
|
+
return Math.min(l, Math.min(o, a) / 6);
|
|
1131
|
+
}
|
|
1132
|
+
async function Fo() {
|
|
1133
|
+
if (V("copyAlt", {
|
|
1134
|
+
config: t.value,
|
|
1135
|
+
dataset: F.value
|
|
1136
|
+
}), !t.value.userOptions.callbacks.altCopy) {
|
|
1137
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
await Promise.resolve(t.value.userOptions.callbacks.altCopy({
|
|
1141
|
+
config: t.value,
|
|
1142
|
+
dataset: F.value
|
|
1143
|
+
}));
|
|
1144
|
+
}
|
|
1145
|
+
function Sl() {
|
|
1146
|
+
ye.value = null, At.value = !0;
|
|
1147
|
+
}
|
|
1148
|
+
function Al() {
|
|
1149
|
+
ye.value = null, je.value = "pointer", Ue.value = !1, R.value = null, At.value = !1;
|
|
1150
|
+
}
|
|
1151
|
+
function Ml(e) {
|
|
1152
|
+
if (!Fe.value || Ge.value || document.activeElement !== Fe.value || !F.value.length || Ee.value) return;
|
|
1153
|
+
const l = ["ArrowLeft", "ArrowUp"].includes(e.key), o = ["ArrowRight", "ArrowDown"].includes(e.key), a = e.key === "Enter" || e.key === " ", n = e.key === "Escape";
|
|
1154
|
+
if (!l && !o && !a && !n) return;
|
|
1155
|
+
if (e.preventDefault(), e.stopPropagation(), n) {
|
|
1156
|
+
ye.value = null, je.value = "pointer", Ue.value = !1, R.value = null;
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
if (a) {
|
|
1160
|
+
if (ye.value === null) return;
|
|
1161
|
+
const w = F.value[ye.value];
|
|
1162
|
+
if (!w) return;
|
|
1163
|
+
qe(w, ye.value);
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
let s = ye.value;
|
|
1167
|
+
const u = R.value ? F.value.findIndex((w) => w.id === R.value.id) : null, i = s !== null && s >= 0 && s < F.value.length, c = u !== null && u >= 0 && u < F.value.length;
|
|
1168
|
+
i ? o ? (s += 1, s >= F.value.length && (s = 0)) : l && (s -= 1, s < 0 && (s = F.value.length - 1)) : c ? (s = o ? u + 1 : u - 1, s >= F.value.length && (s = 0), s < 0 && (s = F.value.length - 1)) : o ? s = 0 : s = F.value.length - 1;
|
|
1169
|
+
const d = F.value[s];
|
|
1170
|
+
d && (Pl(s), To({
|
|
1171
|
+
datapoint: d,
|
|
1172
|
+
seriesIndex: s,
|
|
1173
|
+
triggerMode: "keyboard"
|
|
1174
|
+
}));
|
|
1175
|
+
}
|
|
1176
|
+
function Pl(e) {
|
|
1177
|
+
if (!Number.isFinite(e) || !Fe.value) return;
|
|
1178
|
+
const l = F.value[e];
|
|
1179
|
+
if (!l) return;
|
|
1180
|
+
const o = l.x0 + ee(l) / 2, a = l.y0 + Q(l) / 2, n = Fe.value.getBoundingClientRect();
|
|
1181
|
+
co.value = {
|
|
1182
|
+
x: n.left + (o - ie.value.startX) / ie.value.width * n.width,
|
|
1183
|
+
y: n.top + (a - ie.value.startY) / ie.value.height * n.height
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
const zt = k(() => {
|
|
1187
|
+
const e = We.value?.colNames ?? [], l = We.value?.body ?? [];
|
|
1188
|
+
return { headers: e, rows: l };
|
|
1189
|
+
});
|
|
1190
|
+
return p({
|
|
1191
|
+
getData: pl,
|
|
1192
|
+
getImage: gl,
|
|
1193
|
+
generateCsv: Rt,
|
|
1194
|
+
generateImage: po,
|
|
1195
|
+
generateSvg: _o,
|
|
1196
|
+
generatePdf: fo,
|
|
1197
|
+
hideSeries: hl,
|
|
1198
|
+
showSeries: vl,
|
|
1199
|
+
toggleTable: So,
|
|
1200
|
+
toggleTooltip: Ao,
|
|
1201
|
+
toggleAnnotator: Dt,
|
|
1202
|
+
toggleFullscreen: xo,
|
|
1203
|
+
copyAlt: Fo
|
|
1204
|
+
}), (e, l) => (v(), A("div", {
|
|
1205
|
+
ref_key: "treemapChart",
|
|
1206
|
+
ref: re,
|
|
1207
|
+
class: Zt(`vue-data-ui-component vue-ui-treemap ${Ie.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1208
|
+
style: xe(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
1209
|
+
id: `treemap_${le.value}`,
|
|
1210
|
+
onMouseenter: l[2] || (l[2] = () => y(vo)(!0)),
|
|
1211
|
+
onMouseleave: l[3] || (l[3] = () => y(vo)(!1))
|
|
1212
|
+
}, [
|
|
1213
|
+
E("div", {
|
|
1214
|
+
id: `chart-instructions-${le.value}`,
|
|
1215
|
+
class: "sr-only"
|
|
1216
|
+
}, [
|
|
1217
|
+
E("p", null, tt(t.value.a11y.translations.keyboardNavigation), 1)
|
|
1218
|
+
], 8, pa),
|
|
1219
|
+
zt.value?.rows?.length ? (v(), he(aa, {
|
|
1220
|
+
key: 0,
|
|
1221
|
+
uid: le.value,
|
|
1222
|
+
head: zt.value.headers,
|
|
1223
|
+
body: zt.value.rows,
|
|
1224
|
+
notice: t.value.a11y.translations.tableAvailable,
|
|
1225
|
+
caption: t.value.a11y.translations.tableCaption
|
|
1226
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : N("", !0),
|
|
1227
|
+
t.value.userOptions.buttons.annotator ? (v(), he(y(f), {
|
|
1228
|
+
key: 1,
|
|
1229
|
+
svgRef: y(Fe),
|
|
1230
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1231
|
+
color: t.value.style.chart.color,
|
|
1232
|
+
active: Ge.value,
|
|
1233
|
+
isCursorPointer: Se.value,
|
|
1234
|
+
onClose: Dt
|
|
1235
|
+
}, {
|
|
1236
|
+
"annotator-action-close": M(() => [
|
|
1237
|
+
C(e.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1238
|
+
]),
|
|
1239
|
+
"annotator-action-color": M(({ color: o }) => [
|
|
1240
|
+
C(e.$slots, "annotator-action-color", X(j({ color: o })), void 0, !0)
|
|
1241
|
+
]),
|
|
1242
|
+
"annotator-action-draw": M(({ mode: o }) => [
|
|
1243
|
+
C(e.$slots, "annotator-action-draw", X(j({ mode: o })), void 0, !0)
|
|
1244
|
+
]),
|
|
1245
|
+
"annotator-action-undo": M(({ disabled: o }) => [
|
|
1246
|
+
C(e.$slots, "annotator-action-undo", X(j({ disabled: o })), void 0, !0)
|
|
1247
|
+
]),
|
|
1248
|
+
"annotator-action-redo": M(({ disabled: o }) => [
|
|
1249
|
+
C(e.$slots, "annotator-action-redo", X(j({ disabled: o })), void 0, !0)
|
|
1250
|
+
]),
|
|
1251
|
+
"annotator-action-delete": M(({ disabled: o }) => [
|
|
1252
|
+
C(e.$slots, "annotator-action-delete", X(j({ disabled: o })), void 0, !0)
|
|
1253
|
+
]),
|
|
1254
|
+
_: 3
|
|
1255
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : N("", !0),
|
|
1256
|
+
Go.value ? (v(), A("div", {
|
|
1257
|
+
key: 2,
|
|
1258
|
+
ref_key: "noTitle",
|
|
1259
|
+
ref: uo,
|
|
1260
|
+
class: "vue-data-ui-no-title-space",
|
|
1261
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1262
|
+
}, null, 512)) : N("", !0),
|
|
1263
|
+
t.value.style.chart.title.text ? (v(), A("div", {
|
|
1264
|
+
key: 3,
|
|
1265
|
+
ref_key: "chartTitle",
|
|
1266
|
+
ref: ao,
|
|
1267
|
+
style: xe(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
1268
|
+
}, [
|
|
1269
|
+
(v(), he(ta, {
|
|
1270
|
+
key: `title_${ro.value}`,
|
|
1271
|
+
config: {
|
|
1272
|
+
title: {
|
|
1273
|
+
cy: "treemap-div-title",
|
|
1274
|
+
...t.value.style.chart.title
|
|
1275
|
+
},
|
|
1276
|
+
subtitle: {
|
|
1277
|
+
cy: "treemap-div-subtitle",
|
|
1278
|
+
...t.value.style.chart.title.subtitle
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}, null, 8, ["config"]))
|
|
1282
|
+
], 4)) : N("", !0),
|
|
1283
|
+
E("div", {
|
|
1284
|
+
id: `legend-top-${le.value}`
|
|
1285
|
+
}, null, 8, ga),
|
|
1286
|
+
t.value.userOptions.show && Te.value && (y(ho) || y(Pt)) ? (v(), he(y(P), {
|
|
1287
|
+
ref_key: "userOptionsRef",
|
|
1288
|
+
ref: St,
|
|
1289
|
+
key: `user_option_${lo.value}`,
|
|
1290
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1291
|
+
color: t.value.style.chart.color,
|
|
1292
|
+
isPrinting: y(_t),
|
|
1293
|
+
isImaging: y(It),
|
|
1294
|
+
uid: le.value,
|
|
1295
|
+
hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
|
|
1296
|
+
hasPdf: t.value.userOptions.buttons.pdf,
|
|
1297
|
+
hasXls: t.value.userOptions.buttons.csv,
|
|
1298
|
+
hasImg: t.value.userOptions.buttons.img,
|
|
1299
|
+
hasSvg: t.value.userOptions.buttons.svg,
|
|
1300
|
+
hasTable: t.value.userOptions.buttons.table,
|
|
1301
|
+
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
1302
|
+
hasAltCopy: t.value.userOptions.buttons.altCopy,
|
|
1303
|
+
isFullscreen: Ie.value,
|
|
1304
|
+
isTooltip: J.value.showTooltip,
|
|
1305
|
+
titles: { ...t.value.userOptions.buttonTitles },
|
|
1306
|
+
chartElement: re.value,
|
|
1307
|
+
position: t.value.userOptions.position,
|
|
1308
|
+
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
1309
|
+
isAnnotation: Ge.value,
|
|
1310
|
+
callbacks: t.value.userOptions.callbacks,
|
|
1311
|
+
printScale: t.value.userOptions.print.scale,
|
|
1312
|
+
tableDialog: t.value.table.useDialog,
|
|
1313
|
+
isCursorPointer: Se.value,
|
|
1314
|
+
onToggleFullscreen: xo,
|
|
1315
|
+
onGeneratePdf: y(fo),
|
|
1316
|
+
onGenerateCsv: Rt,
|
|
1317
|
+
onGenerateImage: xl,
|
|
1318
|
+
onGenerateSvg: _o,
|
|
1319
|
+
onToggleTable: So,
|
|
1320
|
+
onToggleTooltip: Ao,
|
|
1321
|
+
onToggleAnnotator: Dt,
|
|
1322
|
+
onCopyAlt: Fo,
|
|
1323
|
+
style: xe({
|
|
1324
|
+
visibility: y(ho) ? y(Pt) ? "visible" : "hidden" : "visible"
|
|
1325
|
+
})
|
|
1326
|
+
}, Bo({ _: 2 }, [
|
|
1327
|
+
e.$slots.menuIcon ? {
|
|
1328
|
+
name: "menuIcon",
|
|
1329
|
+
fn: M(({ isOpen: o, color: a }) => [
|
|
1330
|
+
C(e.$slots, "menuIcon", X(j({ isOpen: o, color: a })), void 0, !0)
|
|
1331
|
+
]),
|
|
1332
|
+
key: "0"
|
|
1333
|
+
} : void 0,
|
|
1334
|
+
e.$slots.optionTooltip ? {
|
|
1335
|
+
name: "optionTooltip",
|
|
1336
|
+
fn: M(() => [
|
|
1337
|
+
C(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
1338
|
+
]),
|
|
1339
|
+
key: "1"
|
|
1340
|
+
} : void 0,
|
|
1341
|
+
e.$slots.optionPdf ? {
|
|
1342
|
+
name: "optionPdf",
|
|
1343
|
+
fn: M(() => [
|
|
1344
|
+
C(e.$slots, "optionPdf", {}, void 0, !0)
|
|
1345
|
+
]),
|
|
1346
|
+
key: "2"
|
|
1347
|
+
} : void 0,
|
|
1348
|
+
e.$slots.optionCsv ? {
|
|
1349
|
+
name: "optionCsv",
|
|
1350
|
+
fn: M(() => [
|
|
1351
|
+
C(e.$slots, "optionCsv", {}, void 0, !0)
|
|
1352
|
+
]),
|
|
1353
|
+
key: "3"
|
|
1354
|
+
} : void 0,
|
|
1355
|
+
e.$slots.optionImg ? {
|
|
1356
|
+
name: "optionImg",
|
|
1357
|
+
fn: M(() => [
|
|
1358
|
+
C(e.$slots, "optionImg", {}, void 0, !0)
|
|
1359
|
+
]),
|
|
1360
|
+
key: "4"
|
|
1361
|
+
} : void 0,
|
|
1362
|
+
e.$slots.optionSvg ? {
|
|
1363
|
+
name: "optionSvg",
|
|
1364
|
+
fn: M(() => [
|
|
1365
|
+
C(e.$slots, "optionSvg", {}, void 0, !0)
|
|
1366
|
+
]),
|
|
1367
|
+
key: "5"
|
|
1368
|
+
} : void 0,
|
|
1369
|
+
e.$slots.optionTable ? {
|
|
1370
|
+
name: "optionTable",
|
|
1371
|
+
fn: M(() => [
|
|
1372
|
+
C(e.$slots, "optionTable", {}, void 0, !0)
|
|
1373
|
+
]),
|
|
1374
|
+
key: "6"
|
|
1375
|
+
} : void 0,
|
|
1376
|
+
e.$slots.optionFullscreen ? {
|
|
1377
|
+
name: "optionFullscreen",
|
|
1378
|
+
fn: M(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
1379
|
+
C(e.$slots, "optionFullscreen", X(j({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
1380
|
+
]),
|
|
1381
|
+
key: "7"
|
|
1382
|
+
} : void 0,
|
|
1383
|
+
e.$slots.optionAnnotator ? {
|
|
1384
|
+
name: "optionAnnotator",
|
|
1385
|
+
fn: M(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
1386
|
+
C(e.$slots, "optionAnnotator", X(j({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
1387
|
+
]),
|
|
1388
|
+
key: "8"
|
|
1389
|
+
} : void 0,
|
|
1390
|
+
e.$slots.optionAltCopy ? {
|
|
1391
|
+
name: "optionAltCopy",
|
|
1392
|
+
fn: M(({ altCopy: o }) => [
|
|
1393
|
+
C(e.$slots, "optionAltCopy", X(j({ altCopy: o })), void 0, !0)
|
|
1394
|
+
]),
|
|
1395
|
+
key: "9"
|
|
1396
|
+
} : void 0
|
|
1397
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : N("", !0),
|
|
1398
|
+
me.value.length > 1 ? (v(), A("nav", {
|
|
1399
|
+
key: 5,
|
|
1400
|
+
class: "vue-ui-treemap-breadcrumbs",
|
|
1401
|
+
"data-dom-to-png-ignore": "",
|
|
1402
|
+
ref_key: "breadcrumbsNav",
|
|
1403
|
+
ref: Tt
|
|
1404
|
+
}, [
|
|
1405
|
+
(v(!0), A(ot, null, ht(me.value, (o, a) => (v(), A("span", {
|
|
1406
|
+
role: "button",
|
|
1407
|
+
tabindex: a < me.value.length - 1 ? 0 : void 0,
|
|
1408
|
+
key: o.id || "root",
|
|
1409
|
+
onClick: (n) => a === me.value.length - 1 ? () => {
|
|
1410
|
+
} : qe(o.node),
|
|
1411
|
+
onKeydown: [
|
|
1412
|
+
Ro(Jt((n) => a === me.value.length - 1 ? void 0 : qe(o.node), ["prevent"]), ["enter"]),
|
|
1413
|
+
Ro(Jt((n) => a === me.value.length - 1 ? void 0 : qe(o.node), ["prevent"]), ["space"])
|
|
1414
|
+
],
|
|
1415
|
+
class: "vue-ui-treemap-crumb",
|
|
1416
|
+
"data-last-crumb": a === me.value.length - 1,
|
|
1417
|
+
style: xe({
|
|
1418
|
+
color: t.value.style.chart.color,
|
|
1419
|
+
cursor: Se.value ? "pointer" : "default"
|
|
1420
|
+
}),
|
|
1421
|
+
onMouseenter: (n) => Mo(a),
|
|
1422
|
+
onMouseleave: Po,
|
|
1423
|
+
onFocus: (n) => Mo(a),
|
|
1424
|
+
onBlur: Po
|
|
1425
|
+
}, [
|
|
1426
|
+
E("span", ma, [
|
|
1427
|
+
E("span", ba, [
|
|
1428
|
+
C(e.$slots, "breadcrumb-label", ft({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: it.value === a }), () => [
|
|
1429
|
+
a === 0 ? (v(), A("div", wa, [
|
|
1430
|
+
pt(Eo, {
|
|
1431
|
+
name: it.value === 0 ? "homeFilled" : "home",
|
|
1432
|
+
stroke: t.value.style.chart.color
|
|
1433
|
+
}, null, 8, ["name", "stroke"])
|
|
1434
|
+
])) : (v(), A(ot, { key: 1 }, [
|
|
1435
|
+
gt(tt(o.label), 1)
|
|
1436
|
+
], 64))
|
|
1437
|
+
], !0)
|
|
1438
|
+
]),
|
|
1439
|
+
a < me.value.length - 1 ? (v(), A("span", ka, [
|
|
1440
|
+
C(e.$slots, "breadcrumb-arrow", {}, () => [
|
|
1441
|
+
l[4] || (l[4] = gt(" › ", -1))
|
|
1442
|
+
], !0)
|
|
1443
|
+
])) : N("", !0)
|
|
1444
|
+
])
|
|
1445
|
+
], 44, ya))), 128))
|
|
1446
|
+
], 512)) : N("", !0),
|
|
1447
|
+
E("div", Ca, [
|
|
1448
|
+
(v(), A("svg", {
|
|
1449
|
+
ref_key: "svgRef",
|
|
1450
|
+
ref: Fe,
|
|
1451
|
+
xmlns: y(Qt),
|
|
1452
|
+
"aria-describedby": `chart-instructions-${le.value}`,
|
|
1453
|
+
class: Zt({ "vue-data-ui-fullscreen--on": Ie.value, "vue-data-ui-fulscreen--off": !Ie.value, "vue-data-ui-zoom-plus": !Ve.value, "vue-data-ui-zoom-minus": Ve.value, loading: y(Ae) }),
|
|
1454
|
+
viewBox: `${ie.value.startX} ${ie.value.startY} ${ie.value.width <= 0 ? 10 : ie.value.width} ${ie.value.height <= 0 ? 10 : ie.value.height}`,
|
|
1455
|
+
style: xe(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`),
|
|
1456
|
+
tabindex: "0",
|
|
1457
|
+
onFocus: Sl,
|
|
1458
|
+
onBlur: Al,
|
|
1459
|
+
onKeydown: Ml
|
|
1460
|
+
}, [
|
|
1461
|
+
pt(y(S)),
|
|
1462
|
+
(v(!0), A(ot, null, ht(F.value, (o, a) => (v(), A("g", {
|
|
1463
|
+
key: `tgrad_${o.id}`
|
|
1464
|
+
}, [
|
|
1465
|
+
t.value.style.chart.layout.rects.gradient.show ? (v(), A("defs", $a, [
|
|
1466
|
+
E("radialGradient", {
|
|
1467
|
+
id: `tgrad_${o.id}`,
|
|
1468
|
+
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
1469
|
+
}, [
|
|
1470
|
+
E("stop", {
|
|
1471
|
+
offset: "18%",
|
|
1472
|
+
"stop-color": o.color
|
|
1473
|
+
}, null, 8, Sa),
|
|
1474
|
+
E("stop", {
|
|
1475
|
+
offset: "100%",
|
|
1476
|
+
"stop-color": y(bt)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
1477
|
+
}, null, 8, Aa)
|
|
1478
|
+
], 8, Ta)
|
|
1479
|
+
])) : N("", !0)
|
|
1480
|
+
]))), 128)),
|
|
1481
|
+
(v(!0), A(ot, null, ht(nl.value, (o, a) => (v(), A("g", {
|
|
1482
|
+
key: `parent_${o.id}`,
|
|
1483
|
+
class: "vue-ui-treemap-parent-wrapper"
|
|
1484
|
+
}, [
|
|
1485
|
+
E("rect", {
|
|
1486
|
+
x: o.x0,
|
|
1487
|
+
y: o.y0,
|
|
1488
|
+
height: Q(o),
|
|
1489
|
+
width: ee(o),
|
|
1490
|
+
fill: t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? y(bt)(o.color ?? t.value.style.chart.backgroundColor, t.value.style.chart.layout.rects.group.backgroundLighterRatio) : t.value.style.chart.backgroundColor,
|
|
1491
|
+
rx: 0,
|
|
1492
|
+
stroke: t.value.style.chart.layout.rects.group.stroke,
|
|
1493
|
+
"stroke-width": t.value.style.chart.layout.rects.group.strokeWidth,
|
|
1494
|
+
class: "vue-data-ui-cursor-default vue-ui-treemap-rect"
|
|
1495
|
+
}, null, 8, Ma),
|
|
1496
|
+
e.$slots["group-label"] && !Ee.value ? (v(), A("foreignObject", {
|
|
1497
|
+
key: 0,
|
|
1498
|
+
width: ee(o),
|
|
1499
|
+
height: Q(o),
|
|
1500
|
+
x: o.x0,
|
|
1501
|
+
y: o.y0
|
|
1502
|
+
}, [
|
|
1503
|
+
C(e.$slots, "group-label", ft({ ref_for: !0 }, { group: o }), void 0, !0)
|
|
1504
|
+
], 8, Pa)) : !y(Ae) && t.value.style.chart.layout.labels.showDefaultLabels && !Ee.value ? (v(), A("g", {
|
|
1505
|
+
key: 1,
|
|
1506
|
+
style: { "pointer-events": "none" },
|
|
1507
|
+
innerHTML: Io({ rect: o, seriesIndex: 0, isTitle: !0 }),
|
|
1508
|
+
class: "vue-data-ui-cursor-default"
|
|
1509
|
+
}, null, 8, Oa)) : N("", !0)
|
|
1510
|
+
]))), 128)),
|
|
1511
|
+
(v(!0), A(ot, null, ht(F.value, (o, a) => (v(), A("g", {
|
|
1512
|
+
key: `k_${o.id}`
|
|
1513
|
+
}, [
|
|
1514
|
+
E("rect", {
|
|
1515
|
+
x: o.x0,
|
|
1516
|
+
y: o.y0,
|
|
1517
|
+
height: Q(o),
|
|
1518
|
+
width: ee(o),
|
|
1519
|
+
fill: ge.value ? o.color ?? t.value.style.chart.backgroundColor : t.value.style.chart.layout.rects.gradient.show ? Ee.value ? t.value.style.chart.backgroundColor : `url(#tgrad_${o.id})` : o.color ?? t.value.style.chart.backgroundColor,
|
|
1520
|
+
rx: Tl(o),
|
|
1521
|
+
stroke: R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
|
|
1522
|
+
"stroke-width": R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
|
|
1523
|
+
onClick: Jt((n) => qe(o, a), ["stop"]),
|
|
1524
|
+
onMouseenter: () => To({
|
|
1525
|
+
datapoint: o,
|
|
1526
|
+
seriesIndex: a,
|
|
1527
|
+
triggerMode: "pointer"
|
|
1528
|
+
}),
|
|
1529
|
+
onMouseleave: (n) => fl({ datapoint: o, seriesIndex: a }),
|
|
1530
|
+
style: xe(`opacity:${R.value ? R.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
1531
|
+
class: Zt([
|
|
1532
|
+
"vue-ui-treemap-rect",
|
|
1533
|
+
il(o) ? "vue-data-ui-zoom-plus" : Ve.value ? "vue-data-ui-zoom-minus" : ""
|
|
1534
|
+
])
|
|
1535
|
+
}, null, 46, _a),
|
|
1536
|
+
!e.$slots.rect && !y(Ae) && t.value.style.chart.layout.labels.showDefaultLabels && !Ee.value ? (v(), A("g", {
|
|
1537
|
+
key: 0,
|
|
1538
|
+
style: xe(`pointer-events:none; opacity:${R.value ? R.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
1539
|
+
innerHTML: Io({ rect: o, seriesIndex: a })
|
|
1540
|
+
}, null, 12, Ia)) : N("", !0),
|
|
1541
|
+
(v(), A("foreignObject", {
|
|
1542
|
+
x: o.x0,
|
|
1543
|
+
y: o.y0,
|
|
1544
|
+
height: Q(o),
|
|
1545
|
+
width: ee(o),
|
|
1546
|
+
class: "vue-ui-treemap-cell-foreignObject"
|
|
1547
|
+
}, [
|
|
1548
|
+
E("div", La, [
|
|
1549
|
+
y(Ae) ? N("", !0) : C(e.$slots, "rect", ft({
|
|
1550
|
+
key: 0,
|
|
1551
|
+
ref_for: !0
|
|
1552
|
+
}, {
|
|
1553
|
+
rect: {
|
|
1554
|
+
...o,
|
|
1555
|
+
height: Q(o),
|
|
1556
|
+
width: ee(o),
|
|
1557
|
+
isSelected: R.value ? R.value.id === o.id : !0
|
|
1558
|
+
},
|
|
1559
|
+
shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Ve.value,
|
|
1560
|
+
fontSize: ze(o),
|
|
1561
|
+
isZoom: Ve.value,
|
|
1562
|
+
textColor: y(wt)(o.color)
|
|
1563
|
+
}), void 0, !0)
|
|
1564
|
+
])
|
|
1565
|
+
], 8, Fa))
|
|
1566
|
+
]))), 128)),
|
|
1567
|
+
C(e.$slots, "svg", X(j({ svg: D.value, isZoom: Ve.value, rect: R.value, config: t.value, isPrintingImg: y(_t) | y(It) | nt.value, isPrintingSvg: st.value })), void 0, !0)
|
|
1568
|
+
], 46, xa)),
|
|
1569
|
+
e.$slots.hint ? (v(), A("div", Na, [
|
|
1570
|
+
C(e.$slots, "hint", X(j({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: At.value })), void 0, !0)
|
|
1571
|
+
])) : N("", !0)
|
|
1572
|
+
]),
|
|
1573
|
+
e.$slots.watermark ? (v(), A("div", Ba, [
|
|
1574
|
+
C(e.$slots, "watermark", X(j({ isPrinting: y(_t) || y(It) || nt.value || st.value })), void 0, !0)
|
|
1575
|
+
])) : N("", !0),
|
|
1576
|
+
E("div", {
|
|
1577
|
+
id: `legend-bottom-${le.value}`
|
|
1578
|
+
}, null, 8, Ra),
|
|
1579
|
+
io.value ? (v(), he(Bl, {
|
|
1580
|
+
key: 7,
|
|
1581
|
+
to: t.value.style.chart.legend.position === "top" ? `#legend-top-${le.value}` : `#legend-bottom-${le.value}`
|
|
1582
|
+
}, [
|
|
1583
|
+
E("div", {
|
|
1584
|
+
ref_key: "chartLegend",
|
|
1585
|
+
ref: no
|
|
1586
|
+
}, [
|
|
1587
|
+
t.value.style.chart.legend.show ? (v(), he(la, {
|
|
1588
|
+
key: `legend_${$t.value}`,
|
|
1589
|
+
legendSet: He.value,
|
|
1590
|
+
config: cl.value,
|
|
1591
|
+
id: `treemap_legend_${le.value}`,
|
|
1592
|
+
isCursorPointer: Se.value,
|
|
1593
|
+
onClickMarker: l[0] || (l[0] = ({ legend: o }) => rt(o))
|
|
1594
|
+
}, {
|
|
1595
|
+
item: M(({ legend: o, index: a }) => [
|
|
1596
|
+
y(Ae) ? N("", !0) : (v(), A("div", {
|
|
1597
|
+
key: 0,
|
|
1598
|
+
onClick: (n) => rt(o),
|
|
1599
|
+
style: xe(`opacity:${B.value.includes(o.id) ? 0.5 : 1}`)
|
|
1600
|
+
}, tt(o.display), 13, Da))
|
|
1601
|
+
]),
|
|
1602
|
+
legendToggle: M(() => [
|
|
1603
|
+
He.value.length > 2 && t.value.style.chart.legend.selectAllToggle.show && !y(Ae) ? (v(), he(na, {
|
|
1604
|
+
key: 0,
|
|
1605
|
+
backgroundColor: t.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1606
|
+
color: t.value.style.chart.legend.selectAllToggle.color,
|
|
1607
|
+
fontSize: t.value.style.chart.legend.fontSize,
|
|
1608
|
+
checked: B.value.length > 0,
|
|
1609
|
+
isCursorPointer: Se.value,
|
|
1610
|
+
onToggle: dl
|
|
1611
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : N("", !0)
|
|
1612
|
+
]),
|
|
1613
|
+
_: 1
|
|
1614
|
+
}, 8, ["legendSet", "config", "id", "isCursorPointer"])) : C(e.$slots, "legend", {
|
|
1615
|
+
key: 1,
|
|
1616
|
+
legend: He.value
|
|
1617
|
+
}, void 0, !0)
|
|
1618
|
+
], 512)
|
|
1619
|
+
], 8, ["to"])) : N("", !0),
|
|
1620
|
+
e.$slots.source ? (v(), A("div", {
|
|
1621
|
+
key: 8,
|
|
1622
|
+
ref_key: "source",
|
|
1623
|
+
ref: so,
|
|
1624
|
+
dir: "auto"
|
|
1625
|
+
}, [
|
|
1626
|
+
C(e.$slots, "source", {}, void 0, !0)
|
|
1627
|
+
], 512)) : N("", !0),
|
|
1628
|
+
pt(y(m), {
|
|
1629
|
+
teleportTo: t.value.style.chart.tooltip.teleportTo,
|
|
1630
|
+
show: J.value.showTooltip && Ue.value,
|
|
1631
|
+
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
1632
|
+
color: t.value.style.chart.tooltip.color,
|
|
1633
|
+
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
1634
|
+
borderRadius: t.value.style.chart.tooltip.borderRadius,
|
|
1635
|
+
borderColor: t.value.style.chart.tooltip.borderColor,
|
|
1636
|
+
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
1637
|
+
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
1638
|
+
position: t.value.style.chart.tooltip.position,
|
|
1639
|
+
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
1640
|
+
parent: re.value,
|
|
1641
|
+
content: Ct.value,
|
|
1642
|
+
isFullscreen: Ie.value,
|
|
1643
|
+
isCustom: y(Ho)(t.value.style.chart.tooltip.customFormat),
|
|
1644
|
+
smooth: t.value.style.chart.tooltip.smooth,
|
|
1645
|
+
backdropFilter: t.value.style.chart.tooltip.backdropFilter,
|
|
1646
|
+
smoothForce: t.value.style.chart.tooltip.smoothForce,
|
|
1647
|
+
smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1648
|
+
isA11yMode: je.value === "keyboard",
|
|
1649
|
+
a11yPosition: co.value
|
|
1650
|
+
}, {
|
|
1651
|
+
"tooltip-before": M(() => [
|
|
1652
|
+
C(e.$slots, "tooltip-before", X(j({ ...Bt.value })), void 0, !0)
|
|
1653
|
+
]),
|
|
1654
|
+
"tooltip-after": M(() => [
|
|
1655
|
+
C(e.$slots, "tooltip-after", X(j({ ...Bt.value })), void 0, !0)
|
|
1656
|
+
]),
|
|
1657
|
+
_: 3
|
|
1658
|
+
}, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
1659
|
+
Te.value && t.value.userOptions.buttons.table ? (v(), he(Rl(Ze.value.component), ft({ key: 9 }, Ze.value.props, {
|
|
1660
|
+
ref_key: "tableUnit",
|
|
1661
|
+
ref: Ye,
|
|
1662
|
+
onClose: Oo
|
|
1663
|
+
}), Bo({
|
|
1664
|
+
content: M(() => [
|
|
1665
|
+
(v(), he(y(g), {
|
|
1666
|
+
key: `table_${xt.value}`,
|
|
1667
|
+
colNames: We.value.colNames,
|
|
1668
|
+
head: We.value.head,
|
|
1669
|
+
body: We.value.body,
|
|
1670
|
+
config: We.value.config,
|
|
1671
|
+
title: t.value.table.useDialog ? "" : Ze.value.title,
|
|
1672
|
+
withCloseButton: !t.value.table.useDialog,
|
|
1673
|
+
isCursorPointer: Se.value,
|
|
1674
|
+
onClose: Oo
|
|
1675
|
+
}, {
|
|
1676
|
+
th: M(({ th: o }) => [
|
|
1677
|
+
E("div", {
|
|
1678
|
+
innerHTML: o,
|
|
1679
|
+
style: { display: "flex", "align-items": "center" }
|
|
1680
|
+
}, null, 8, za)
|
|
1681
|
+
]),
|
|
1682
|
+
td: M(({ td: o }) => [
|
|
1683
|
+
gt(tt(o.name || o), 1)
|
|
1684
|
+
]),
|
|
1685
|
+
_: 1
|
|
1686
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1687
|
+
]),
|
|
1688
|
+
_: 2
|
|
1689
|
+
}, [
|
|
1690
|
+
t.value.table.useDialog ? {
|
|
1691
|
+
name: "title",
|
|
1692
|
+
fn: M(() => [
|
|
1693
|
+
gt(tt(Ze.value.title), 1)
|
|
1694
|
+
]),
|
|
1695
|
+
key: "0"
|
|
1696
|
+
} : void 0,
|
|
1697
|
+
t.value.table.useDialog ? {
|
|
1698
|
+
name: "actions",
|
|
1699
|
+
fn: M(() => [
|
|
1700
|
+
E("button", {
|
|
1701
|
+
tabindex: "0",
|
|
1702
|
+
class: "vue-ui-user-options-button",
|
|
1703
|
+
onClick: l[1] || (l[1] = (o) => Rt(t.value.userOptions.callbacks.csv)),
|
|
1704
|
+
style: xe({ cursor: Se.value ? "pointer" : "default" })
|
|
1705
|
+
}, [
|
|
1706
|
+
pt(Eo, {
|
|
1707
|
+
name: "fileCsv",
|
|
1708
|
+
stroke: Ze.value.props.color
|
|
1709
|
+
}, null, 8, ["stroke"])
|
|
1710
|
+
], 4)
|
|
1711
|
+
]),
|
|
1712
|
+
key: "1"
|
|
1713
|
+
} : void 0
|
|
1714
|
+
]), 1040)) : N("", !0),
|
|
1715
|
+
C(e.$slots, "skeleton", {}, () => [
|
|
1716
|
+
y(Ae) ? (v(), he(Kl, { key: 0 })) : N("", !0)
|
|
1717
|
+
], !0)
|
|
1718
|
+
], 46, fa));
|
|
1719
|
+
}
|
|
1720
|
+
}, sn = /* @__PURE__ */ sa(Va, [["__scopeId", "data-v-d1257624"]]);
|
|
1721
|
+
export {
|
|
1722
|
+
sn as default
|
|
1723
|
+
};
|