vue-data-ui 2.16.6 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +83 -53
  2. package/dist/{Arrow-DCqxVwey.js → Arrow-BAEkZGzL.js} +1 -1
  3. package/dist/{BaseDraggableDialog-6DIKXIBU.js → BaseDraggableDialog-ChCkcmj_.js} +2 -2
  4. package/dist/{BaseIcon-Bn996RXm.js → BaseIcon-naqtCxVi.js} +1 -1
  5. package/dist/{ColorPicker-OFfLkKNb.js → ColorPicker-CfIPgxcj.js} +2 -2
  6. package/dist/{DataTable-CHBLjKtZ.js → DataTable-D0VYDhfx.js} +2 -2
  7. package/dist/{Legend-nBXoxXJH.js → Legend-Bxlv67uY.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-Cls2idJS.js → NonSvgPenAndPaper-b_oVy-Dd.js} +3 -3
  9. package/dist/{PackageVersion-Bg_9KCU-.js → PackageVersion-5TR4ocqp.js} +1 -1
  10. package/dist/{PenAndPaper-BPTpbnay.js → PenAndPaper-D6AqipIO.js} +32 -32
  11. package/dist/{Shape-Bnf512BA.js → Shape-DtFT5EJa.js} +1 -1
  12. package/dist/{Slicer-BrqtJG2E.js → Slicer-CL6-MRI6.js} +2 -2
  13. package/dist/{SparkTooltip-C-rLATAw.js → SparkTooltip-Bcv1aoA5.js} +1 -1
  14. package/dist/{Title-Gi81VwUM.js → Title-B-2bV0SW.js} +1 -1
  15. package/dist/{Tooltip-CJxVw7-T.js → Tooltip-CoQnTnr-.js} +1 -1
  16. package/dist/{UserOptions-CBEK6_jo.js → UserOptions-Dd34lEKb.js} +2 -2
  17. package/dist/{dom-to-png-CRHNL8VU.js → dom-to-png-2AA0wHlX.js} +1 -1
  18. package/dist/{img-BgOg8opa.js → img-Y_hYz-ZC.js} +1 -1
  19. package/dist/{index-DvIXJm6t.js → index-pPGk-uhD.js} +1 -1
  20. package/dist/{pdf-DhTxBrbJ.js → pdf-yfk3d1is.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1096 -160
  23. package/dist/types/vue-data-ui.d.ts +1096 -160
  24. package/dist/{useNestedProp-DrYHm61t.js → useNestedProp-DjACxgdZ.js} +1 -1
  25. package/dist/{usePrinter-CWnXbGMb.js → usePrinter-DDHcrl0A.js} +2 -2
  26. package/dist/vue-data-ui-CIWxgKjd.js +312 -0
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CtlB4p7i.js → vue-ui-3d-bar-D5Wpdqfk.js} +228 -220
  29. package/dist/{vue-ui-accordion-D55kCO5G.js → vue-ui-accordion-CVnA550V.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-DSshyUn-.js → vue-ui-age-pyramid-BuAl-zC5.js} +179 -171
  31. package/dist/{vue-ui-annotator-DQSMv_k2.js → vue-ui-annotator-gl2A20m3.js} +2 -2
  32. package/dist/{vue-ui-bullet-FeScjj7q.js → vue-ui-bullet-D-VMKpwe.js} +127 -119
  33. package/dist/{vue-ui-candlestick-Drupgyoi.js → vue-ui-candlestick-1r6YwiUV.js} +194 -186
  34. package/dist/{vue-ui-carousel-table-BTZQRZfO.js → vue-ui-carousel-table-B6UJoNtP.js} +4 -4
  35. package/dist/{vue-ui-chestnut-DLWjPwRL.js → vue-ui-chestnut-DnlBYpC5.js} +226 -218
  36. package/dist/{vue-ui-chord-BgLbFBT9.js → vue-ui-chord-D3kpzYjp.js} +175 -167
  37. package/dist/{vue-ui-circle-pack-VXcRh2gy.js → vue-ui-circle-pack-CHgdpoYu.js} +188 -180
  38. package/dist/{vue-ui-cursor-DWmfnM25.js → vue-ui-cursor-63EAvElT.js} +2 -2
  39. package/dist/{vue-ui-dashboard-CGIocEHj.js → vue-ui-dashboard-Da6CPET-.js} +62 -62
  40. package/dist/{vue-ui-digits-BgQch3Fc.js → vue-ui-digits-CA8pUKej.js} +2 -2
  41. package/dist/{vue-ui-donut-B59bCV5_.js → vue-ui-donut-CKa7nFjt.js} +329 -321
  42. package/dist/{vue-ui-donut-evolution-CI8qBIQd.js → vue-ui-donut-evolution-qeBEA4W8.js} +245 -237
  43. package/dist/{vue-ui-dumbbell-CXv7sk88.js → vue-ui-dumbbell-Bm0PvAKT.js} +144 -136
  44. package/dist/{vue-ui-flow-DxF0ELtv.js → vue-ui-flow-C2dqXvrU.js} +169 -161
  45. package/dist/{vue-ui-funnel-Bco8rqF8.js → vue-ui-funnel-Dvy5rRld.js} +132 -124
  46. package/dist/{vue-ui-galaxy-CaPJwwOj.js → vue-ui-galaxy-Y8LYp5n2.js} +168 -160
  47. package/dist/{vue-ui-gauge-D7arhDmb.js → vue-ui-gauge-BBo0jWAP.js} +164 -156
  48. package/dist/{vue-ui-gizmo-Dwli-Mip.js → vue-ui-gizmo-DjXfTOWn.js} +3 -3
  49. package/dist/{vue-ui-heatmap-Cyn-ahGO.js → vue-ui-heatmap-BbxRpltP.js} +240 -228
  50. package/dist/{vue-ui-history-plot-C2AEToqx.js → vue-ui-history-plot-ChYf3Nvc.js} +214 -206
  51. package/dist/{vue-ui-kpi-DKDibSdl.js → vue-ui-kpi-Vfc5-JnE.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-B8OVutUx.js → vue-ui-mini-loader-C0-Nsz8K.js} +2 -2
  53. package/dist/{vue-ui-molecule-BVSrqIGw.js → vue-ui-molecule-B7Yu7vzF.js} +158 -150
  54. package/dist/{vue-ui-mood-radar-DvlyS3RN.js → vue-ui-mood-radar-C8JUTwNw.js} +128 -120
  55. package/dist/{vue-ui-nested-donuts-D9ssSus6.js → vue-ui-nested-donuts-D0RgFifU.js} +196 -188
  56. package/dist/{vue-ui-onion-Buu4VX3u.js → vue-ui-onion-D4U7TL_N.js} +166 -158
  57. package/dist/{vue-ui-parallel-coordinate-plot-DFLUvhxD.js → vue-ui-parallel-coordinate-plot-CXMT7Rjr.js} +186 -178
  58. package/dist/{vue-ui-quadrant-BMC7NBGd.js → vue-ui-quadrant-B13pTVVZ.js} +182 -174
  59. package/dist/{vue-ui-quick-chart-DB9RKUkb.js → vue-ui-quick-chart-C0UL4o63.js} +305 -297
  60. package/dist/{vue-ui-radar-68NMPxxQ.js → vue-ui-radar-XpdiXnhz.js} +167 -159
  61. package/dist/{vue-ui-rating-swH9kRr3.js → vue-ui-rating-CM8ZrUb1.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-CT-EdSjO.js → vue-ui-relation-circle-CYoFNekk.js} +144 -136
  63. package/dist/{vue-ui-ridgeline-DftROPaX.js → vue-ui-ridgeline-QUquE6ck.js} +196 -188
  64. package/dist/{vue-ui-rings-M-9dPI5D.js → vue-ui-rings-DwT0IfOh.js} +145 -137
  65. package/dist/{vue-ui-scatter-CsGhaFJh.js → vue-ui-scatter-zDpy1udm.js} +179 -172
  66. package/dist/{vue-ui-skeleton-BAOt2neL.js → vue-ui-skeleton-DJPjyNYn.js} +3 -3
  67. package/dist/{vue-ui-smiley-7_kIgPg-.js → vue-ui-smiley-DoDXl6k0.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-DHlQQpwz.js → vue-ui-spark-trend-CniV6Cpr.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BnHhzuKf.js → vue-ui-sparkbar-Ds2ITgwn.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-WtfkCK8g.js → vue-ui-sparkgauge-CosfK-kw.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-B2u4XLVd.js → vue-ui-sparkhistogram-C7O1wPAJ.js} +4 -4
  72. package/dist/{vue-ui-sparkline-DKIyUlSm.js → vue-ui-sparkline-B_iUj3F2.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-BLGz2qIb.js → vue-ui-sparkstackbar-DBhWrysr.js} +3 -3
  74. package/dist/{vue-ui-stackbar-BDpMsTYe.js → vue-ui-stackbar-C3aV4IcL.js} +240 -232
  75. package/dist/{vue-ui-strip-plot-5qDcYPnR.js → vue-ui-strip-plot-Bvr1GAzH.js} +204 -196
  76. package/dist/{vue-ui-table-Bg5HIQ3O.js → vue-ui-table-DQKKRgyo.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-DmjNy1q1.js → vue-ui-table-heatmap-Dyqj5XJC.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-CnkJkBk5.js → vue-ui-table-sparkline-D4RubyLj.js} +4 -4
  79. package/dist/{vue-ui-thermometer-RlD-9mJf.js → vue-ui-thermometer-B0FKI5cG.js} +145 -137
  80. package/dist/{vue-ui-timer-Bes74INL.js → vue-ui-timer-DUCBRIl-.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-DiLS3akQ.js → vue-ui-tiremarks-CRt4UQZD.js} +108 -100
  82. package/dist/vue-ui-treemap-CWP5nYDx.js +961 -0
  83. package/dist/{vue-ui-vertical-bar-CwqQyZFX.js → vue-ui-vertical-bar-C5fPYltO.js} +278 -270
  84. package/dist/{vue-ui-waffle-Ce3T4BPp.js → vue-ui-waffle-BpWLlfpg.js} +188 -180
  85. package/dist/{vue-ui-wheel-6B0WTkf2.js → vue-ui-wheel-CTzuCroy.js} +112 -104
  86. package/dist/{vue-ui-word-cloud-ByYZCOh7.js → vue-ui-word-cloud-BPokdaP1.js} +198 -190
  87. package/dist/{vue-ui-world-B9PxVO4n.js → vue-ui-world-CS6k-oil.js} +199 -191
  88. package/dist/{vue-ui-xy-DtJ7qJib.js → vue-ui-xy-CQ425kLR.js} +550 -544
  89. package/dist/{vue-ui-xy-canvas-S6YpFgzs.js → vue-ui-xy-canvas-D2IFwAr7.js} +306 -298
  90. package/package.json +1 -1
  91. package/dist/vue-data-ui-B8EWlMIK.js +0 -301
  92. package/dist/vue-ui-treemap-BG1Omm38.js +0 -953
@@ -0,0 +1,961 @@
1
+ import { defineAsyncComponent as Z, useSlots as Ot, onMounted as st, computed as b, ref as $, shallowRef as B, watch as _t, onBeforeUnmount as St, createElementBlock as y, openBlock as v, unref as d, normalizeStyle as M, normalizeClass as xe, createBlock as J, createCommentVNode as O, createElementVNode as _, createVNode as Te, createSlots as It, withCtx as T, renderSlot as k, normalizeProps as Q, guardReactiveProps as ee, Fragment as ge, renderList as Oe, withKeys as ut, withModifiers as _e, mergeProps as rt, createTextVNode as ye, toDisplayString as te, nextTick as Ft } from "vue";
2
+ import { u as Nt, c as Se, t as zt, p as S, a as At, b as Pt, o as Rt, e as Lt, d as me, i as be, f as ie, X as Mt, l as it, F as ct, x as dt, q as Dt, r as Vt, y as Bt } from "./index-pPGk-uhD.js";
3
+ import { t as Ht, u as Ut } from "./useResponsive-DfdjqQps.js";
4
+ import { u as vt } from "./useNestedProp-DjACxgdZ.js";
5
+ import { u as Et } from "./usePrinter-DDHcrl0A.js";
6
+ import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as qt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Gt from "./BaseIcon-naqtCxVi.js";
9
+ import Xt from "./Title-B-2bV0SW.js";
10
+ import jt from "./Legend-Bxlv67uY.js";
11
+ import Yt from "./img-Y_hYz-ZC.js";
12
+ import { _ as Kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ function ht(n, r) {
14
+ const s = n.length;
15
+ if (s === 0)
16
+ throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
17
+ {
18
+ let i = 1 / 0, u = -1 / 0, h = 0;
19
+ for (let g = 0; g < s; g += 1) {
20
+ const p = n[g].normalizedValue;
21
+ p < i && (i = p), p > u && (u = p), h += p;
22
+ }
23
+ return Math.max(
24
+ r ** 2 * u / h ** 2,
25
+ h ** 2 / (r ** 2 * i)
26
+ );
27
+ }
28
+ }
29
+ function pt(n) {
30
+ const { xOffset: r, yOffset: s, width: i, height: u } = n;
31
+ return {
32
+ x0: r,
33
+ y0: s,
34
+ x1: r + i,
35
+ y1: s + u
36
+ };
37
+ }
38
+ function Zt(n, r, s) {
39
+ if (n.length === 0)
40
+ return !0;
41
+ {
42
+ const i = n.concat(r), u = ht(
43
+ n,
44
+ s
45
+ ), h = ht(i, s);
46
+ return u >= h;
47
+ }
48
+ }
49
+ function Jt(n) {
50
+ const r = [], s = n.length;
51
+ for (let i = 0; i < s; i += 1) {
52
+ const u = n[i], h = u.length;
53
+ for (let c = 0; c < h; c += 1)
54
+ r.push(u[c]);
55
+ }
56
+ return r;
57
+ }
58
+ function Qt(n, r) {
59
+ const s = {
60
+ ...r,
61
+ children: n
62
+ };
63
+ return gt(s);
64
+ }
65
+ function el(n) {
66
+ return (n.x1 - n.x0) * (n.y1 - n.y0);
67
+ }
68
+ function ft(n, r) {
69
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ie(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i, H = g / s;
70
+ let z = u, w = h;
71
+ const C = [];
72
+ if (s >= i) {
73
+ for (let m = 0; m < c; m += 1) {
74
+ const x = n[m], D = w + x.normalizedValue / p, A = {
75
+ x0: z,
76
+ y0: w,
77
+ x1: z + p,
78
+ y1: D
79
+ }, N = Object.assign({}, x, A);
80
+ w = D, C.push(N);
81
+ }
82
+ return C;
83
+ } else {
84
+ for (let m = 0; m < c; m += 1) {
85
+ const x = n[m], D = z + x.normalizedValue / H, A = {
86
+ x0: z,
87
+ y0: w,
88
+ x1: D,
89
+ y1: w + H
90
+ }, N = Object.assign({}, x, A);
91
+ z = D, C.push(N);
92
+ }
93
+ return C;
94
+ }
95
+ }
96
+ function tl(n) {
97
+ const r = Ie(n), s = r.width, i = r.height;
98
+ return Math.min(s, i);
99
+ }
100
+ function ll(n, r) {
101
+ const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p, H) => p + H, 0), u = r / i, h = [];
102
+ let c, g;
103
+ for (let p = 0; p < s; p += 1)
104
+ g = n[p], c = Object.assign({}, g, {
105
+ normalizedValue: g.value * (u || 0)
106
+ }), h.push(c);
107
+ return h;
108
+ }
109
+ function Ie(n) {
110
+ const { x0: r, y0: s, x1: i, y1: u } = n;
111
+ return {
112
+ xOffset: r,
113
+ yOffset: s,
114
+ width: i - r,
115
+ height: u - s
116
+ };
117
+ }
118
+ function ol(n, r, s, i) {
119
+ let u = n, h = r, c = s, g = i;
120
+ for (; ; ) {
121
+ const p = u.length;
122
+ if (p === 0) {
123
+ const C = ft(h, c);
124
+ return g.concat(C);
125
+ }
126
+ const H = tl(c), z = u[0], w = u.slice(1, p);
127
+ if (Zt(h, z, H)) {
128
+ const C = h.concat(z);
129
+ u = w, h = C, c = c, g = g;
130
+ } else {
131
+ const C = h.length;
132
+ let m = 0;
133
+ for (let N = 0; N < C; N += 1)
134
+ m += h[N].normalizedValue;
135
+ const x = al(c, m), D = ft(h, c), A = g.concat(D);
136
+ u = u, h = [], c = x, g = A;
137
+ }
138
+ }
139
+ }
140
+ function gt(n) {
141
+ if (typeof n.children > "u" || !n.children.length)
142
+ return [n];
143
+ {
144
+ const r = ll(
145
+ n.children,
146
+ el(n)
147
+ ), s = ol(r, [], n, []), i = s.length, u = [];
148
+ for (let c = 0; c < i; c += 1)
149
+ u.push(gt(s[c]));
150
+ return Jt(u);
151
+ }
152
+ }
153
+ function al(n, r) {
154
+ const { width: s, height: i, xOffset: u, yOffset: h } = Ie(n);
155
+ if (s >= i) {
156
+ const c = r / i, g = s - c, p = {
157
+ xOffset: u + c,
158
+ yOffset: h,
159
+ width: g,
160
+ height: i
161
+ };
162
+ return pt(p);
163
+ } else {
164
+ const c = r / s, g = i - c, p = {
165
+ xOffset: u,
166
+ yOffset: h + c,
167
+ width: s,
168
+ height: g
169
+ };
170
+ return pt(p);
171
+ }
172
+ }
173
+ const nl = ["id"], sl = {
174
+ key: 4,
175
+ class: "vue-ui-treemap-breadcrumbs",
176
+ "data-dom-to-png-ignore": ""
177
+ }, ul = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], rl = { class: "vue-ui-treemap-crumb-unit" }, il = { class: "vue-ui-treemap-crumb-unit-label" }, cl = {
178
+ key: 0,
179
+ style: { width: "24px", display: "flex", "align-items": "center" }
180
+ }, dl = {
181
+ key: 0,
182
+ class: "vue-ui-treemap-crumb-unit-arrow"
183
+ }, vl = ["xmlns", "viewBox"], hl = { key: 0 }, pl = ["id"], fl = ["stop-color"], gl = ["stop-color"], yl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], ml = ["x", "y", "height", "width"], bl = {
184
+ style: { width: "100%", height: "100%" },
185
+ class: "vue-ui-treemap-cell"
186
+ }, kl = {
187
+ key: 6,
188
+ class: "vue-data-ui-watermark"
189
+ }, wl = ["onClick"], Cl = { key: 0 }, $l = { key: 1 }, xl = ["innerHTML"], Tl = {
190
+ __name: "vue-ui-treemap",
191
+ props: {
192
+ config: {
193
+ type: Object,
194
+ default() {
195
+ return {};
196
+ }
197
+ },
198
+ dataset: {
199
+ type: Array,
200
+ default() {
201
+ return [];
202
+ }
203
+ }
204
+ },
205
+ emits: ["selectLegend", "selectDatapoint"],
206
+ setup(n, { expose: r, emit: s }) {
207
+ const i = Z(() => import("./DataTable-D0VYDhfx.js")), u = Z(() => import("./PenAndPaper-D6AqipIO.js")), h = Z(() => import("./vue-ui-accordion-CVnA550V.js")), c = Z(() => import("./vue-ui-skeleton-DJPjyNYn.js")), g = Z(() => import("./Tooltip-CoQnTnr-.js")), p = Z(() => import("./UserOptions-Dd34lEKb.js")), H = Z(() => import("./PackageVersion-5TR4ocqp.js")), { vue_ui_treemap: z } = Nt(), w = n, C = s, m = Ot();
208
+ st(() => {
209
+ m["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
210
+ });
211
+ const x = b(() => !!w.dataset && w.dataset.length), D = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), A = $(Se()), N = $(!1), ke = $(""), le = $(!1), Fe = $(0), P = $([]), G = B(null), Ne = B(null), ze = B(null), Ae = B(null), Pe = B(null), Re = $(0), Le = $(0), Me = $(0), t = b({
212
+ get: () => He(),
213
+ set: (e) => e
214
+ }), { userOptionsVisible: we, setUserOptionsVisibility: De, keepUserOptionState: Ve } = Wt({ config: t.value }), { svgRef: Be } = qt({ config: t.value.style.chart.title });
215
+ function He() {
216
+ const e = vt({
217
+ userConfig: w.config,
218
+ defaultConfig: z
219
+ });
220
+ return e.theme ? {
221
+ ...vt({
222
+ userConfig: At.vue_ui_treemap[e.theme] || w.config,
223
+ defaultConfig: e
224
+ }),
225
+ customPalette: zt[e.theme] || S
226
+ } : e;
227
+ }
228
+ _t(() => w.config, (e) => {
229
+ t.value = He(), we.value = !t.value.userOptions.showOnChartHover, Re.value += 1, Le.value += 1, Me.value += 1, R.value.showTable = t.value.table.show, R.value.showTooltip = t.value.style.chart.tooltip.show;
230
+ }, { deep: !0 });
231
+ const { isPrinting: Ue, isImaging: Ee, generatePdf: We, generateImage: qe } = Et({
232
+ elementId: `treemap_${A.value}`,
233
+ fileName: t.value.style.chart.title.text || "vue-ui-treemap",
234
+ options: t.value.userOptions.print
235
+ }), yt = b(() => t.value.userOptions.show && !t.value.style.chart.title.text), ce = b(() => Pt(t.value.customPalette)), R = $({
236
+ showTable: t.value.table.show,
237
+ showTooltip: t.value.style.chart.tooltip.show
238
+ }), U = $({
239
+ height: t.value.style.chart.height,
240
+ width: t.value.style.chart.width
241
+ }), X = b(() => ({
242
+ bottom: U.value.height - t.value.style.chart.padding.bottom,
243
+ height: U.value.height - t.value.style.chart.padding.top - t.value.style.chart.padding.bottom,
244
+ left: t.value.style.chart.padding.left,
245
+ right: U.value.width - t.value.style.chart.padding.right,
246
+ top: t.value.style.chart.padding.top,
247
+ vbHeight: U.value.height,
248
+ vbWidth: U.value.width,
249
+ width: U.value.width - t.value.style.chart.padding.left - t.value.style.chart.padding.right
250
+ }));
251
+ function Ge(e) {
252
+ e.forEach((o, l) => {
253
+ o.id = Se(), o.color = me(o.color) || ce.value[l] || S[l] || S[l % S.length], o.children && (o.children.forEach((a) => {
254
+ a.parentId = o.id, a.color = o.color;
255
+ }), Ge(o.children));
256
+ });
257
+ }
258
+ const E = B(w.dataset), W = B(null), oe = B(null);
259
+ st(() => {
260
+ mt();
261
+ });
262
+ function mt() {
263
+ if (Rt(w.dataset) && Lt({
264
+ componentName: "VueUiTreemap",
265
+ type: "dataset"
266
+ }), Ge(E.value), t.value.responsive) {
267
+ const e = Ht(() => {
268
+ const { width: o, height: l } = Ut({
269
+ chart: G.value,
270
+ title: t.value.style.chart.title.text ? Ne.value : null,
271
+ legend: t.value.style.chart.legend.show ? ze.value : null,
272
+ source: Ae.value,
273
+ noTitle: Pe.value
274
+ });
275
+ requestAnimationFrame(() => {
276
+ U.value.width = o, U.value.height = l;
277
+ });
278
+ });
279
+ W.value && (oe.value && W.value.unobserve(oe.value), W.value.disconnect()), W.value = new ResizeObserver(e), oe.value = G.value.parentNode, W.value.observe(oe.value);
280
+ }
281
+ }
282
+ St(() => {
283
+ W.value && (oe.value && W.value.unobserve(oe.value), W.value.disconnect());
284
+ });
285
+ const ae = $(E.value), ue = b(() => ae.value.map((e, o) => ({
286
+ ...e,
287
+ color: me(e.color) || ce.value[o] || S[o] || S[o % S.length]
288
+ })).filter((e) => !P.value.includes(e.id))), ne = b(() => E.value.filter((e) => !P.value.includes(e.id)).map((e) => e.value || 0).reduce((e, o) => e + o, 0)), Xe = b({
289
+ get() {
290
+ let e = [...ue.value];
291
+ return t.value.style.chart.layout.sorted && (e = [...ue.value].sort((o, l) => l.value - o.value)), e.map((o) => ({
292
+ ...o
293
+ }));
294
+ },
295
+ set(e) {
296
+ return e;
297
+ }
298
+ });
299
+ function je(e, o) {
300
+ return e.value / o;
301
+ }
302
+ function bt(e, o, l) {
303
+ const a = t.value.style.chart.layout.rects.colorRatio - je(o, l);
304
+ return it(e, a < 0 ? 0 : a);
305
+ }
306
+ function Ye(e, o, l, a) {
307
+ return e.map((f, F) => {
308
+ const fe = bt(me(o) || ce.value[F] || S[F] || S[F % S.length], f, a), Tt = je(f, a);
309
+ return {
310
+ ...f,
311
+ color: fe,
312
+ proportion: Tt,
313
+ parentName: l,
314
+ children: f.children ? Ye(f.children, fe, f.name, a) : void 0
315
+ };
316
+ });
317
+ }
318
+ const re = b(() => Qt(
319
+ Xe.value.map((e, o) => {
320
+ const l = e.children ? e.children.reduce((a, f) => a + f.value, 0) : e.value;
321
+ return {
322
+ value: e.value,
323
+ id: e.id || Se(),
324
+ children: e.children ? Ye(e.children.sort((a, f) => f.value - a.value), e.color, e.name, l) : void 0,
325
+ color: e.color,
326
+ name: e.name
327
+ };
328
+ }),
329
+ { x0: X.value.left * 2, y0: X.value.top, x1: X.value.width, y1: X.value.height }
330
+ ));
331
+ function Ke({ y0: e, y1: o }) {
332
+ return o - e <= 0 ? 1e-4 : o - e;
333
+ }
334
+ function Ze({ x0: e, x1: o }) {
335
+ return o - e <= 0 ? 1e-4 : o - e;
336
+ }
337
+ function j(e) {
338
+ const o = t.value.style.chart.layout.labels.fontSize * (e.proportion * 2 > 1 ? 1 : e.proportion * 2);
339
+ return o < t.value.style.chart.layout.labels.minFontSize ? t.value.style.chart.layout.labels.minFontSize : o;
340
+ }
341
+ function Je(e) {
342
+ le.value = e, Fe.value += 1;
343
+ }
344
+ const se = b(() => ({
345
+ startX: 0,
346
+ startY: 0,
347
+ width: X.value.vbWidth,
348
+ height: X.value.vbHeight
349
+ }));
350
+ function Y(e, o = E.value) {
351
+ for (const l of o) {
352
+ if (l.id === e)
353
+ return l;
354
+ if (l.children) {
355
+ const a = Y(e, l.children);
356
+ if (a)
357
+ return a;
358
+ }
359
+ }
360
+ return null;
361
+ }
362
+ const I = $([]), K = b(() => I.value.length > 0);
363
+ function de(e) {
364
+ if (!e) {
365
+ ae.value = E.value.slice(), C("selectDatapoint", void 0), I.value = [];
366
+ return;
367
+ }
368
+ const o = Y(e.id);
369
+ if (o && o.children?.length)
370
+ I.value.push(o.id), ae.value = o.children.slice(), C("selectDatapoint", e);
371
+ else if (e.parentId) {
372
+ I.value.push(e.parentId);
373
+ const l = Y(e.parentId);
374
+ ae.value = l.children.slice(), C("selectDatapoint", e);
375
+ } else if (I.value.length > 0) {
376
+ I.value.pop();
377
+ const l = I.value[I.value.length - 1];
378
+ if (l) {
379
+ const a = Y(l);
380
+ ae.value = a.children.slice();
381
+ } else
382
+ ae.value = E.value.slice(), I.value = [], C("selectDatapoint", void 0);
383
+ }
384
+ }
385
+ function kt(e) {
386
+ return !!(Y(e.id)?.children?.length || e.parentId);
387
+ }
388
+ const q = b(() => {
389
+ const e = [
390
+ { id: null, label: "All" }
391
+ ];
392
+ if (I.value.length > 0) {
393
+ let o = Y(I.value[I.value.length - 1]);
394
+ const l = [];
395
+ for (; o; )
396
+ l.unshift(o), o = o.parentId ? Y(o.parentId) : null;
397
+ for (const a of l)
398
+ e.push({
399
+ id: a.id,
400
+ label: a.name,
401
+ node: a
402
+ });
403
+ }
404
+ return e;
405
+ }), L = B(null), Qe = b(() => E.value.map((e, o) => ({
406
+ ...e,
407
+ color: me(e.color) || ce.value[o] || S[o] || S[o % S.length],
408
+ shape: "square"
409
+ })).sort((e, o) => o.value - e.value).map((e, o) => ({
410
+ ...e,
411
+ proportion: e.value / E.value.map((l) => l.value).reduce((l, a) => l + a, 0),
412
+ opacity: P.value.includes(e.id) ? 0.5 : 1
413
+ }))), wt = b(() => ({
414
+ cy: "treemap-div-legend",
415
+ backgroundColor: t.value.style.chart.legend.backgroundColor,
416
+ color: t.value.style.chart.legend.color,
417
+ fontSize: t.value.style.chart.legend.fontSize,
418
+ paddingBottom: 12,
419
+ fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
420
+ }));
421
+ function et(e) {
422
+ L.value = null, P.value.includes(e.id) ? P.value = P.value.filter((o) => o !== e.id) : P.value.length < w.dataset.length - 1 && P.value.push(e.id), C("selectLegend", Xe.value);
423
+ }
424
+ const Ce = $(null);
425
+ function Ct({ datapoint: e, seriesIndex: o }) {
426
+ L.value = e, Ce.value = { datapoint: e, seriesIndex: o, config: t.value, series: ue.value };
427
+ const l = t.value.style.chart.tooltip.customFormat;
428
+ if (dt(l) && Bt(() => l({
429
+ seriesIndex: o,
430
+ datapoint: e,
431
+ series: ue.value,
432
+ config: t.value
433
+ })))
434
+ ke.value = l({
435
+ seriesIndex: o,
436
+ datapoint: e,
437
+ series: ue.value,
438
+ config: t.value
439
+ });
440
+ else {
441
+ let a = "";
442
+ a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, 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="${e.color}"/></svg>`, a += `<b>${be(
443
+ t.value.style.chart.layout.labels.formatter,
444
+ e.value,
445
+ ie({
446
+ p: t.value.style.chart.layout.labels.prefix,
447
+ v: e.value,
448
+ s: t.value.style.chart.layout.labels.suffix,
449
+ r: t.value.style.chart.tooltip.roundingValue
450
+ }),
451
+ { datapoint: e, seriesIndex: o }
452
+ )}</b>`, ke.value = `<div>${a}</div>`;
453
+ }
454
+ N.value = !0;
455
+ }
456
+ const V = b(() => {
457
+ const e = re.value.map((l) => ({
458
+ name: l.name,
459
+ color: l.color
460
+ })), o = re.value.map((l) => l.value);
461
+ return { head: e, body: o };
462
+ });
463
+ function tt(e = null) {
464
+ Ft(() => {
465
+ const o = V.value.head.map((f, F) => [[
466
+ f.name
467
+ ], [V.value.body[F]], [isNaN(V.value.body[F] / ne.value) ? "-" : V.value.body[F] / ne.value * 100]]), l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Dt(l);
468
+ e ? e(a) : Vt({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
469
+ });
470
+ }
471
+ const ve = b(() => {
472
+ const e = [
473
+ t.value.table.columnNames.series,
474
+ t.value.table.columnNames.value,
475
+ t.value.table.columnNames.percentage
476
+ ], o = V.value.head.map((f, F) => {
477
+ const fe = be(
478
+ t.value.style.chart.layout.labels.formatter,
479
+ V.value.body[F],
480
+ ie({
481
+ p: t.value.style.chart.layout.labels.prefix,
482
+ v: V.value.body[F],
483
+ s: t.value.style.chart.layout.labels.suffix,
484
+ r: t.value.table.td.roundingValue
485
+ })
486
+ );
487
+ return [
488
+ {
489
+ color: f.color,
490
+ name: f.name,
491
+ shape: "square"
492
+ },
493
+ fe,
494
+ isNaN(V.value.body[F] / ne.value) ? "-" : ie({
495
+ v: V.value.body[F] / ne.value * 100,
496
+ s: "%",
497
+ r: t.value.table.td.roundingPercentage
498
+ })
499
+ ];
500
+ }), l = {
501
+ th: {
502
+ backgroundColor: t.value.table.th.backgroundColor,
503
+ color: t.value.table.th.color,
504
+ outline: t.value.table.th.outline
505
+ },
506
+ td: {
507
+ backgroundColor: t.value.table.td.backgroundColor,
508
+ color: t.value.table.td.color,
509
+ outline: t.value.table.td.outline
510
+ },
511
+ breakpoint: t.value.table.responsiveBreakpoint
512
+ };
513
+ return {
514
+ colNames: [
515
+ t.value.table.columnNames.series,
516
+ t.value.table.columnNames.value
517
+ ],
518
+ head: e,
519
+ body: o,
520
+ config: l
521
+ };
522
+ });
523
+ function $t() {
524
+ return re.value;
525
+ }
526
+ function lt() {
527
+ R.value.showTable = !R.value.showTable;
528
+ }
529
+ function ot() {
530
+ R.value.showTooltip = !R.value.showTooltip;
531
+ }
532
+ const he = $(!1);
533
+ function $e() {
534
+ he.value = !he.value;
535
+ }
536
+ const pe = $(null);
537
+ function at(e) {
538
+ pe.value = e;
539
+ }
540
+ function nt() {
541
+ pe.value = null;
542
+ }
543
+ async function xt({ scale: e = 2 } = {}) {
544
+ if (!G.value) return;
545
+ const { imageUri: o, base64: l } = await Yt({ domElement: G.value, base64: !0, img: !0, scale: e });
546
+ return { imageUri: o, base64: l };
547
+ }
548
+ return r({
549
+ getData: $t,
550
+ getImage: xt,
551
+ generateCsv: tt,
552
+ generateImage: qe,
553
+ generatePdf: We,
554
+ toggleTable: lt,
555
+ toggleTooltip: ot,
556
+ toggleAnnotator: $e,
557
+ toggleFullscreen: Je
558
+ }), (e, o) => (v(), y("div", {
559
+ ref_key: "treemapChart",
560
+ ref: G,
561
+ class: xe(`vue-ui-treemap ${le.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
562
+ style: M(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
563
+ id: `treemap_${A.value}`,
564
+ onMouseenter: o[3] || (o[3] = () => d(De)(!0)),
565
+ onMouseleave: o[4] || (o[4] = () => d(De)(!1))
566
+ }, [
567
+ t.value.userOptions.buttons.annotator ? (v(), J(d(u), {
568
+ key: 0,
569
+ svgRef: d(Be),
570
+ backgroundColor: t.value.style.chart.backgroundColor,
571
+ color: t.value.style.chart.color,
572
+ active: he.value,
573
+ onClose: $e
574
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : O("", !0),
575
+ yt.value ? (v(), y("div", {
576
+ key: 1,
577
+ ref_key: "noTitle",
578
+ ref: Pe,
579
+ class: "vue-data-ui-no-title-space",
580
+ style: "height:36px; width: 100%;background:transparent"
581
+ }, null, 512)) : O("", !0),
582
+ t.value.style.chart.title.text ? (v(), y("div", {
583
+ key: 2,
584
+ ref_key: "chartTitle",
585
+ ref: Ne,
586
+ style: M(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
587
+ }, [
588
+ (v(), J(Xt, {
589
+ key: `title_${Re.value}`,
590
+ config: {
591
+ title: {
592
+ cy: "treemap-div-title",
593
+ ...t.value.style.chart.title
594
+ },
595
+ subtitle: {
596
+ cy: "treemap-div-subtitle",
597
+ ...t.value.style.chart.title.subtitle
598
+ }
599
+ }
600
+ }, null, 8, ["config"]))
601
+ ], 4)) : O("", !0),
602
+ t.value.userOptions.show && x.value && (d(Ve) || d(we)) ? (v(), J(d(p), {
603
+ ref: "details",
604
+ key: `user_option_${Fe.value}`,
605
+ backgroundColor: t.value.style.chart.backgroundColor,
606
+ color: t.value.style.chart.color,
607
+ isPrinting: d(Ue),
608
+ isImaging: d(Ee),
609
+ uid: A.value,
610
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
611
+ hasPdf: t.value.userOptions.buttons.pdf,
612
+ hasXls: t.value.userOptions.buttons.csv,
613
+ hasImg: t.value.userOptions.buttons.img,
614
+ hasTable: t.value.userOptions.buttons.table,
615
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
616
+ isFullscreen: le.value,
617
+ isTooltip: R.value.showTooltip,
618
+ titles: { ...t.value.userOptions.buttonTitles },
619
+ chartElement: G.value,
620
+ position: t.value.userOptions.position,
621
+ hasAnnotator: t.value.userOptions.buttons.annotator,
622
+ isAnnotation: he.value,
623
+ callbacks: t.value.userOptions.callbacks,
624
+ printScale: t.value.userOptions.print.scale,
625
+ onToggleFullscreen: Je,
626
+ onGeneratePdf: d(We),
627
+ onGenerateCsv: tt,
628
+ onGenerateImage: d(qe),
629
+ onToggleTable: lt,
630
+ onToggleTooltip: ot,
631
+ onToggleAnnotator: $e,
632
+ style: M({
633
+ visibility: d(Ve) ? d(we) ? "visible" : "hidden" : "visible"
634
+ })
635
+ }, It({ _: 2 }, [
636
+ e.$slots.menuIcon ? {
637
+ name: "menuIcon",
638
+ fn: T(({ isOpen: l, color: a }) => [
639
+ k(e.$slots, "menuIcon", Q(ee({ isOpen: l, color: a })), void 0, !0)
640
+ ]),
641
+ key: "0"
642
+ } : void 0,
643
+ e.$slots.optionTooltip ? {
644
+ name: "optionTooltip",
645
+ fn: T(() => [
646
+ k(e.$slots, "optionTooltip", {}, void 0, !0)
647
+ ]),
648
+ key: "1"
649
+ } : void 0,
650
+ e.$slots.optionPdf ? {
651
+ name: "optionPdf",
652
+ fn: T(() => [
653
+ k(e.$slots, "optionPdf", {}, void 0, !0)
654
+ ]),
655
+ key: "2"
656
+ } : void 0,
657
+ e.$slots.optionCsv ? {
658
+ name: "optionCsv",
659
+ fn: T(() => [
660
+ k(e.$slots, "optionCsv", {}, void 0, !0)
661
+ ]),
662
+ key: "3"
663
+ } : void 0,
664
+ e.$slots.optionImg ? {
665
+ name: "optionImg",
666
+ fn: T(() => [
667
+ k(e.$slots, "optionImg", {}, void 0, !0)
668
+ ]),
669
+ key: "4"
670
+ } : void 0,
671
+ e.$slots.optionTable ? {
672
+ name: "optionTable",
673
+ fn: T(() => [
674
+ k(e.$slots, "optionTable", {}, void 0, !0)
675
+ ]),
676
+ key: "5"
677
+ } : void 0,
678
+ e.$slots.optionFullscreen ? {
679
+ name: "optionFullscreen",
680
+ fn: T(({ toggleFullscreen: l, isFullscreen: a }) => [
681
+ k(e.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
682
+ ]),
683
+ key: "6"
684
+ } : void 0,
685
+ e.$slots.optionAnnotator ? {
686
+ name: "optionAnnotator",
687
+ fn: T(({ toggleAnnotator: l, isAnnotator: a }) => [
688
+ k(e.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
689
+ ]),
690
+ key: "7"
691
+ } : void 0
692
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : O("", !0),
693
+ q.value.length > 1 ? (v(), y("nav", sl, [
694
+ (v(!0), y(ge, null, Oe(q.value, (l, a) => (v(), y("span", {
695
+ role: "button",
696
+ tabindex: a < q.value.length - 1 ? 0 : void 0,
697
+ key: l.id || "root",
698
+ onClick: (f) => a === q.value.length - 1 ? () => {
699
+ } : de(l.node),
700
+ onKeydown: [
701
+ ut(_e((f) => a === q.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["enter"]),
702
+ ut(_e((f) => a === q.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["space"])
703
+ ],
704
+ class: "vue-ui-treemap-crumb",
705
+ "data-last-crumb": a === q.value.length - 1,
706
+ style: M({
707
+ color: t.value.style.chart.color
708
+ }),
709
+ onMouseenter: (f) => at(a),
710
+ onMouseleave: nt,
711
+ onFocus: (f) => at(a),
712
+ onBlur: nt
713
+ }, [
714
+ _("span", rl, [
715
+ _("span", il, [
716
+ k(e.$slots, "breadcrumb-label", rt({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: pe.value === a }), () => [
717
+ a === 0 ? (v(), y("div", cl, [
718
+ Te(Gt, {
719
+ name: pe.value === 0 ? "homeFilled" : "home",
720
+ stroke: t.value.style.chart.color
721
+ }, null, 8, ["name", "stroke"])
722
+ ])) : (v(), y(ge, { key: 1 }, [
723
+ ye(te(l.label), 1)
724
+ ], 64))
725
+ ], !0)
726
+ ]),
727
+ a < q.value.length - 1 ? (v(), y("span", dl, [
728
+ k(e.$slots, "breadcrumb-arrow", {}, () => [
729
+ o[5] || (o[5] = ye(" › "))
730
+ ], !0)
731
+ ])) : O("", !0)
732
+ ])
733
+ ], 44, ul))), 128))
734
+ ])) : O("", !0),
735
+ x.value ? (v(), y("svg", {
736
+ key: 5,
737
+ ref_key: "svgRef",
738
+ ref: Be,
739
+ xmlns: d(Mt),
740
+ class: xe({ "vue-data-ui-fullscreen--on": le.value, "vue-data-ui-fulscreen--off": !le.value, "vue-data-ui-zoom-plus": !K.value, "vue-data-ui-zoom-minus": K.value }),
741
+ viewBox: `${se.value.startX} ${se.value.startY} ${se.value.width <= 0 ? 10 : se.value.width} ${se.value.height <= 0 ? 10 : se.value.height}`,
742
+ style: M(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
743
+ }, [
744
+ Te(d(H)),
745
+ (v(!0), y(ge, null, Oe(re.value, (l, a) => (v(), y("g", {
746
+ key: `tgrad_${l.id}`
747
+ }, [
748
+ t.value.style.chart.layout.rects.gradient.show ? (v(), y("defs", hl, [
749
+ _("radialGradient", {
750
+ id: `tgrad_${l.id}`,
751
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
752
+ }, [
753
+ _("stop", {
754
+ offset: "18%",
755
+ "stop-color": l.color
756
+ }, null, 8, fl),
757
+ _("stop", {
758
+ offset: "100%",
759
+ "stop-color": d(it)(l.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
760
+ }, null, 8, gl)
761
+ ], 8, pl)
762
+ ])) : O("", !0)
763
+ ]))), 128)),
764
+ (v(!0), y(ge, null, Oe(re.value, (l, a) => (v(), y("g", {
765
+ key: `k_${l.id}`
766
+ }, [
767
+ _("rect", {
768
+ x: l.x0,
769
+ y: l.y0,
770
+ height: Ke(l),
771
+ width: Ze(l),
772
+ fill: D.value ? l.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
773
+ rx: t.value.style.chart.layout.rects.borderRadius,
774
+ stroke: L.value && L.value.id === l.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
775
+ "stroke-width": L.value && L.value.id === l.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
776
+ onClick: _e((f) => de(l), ["stop"]),
777
+ onMouseenter: () => Ct({
778
+ datapoint: l,
779
+ seriesIndex: a
780
+ }),
781
+ onMouseleave: o[0] || (o[0] = (f) => {
782
+ L.value = null, N.value = !1;
783
+ }),
784
+ style: M(`opacity:${L.value ? L.value.id === l.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
785
+ class: xe([
786
+ "vue-ui-treemap-rect",
787
+ kt(l) ? "vue-data-ui-zoom-plus" : K.value ? "vue-data-ui-zoom-minus" : ""
788
+ ])
789
+ }, null, 46, yl),
790
+ (v(), y("foreignObject", {
791
+ x: l.x0,
792
+ y: l.y0,
793
+ height: Ke(l),
794
+ width: Ze(l),
795
+ class: "vue-ui-treemap-cell-foreignObject"
796
+ }, [
797
+ _("div", bl, [
798
+ t.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > t.value.style.chart.layout.labels.hideUnderProportion || K.value) ? (v(), y("div", {
799
+ key: 0,
800
+ class: "vue-ui-treemap-cell-default",
801
+ style: M(`width:calc(100% - ${j(l) / 1.5}px);text-align:left;line-height:${j(l) < 14 ? 14 : j(l)}px;padding:${j(l) / 3}px; color:${d(ct)(l.color)}`)
802
+ }, [
803
+ _("span", {
804
+ style: M(`width:100%;font-size:${j(l)}px;`)
805
+ }, te(l.name), 5),
806
+ o[6] || (o[6] = _("br", null, null, -1)),
807
+ _("span", {
808
+ style: M(`width:100%;font-size:${j(l)}px;`)
809
+ }, te(d(be)(
810
+ t.value.style.chart.layout.labels.formatter,
811
+ l.value,
812
+ d(ie)({
813
+ p: t.value.style.chart.layout.labels.prefix,
814
+ v: l.value,
815
+ s: t.value.style.chart.layout.labels.suffix,
816
+ r: t.value.style.chart.layout.labels.rounding
817
+ }),
818
+ { datapoint: l }
819
+ )), 5)
820
+ ], 4)) : O("", !0),
821
+ k(e.$slots, "rect", rt({ ref_for: !0 }, {
822
+ rect: l,
823
+ shouldShow: l.proportion > t.value.style.chart.layout.labels.hideUnderProportion || K.value,
824
+ fontSize: j(l),
825
+ isZoom: K.value,
826
+ textColor: d(ct)(l.color)
827
+ }), void 0, !0)
828
+ ])
829
+ ], 8, ml))
830
+ ]))), 128)),
831
+ k(e.$slots, "svg", Q(ee({ svg: X.value, isZoom: K.value, rect: L.value, config: t.value })), void 0, !0)
832
+ ], 14, vl)) : O("", !0),
833
+ e.$slots.watermark ? (v(), y("div", kl, [
834
+ k(e.$slots, "watermark", Q(ee({ isPrinting: d(Ue) || d(Ee) })), void 0, !0)
835
+ ])) : O("", !0),
836
+ x.value ? O("", !0) : (v(), J(d(c), {
837
+ key: 7,
838
+ config: {
839
+ type: "treemap",
840
+ style: {
841
+ backgroundColor: t.value.style.chart.backgroundColor,
842
+ treemap: {
843
+ color: "#CCCCCC"
844
+ }
845
+ }
846
+ }
847
+ }, null, 8, ["config"])),
848
+ _("div", {
849
+ ref_key: "chartLegend",
850
+ ref: ze
851
+ }, [
852
+ t.value.style.chart.legend.show ? (v(), J(jt, {
853
+ key: `legend_${Me.value}`,
854
+ legendSet: Qe.value,
855
+ config: wt.value,
856
+ id: `treemap_legend_${A.value}`,
857
+ onClickMarker: o[1] || (o[1] = ({ legend: l }) => et(l))
858
+ }, {
859
+ item: T(({ legend: l, index: a }) => [
860
+ _("div", {
861
+ onClick: (f) => et(l),
862
+ style: M(`opacity:${P.value.includes(l.id) ? 0.5 : 1}`)
863
+ }, [
864
+ ye(te(l.name) + ": " + te(d(be)(
865
+ t.value.style.chart.layout.labels.formatter,
866
+ l.value,
867
+ d(ie)({
868
+ p: t.value.style.chart.layout.labels.prefix,
869
+ v: l.value,
870
+ s: t.value.style.chart.layout.labels.suffix,
871
+ r: t.value.style.chart.legend.roundingValue
872
+ }),
873
+ { datapoint: l }
874
+ )) + " ", 1),
875
+ P.value.includes(l.id) ? (v(), y("span", $l, " ( - % ) ")) : (v(), y("span", Cl, " (" + te(isNaN(l.value / ne.value) ? "-" : (l.value / ne.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
876
+ ], 12, wl)
877
+ ]),
878
+ _: 1
879
+ }, 8, ["legendSet", "config", "id"])) : k(e.$slots, "legend", {
880
+ key: 1,
881
+ legend: Qe.value
882
+ }, void 0, !0)
883
+ ], 512),
884
+ e.$slots.source ? (v(), y("div", {
885
+ key: 8,
886
+ ref_key: "source",
887
+ ref: Ae,
888
+ dir: "auto"
889
+ }, [
890
+ k(e.$slots, "source", {}, void 0, !0)
891
+ ], 512)) : O("", !0),
892
+ Te(d(g), {
893
+ show: R.value.showTooltip && N.value,
894
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
895
+ color: t.value.style.chart.tooltip.color,
896
+ fontSize: t.value.style.chart.tooltip.fontSize,
897
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
898
+ borderColor: t.value.style.chart.tooltip.borderColor,
899
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
900
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
901
+ position: t.value.style.chart.tooltip.position,
902
+ offsetY: t.value.style.chart.tooltip.offsetY,
903
+ parent: G.value,
904
+ content: ke.value,
905
+ isFullscreen: le.value,
906
+ isCustom: d(dt)(t.value.style.chart.tooltip.customFormat)
907
+ }, {
908
+ "tooltip-before": T(() => [
909
+ k(e.$slots, "tooltip-before", Q(ee({ ...Ce.value })), void 0, !0)
910
+ ]),
911
+ "tooltip-after": T(() => [
912
+ k(e.$slots, "tooltip-after", Q(ee({ ...Ce.value })), void 0, !0)
913
+ ]),
914
+ _: 3
915
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
916
+ x.value ? (v(), J(d(h), {
917
+ key: 9,
918
+ hideDetails: "",
919
+ config: {
920
+ open: R.value.showTable,
921
+ maxHeight: 1e4,
922
+ body: {
923
+ backgroundColor: t.value.style.chart.backgroundColor,
924
+ color: t.value.style.chart.color
925
+ },
926
+ head: {
927
+ backgroundColor: t.value.style.chart.backgroundColor,
928
+ color: t.value.style.chart.color
929
+ }
930
+ }
931
+ }, {
932
+ content: T(() => [
933
+ (v(), J(d(i), {
934
+ key: `table_${Le.value}`,
935
+ colNames: ve.value.colNames,
936
+ head: ve.value.head,
937
+ body: ve.value.body,
938
+ config: ve.value.config,
939
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
940
+ onClose: o[2] || (o[2] = (l) => R.value.showTable = !1)
941
+ }, {
942
+ th: T(({ th: l }) => [
943
+ _("div", {
944
+ innerHTML: l,
945
+ style: { display: "flex", "align-items": "center" }
946
+ }, null, 8, xl)
947
+ ]),
948
+ td: T(({ td: l }) => [
949
+ ye(te(l.name || l), 1)
950
+ ]),
951
+ _: 1
952
+ }, 8, ["colNames", "head", "body", "config", "title"]))
953
+ ]),
954
+ _: 1
955
+ }, 8, ["config"])) : O("", !0)
956
+ ], 46, nl));
957
+ }
958
+ }, Dl = /* @__PURE__ */ Kt(Tl, [["__scopeId", "data-v-c04debca"]]);
959
+ export {
960
+ Dl as default
961
+ };