vue-data-ui 2.2.90 → 2.2.92

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 (58) hide show
  1. package/dist/data-table-d-VcuH-r.js +1488 -0
  2. package/dist/{index.es-Cgqo-FBk.js → index.es-Dc9Fd4o6.js} +1 -1
  3. package/dist/legend-DJCYLsl_.js +61 -0
  4. package/dist/style.css +1 -1
  5. package/dist/themes-lgjsYHsH.js +4967 -0
  6. package/dist/title-BF-9Qcni.js +56 -0
  7. package/dist/tooltip-D85WEOKi.js +94 -0
  8. package/dist/user-options-DZgCz8UA.js +415 -0
  9. package/dist/vue-data-ui.js +455 -61
  10. package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
  11. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
  12. package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
  13. package/dist/vue-ui-candlestick-diclGj95.js +807 -0
  14. package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
  15. package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
  16. package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
  17. package/dist/vue-ui-digits-CxMXID42.js +154 -0
  18. package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
  19. package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
  20. package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
  21. package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
  22. package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
  23. package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
  24. package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
  25. package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
  26. package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
  27. package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
  28. package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
  29. package/dist/vue-ui-onion-C0eowUT6.js +551 -0
  30. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
  31. package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
  32. package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
  33. package/dist/vue-ui-radar-Dyg38i33.js +853 -0
  34. package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
  35. package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
  36. package/dist/vue-ui-rings-BuXeijvb.js +507 -0
  37. package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
  38. package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
  39. package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
  40. package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
  41. package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
  42. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
  43. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
  44. package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
  45. package/dist/vue-ui-table-DM3zL89q.js +2180 -0
  46. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
  47. package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
  48. package/dist/vue-ui-timer-BIFxjujK.js +451 -0
  49. package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
  50. package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
  51. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
  52. package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
  53. package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
  54. package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
  55. package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
  56. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
  57. package/package.json +1 -1
  58. package/dist/index-DZlxUin4.js +0 -57288
@@ -0,0 +1,719 @@
1
+ import { computed as w, ref as y, onMounted as He, onBeforeUnmount as Ee, openBlock as m, createElementBlock as x, normalizeClass as Ce, normalizeStyle as D, createVNode as ne, createCommentVNode as H, createBlock as ee, unref as T, createSlots as Ue, withCtx as $, renderSlot as _, normalizeProps as q, guardReactiveProps as Y, Fragment as ke, renderList as xe, createElementVNode as O, toDisplayString as G, createTextVNode as $e, nextTick as Ge, pushScopeId as Xe, popScopeId as je } from "vue";
2
+ import { t as qe } from "./themes-lgjsYHsH.js";
3
+ import { u as Te, _ as Ye } from "./title-BF-9Qcni.js";
4
+ import { U as Ze } from "./user-options-DZgCz8UA.js";
5
+ import { _ as Je } from "./tooltip-D85WEOKi.js";
6
+ import { L as Ke } from "./legend-DJCYLsl_.js";
7
+ import { u as Qe, a as et, S as tt, A as lt } from "./vue-ui-3d-bar-DW7kGJSz.js";
8
+ import { _ as ot, e as _e, f as at, p as C, g as nt, i as st, j as rt, h as te, n as le, X as ut, l as Oe, F as Se, y as ze, D as it, z as ct, v as dt, w as vt } from "./data-table-d-VcuH-r.js";
9
+ import { t as ht, u as ft } from "./vue-ui-age-pyramid-4hcuKpFY.js";
10
+ function Ne(a, i) {
11
+ const s = a.length;
12
+ if (s === 0)
13
+ throw new Error(`Max aspect ratio cannot be computed: ${a} is an empty array`);
14
+ {
15
+ let n = 1 / 0, r = -1 / 0, c = 0;
16
+ for (let h = 0; h < s; h += 1) {
17
+ const v = a[h].normalizedValue;
18
+ v < n && (n = v), v > r && (r = v), c += v;
19
+ }
20
+ return Math.max(
21
+ i ** 2 * r / c ** 2,
22
+ c ** 2 / (i ** 2 * n)
23
+ );
24
+ }
25
+ }
26
+ function Fe(a) {
27
+ const { xOffset: i, yOffset: s, width: n, height: r } = a;
28
+ return {
29
+ x0: i,
30
+ y0: s,
31
+ x1: i + n,
32
+ y1: s + r
33
+ };
34
+ }
35
+ function pt(a, i, s) {
36
+ if (a.length === 0)
37
+ return !0;
38
+ {
39
+ const n = a.concat(i), r = Ne(
40
+ a,
41
+ s
42
+ ), c = Ne(n, s);
43
+ return r >= c;
44
+ }
45
+ }
46
+ function gt(a) {
47
+ const i = [], s = a.length;
48
+ for (let n = 0; n < s; n += 1) {
49
+ const r = a[n], c = r.length;
50
+ for (let d = 0; d < c; d += 1)
51
+ i.push(r[d]);
52
+ }
53
+ return i;
54
+ }
55
+ function yt(a, i) {
56
+ const s = {
57
+ ...i,
58
+ children: a
59
+ };
60
+ return Pe(s);
61
+ }
62
+ function mt(a) {
63
+ return (a.x1 - a.x0) * (a.y1 - a.y0);
64
+ }
65
+ function Ie(a, i) {
66
+ const { width: s, height: n, xOffset: r, yOffset: c } = se(i), d = a.length, h = a.map((p) => p.normalizedValue || 0).reduce((p, k) => p + k, 0), v = h / n, S = h / s;
67
+ let b = r, z = c;
68
+ const f = [];
69
+ if (s >= n) {
70
+ for (let p = 0; p < d; p += 1) {
71
+ const k = a[p], N = z + k.normalizedValue / v, e = {
72
+ x0: b,
73
+ y0: z,
74
+ x1: b + v,
75
+ y1: N
76
+ }, P = Object.assign({}, k, e);
77
+ z = N, f.push(P);
78
+ }
79
+ return f;
80
+ } else {
81
+ for (let p = 0; p < d; p += 1) {
82
+ const k = a[p], N = b + k.normalizedValue / S, e = {
83
+ x0: b,
84
+ y0: z,
85
+ x1: N,
86
+ y1: z + S
87
+ }, P = Object.assign({}, k, e);
88
+ b = N, f.push(P);
89
+ }
90
+ return f;
91
+ }
92
+ }
93
+ function bt(a) {
94
+ const i = se(a), s = i.width, n = i.height;
95
+ return Math.min(s, n);
96
+ }
97
+ function wt(a, i) {
98
+ const s = a.length, n = a.map((v) => v.value ?? 0).reduce((v, S) => v + S, 0), r = i / n, c = [];
99
+ let d, h;
100
+ for (let v = 0; v < s; v += 1)
101
+ h = a[v], d = Object.assign({}, h, {
102
+ normalizedValue: h.value * (r || 0)
103
+ }), c.push(d);
104
+ return c;
105
+ }
106
+ function se(a) {
107
+ const { x0: i, y0: s, x1: n, y1: r } = a;
108
+ return {
109
+ xOffset: i,
110
+ yOffset: s,
111
+ width: n - i,
112
+ height: r - s
113
+ };
114
+ }
115
+ function Ct(a, i, s, n) {
116
+ let r = a, c = i, d = s, h = n;
117
+ for (; ; ) {
118
+ const v = r.length;
119
+ if (v === 0) {
120
+ const f = Ie(c, d);
121
+ return h.concat(f);
122
+ }
123
+ const S = bt(d), b = r[0], z = r.slice(1, v);
124
+ if (pt(c, b, S)) {
125
+ const f = c.concat(b);
126
+ r = z, c = f, d = d, h = h;
127
+ } else {
128
+ const f = c.length;
129
+ let p = 0;
130
+ for (let P = 0; P < f; P += 1)
131
+ p += c[P].normalizedValue;
132
+ const k = kt(d, p), N = Ie(c, d), e = h.concat(N);
133
+ r = r, c = [], d = k, h = e;
134
+ }
135
+ }
136
+ }
137
+ function Pe(a) {
138
+ if (typeof a.children > "u" || !a.children.length)
139
+ return [a];
140
+ {
141
+ const i = wt(
142
+ a.children,
143
+ mt(a)
144
+ ), s = Ct(i, [], a, []), n = s.length, r = [];
145
+ for (let d = 0; d < n; d += 1)
146
+ r.push(Pe(s[d]));
147
+ return gt(r);
148
+ }
149
+ }
150
+ function kt(a, i) {
151
+ const { width: s, height: n, xOffset: r, yOffset: c } = se(a);
152
+ if (s >= n) {
153
+ const d = i / n, h = s - d, v = {
154
+ xOffset: r + d,
155
+ yOffset: c,
156
+ width: h,
157
+ height: n
158
+ };
159
+ return Fe(v);
160
+ } else {
161
+ const d = i / s, h = n - d, v = {
162
+ xOffset: r,
163
+ yOffset: c + d,
164
+ width: s,
165
+ height: h
166
+ };
167
+ return Fe(v);
168
+ }
169
+ }
170
+ const xt = (a) => (Xe("data-v-7489c985"), a = a(), je(), a), $t = ["id"], Tt = ["xmlns", "viewBox"], _t = { key: 0 }, Ot = ["id"], St = ["stop-color"], zt = ["stop-color"], Nt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], Ft = ["x", "y", "height", "width"], It = {
171
+ style: { width: "100%", height: "100%" },
172
+ class: "vue-ui-treemap-cell"
173
+ }, Pt = /* @__PURE__ */ xt(() => /* @__PURE__ */ O("br", null, null, -1)), Lt = ["onClick"], Rt = { key: 0 }, At = { key: 1 }, Dt = ["innerHTML"], Mt = {
174
+ __name: "vue-ui-treemap",
175
+ props: {
176
+ config: {
177
+ type: Object,
178
+ default() {
179
+ return {};
180
+ }
181
+ },
182
+ dataset: {
183
+ type: Array,
184
+ default() {
185
+ return [];
186
+ }
187
+ }
188
+ },
189
+ emits: ["selectLegend", "selectDatapoint"],
190
+ setup(a, { expose: i, emit: s }) {
191
+ const n = a, { vue_ui_treemap: r } = Qe(), c = w(() => !!n.dataset && n.dataset.length), d = w(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), h = y(_e()), v = y(!1), S = y(""), b = y(!1), z = y(0), f = y([]), p = y(null), k = y(null), N = y(null), e = w(() => {
192
+ const t = Te({
193
+ userConfig: n.config,
194
+ defaultConfig: r
195
+ });
196
+ return t.theme ? {
197
+ ...Te({
198
+ userConfig: qe.vue_ui_treemap[t.theme] || n.config,
199
+ defaultConfig: t
200
+ }),
201
+ customPalette: at[t.theme] || C
202
+ } : t;
203
+ }), { isPrinting: P, isImaging: Le, generatePdf: re, generateImage: ue } = et({
204
+ elementId: `treemap_${h.value}`,
205
+ fileName: e.value.style.chart.title.text || "vue-ui-treemap"
206
+ }), Z = w(() => nt(e.value.customPalette)), L = y({
207
+ showTable: e.value.table.show,
208
+ showTooltip: e.value.style.chart.tooltip.show
209
+ }), R = y({
210
+ height: e.value.style.chart.height,
211
+ width: e.value.style.chart.width
212
+ }), M = w(() => ({
213
+ bottom: R.value.height - e.value.style.chart.padding.bottom,
214
+ height: R.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
215
+ left: e.value.style.chart.padding.left,
216
+ right: R.value.width - e.value.style.chart.padding.right,
217
+ top: e.value.style.chart.padding.top,
218
+ vbHeight: R.value.height,
219
+ vbWidth: R.value.width,
220
+ width: R.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
221
+ }));
222
+ function ie(t) {
223
+ t.forEach((o, l) => {
224
+ o.id = _e(), o.color = te(o.color) || Z.value[l] || C[l] || C[l % C.length], o.children && (o.children.forEach((u) => {
225
+ u.parentId = o.id, u.color = o.color;
226
+ }), ie(o.children));
227
+ });
228
+ }
229
+ const V = y(n.dataset), J = y(null);
230
+ He(() => {
231
+ if (st(n.dataset) && rt({
232
+ componentName: "VueUiTreemap",
233
+ type: "dataset"
234
+ }), ie(V.value), e.value.responsive) {
235
+ const t = ht(() => {
236
+ const { width: o, height: l } = ft({
237
+ chart: p.value,
238
+ title: e.value.style.chart.title.text ? k.value : null,
239
+ legend: e.value.style.chart.legend.show ? N.value : null
240
+ });
241
+ R.value.width = o, R.value.height = l;
242
+ });
243
+ J.value = new ResizeObserver(t), J.value.observe(p.value.parentNode);
244
+ }
245
+ }), Ee(() => {
246
+ J.value && J.value.disconnect();
247
+ });
248
+ const oe = y(V.value), X = w(() => oe.value.map((t, o) => ({
249
+ ...t,
250
+ color: te(t.color) || Z.value[o] || C[o] || C[o % C.length]
251
+ })).filter((t) => !f.value.includes(t.id))), E = w(() => V.value.filter((t) => !f.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), ce = w({
252
+ get() {
253
+ let t = [...X.value];
254
+ return e.value.style.chart.layout.sorted && (t = [...X.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
255
+ ...o
256
+ }));
257
+ },
258
+ set(t) {
259
+ return t;
260
+ }
261
+ });
262
+ function de(t, o) {
263
+ return t.value / o;
264
+ }
265
+ function Re(t, o, l) {
266
+ const u = e.value.style.chart.layout.rects.colorRatio - de(o, l);
267
+ return Oe(t, u < 0 ? 0 : u);
268
+ }
269
+ function ve(t, o, l, u) {
270
+ return t.map((g, W) => {
271
+ const Q = Re(te(o) || Z.value[W] || C[W] || C[W % C.length], g, u), We = de(g, u);
272
+ return {
273
+ ...g,
274
+ color: Q,
275
+ proportion: We,
276
+ parentName: l,
277
+ children: g.children ? ve(g.children, Q, g.name, u) : void 0
278
+ };
279
+ });
280
+ }
281
+ const j = w(() => yt(
282
+ ce.value.map((t, o) => {
283
+ const l = t.children ? t.children.reduce((u, g) => u + g.value, 0) : t.value;
284
+ return {
285
+ value: t.value,
286
+ id: t.id,
287
+ children: t.children ? ve(t.children.sort((u, g) => g.value - u.value), t.color, t.name, l) : void 0,
288
+ color: t.color,
289
+ name: t.name
290
+ };
291
+ }),
292
+ { x0: M.value.left * 2, y0: M.value.top, x1: M.value.width, y1: M.value.height }
293
+ ));
294
+ function he({ y0: t, y1: o }) {
295
+ return o - t <= 0 ? 1e-4 : o - t;
296
+ }
297
+ function fe({ x0: t, x1: o }) {
298
+ return o - t <= 0 ? 1e-4 : o - t;
299
+ }
300
+ function B(t) {
301
+ const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
302
+ return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
303
+ }
304
+ function Ae(t) {
305
+ b.value = t, z.value += 1;
306
+ }
307
+ const U = w(() => ({
308
+ startX: 0,
309
+ startY: 0,
310
+ width: M.value.vbWidth,
311
+ height: M.value.vbHeight
312
+ })), F = y(!1);
313
+ function pe(t, o = V.value) {
314
+ for (const l of o) {
315
+ if (l.id === t)
316
+ return l;
317
+ if (l.children) {
318
+ const u = pe(t, l.children);
319
+ if (u)
320
+ return u;
321
+ }
322
+ }
323
+ return null;
324
+ }
325
+ function De(t) {
326
+ F.value ? (s("selectDatapoint", void 0), oe.value = V.value) : (s("selectDatapoint", t), oe.value = [pe(t.parentId)]), F.value = !F.value;
327
+ }
328
+ const I = y(null), ge = w(() => V.value.map((t, o) => ({
329
+ ...t,
330
+ color: te(t.color) || Z.value[o] || C[o] || C[o % C.length],
331
+ shape: "square"
332
+ })).sort((t, o) => o.value - t.value).map((t, o) => ({
333
+ ...t,
334
+ proportion: t.value / V.value.map((l) => l.value).reduce((l, u) => l + u, 0),
335
+ opacity: f.value.includes(t.id) ? 0.5 : 1
336
+ }))), Me = w(() => ({
337
+ cy: "treemap-div-legend",
338
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
339
+ color: e.value.style.chart.legend.color,
340
+ fontSize: e.value.style.chart.legend.fontSize,
341
+ paddingBottom: 12,
342
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
343
+ }));
344
+ function ye(t) {
345
+ F.value = !1, I.value = null, f.value.includes(t.id) ? f.value = f.value.filter((o) => o !== t.id) : f.value.length < n.dataset.length - 1 && f.value.push(t.id), s("selectLegend", ce.value);
346
+ }
347
+ const ae = y(null);
348
+ function Ve({ datapoint: t, seriesIndex: o }) {
349
+ I.value = t, ae.value = { datapoint: t, seriesIndex: o, config: e.value, series: X.value };
350
+ const l = e.value.style.chart.tooltip.customFormat;
351
+ if (ze(l) && ct(() => l({
352
+ seriesIndex: o,
353
+ datapoint: t,
354
+ series: X.value,
355
+ config: e.value
356
+ })))
357
+ S.value = l({
358
+ seriesIndex: o,
359
+ datapoint: t,
360
+ series: X.value,
361
+ config: e.value
362
+ });
363
+ else {
364
+ let u = "";
365
+ u += `<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>`, u += `<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>`, u += `<b>${le({ p: e.value.style.chart.layout.labels.prefix, v: t.value, s: e.value.style.chart.layout.labels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`, S.value = `<div>${u}</div>`;
366
+ }
367
+ v.value = !0;
368
+ }
369
+ const A = w(() => {
370
+ const t = j.value.map((l) => ({
371
+ name: l.name,
372
+ color: l.color
373
+ })), o = j.value.map((l) => l.value);
374
+ return { head: t, body: o };
375
+ });
376
+ function me() {
377
+ Ge(() => {
378
+ const t = A.value.head.map((u, g) => [[
379
+ u.name
380
+ ], [A.value.body[g]], [isNaN(A.value.body[g] / E.value) ? "-" : A.value.body[g] / E.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = dt(o);
381
+ vt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-treemap" });
382
+ });
383
+ }
384
+ const K = w(() => {
385
+ const t = [
386
+ e.value.table.columnNames.series,
387
+ e.value.table.columnNames.value,
388
+ e.value.table.columnNames.percentage
389
+ ], o = A.value.head.map((g, W) => {
390
+ const Q = le({ p: e.value.style.chart.layout.labels.prefix, v: A.value.body[W], s: e.value.style.chart.layout.labels.suffix, r: e.value.table.td.roundingValue });
391
+ return [
392
+ {
393
+ color: g.color,
394
+ name: g.name,
395
+ shape: "square"
396
+ },
397
+ Q,
398
+ isNaN(A.value.body[W] / E.value) ? "-" : (A.value.body[W] / E.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
399
+ ];
400
+ }), l = {
401
+ th: {
402
+ backgroundColor: e.value.table.th.backgroundColor,
403
+ color: e.value.table.th.color,
404
+ outline: e.value.table.th.outline
405
+ },
406
+ td: {
407
+ backgroundColor: e.value.table.td.backgroundColor,
408
+ color: e.value.table.td.color,
409
+ outline: e.value.table.td.outline
410
+ },
411
+ breakpoint: e.value.table.responsiveBreakpoint
412
+ };
413
+ return {
414
+ colNames: [
415
+ e.value.table.columnNames.series,
416
+ e.value.table.columnNames.value
417
+ ],
418
+ head: t,
419
+ body: o,
420
+ config: l
421
+ };
422
+ });
423
+ function Be() {
424
+ return j.value;
425
+ }
426
+ function be() {
427
+ L.value.showTable = !L.value.showTable;
428
+ }
429
+ function we() {
430
+ L.value.showTooltip = !L.value.showTooltip;
431
+ }
432
+ return i({
433
+ getData: Be,
434
+ generateCsv: me,
435
+ generateImage: ue,
436
+ generatePdf: re,
437
+ toggleTable: be,
438
+ toggleTooltip: we
439
+ }), (t, o) => (m(), x("div", {
440
+ ref_key: "treemapChart",
441
+ ref: p,
442
+ class: Ce(`vue-ui-treemap ${b.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
443
+ style: D(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
444
+ id: `treemap_${h.value}`
445
+ }, [
446
+ e.value.style.chart.title.text ? (m(), x("div", {
447
+ key: 0,
448
+ ref_key: "chartTitle",
449
+ ref: k,
450
+ style: D(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
451
+ }, [
452
+ ne(Ye, {
453
+ config: {
454
+ title: {
455
+ cy: "treemap-div-title",
456
+ ...e.value.style.chart.title
457
+ },
458
+ subtitle: {
459
+ cy: "treemap-div-subtitle",
460
+ ...e.value.style.chart.title.subtitle
461
+ }
462
+ }
463
+ }, null, 8, ["config"])
464
+ ], 4)) : H("", !0),
465
+ e.value.userOptions.show && c.value ? (m(), ee(Ze, {
466
+ ref: "details",
467
+ key: `user_option_${z.value}`,
468
+ backgroundColor: e.value.style.chart.backgroundColor,
469
+ color: e.value.style.chart.color,
470
+ isPrinting: T(P),
471
+ isImaging: T(Le),
472
+ uid: h.value,
473
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
474
+ hasPdf: e.value.userOptions.buttons.pdf,
475
+ hasXls: e.value.userOptions.buttons.csv,
476
+ hasImg: e.value.userOptions.buttons.img,
477
+ hasTable: e.value.userOptions.buttons.table,
478
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
479
+ isFullscreen: b.value,
480
+ isTooltip: L.value.showTooltip,
481
+ titles: { ...e.value.userOptions.buttonTitles },
482
+ chartElement: p.value,
483
+ onToggleFullscreen: Ae,
484
+ onGeneratePdf: T(re),
485
+ onGenerateCsv: me,
486
+ onGenerateImage: T(ue),
487
+ onToggleTable: be,
488
+ onToggleTooltip: we
489
+ }, Ue({ _: 2 }, [
490
+ t.$slots.optionTooltip ? {
491
+ name: "optionTooltip",
492
+ fn: $(() => [
493
+ _(t.$slots, "optionTooltip", {}, void 0, !0)
494
+ ]),
495
+ key: "0"
496
+ } : void 0,
497
+ t.$slots.optionPdf ? {
498
+ name: "optionPdf",
499
+ fn: $(() => [
500
+ _(t.$slots, "optionPdf", {}, void 0, !0)
501
+ ]),
502
+ key: "1"
503
+ } : void 0,
504
+ t.$slots.optionCsv ? {
505
+ name: "optionCsv",
506
+ fn: $(() => [
507
+ _(t.$slots, "optionCsv", {}, void 0, !0)
508
+ ]),
509
+ key: "2"
510
+ } : void 0,
511
+ t.$slots.optionImg ? {
512
+ name: "optionImg",
513
+ fn: $(() => [
514
+ _(t.$slots, "optionImg", {}, void 0, !0)
515
+ ]),
516
+ key: "3"
517
+ } : void 0,
518
+ t.$slots.optionTable ? {
519
+ name: "optionTable",
520
+ fn: $(() => [
521
+ _(t.$slots, "optionTable", {}, void 0, !0)
522
+ ]),
523
+ key: "4"
524
+ } : void 0,
525
+ t.$slots.optionFullscreen ? {
526
+ name: "optionFullscreen",
527
+ fn: $(({ toggleFullscreen: l, isFullscreen: u }) => [
528
+ _(t.$slots, "optionFullscreen", q(Y({ toggleFullscreen: l, isFullscreen: u })), void 0, !0)
529
+ ]),
530
+ key: "5"
531
+ } : void 0
532
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : H("", !0),
533
+ c.value ? (m(), x("svg", {
534
+ key: 2,
535
+ xmlns: T(ut),
536
+ class: Ce({ "vue-data-ui-fullscreen--on": b.value, "vue-data-ui-fulscreen--off": !b.value, "vue-data-ui-zoom-plus": !F.value, "vue-data-ui-zoom-minus": F.value }),
537
+ viewBox: `${U.value.startX} ${U.value.startY} ${U.value.width <= 0 ? 10 : U.value.width} ${U.value.height <= 0 ? 10 : U.value.height}`,
538
+ style: D(`max-width:100%; overflow: hidden; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
539
+ }, [
540
+ (m(!0), x(ke, null, xe(j.value, (l, u) => (m(), x("g", null, [
541
+ e.value.style.chart.layout.rects.gradient.show ? (m(), x("defs", _t, [
542
+ O("radialGradient", {
543
+ id: `tgrad_${l.id}`,
544
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
545
+ }, [
546
+ O("stop", {
547
+ offset: "18%",
548
+ "stop-color": l.color
549
+ }, null, 8, St),
550
+ O("stop", {
551
+ offset: "100%",
552
+ "stop-color": T(Oe)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
553
+ }, null, 8, zt)
554
+ ], 8, Ot)
555
+ ])) : H("", !0)
556
+ ]))), 256)),
557
+ (m(!0), x(ke, null, xe(j.value, (l, u) => (m(), x("g", null, [
558
+ O("rect", {
559
+ x: l.x0,
560
+ y: l.y0,
561
+ height: he(l),
562
+ width: fe(l),
563
+ fill: d.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
564
+ rx: e.value.style.chart.layout.rects.borderRadius,
565
+ stroke: I.value && I.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
566
+ "stroke-width": I.value && I.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
567
+ onClick: (g) => De(l),
568
+ onMouseenter: () => Ve({
569
+ datapoint: l,
570
+ seriesIndex: u
571
+ }),
572
+ onMouseleave: o[0] || (o[0] = (g) => {
573
+ I.value = null, v.value = !1;
574
+ }),
575
+ style: D(`opacity:${I.value ? I.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
576
+ class: "vue-ui-treemap-rect"
577
+ }, null, 44, Nt),
578
+ (m(), x("foreignObject", {
579
+ x: l.x0,
580
+ y: l.y0,
581
+ height: he(l),
582
+ width: fe(l),
583
+ class: "vue-ui-treemap-cell-foreignObject"
584
+ }, [
585
+ O("div", It, [
586
+ e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || F.value) ? (m(), x("div", {
587
+ key: 0,
588
+ class: "vue-ui-treemap-cell-default",
589
+ style: D(`width:calc(100% - ${B(l) / 1.5}px);text-align:left;line-height:${B(l) < 14 ? 14 : B(l)}px;padding:${B(l) / 3}px; color:${T(Se)(l.color)}`)
590
+ }, [
591
+ O("span", {
592
+ style: D(`width:100%;font-size:${B(l)}px;`)
593
+ }, G(l.name), 5),
594
+ Pt,
595
+ O("span", {
596
+ style: D(`width:100%;font-size:${B(l)}px;`)
597
+ }, G(T(le)({
598
+ p: e.value.style.chart.layout.labels.prefix,
599
+ v: l.value,
600
+ s: e.value.style.chart.layout.labels.suffix,
601
+ r: e.value.style.chart.layout.labels.rounding
602
+ })), 5)
603
+ ], 4)) : H("", !0),
604
+ _(t.$slots, "rect", q(Y({
605
+ rect: l,
606
+ shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || F.value,
607
+ fontSize: B(l),
608
+ isZoom: F.value,
609
+ textColor: T(Se)(l.color)
610
+ })), void 0, !0)
611
+ ])
612
+ ], 8, Ft))
613
+ ]))), 256)),
614
+ _(t.$slots, "svg", q(Y({ svg: M.value, isZoom: F.value, rect: I.value, config: e.value })), void 0, !0)
615
+ ], 14, Tt)) : H("", !0),
616
+ c.value ? H("", !0) : (m(), ee(tt, {
617
+ key: 3,
618
+ config: {
619
+ type: "treemap",
620
+ style: {
621
+ backgroundColor: e.value.style.chart.backgroundColor,
622
+ treemap: {
623
+ color: "#CCCCCC"
624
+ }
625
+ }
626
+ }
627
+ }, null, 8, ["config"])),
628
+ O("div", {
629
+ ref_key: "chartLegend",
630
+ ref: N
631
+ }, [
632
+ e.value.style.chart.legend.show ? (m(), ee(Ke, {
633
+ key: 0,
634
+ legendSet: ge.value,
635
+ config: Me.value,
636
+ id: `treemap_legend_${h.value}`,
637
+ onClickMarker: o[1] || (o[1] = ({ legend: l }) => ye(l))
638
+ }, {
639
+ item: $(({ legend: l, index: u }) => [
640
+ O("div", {
641
+ onClick: (g) => ye(l),
642
+ style: D(`opacity:${f.value.includes(l.id) ? 0.5 : 1}`)
643
+ }, [
644
+ $e(G(l.name) + ": " + G(T(le)({ p: e.value.style.chart.layout.labels.prefix, v: l.value, s: e.value.style.chart.layout.labels.suffix, r: e.value.style.chart.legend.roundingValue })) + " ", 1),
645
+ f.value.includes(l.id) ? (m(), x("span", At, " ( - % ) ")) : (m(), x("span", Rt, " (" + G(isNaN(l.value / E.value) ? "-" : (l.value / E.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
646
+ ], 12, Lt)
647
+ ]),
648
+ _: 1
649
+ }, 8, ["legendSet", "config", "id"])) : _(t.$slots, "legend", {
650
+ key: 1,
651
+ legend: ge.value
652
+ }, void 0, !0)
653
+ ], 512),
654
+ ne(Je, {
655
+ show: L.value.showTooltip && v.value,
656
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
657
+ color: e.value.style.chart.tooltip.color,
658
+ fontSize: e.value.style.chart.tooltip.fontSize,
659
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
660
+ borderColor: e.value.style.chart.tooltip.borderColor,
661
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
662
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
663
+ parent: p.value,
664
+ content: S.value,
665
+ isCustom: T(ze)(e.value.style.chart.tooltip.customFormat)
666
+ }, {
667
+ "tooltip-before": $(() => [
668
+ _(t.$slots, "tooltip-before", q(Y({ ...ae.value })), void 0, !0)
669
+ ]),
670
+ "tooltip-after": $(() => [
671
+ _(t.$slots, "tooltip-after", q(Y({ ...ae.value })), void 0, !0)
672
+ ]),
673
+ _: 3
674
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "parent", "content", "isCustom"]),
675
+ c.value ? (m(), ee(lt, {
676
+ key: 4,
677
+ hideDetails: "",
678
+ config: {
679
+ open: L.value.showTable,
680
+ maxHeight: 1e4,
681
+ body: {
682
+ backgroundColor: e.value.style.chart.backgroundColor,
683
+ color: e.value.style.chart.color
684
+ },
685
+ head: {
686
+ backgroundColor: e.value.style.chart.backgroundColor,
687
+ color: e.value.style.chart.color
688
+ }
689
+ }
690
+ }, {
691
+ content: $(() => [
692
+ ne(it, {
693
+ colNames: K.value.colNames,
694
+ head: K.value.head,
695
+ body: K.value.body,
696
+ config: K.value.config,
697
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
698
+ onClose: o[2] || (o[2] = (l) => L.value.showTable = !1)
699
+ }, {
700
+ th: $(({ th: l }) => [
701
+ O("div", {
702
+ innerHTML: l,
703
+ style: { display: "flex", "align-items": "center" }
704
+ }, null, 8, Dt)
705
+ ]),
706
+ td: $(({ td: l }) => [
707
+ $e(G(l.name || l), 1)
708
+ ]),
709
+ _: 1
710
+ }, 8, ["colNames", "head", "body", "config", "title"])
711
+ ]),
712
+ _: 1
713
+ }, 8, ["config"])) : H("", !0)
714
+ ], 14, $t));
715
+ }
716
+ }, qt = /* @__PURE__ */ ot(Mt, [["__scopeId", "data-v-7489c985"]]);
717
+ export {
718
+ qt as default
719
+ };