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