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