vue-data-ui 3.0.23 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/{Arrow-B1Op9F3x.js → Arrow-xQM7mBzd.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-B2BQC0-h.js} +72 -59
  3. package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DLesaZpW.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-BKvJvFtX.js} +2 -2
  6. package/dist/DataTable-BAf4Obr9.js +140 -0
  7. package/dist/{Legend-CyYXMSsW.js → Legend-8_V5egWW.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-Cq4fHmA0.js} +3 -3
  9. package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-Cv_ypT0N.js} +1 -1
  10. package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B6OvfyHH.js} +3 -3
  11. package/dist/{Shape-CYVs2kYz.js → Shape-Cjca5zta.js} +1 -1
  12. package/dist/{Slicer-BTIFUO4x.js → Slicer-6w3K8gAc.js} +2 -2
  13. package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-BV4Z-NMp.js} +1 -1
  14. package/dist/{Title-D_e0SFWS.js → Title-Dz-j6ERs.js} +1 -1
  15. package/dist/{Tooltip-DjVoFYj1.js → Tooltip-BTGOEC7w.js} +1 -1
  16. package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-CsDlFB0L.js} +2 -2
  17. package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BOu5-Ohz.js} +1 -1
  18. package/dist/{img-z5p1gGfY.js → img-gBDz7xQQ.js} +1 -1
  19. package/dist/{index-BEuUtONc.js → index-BKQqb9lF.js} +37 -2
  20. package/dist/{pdf-BmUjVBni.js → pdf-Cjsn5GEE.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-IO2dh0Uq.js} +1 -1
  25. package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-aBOhgs4U.js} +1 -1
  26. package/dist/{usePrinter-DiB0_UNt.js → usePrinter-BzuXiubT.js} +2 -2
  27. package/dist/useTableResponsive-Cbx-ACcP.js +22 -0
  28. package/dist/{vue-data-ui-DJIAas-7.js → vue-data-ui-B6eM6hF3.js} +64 -64
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-DBeWmnvH.js +1369 -0
  31. package/dist/{vue-ui-accordion-B4YfUjZ5.js → vue-ui-accordion-B5QeV3BK.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-rZFdUsgz.js} +333 -286
  33. package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-CCCuslrT.js} +2 -2
  34. package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DhJf9mvK.js} +8 -8
  35. package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-CGVtDKqZ.js} +453 -406
  36. package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-DLAR3WY8.js} +4 -4
  37. package/dist/{vue-ui-chestnut-B-jSj7FT.js → vue-ui-chestnut-BXnSxoXB.js} +563 -520
  38. package/dist/vue-ui-chord-DH_MwAKX.js +1100 -0
  39. package/dist/vue-ui-circle-pack-Cx_E1R63.js +755 -0
  40. package/dist/{vue-ui-cursor-DdBrui6i.js → vue-ui-cursor-CEvH1qDS.js} +2 -2
  41. package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-CvduVgEy.js} +62 -62
  42. package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-PTozKs3l.js} +2 -2
  43. package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-CsEtKJJD.js} +477 -431
  44. package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-DD7o-CxF.js} +482 -435
  45. package/dist/{vue-ui-dumbbell-B5w2oqNO.js → vue-ui-dumbbell-DfPYl3fu.js} +443 -398
  46. package/dist/vue-ui-flow-CSTTZHwg.js +900 -0
  47. package/dist/vue-ui-funnel-C-NUZqIo.js +666 -0
  48. package/dist/vue-ui-galaxy-BwsZnU6T.js +744 -0
  49. package/dist/{vue-ui-gauge-C_KLPWk2.js → vue-ui-gauge-D9MUneq0.js} +8 -8
  50. package/dist/{vue-ui-gizmo-CsPX25Ti.js → vue-ui-gizmo-Dnzs9wSf.js} +4 -4
  51. package/dist/{vue-ui-heatmap-BHq6hBaL.js → vue-ui-heatmap-CYaQIhy8.js} +501 -461
  52. package/dist/{vue-ui-history-plot-DgpYiaUD.js → vue-ui-history-plot-DMTFzl-_.js} +408 -361
  53. package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CkPotdff.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-BjsQAxDx.js → vue-ui-mini-loader-CCE-bDOJ.js} +2 -2
  55. package/dist/vue-ui-molecule-DaN5lroq.js +702 -0
  56. package/dist/{vue-ui-mood-radar-DMwVl3wz.js → vue-ui-mood-radar-tM0mmZh8.js} +342 -291
  57. package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-RB4r6beI.js} +548 -502
  58. package/dist/{vue-ui-onion-A6nKcus1.js → vue-ui-onion-CxDozHg3.js} +363 -317
  59. package/dist/vue-ui-parallel-coordinate-plot-CK9nNExU.js +979 -0
  60. package/dist/vue-ui-quadrant-C7tLJYn7.js +1483 -0
  61. package/dist/{vue-ui-quick-chart-mwXE3w_o.js → vue-ui-quick-chart-MUBAkrHb.js} +7 -7
  62. package/dist/vue-ui-radar-Br4K80I9.js +858 -0
  63. package/dist/{vue-ui-rating-CleNHFo5.js → vue-ui-rating-NtvT9r_M.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-CMCH7Ia6.js → vue-ui-relation-circle-CPQjAy1g.js} +8 -8
  65. package/dist/vue-ui-ridgeline-C2M_Cjlh.js +1204 -0
  66. package/dist/vue-ui-rings-DEru-cWN.js +785 -0
  67. package/dist/{vue-ui-scatter-kv28dsT3.js → vue-ui-scatter-CJKkiKle.js} +594 -548
  68. package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton--twnjS2t.js} +3 -3
  69. package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-CNccdPZ7.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-9BFkkC0u.js} +4 -4
  71. package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-RYAThoA4.js} +4 -4
  72. package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DkPlmgMF.js} +4 -4
  73. package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-6EkCyYRF.js} +5 -5
  74. package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Bl3nj8zd.js} +4 -4
  75. package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B88lA7iy.js} +4 -4
  76. package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-Csj7NhT6.js} +525 -479
  77. package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-yY9NsUUI.js} +390 -343
  78. package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dg6U31ex.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-BWU7CAWP.js} +5 -5
  80. package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-DV4Y9aRL.js} +4 -4
  81. package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-C3fKamV-.js} +8 -8
  82. package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-6VAK9XyF.js} +5 -5
  83. package/dist/{vue-ui-tiremarks-BW_jSayT.js → vue-ui-tiremarks-BB-KAkF7.js} +7 -7
  84. package/dist/vue-ui-treemap-GrXkD_3Z.js +1092 -0
  85. package/dist/{vue-ui-vertical-bar-OrLV4CxH.js → vue-ui-vertical-bar-Mmz6u4aX.js} +504 -461
  86. package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-DzPVRUOA.js} +416 -370
  87. package/dist/{vue-ui-wheel-B_BkI-5f.js → vue-ui-wheel-idRCvS5t.js} +7 -7
  88. package/dist/vue-ui-word-cloud-B2641uNP.js +811 -0
  89. package/dist/{vue-ui-world-B4mKuSSn.js → vue-ui-world-D6s5Eph8.js} +512 -466
  90. package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-BKTGSvfU.js} +1551 -1500
  91. package/dist/vue-ui-xy-canvas-BOQyxVRl.js +1291 -0
  92. package/package.json +1 -1
  93. package/dist/DataTable-nO6ydJO2.js +0 -133
  94. package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
  95. package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
  96. package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
  97. package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
  98. package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
  99. package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
  100. package/dist/vue-ui-molecule-BtyMTwEn.js +0 -656
  101. package/dist/vue-ui-parallel-coordinate-plot-DZ9_0F5c.js +0 -927
  102. package/dist/vue-ui-quadrant-CUggSeUN.js +0 -1432
  103. package/dist/vue-ui-radar-BRKZ8e_X.js +0 -807
  104. package/dist/vue-ui-ridgeline-xW7UrSfR.js +0 -1157
  105. package/dist/vue-ui-rings-D3NfFMaO.js +0 -739
  106. package/dist/vue-ui-treemap-DhAYSVB9.js +0 -1046
  107. package/dist/vue-ui-word-cloud-CrSLGFOK.js +0 -765
  108. package/dist/vue-ui-xy-canvas-CX2JT6T3.js +0 -1243
@@ -0,0 +1,1092 @@
1
+ import { defineAsyncComponent as te, useSlots as Ut, onMounted as gt, computed as b, ref as m, shallowRef as U, toRefs as Ht, watch as ke, onBeforeUnmount as Wt, createElementBlock as y, openBlock as d, unref as c, normalizeStyle as M, normalizeClass as Re, createBlock as Z, createCommentVNode as _, createElementVNode as O, createVNode as we, createSlots as mt, withCtx as T, renderSlot as C, normalizeProps as le, guardReactiveProps as oe, Fragment as Ce, renderList as Le, withKeys as yt, withModifiers as Me, mergeProps as Be, createTextVNode as $e, toDisplayString as H, Teleport as Gt, resolveDynamicComponent as Xt, nextTick as qt } from "vue";
2
+ import { u as Yt, c as Te, t as jt, a as Zt, p as F, b as Kt, d as Jt, o as bt, f as Qt, e as de, k as xe, i as he, X as el, l as kt, F as wt, y as Ct, v as tl, w as ll, z as ol } from "./index-BKQqb9lF.js";
3
+ import { t as al, u as nl } from "./useResponsive-DfdjqQps.js";
4
+ import { u as sl, B as ul } from "./BaseScanner-BgWxam9d.js";
5
+ import { u as rl } from "./usePrinter-BzuXiubT.js";
6
+ import { u as $t } from "./useNestedProp-aBOhgs4U.js";
7
+ import { u as il } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as cl } from "./useChartAccessibility-9icAAmYg.js";
9
+ import vl from "./img-gBDz7xQQ.js";
10
+ import dl from "./Title-Dz-j6ERs.js";
11
+ import hl from "./Legend-8_V5egWW.js";
12
+ import Tt from "./BaseIcon-DLesaZpW.js";
13
+ import { _ as pl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ function xt(n, r) {
15
+ const s = n.length;
16
+ if (s === 0)
17
+ throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
18
+ {
19
+ let i = 1 / 0, u = -1 / 0, h = 0;
20
+ for (let g = 0; g < s; g += 1) {
21
+ const f = n[g].normalizedValue;
22
+ f < i && (i = f), f > u && (u = f), h += f;
23
+ }
24
+ return Math.max(
25
+ r ** 2 * u / h ** 2,
26
+ h ** 2 / (r ** 2 * i)
27
+ );
28
+ }
29
+ }
30
+ function _t(n) {
31
+ const { xOffset: r, yOffset: s, width: i, height: u } = n;
32
+ return {
33
+ x0: r,
34
+ y0: s,
35
+ x1: r + i,
36
+ y1: s + u
37
+ };
38
+ }
39
+ function fl(n, r, s) {
40
+ if (n.length === 0)
41
+ return !0;
42
+ {
43
+ const i = n.concat(r), u = xt(
44
+ n,
45
+ s
46
+ ), h = xt(i, s);
47
+ return u >= h;
48
+ }
49
+ }
50
+ function gl(n) {
51
+ const r = [], s = n.length;
52
+ for (let i = 0; i < s; i += 1) {
53
+ const u = n[i], h = u.length;
54
+ for (let v = 0; v < h; v += 1)
55
+ r.push(u[v]);
56
+ }
57
+ return r;
58
+ }
59
+ function ml(n, r) {
60
+ const s = {
61
+ ...r,
62
+ children: n
63
+ };
64
+ return At(s);
65
+ }
66
+ function yl(n) {
67
+ return (n.x1 - n.x0) * (n.y1 - n.y0);
68
+ }
69
+ function Ot(n, r) {
70
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ve(r), v = n.length, g = n.map((w) => w.normalizedValue || 0).reduce((w, N) => w + N, 0), f = g / i, W = g / s;
71
+ let D = u, k = h;
72
+ const $ = [];
73
+ if (s >= i) {
74
+ for (let w = 0; w < v; w += 1) {
75
+ const N = n[w], B = k + N.normalizedValue / f, A = {
76
+ x0: D,
77
+ y0: k,
78
+ x1: D + f,
79
+ y1: B
80
+ }, P = Object.assign({}, N, A);
81
+ k = B, $.push(P);
82
+ }
83
+ return $;
84
+ } else {
85
+ for (let w = 0; w < v; w += 1) {
86
+ const N = n[w], B = D + N.normalizedValue / W, A = {
87
+ x0: D,
88
+ y0: k,
89
+ x1: B,
90
+ y1: k + W
91
+ }, P = Object.assign({}, N, A);
92
+ D = B, $.push(P);
93
+ }
94
+ return $;
95
+ }
96
+ }
97
+ function bl(n) {
98
+ const r = Ve(n), s = r.width, i = r.height;
99
+ return Math.min(s, i);
100
+ }
101
+ function kl(n, r) {
102
+ const s = n.length, i = n.map((f) => f.value ?? 0).reduce((f, W) => f + W, 0), u = r / i, h = [];
103
+ let v, g;
104
+ for (let f = 0; f < s; f += 1)
105
+ g = n[f], v = Object.assign({}, g, {
106
+ normalizedValue: g.value * (u || 0)
107
+ }), h.push(v);
108
+ return h;
109
+ }
110
+ function Ve(n) {
111
+ const { x0: r, y0: s, x1: i, y1: u } = n;
112
+ return {
113
+ xOffset: r,
114
+ yOffset: s,
115
+ width: i - r,
116
+ height: u - s
117
+ };
118
+ }
119
+ function wl(n, r, s, i) {
120
+ let u = n, h = r, v = s, g = i;
121
+ for (; ; ) {
122
+ const f = u.length;
123
+ if (f === 0) {
124
+ const $ = Ot(h, v);
125
+ return g.concat($);
126
+ }
127
+ const W = bl(v), D = u[0], k = u.slice(1, f);
128
+ if (fl(h, D, W)) {
129
+ const $ = h.concat(D);
130
+ u = k, h = $, v = v, g = g;
131
+ } else {
132
+ const $ = h.length;
133
+ let w = 0;
134
+ for (let P = 0; P < $; P += 1)
135
+ w += h[P].normalizedValue;
136
+ const N = Cl(v, w), B = Ot(h, v), A = g.concat(B);
137
+ u = u, h = [], v = N, g = A;
138
+ }
139
+ }
140
+ }
141
+ function At(n) {
142
+ if (typeof n.children > "u" || !n.children.length)
143
+ return [n];
144
+ {
145
+ const r = kl(
146
+ n.children,
147
+ yl(n)
148
+ ), s = wl(r, [], n, []), i = s.length, u = [];
149
+ for (let v = 0; v < i; v += 1)
150
+ u.push(At(s[v]));
151
+ return gl(u);
152
+ }
153
+ }
154
+ function Cl(n, r) {
155
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ve(n);
156
+ if (s >= i) {
157
+ const v = r / i, g = s - v, f = {
158
+ xOffset: u + v,
159
+ yOffset: h,
160
+ width: g,
161
+ height: i
162
+ };
163
+ return _t(f);
164
+ } else {
165
+ const v = r / s, g = i - v, f = {
166
+ xOffset: u,
167
+ yOffset: h + v,
168
+ width: s,
169
+ height: g
170
+ };
171
+ return _t(f);
172
+ }
173
+ }
174
+ const $l = ["id"], Tl = ["id"], xl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], _l = { class: "vue-ui-treemap-crumb-unit" }, Ol = { class: "vue-ui-treemap-crumb-unit-label" }, Al = {
175
+ key: 0,
176
+ style: { width: "24px", display: "flex", "align-items": "center" }
177
+ }, Sl = {
178
+ key: 0,
179
+ class: "vue-ui-treemap-crumb-unit-arrow"
180
+ }, Il = ["xmlns", "viewBox"], Fl = { key: 0 }, Nl = ["id"], Pl = ["stop-color"], zl = ["stop-color"], Dl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Rl = ["x", "y", "height", "width"], Ll = {
181
+ style: { width: "100%", height: "100%" },
182
+ class: "vue-ui-treemap-cell"
183
+ }, Ml = {
184
+ key: 5,
185
+ class: "vue-data-ui-watermark"
186
+ }, Bl = ["id"], Vl = ["onClick"], El = ["innerHTML"], Ul = {
187
+ __name: "vue-ui-treemap",
188
+ props: {
189
+ config: {
190
+ type: Object,
191
+ default() {
192
+ return {};
193
+ }
194
+ },
195
+ dataset: {
196
+ type: Array,
197
+ default() {
198
+ return [];
199
+ }
200
+ }
201
+ },
202
+ emits: ["selectLegend", "selectDatapoint"],
203
+ setup(n, { expose: r, emit: s }) {
204
+ const i = te(() => import("./DataTable-BAf4Obr9.js")), u = te(() => import("./PenAndPaper-B6OvfyHH.js")), h = te(() => import("./vue-ui-accordion-B5QeV3BK.js")), v = te(() => import("./Tooltip-BTGOEC7w.js")), g = te(() => import("./UserOptions-CsDlFB0L.js")), f = te(() => import("./PackageVersion-Cv_ypT0N.js")), W = te(() => import("./BaseDraggableDialog-B2BQC0-h.js")), { vue_ui_treemap: D } = Yt(), k = n, $ = s, w = Ut();
205
+ gt(() => {
206
+ w["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
207
+ });
208
+ const N = b(() => !!k.dataset && k.dataset.length), B = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), A = m(Te()), P = m(!1), _e = m(""), K = m(!1), Ee = m(0), R = m([]), V = U(null), Ue = U(null), He = U(null), We = U(null), Ge = U(null), Xe = m(0), Oe = m(0), Ae = m(0), x = m([]), Se = m(null), qe = m(!1), ue = m(null), e = m(Ne()), { loading: re, FINAL_DATASET: Ie, manualLoading: St } = sl({
209
+ ...Ht(k),
210
+ FINAL_CONFIG: e,
211
+ prepareConfig: Ne,
212
+ skeletonDataset: [
213
+ {
214
+ name: "_",
215
+ value: 53,
216
+ color: "#CACACA90",
217
+ children: [
218
+ { name: "_", value: 21 },
219
+ { name: "_", value: 13 },
220
+ { name: "_", value: 8 },
221
+ { name: "_", value: 5 },
222
+ { name: "_", value: 3 },
223
+ { name: "_", value: 2 },
224
+ { name: "_", value: 1 }
225
+ ]
226
+ }
227
+ ],
228
+ skeletonConfig: jt({
229
+ defaultConfig: e.value,
230
+ userConfig: {
231
+ userOptions: { show: !1 },
232
+ style: {
233
+ chart: {
234
+ backgroundColor: "#999999",
235
+ layout: {
236
+ labels: {
237
+ showDefaultLabels: !1
238
+ },
239
+ rects: {
240
+ stroke: "#6A6A6A"
241
+ }
242
+ },
243
+ legend: {
244
+ backgroundColor: "transparent"
245
+ }
246
+ }
247
+ }
248
+ }
249
+ })
250
+ }), { userOptionsVisible: Fe, setUserOptionsVisibility: Ye, keepUserOptionState: je } = il({ config: e.value }), { svgRef: Ze } = cl({ config: e.value.style.chart.title });
251
+ function Ne() {
252
+ const t = $t({
253
+ userConfig: k.config,
254
+ defaultConfig: D
255
+ });
256
+ return t.theme ? {
257
+ ...$t({
258
+ userConfig: Kt.vue_ui_treemap[t.theme] || k.config,
259
+ defaultConfig: t
260
+ }),
261
+ customPalette: Zt[t.theme] || F
262
+ } : t;
263
+ }
264
+ ke(() => k.config, (t) => {
265
+ re.value || (e.value = Ne()), Fe.value = !e.value.userOptions.showOnChartHover, Xe.value += 1, Oe.value += 1, Ae.value += 1, I.value.showTable = e.value.table.show, I.value.showTooltip = e.value.style.chart.tooltip.show;
266
+ }, { deep: !0 });
267
+ const { isPrinting: Ke, isImaging: Je, generatePdf: Qe, generateImage: et } = rl({
268
+ elementId: `treemap_${A.value}`,
269
+ fileName: e.value.style.chart.title.text || "vue-ui-treemap",
270
+ options: e.value.userOptions.print
271
+ }), It = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), pe = b(() => Jt(e.value.customPalette)), I = m({
272
+ showTable: e.value.table.show,
273
+ showTooltip: e.value.style.chart.tooltip.show
274
+ });
275
+ ke(e, () => {
276
+ I.value = {
277
+ showTable: e.value.table.show,
278
+ showTooltip: e.value.style.chart.tooltip.show
279
+ };
280
+ }, { immediate: !0 });
281
+ const G = m({
282
+ height: e.value.style.chart.height,
283
+ width: e.value.style.chart.width
284
+ }), J = b(() => ({
285
+ bottom: G.value.height - e.value.style.chart.padding.bottom,
286
+ height: G.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
287
+ left: e.value.style.chart.padding.left,
288
+ right: G.value.width - e.value.style.chart.padding.right,
289
+ top: e.value.style.chart.padding.top,
290
+ vbHeight: G.value.height,
291
+ vbWidth: G.value.width,
292
+ width: G.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
293
+ })), z = m(Ie.value), X = m(z.value), tt = U(/* @__PURE__ */ new Map());
294
+ function lt(t) {
295
+ Array.isArray(t) && t.forEach((o, l) => {
296
+ o.id || (o.id = Te());
297
+ let a = de(o.color) || tt.value.get(o.id) || pe.value[l] || F[l] || F[l % F.length];
298
+ a = de(a), tt.value.set(o.id, a), o.color = a, ot(o, a);
299
+ });
300
+ }
301
+ function ot(t, o) {
302
+ Array.isArray(t.children) && t.children.forEach((l) => {
303
+ l.id || (l.id = Te()), l.parentId = t.id, l.color = o, ot(l, o);
304
+ });
305
+ }
306
+ function Ft() {
307
+ if (!x.value.length)
308
+ X.value = z.value.slice();
309
+ else {
310
+ const t = x.value[x.value.length - 1], o = Y(t);
311
+ X.value = o?.children?.slice() || [];
312
+ }
313
+ }
314
+ ke(
315
+ () => Ie.value,
316
+ () => {
317
+ z.value = Ie.value, lt(z.value), Ft(), Ae.value += 1, Oe.value += 1;
318
+ },
319
+ { deep: !0, immediate: !0, flush: "post" }
320
+ );
321
+ const q = U(null), ae = U(null);
322
+ gt(() => {
323
+ qe.value = !0, Pt();
324
+ });
325
+ const Nt = b(() => e.value.debug);
326
+ function Pt() {
327
+ if (bt(k.dataset) && Qt({
328
+ componentName: "VueUiTreemap",
329
+ type: "dataset",
330
+ debug: Nt.value
331
+ }), lt(z.value), bt(k.dataset) || (St.value = e.value.loading), e.value.responsive) {
332
+ const t = al(() => {
333
+ const { width: o, height: l } = nl({
334
+ chart: V.value,
335
+ title: e.value.style.chart.title.text ? Ue.value : null,
336
+ legend: e.value.style.chart.legend.show ? He.value : null,
337
+ source: We.value,
338
+ noTitle: Ge.value
339
+ });
340
+ requestAnimationFrame(() => {
341
+ G.value.width = o, G.value.height = l - 12;
342
+ });
343
+ });
344
+ q.value && (ae.value && q.value.unobserve(ae.value), q.value.disconnect()), q.value = new ResizeObserver(t), ae.value = V.value.parentNode, q.value.observe(ae.value);
345
+ }
346
+ }
347
+ Wt(() => {
348
+ q.value && (ae.value && q.value.unobserve(ae.value), q.value.disconnect());
349
+ });
350
+ const ie = b(() => X.value.map((t, o) => ({
351
+ ...t,
352
+ color: de(t.color) || pe.value[o] || F[o] || F[o % F.length]
353
+ })).filter((t) => !R.value.includes(t.id))), ne = b(() => z.value.filter((t) => !R.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), at = b({
354
+ get() {
355
+ let t = [...ie.value];
356
+ return e.value.style.chart.layout.sorted && (t = [...ie.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
357
+ ...o
358
+ }));
359
+ },
360
+ set(t) {
361
+ return t;
362
+ }
363
+ });
364
+ function nt(t, o) {
365
+ return t.value / o;
366
+ }
367
+ function zt(t, o, l) {
368
+ const a = e.value.style.chart.layout.rects.colorRatio - nt(o, l);
369
+ return kt(t, a < 0 ? 0 : a);
370
+ }
371
+ function st(t, o, l, a) {
372
+ return t.map((p, S) => {
373
+ const be = zt(de(o) || pe.value[S] || F[S] || F[S % F.length], p, a), Et = nt(p, a);
374
+ return {
375
+ ...p,
376
+ color: be,
377
+ proportion: Et,
378
+ parentName: l,
379
+ children: p.children ? st(p.children, be, p.name, a) : void 0
380
+ };
381
+ });
382
+ }
383
+ const ce = b(() => ml(
384
+ at.value.map((t, o) => {
385
+ const l = t.children ? t.children.reduce((a, p) => a + p.value, 0) : t.value;
386
+ return {
387
+ value: t.value,
388
+ id: t.id || Te(),
389
+ children: t.children ? st(t.children.sort((a, p) => p.value - a.value), t.color, t.name, l) : void 0,
390
+ color: t.color,
391
+ name: t.name
392
+ };
393
+ }),
394
+ { x0: J.value.left * 2, y0: J.value.top, x1: J.value.width, y1: J.value.height }
395
+ ));
396
+ function ut({ y0: t, y1: o }) {
397
+ return o - t <= 0 ? 1e-4 : o - t;
398
+ }
399
+ function rt({ x0: t, x1: o }) {
400
+ return o - t <= 0 ? 1e-4 : o - t;
401
+ }
402
+ function Q(t) {
403
+ const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
404
+ return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
405
+ }
406
+ function it(t) {
407
+ K.value = t, Ee.value += 1;
408
+ }
409
+ const se = b(() => {
410
+ let t = 0;
411
+ return Se.value && (t = Se.value.getBoundingClientRect().height), {
412
+ startX: 0,
413
+ startY: 0,
414
+ width: J.value.vbWidth,
415
+ height: J.value.vbHeight - t
416
+ };
417
+ });
418
+ function Y(t, o = z.value) {
419
+ for (const l of o) {
420
+ if (l.id === t)
421
+ return l;
422
+ if (l.children) {
423
+ const a = Y(t, l.children);
424
+ if (a)
425
+ return a;
426
+ }
427
+ }
428
+ return null;
429
+ }
430
+ const ee = b(() => x.value.length > 0);
431
+ function fe(t, o) {
432
+ if (!t) {
433
+ X.value = z.value.slice(), $("selectDatapoint", void 0), x.value = [];
434
+ return;
435
+ }
436
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
437
+ const l = Y(t.id);
438
+ if (l && l.children?.length)
439
+ x.value.push(l.id), X.value = l.children.slice(), $("selectDatapoint", t);
440
+ else if (t.parentId) {
441
+ x.value.push(t.parentId);
442
+ const a = Y(t.parentId);
443
+ X.value = a.children.slice(), $("selectDatapoint", t);
444
+ } else if (x.value.length > 0) {
445
+ x.value.pop();
446
+ const a = x.value[x.value.length - 1];
447
+ if (a) {
448
+ const p = Y(a);
449
+ X.value = p.children.slice();
450
+ } else
451
+ X.value = z.value.slice(), x.value = [], $("selectDatapoint", void 0);
452
+ }
453
+ }
454
+ function Dt(t) {
455
+ return !!(Y(t.id)?.children?.length || t.parentId);
456
+ }
457
+ const j = b(() => {
458
+ const t = [
459
+ { id: null, label: "All" }
460
+ ];
461
+ if (x.value.length > 0) {
462
+ let o = Y(x.value[x.value.length - 1]);
463
+ const l = [];
464
+ for (; o; )
465
+ l.unshift(o), o = o.parentId ? Y(o.parentId) : null;
466
+ for (const a of l)
467
+ t.push({
468
+ id: a.id,
469
+ label: a.name,
470
+ node: a
471
+ });
472
+ }
473
+ return t;
474
+ }), L = U(null), ct = b(() => z.value.map((t, o) => ({
475
+ ...t,
476
+ color: de(t.color) || pe.value[o] || F[o] || F[o % F.length],
477
+ shape: "square"
478
+ })).sort((t, o) => o.value - t.value).map((t, o) => ({
479
+ ...t,
480
+ proportion: t.value / z.value.map((l) => l.value).reduce((l, a) => l + a, 0),
481
+ opacity: R.value.includes(t.id) ? 0.5 : 1
482
+ }))), Rt = b(() => ({
483
+ cy: "treemap-div-legend",
484
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
485
+ color: e.value.style.chart.legend.color,
486
+ fontSize: e.value.style.chart.legend.fontSize,
487
+ paddingBottom: 12,
488
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
489
+ }));
490
+ function vt(t) {
491
+ L.value = null, R.value.includes(t.id) ? R.value = R.value.filter((o) => o !== t.id) : R.value.length < k.dataset.length - 1 && R.value.push(t.id), $("selectLegend", at.value);
492
+ }
493
+ function Lt({ datapoint: t, seriesIndex: o }) {
494
+ L.value = null, P.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
495
+ }
496
+ const Pe = m(null);
497
+ function Mt({ datapoint: t, seriesIndex: o }) {
498
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o }), L.value = t, Pe.value = { datapoint: t, seriesIndex: o, config: e.value, series: ie.value };
499
+ const l = e.value.style.chart.tooltip.customFormat;
500
+ if (Ct(l) && ol(() => l({
501
+ seriesIndex: o,
502
+ datapoint: t,
503
+ series: ie.value,
504
+ config: e.value
505
+ })))
506
+ _e.value = l({
507
+ seriesIndex: o,
508
+ datapoint: t,
509
+ series: ie.value,
510
+ config: e.value
511
+ });
512
+ else {
513
+ let a = "";
514
+ a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, a += `<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="${t.color}"/></svg>`, a += `<b>${xe(
515
+ e.value.style.chart.layout.labels.formatter,
516
+ t.value,
517
+ he({
518
+ p: e.value.style.chart.layout.labels.prefix,
519
+ v: t.value,
520
+ s: e.value.style.chart.layout.labels.suffix,
521
+ r: e.value.style.chart.tooltip.roundingValue
522
+ }),
523
+ { datapoint: t, seriesIndex: o }
524
+ )}</b>`, _e.value = `<div>${a}</div>`;
525
+ }
526
+ P.value = !0;
527
+ }
528
+ const E = b(() => {
529
+ const t = ce.value.map((l) => ({
530
+ name: l.name,
531
+ color: l.color
532
+ })), o = ce.value.map((l) => l.value);
533
+ return { head: t, body: o };
534
+ });
535
+ function ze(t = null) {
536
+ qt(() => {
537
+ const o = E.value.head.map((p, S) => [[
538
+ p.name
539
+ ], [E.value.body[S]], [isNaN(E.value.body[S] / ne.value) ? "-" : E.value.body[S] / ne.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = tl(l);
540
+ t ? t(a) : ll({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
541
+ });
542
+ }
543
+ const ge = b(() => {
544
+ const t = [
545
+ e.value.table.columnNames.series,
546
+ e.value.table.columnNames.value,
547
+ e.value.table.columnNames.percentage
548
+ ], o = E.value.head.map((p, S) => {
549
+ const be = xe(
550
+ e.value.style.chart.layout.labels.formatter,
551
+ E.value.body[S],
552
+ he({
553
+ p: e.value.style.chart.layout.labels.prefix,
554
+ v: E.value.body[S],
555
+ s: e.value.style.chart.layout.labels.suffix,
556
+ r: e.value.table.td.roundingValue
557
+ })
558
+ );
559
+ return [
560
+ {
561
+ color: p.color,
562
+ name: p.name,
563
+ shape: "square"
564
+ },
565
+ be,
566
+ isNaN(E.value.body[S] / ne.value) ? "-" : he({
567
+ v: E.value.body[S] / ne.value * 100,
568
+ s: "%",
569
+ r: e.value.table.td.roundingPercentage
570
+ })
571
+ ];
572
+ }), l = {
573
+ th: {
574
+ backgroundColor: e.value.table.th.backgroundColor,
575
+ color: e.value.table.th.color,
576
+ outline: e.value.table.th.outline
577
+ },
578
+ td: {
579
+ backgroundColor: e.value.table.td.backgroundColor,
580
+ color: e.value.table.td.color,
581
+ outline: e.value.table.td.outline
582
+ },
583
+ breakpoint: e.value.table.responsiveBreakpoint
584
+ };
585
+ return {
586
+ colNames: [
587
+ e.value.table.columnNames.series,
588
+ e.value.table.columnNames.value
589
+ ],
590
+ head: t,
591
+ body: o,
592
+ config: l
593
+ };
594
+ });
595
+ function Bt() {
596
+ return ce.value;
597
+ }
598
+ function dt() {
599
+ I.value.showTable = !I.value.showTable;
600
+ }
601
+ function ht() {
602
+ I.value.showTooltip = !I.value.showTooltip;
603
+ }
604
+ const me = m(!1);
605
+ function De() {
606
+ me.value = !me.value;
607
+ }
608
+ const ye = m(null);
609
+ function pt(t) {
610
+ ye.value = t;
611
+ }
612
+ function ft() {
613
+ ye.value = null;
614
+ }
615
+ async function Vt({ scale: t = 2 } = {}) {
616
+ if (!V.value) return;
617
+ const { width: o, height: l } = V.value.getBoundingClientRect(), a = o / l, { imageUri: p, base64: S } = await vl({ domElement: V.value, base64: !0, img: !0, scale: t });
618
+ return {
619
+ imageUri: p,
620
+ base64: S,
621
+ title: e.value.style.chart.title.text,
622
+ width: o,
623
+ height: l,
624
+ aspectRatio: a
625
+ };
626
+ }
627
+ const ve = b(() => {
628
+ const t = e.value.table.useDialog && !e.value.table.show, o = I.value.showTable;
629
+ return {
630
+ component: t ? W : h,
631
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
632
+ props: t ? {
633
+ backgroundColor: e.value.table.th.backgroundColor,
634
+ color: e.value.table.th.color,
635
+ headerColor: e.value.table.th.color,
636
+ headerBg: e.value.table.th.backgroundColor,
637
+ isFullscreen: K.value,
638
+ fullscreenParent: V.value,
639
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
640
+ } : {
641
+ hideDetails: !0,
642
+ config: {
643
+ open: o,
644
+ maxHeight: 1e4,
645
+ body: {
646
+ backgroundColor: e.value.style.chart.backgroundColor,
647
+ color: e.value.style.chart.color
648
+ },
649
+ head: {
650
+ backgroundColor: e.value.style.chart.backgroundColor,
651
+ color: e.value.style.chart.color
652
+ }
653
+ }
654
+ }
655
+ };
656
+ });
657
+ return ke(() => I.value.showTable, (t) => {
658
+ e.value.table.show || (t && e.value.table.useDialog && ue.value ? ue.value.open() : "close" in ue.value && ue.value.close());
659
+ }), r({
660
+ getData: Bt,
661
+ getImage: Vt,
662
+ generateCsv: ze,
663
+ generateImage: et,
664
+ generatePdf: Qe,
665
+ toggleTable: dt,
666
+ toggleTooltip: ht,
667
+ toggleAnnotator: De,
668
+ toggleFullscreen: it
669
+ }), (t, o) => (d(), y("div", {
670
+ ref_key: "treemapChart",
671
+ ref: V,
672
+ class: Re(`vue-ui-treemap ${K.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
673
+ style: M(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
674
+ id: `treemap_${A.value}`,
675
+ onMouseenter: o[4] || (o[4] = () => c(Ye)(!0)),
676
+ onMouseleave: o[5] || (o[5] = () => c(Ye)(!1))
677
+ }, [
678
+ e.value.userOptions.buttons.annotator ? (d(), Z(c(u), {
679
+ key: 0,
680
+ svgRef: c(Ze),
681
+ backgroundColor: e.value.style.chart.backgroundColor,
682
+ color: e.value.style.chart.color,
683
+ active: me.value,
684
+ onClose: De
685
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
686
+ It.value ? (d(), y("div", {
687
+ key: 1,
688
+ ref_key: "noTitle",
689
+ ref: Ge,
690
+ class: "vue-data-ui-no-title-space",
691
+ style: "height:36px; width: 100%;background:transparent"
692
+ }, null, 512)) : _("", !0),
693
+ e.value.style.chart.title.text ? (d(), y("div", {
694
+ key: 2,
695
+ ref_key: "chartTitle",
696
+ ref: Ue,
697
+ style: M(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
698
+ }, [
699
+ (d(), Z(dl, {
700
+ key: `title_${Xe.value}`,
701
+ config: {
702
+ title: {
703
+ cy: "treemap-div-title",
704
+ ...e.value.style.chart.title
705
+ },
706
+ subtitle: {
707
+ cy: "treemap-div-subtitle",
708
+ ...e.value.style.chart.title.subtitle
709
+ }
710
+ }
711
+ }, null, 8, ["config"]))
712
+ ], 4)) : _("", !0),
713
+ O("div", {
714
+ id: `legend-top-${A.value}`
715
+ }, null, 8, Tl),
716
+ e.value.userOptions.show && N.value && (c(je) || c(Fe)) ? (d(), Z(c(g), {
717
+ ref: "details",
718
+ key: `user_option_${Ee.value}`,
719
+ backgroundColor: e.value.style.chart.backgroundColor,
720
+ color: e.value.style.chart.color,
721
+ isPrinting: c(Ke),
722
+ isImaging: c(Je),
723
+ uid: A.value,
724
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
725
+ hasPdf: e.value.userOptions.buttons.pdf,
726
+ hasXls: e.value.userOptions.buttons.csv,
727
+ hasImg: e.value.userOptions.buttons.img,
728
+ hasTable: e.value.userOptions.buttons.table,
729
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
730
+ isFullscreen: K.value,
731
+ isTooltip: I.value.showTooltip,
732
+ titles: { ...e.value.userOptions.buttonTitles },
733
+ chartElement: V.value,
734
+ position: e.value.userOptions.position,
735
+ hasAnnotator: e.value.userOptions.buttons.annotator,
736
+ isAnnotation: me.value,
737
+ callbacks: e.value.userOptions.callbacks,
738
+ printScale: e.value.userOptions.print.scale,
739
+ onToggleFullscreen: it,
740
+ onGeneratePdf: c(Qe),
741
+ onGenerateCsv: ze,
742
+ onGenerateImage: c(et),
743
+ onToggleTable: dt,
744
+ onToggleTooltip: ht,
745
+ onToggleAnnotator: De,
746
+ style: M({
747
+ visibility: c(je) ? c(Fe) ? "visible" : "hidden" : "visible"
748
+ })
749
+ }, mt({ _: 2 }, [
750
+ t.$slots.menuIcon ? {
751
+ name: "menuIcon",
752
+ fn: T(({ isOpen: l, color: a }) => [
753
+ C(t.$slots, "menuIcon", le(oe({ isOpen: l, color: a })), void 0, !0)
754
+ ]),
755
+ key: "0"
756
+ } : void 0,
757
+ t.$slots.optionTooltip ? {
758
+ name: "optionTooltip",
759
+ fn: T(() => [
760
+ C(t.$slots, "optionTooltip", {}, void 0, !0)
761
+ ]),
762
+ key: "1"
763
+ } : void 0,
764
+ t.$slots.optionPdf ? {
765
+ name: "optionPdf",
766
+ fn: T(() => [
767
+ C(t.$slots, "optionPdf", {}, void 0, !0)
768
+ ]),
769
+ key: "2"
770
+ } : void 0,
771
+ t.$slots.optionCsv ? {
772
+ name: "optionCsv",
773
+ fn: T(() => [
774
+ C(t.$slots, "optionCsv", {}, void 0, !0)
775
+ ]),
776
+ key: "3"
777
+ } : void 0,
778
+ t.$slots.optionImg ? {
779
+ name: "optionImg",
780
+ fn: T(() => [
781
+ C(t.$slots, "optionImg", {}, void 0, !0)
782
+ ]),
783
+ key: "4"
784
+ } : void 0,
785
+ t.$slots.optionTable ? {
786
+ name: "optionTable",
787
+ fn: T(() => [
788
+ C(t.$slots, "optionTable", {}, void 0, !0)
789
+ ]),
790
+ key: "5"
791
+ } : void 0,
792
+ t.$slots.optionFullscreen ? {
793
+ name: "optionFullscreen",
794
+ fn: T(({ toggleFullscreen: l, isFullscreen: a }) => [
795
+ C(t.$slots, "optionFullscreen", le(oe({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
796
+ ]),
797
+ key: "6"
798
+ } : void 0,
799
+ t.$slots.optionAnnotator ? {
800
+ name: "optionAnnotator",
801
+ fn: T(({ toggleAnnotator: l, isAnnotator: a }) => [
802
+ C(t.$slots, "optionAnnotator", le(oe({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
803
+ ]),
804
+ key: "7"
805
+ } : void 0
806
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : _("", !0),
807
+ j.value.length > 1 ? (d(), y("nav", {
808
+ key: 4,
809
+ class: "vue-ui-treemap-breadcrumbs",
810
+ "data-dom-to-png-ignore": "",
811
+ ref_key: "breadcrumbsNav",
812
+ ref: Se
813
+ }, [
814
+ (d(!0), y(Ce, null, Le(j.value, (l, a) => (d(), y("span", {
815
+ role: "button",
816
+ tabindex: a < j.value.length - 1 ? 0 : void 0,
817
+ key: l.id || "root",
818
+ onClick: (p) => a === j.value.length - 1 ? () => {
819
+ } : fe(l.node),
820
+ onKeydown: [
821
+ yt(Me((p) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["enter"]),
822
+ yt(Me((p) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["space"])
823
+ ],
824
+ class: "vue-ui-treemap-crumb",
825
+ "data-last-crumb": a === j.value.length - 1,
826
+ style: M({
827
+ color: e.value.style.chart.color
828
+ }),
829
+ onMouseenter: (p) => pt(a),
830
+ onMouseleave: ft,
831
+ onFocus: (p) => pt(a),
832
+ onBlur: ft
833
+ }, [
834
+ O("span", _l, [
835
+ O("span", Ol, [
836
+ C(t.$slots, "breadcrumb-label", Be({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: ye.value === a }), () => [
837
+ a === 0 ? (d(), y("div", Al, [
838
+ we(Tt, {
839
+ name: ye.value === 0 ? "homeFilled" : "home",
840
+ stroke: e.value.style.chart.color
841
+ }, null, 8, ["name", "stroke"])
842
+ ])) : (d(), y(Ce, { key: 1 }, [
843
+ $e(H(l.label), 1)
844
+ ], 64))
845
+ ], !0)
846
+ ]),
847
+ a < j.value.length - 1 ? (d(), y("span", Sl, [
848
+ C(t.$slots, "breadcrumb-arrow", {}, () => [
849
+ o[6] || (o[6] = $e(" › ", -1))
850
+ ], !0)
851
+ ])) : _("", !0)
852
+ ])
853
+ ], 44, xl))), 128))
854
+ ], 512)) : _("", !0),
855
+ (d(), y("svg", {
856
+ ref_key: "svgRef",
857
+ ref: Ze,
858
+ xmlns: c(el),
859
+ class: Re({ "vue-data-ui-fullscreen--on": K.value, "vue-data-ui-fulscreen--off": !K.value, "vue-data-ui-zoom-plus": !ee.value, "vue-data-ui-zoom-minus": ee.value, loading: c(re) }),
860
+ viewBox: `${se.value.startX} ${se.value.startY} ${se.value.width <= 0 ? 10 : se.value.width} ${se.value.height <= 0 ? 10 : se.value.height}`,
861
+ style: M(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
862
+ }, [
863
+ we(c(f)),
864
+ (d(!0), y(Ce, null, Le(ce.value, (l, a) => (d(), y("g", {
865
+ key: `tgrad_${l.id}`
866
+ }, [
867
+ e.value.style.chart.layout.rects.gradient.show ? (d(), y("defs", Fl, [
868
+ O("radialGradient", {
869
+ id: `tgrad_${l.id}`,
870
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
871
+ }, [
872
+ O("stop", {
873
+ offset: "18%",
874
+ "stop-color": l.color
875
+ }, null, 8, Pl),
876
+ O("stop", {
877
+ offset: "100%",
878
+ "stop-color": c(kt)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
879
+ }, null, 8, zl)
880
+ ], 8, Nl)
881
+ ])) : _("", !0)
882
+ ]))), 128)),
883
+ (d(!0), y(Ce, null, Le(ce.value, (l, a) => (d(), y("g", {
884
+ key: `k_${l.id}`
885
+ }, [
886
+ O("rect", {
887
+ x: l.x0,
888
+ y: l.y0,
889
+ height: ut(l),
890
+ width: rt(l),
891
+ fill: B.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
892
+ rx: e.value.style.chart.layout.rects.borderRadius,
893
+ stroke: L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
894
+ "stroke-width": L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
895
+ onClick: Me((p) => fe(l, a), ["stop"]),
896
+ onMouseenter: () => Mt({
897
+ datapoint: l,
898
+ seriesIndex: a
899
+ }),
900
+ onMouseleave: (p) => Lt({ datapoint: l, seriesIndex: a }),
901
+ style: M(`opacity:${L.value ? L.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
902
+ class: Re([
903
+ "vue-ui-treemap-rect",
904
+ Dt(l) ? "vue-data-ui-zoom-plus" : ee.value ? "vue-data-ui-zoom-minus" : ""
905
+ ])
906
+ }, null, 46, Dl),
907
+ (d(), y("foreignObject", {
908
+ x: l.x0,
909
+ y: l.y0,
910
+ height: ut(l),
911
+ width: rt(l),
912
+ class: "vue-ui-treemap-cell-foreignObject"
913
+ }, [
914
+ O("div", Ll, [
915
+ e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || ee.value) ? (d(), y("div", {
916
+ key: 0,
917
+ class: "vue-ui-treemap-cell-default",
918
+ style: M(`width:calc(100% - ${Q(l) / 1.5}px);text-align:left;line-height:${Q(l) < 14 ? 14 : Q(l)}px;padding:${Q(l) / 3}px; color:${c(wt)(l.color)}`)
919
+ }, [
920
+ O("span", {
921
+ style: M(`width:100%;font-size:${Q(l)}px;`)
922
+ }, H(l.name), 5),
923
+ o[7] || (o[7] = O("br", null, null, -1)),
924
+ O("span", {
925
+ style: M(`width:100%;font-size:${Q(l)}px;`)
926
+ }, H(c(xe)(
927
+ e.value.style.chart.layout.labels.formatter,
928
+ l.value,
929
+ c(he)({
930
+ p: e.value.style.chart.layout.labels.prefix,
931
+ v: l.value,
932
+ s: e.value.style.chart.layout.labels.suffix,
933
+ r: e.value.style.chart.layout.labels.rounding
934
+ }),
935
+ { datapoint: l }
936
+ )), 5)
937
+ ], 4)) : _("", !0),
938
+ c(re) ? _("", !0) : C(t.$slots, "rect", Be({
939
+ key: 1,
940
+ ref_for: !0
941
+ }, {
942
+ rect: l,
943
+ shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || ee.value,
944
+ fontSize: Q(l),
945
+ isZoom: ee.value,
946
+ textColor: c(wt)(l.color)
947
+ }), void 0, !0)
948
+ ])
949
+ ], 8, Rl))
950
+ ]))), 128)),
951
+ C(t.$slots, "svg", le(oe({ svg: J.value, isZoom: ee.value, rect: L.value, config: e.value })), void 0, !0)
952
+ ], 14, Il)),
953
+ t.$slots.watermark ? (d(), y("div", Ml, [
954
+ C(t.$slots, "watermark", le(oe({ isPrinting: c(Ke) || c(Je) })), void 0, !0)
955
+ ])) : _("", !0),
956
+ O("div", {
957
+ id: `legend-bottom-${A.value}`
958
+ }, null, 8, Bl),
959
+ qe.value ? (d(), Z(Gt, {
960
+ key: 6,
961
+ to: e.value.style.chart.legend.position === "top" ? `#legend-top-${A.value}` : `#legend-bottom-${A.value}`
962
+ }, [
963
+ O("div", {
964
+ ref_key: "chartLegend",
965
+ ref: He
966
+ }, [
967
+ e.value.style.chart.legend.show ? (d(), Z(hl, {
968
+ key: `legend_${Ae.value}`,
969
+ legendSet: ct.value,
970
+ config: Rt.value,
971
+ id: `treemap_legend_${A.value}`,
972
+ onClickMarker: o[0] || (o[0] = ({ legend: l }) => vt(l))
973
+ }, {
974
+ item: T(({ legend: l, index: a }) => [
975
+ c(re) ? _("", !0) : (d(), y("div", {
976
+ key: 0,
977
+ onClick: (p) => vt(l),
978
+ style: M(`opacity:${R.value.includes(l.id) ? 0.5 : 1}`)
979
+ }, H(l.name) + H(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + H(e.value.style.chart.legend.showValue ? c(xe)(
980
+ e.value.style.chart.layout.labels.formatter,
981
+ l.value,
982
+ c(he)({
983
+ p: e.value.style.chart.layout.labels.prefix,
984
+ v: l.value,
985
+ s: e.value.style.chart.layout.labels.suffix,
986
+ r: e.value.style.chart.legend.roundingValue
987
+ }),
988
+ { datapoint: l }
989
+ ) : "") + " " + H(e.value.style.chart.legend.showPercentage ? R.value.includes(l.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / ne.value) ? "-" : (l.value / ne.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Vl))
990
+ ]),
991
+ _: 1
992
+ }, 8, ["legendSet", "config", "id"])) : C(t.$slots, "legend", {
993
+ key: 1,
994
+ legend: ct.value
995
+ }, void 0, !0)
996
+ ], 512)
997
+ ], 8, ["to"])) : _("", !0),
998
+ t.$slots.source ? (d(), y("div", {
999
+ key: 7,
1000
+ ref_key: "source",
1001
+ ref: We,
1002
+ dir: "auto"
1003
+ }, [
1004
+ C(t.$slots, "source", {}, void 0, !0)
1005
+ ], 512)) : _("", !0),
1006
+ we(c(v), {
1007
+ show: I.value.showTooltip && P.value,
1008
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1009
+ color: e.value.style.chart.tooltip.color,
1010
+ fontSize: e.value.style.chart.tooltip.fontSize,
1011
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1012
+ borderColor: e.value.style.chart.tooltip.borderColor,
1013
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1014
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1015
+ position: e.value.style.chart.tooltip.position,
1016
+ offsetY: e.value.style.chart.tooltip.offsetY,
1017
+ parent: V.value,
1018
+ content: _e.value,
1019
+ isFullscreen: K.value,
1020
+ isCustom: c(Ct)(e.value.style.chart.tooltip.customFormat),
1021
+ smooth: e.value.style.chart.tooltip.smooth,
1022
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
1023
+ }, {
1024
+ "tooltip-before": T(() => [
1025
+ C(t.$slots, "tooltip-before", le(oe({ ...Pe.value })), void 0, !0)
1026
+ ]),
1027
+ "tooltip-after": T(() => [
1028
+ C(t.$slots, "tooltip-after", le(oe({ ...Pe.value })), void 0, !0)
1029
+ ]),
1030
+ _: 3
1031
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
1032
+ N.value ? (d(), Z(Xt(ve.value.component), Be({ key: 8 }, ve.value.props, {
1033
+ ref_key: "tableUnit",
1034
+ ref: ue,
1035
+ onClose: o[3] || (o[3] = (l) => I.value.showTable = !1)
1036
+ }), mt({
1037
+ content: T(() => [
1038
+ (d(), Z(c(i), {
1039
+ key: `table_${Oe.value}`,
1040
+ colNames: ge.value.colNames,
1041
+ head: ge.value.head,
1042
+ body: ge.value.body,
1043
+ config: ge.value.config,
1044
+ title: e.value.table.useDialog ? "" : ve.value.title,
1045
+ withCloseButton: !e.value.table.useDialog,
1046
+ onClose: o[2] || (o[2] = (l) => I.value.showTable = !1)
1047
+ }, {
1048
+ th: T(({ th: l }) => [
1049
+ O("div", {
1050
+ innerHTML: l,
1051
+ style: { display: "flex", "align-items": "center" }
1052
+ }, null, 8, El)
1053
+ ]),
1054
+ td: T(({ td: l }) => [
1055
+ $e(H(l.name || l), 1)
1056
+ ]),
1057
+ _: 1
1058
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1059
+ ]),
1060
+ _: 2
1061
+ }, [
1062
+ e.value.table.useDialog ? {
1063
+ name: "title",
1064
+ fn: T(() => [
1065
+ $e(H(ve.value.title), 1)
1066
+ ]),
1067
+ key: "0"
1068
+ } : void 0,
1069
+ e.value.table.useDialog ? {
1070
+ name: "actions",
1071
+ fn: T(() => [
1072
+ O("button", {
1073
+ tabindex: "0",
1074
+ class: "vue-ui-user-options-button",
1075
+ onClick: o[1] || (o[1] = (l) => ze(e.value.userOptions.callbacks.csv))
1076
+ }, [
1077
+ we(Tt, {
1078
+ name: "excel",
1079
+ stroke: ve.value.props.color
1080
+ }, null, 8, ["stroke"])
1081
+ ])
1082
+ ]),
1083
+ key: "1"
1084
+ } : void 0
1085
+ ]), 1040)) : _("", !0),
1086
+ c(re) ? (d(), Z(ul, { key: 9 })) : _("", !0)
1087
+ ], 46, $l));
1088
+ }
1089
+ }, lo = /* @__PURE__ */ pl(Ul, [["__scopeId", "data-v-3a726c85"]]);
1090
+ export {
1091
+ lo as default
1092
+ };