vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -0,0 +1,1035 @@
1
+ import { defineAsyncComponent as se, useSlots as Lt, onMounted as vt, computed as k, ref as y, shallowRef as E, toRefs as Mt, watch as Se, onBeforeUnmount as Vt, createElementBlock as m, openBlock as p, unref as r, normalizeStyle as V, normalizeClass as Ie, createBlock as Q, createCommentVNode as x, createElementVNode as F, createVNode as Fe, createSlots as Dt, withCtx as _, renderSlot as C, normalizeProps as ee, guardReactiveProps as te, Fragment as ye, renderList as Ne, withKeys as dt, withModifiers as ze, mergeProps as ht, createTextVNode as Pe, toDisplayString as j, nextTick as Bt } from "vue";
2
+ import { u as Et, c as be, t as Ht, a as Ut, p as A, b as Wt, d as Gt, o as pt, f as Xt, e as ce, k as we, i as ve, X as qt, l as ft, F as gt, y as mt, v as Yt, w as jt, z as Zt } from "./index-DKpp7RIH.js";
3
+ import { t as Kt, u as Jt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as yt } from "./useNestedProp-D-8c0o4p.js";
5
+ import { u as Qt } from "./usePrinter-NUeckmCX.js";
6
+ import { u as el } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as tl } from "./useChartAccessibility-9icAAmYg.js";
8
+ import ll from "./BaseIcon-BdOEhJar.js";
9
+ import ol from "./Title-VLWyIYrj.js";
10
+ import al from "./Legend-DiGLrlzP.js";
11
+ import nl from "./img-DD_2wgY3.js";
12
+ import { u as sl, B as ul } from "./useLoading-D7YHNtLX.js";
13
+ import { _ as rl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ function bt(n, i) {
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 c = 1 / 0, u = -1 / 0, d = 0;
20
+ for (let g = 0; g < s; g += 1) {
21
+ const f = n[g].normalizedValue;
22
+ f < c && (c = f), f > u && (u = f), d += f;
23
+ }
24
+ return Math.max(
25
+ i ** 2 * u / d ** 2,
26
+ d ** 2 / (i ** 2 * c)
27
+ );
28
+ }
29
+ }
30
+ function wt(n) {
31
+ const { xOffset: i, yOffset: s, width: c, height: u } = n;
32
+ return {
33
+ x0: i,
34
+ y0: s,
35
+ x1: i + c,
36
+ y1: s + u
37
+ };
38
+ }
39
+ function il(n, i, s) {
40
+ if (n.length === 0)
41
+ return !0;
42
+ {
43
+ const c = n.concat(i), u = bt(
44
+ n,
45
+ s
46
+ ), d = bt(c, s);
47
+ return u >= d;
48
+ }
49
+ }
50
+ function cl(n) {
51
+ const i = [], s = n.length;
52
+ for (let c = 0; c < s; c += 1) {
53
+ const u = n[c], d = u.length;
54
+ for (let v = 0; v < d; v += 1)
55
+ i.push(u[v]);
56
+ }
57
+ return i;
58
+ }
59
+ function vl(n, i) {
60
+ const s = {
61
+ ...i,
62
+ children: n
63
+ };
64
+ return Ct(s);
65
+ }
66
+ function dl(n) {
67
+ return (n.x1 - n.x0) * (n.y1 - n.y0);
68
+ }
69
+ function kt(n, i) {
70
+ const { width: s, height: c, xOffset: u, yOffset: d } = Re(i), v = n.length, g = n.map((w) => w.normalizedValue || 0).reduce((w, N) => w + N, 0), f = g / c, H = g / s;
71
+ let b = u, O = d;
72
+ const S = [];
73
+ if (s >= c) {
74
+ for (let w = 0; w < v; w += 1) {
75
+ const N = n[w], I = O + N.normalizedValue / f, D = {
76
+ x0: b,
77
+ y0: O,
78
+ x1: b + f,
79
+ y1: I
80
+ }, z = Object.assign({}, N, D);
81
+ O = I, S.push(z);
82
+ }
83
+ return S;
84
+ } else {
85
+ for (let w = 0; w < v; w += 1) {
86
+ const N = n[w], I = b + N.normalizedValue / H, D = {
87
+ x0: b,
88
+ y0: O,
89
+ x1: I,
90
+ y1: O + H
91
+ }, z = Object.assign({}, N, D);
92
+ b = I, S.push(z);
93
+ }
94
+ return S;
95
+ }
96
+ }
97
+ function hl(n) {
98
+ const i = Re(n), s = i.width, c = i.height;
99
+ return Math.min(s, c);
100
+ }
101
+ function pl(n, i) {
102
+ const s = n.length, c = n.map((f) => f.value ?? 0).reduce((f, H) => f + H, 0), u = i / c, d = [];
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
+ }), d.push(v);
108
+ return d;
109
+ }
110
+ function Re(n) {
111
+ const { x0: i, y0: s, x1: c, y1: u } = n;
112
+ return {
113
+ xOffset: i,
114
+ yOffset: s,
115
+ width: c - i,
116
+ height: u - s
117
+ };
118
+ }
119
+ function fl(n, i, s, c) {
120
+ let u = n, d = i, v = s, g = c;
121
+ for (; ; ) {
122
+ const f = u.length;
123
+ if (f === 0) {
124
+ const S = kt(d, v);
125
+ return g.concat(S);
126
+ }
127
+ const H = hl(v), b = u[0], O = u.slice(1, f);
128
+ if (il(d, b, H)) {
129
+ const S = d.concat(b);
130
+ u = O, d = S, v = v, g = g;
131
+ } else {
132
+ const S = d.length;
133
+ let w = 0;
134
+ for (let z = 0; z < S; z += 1)
135
+ w += d[z].normalizedValue;
136
+ const N = gl(v, w), I = kt(d, v), D = g.concat(I);
137
+ u = u, d = [], v = N, g = D;
138
+ }
139
+ }
140
+ }
141
+ function Ct(n) {
142
+ if (typeof n.children > "u" || !n.children.length)
143
+ return [n];
144
+ {
145
+ const i = pl(
146
+ n.children,
147
+ dl(n)
148
+ ), s = fl(i, [], n, []), c = s.length, u = [];
149
+ for (let v = 0; v < c; v += 1)
150
+ u.push(Ct(s[v]));
151
+ return cl(u);
152
+ }
153
+ }
154
+ function gl(n, i) {
155
+ const { width: s, height: c, xOffset: u, yOffset: d } = Re(n);
156
+ if (s >= c) {
157
+ const v = i / c, g = s - v, f = {
158
+ xOffset: u + v,
159
+ yOffset: d,
160
+ width: g,
161
+ height: c
162
+ };
163
+ return wt(f);
164
+ } else {
165
+ const v = i / s, g = c - v, f = {
166
+ xOffset: u,
167
+ yOffset: d + v,
168
+ width: s,
169
+ height: g
170
+ };
171
+ return wt(f);
172
+ }
173
+ }
174
+ const ml = ["id"], yl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], bl = { class: "vue-ui-treemap-crumb-unit" }, wl = { class: "vue-ui-treemap-crumb-unit-label" }, kl = {
175
+ key: 0,
176
+ style: { width: "24px", display: "flex", "align-items": "center" }
177
+ }, Cl = {
178
+ key: 0,
179
+ class: "vue-ui-treemap-crumb-unit-arrow"
180
+ }, $l = ["xmlns", "viewBox"], Tl = { key: 0 }, xl = ["id"], _l = ["stop-color"], Ol = ["stop-color"], Al = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Sl = ["x", "y", "height", "width"], Il = {
181
+ style: { width: "100%", height: "100%" },
182
+ class: "vue-ui-treemap-cell"
183
+ }, Fl = {
184
+ key: 5,
185
+ class: "vue-data-ui-watermark"
186
+ }, Nl = ["onClick"], zl = ["innerHTML"], Pl = {
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: i, emit: s }) {
204
+ const c = se(() => import("./DataTable-B3yakHEM.js")), u = se(() => import("./PenAndPaper-JoUN7Ink.js")), d = se(() => import("./vue-ui-accordion-Cpovz3RE.js")), v = se(() => import("./Tooltip-BS5naLS2.js")), g = se(() => import("./UserOptions-BV_xM-sB.js")), f = se(() => import("./PackageVersion-6s4eI8W7.js")), { vue_ui_treemap: H } = Et(), b = n, O = s, S = Lt();
205
+ vt(() => {
206
+ S["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
207
+ });
208
+ const w = k(() => !!b.dataset && b.dataset.length), N = k(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), I = y(be()), D = y(!1), z = y(""), le = y(!1), Le = y(0), L = y([]), U = E(null), Me = E(null), Ve = E(null), De = E(null), Be = E(null), Ee = y(0), ke = y(0), Ce = y(0), $ = y([]), $e = y(null), e = y(_e()), { loading: ue, FINAL_DATASET: Te, manualLoading: $t } = sl({
209
+ ...Mt(b),
210
+ FINAL_CONFIG: e,
211
+ prepareConfig: _e,
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: Ht({
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: xe, setUserOptionsVisibility: He, keepUserOptionState: Ue } = el({ config: e.value }), { svgRef: We } = tl({ config: e.value.style.chart.title });
251
+ function _e() {
252
+ const t = yt({
253
+ userConfig: b.config,
254
+ defaultConfig: H
255
+ });
256
+ return t.theme ? {
257
+ ...yt({
258
+ userConfig: Wt.vue_ui_treemap[t.theme] || b.config,
259
+ defaultConfig: t
260
+ }),
261
+ customPalette: Ut[t.theme] || A
262
+ } : t;
263
+ }
264
+ Se(() => b.config, (t) => {
265
+ ue.value || (e.value = _e()), xe.value = !e.value.userOptions.showOnChartHover, Ee.value += 1, ke.value += 1, Ce.value += 1, P.value.showTable = e.value.table.show, P.value.showTooltip = e.value.style.chart.tooltip.show;
266
+ }, { deep: !0 });
267
+ const { isPrinting: Ge, isImaging: Xe, generatePdf: qe, generateImage: Ye } = Qt({
268
+ elementId: `treemap_${I.value}`,
269
+ fileName: e.value.style.chart.title.text || "vue-ui-treemap",
270
+ options: e.value.userOptions.print
271
+ }), Tt = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), de = k(() => Gt(e.value.customPalette)), P = y({
272
+ showTable: e.value.table.show,
273
+ showTooltip: e.value.style.chart.tooltip.show
274
+ });
275
+ Se(e, () => {
276
+ P.value = {
277
+ showTable: e.value.table.show,
278
+ showTooltip: e.value.style.chart.tooltip.show
279
+ };
280
+ }, { immediate: !0 });
281
+ const W = y({
282
+ height: e.value.style.chart.height,
283
+ width: e.value.style.chart.width
284
+ }), Z = k(() => ({
285
+ bottom: W.value.height - e.value.style.chart.padding.bottom,
286
+ height: W.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
287
+ left: e.value.style.chart.padding.left,
288
+ right: W.value.width - e.value.style.chart.padding.right,
289
+ top: e.value.style.chart.padding.top,
290
+ vbHeight: W.value.height,
291
+ vbWidth: W.value.width,
292
+ width: W.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
293
+ })), R = y(Te.value), G = y(R.value), je = E(/* @__PURE__ */ new Map());
294
+ function Ze(t) {
295
+ Array.isArray(t) && t.forEach((o, l) => {
296
+ o.id || (o.id = be());
297
+ let a = ce(o.color) || je.value.get(o.id) || de.value[l] || A[l] || A[l % A.length];
298
+ a = ce(a), je.value.set(o.id, a), o.color = a, Ke(o, a);
299
+ });
300
+ }
301
+ function Ke(t, o) {
302
+ Array.isArray(t.children) && t.children.forEach((l) => {
303
+ l.id || (l.id = be()), l.parentId = t.id, l.color = o, Ke(l, o);
304
+ });
305
+ }
306
+ function xt() {
307
+ if (!$.value.length)
308
+ G.value = R.value.slice();
309
+ else {
310
+ const t = $.value[$.value.length - 1], o = q(t);
311
+ G.value = o?.children?.slice() || [];
312
+ }
313
+ }
314
+ Se(
315
+ () => Te.value,
316
+ () => {
317
+ R.value = Te.value, Ze(R.value), xt(), Ce.value += 1, ke.value += 1;
318
+ },
319
+ { deep: !0, immediate: !0, flush: "post" }
320
+ );
321
+ const X = E(null), oe = E(null);
322
+ vt(() => {
323
+ Ot();
324
+ });
325
+ const _t = k(() => e.value.debug);
326
+ function Ot() {
327
+ if (pt(b.dataset) && Xt({
328
+ componentName: "VueUiTreemap",
329
+ type: "dataset",
330
+ debug: _t.value
331
+ }), Ze(R.value), pt(b.dataset) || ($t.value = e.value.loading), e.value.responsive) {
332
+ const t = Kt(() => {
333
+ const { width: o, height: l } = Jt({
334
+ chart: U.value,
335
+ title: e.value.style.chart.title.text ? Me.value : null,
336
+ legend: e.value.style.chart.legend.show ? Ve.value : null,
337
+ source: De.value,
338
+ noTitle: Be.value
339
+ });
340
+ requestAnimationFrame(() => {
341
+ W.value.width = o, W.value.height = l - 12;
342
+ });
343
+ });
344
+ X.value && (oe.value && X.value.unobserve(oe.value), X.value.disconnect()), X.value = new ResizeObserver(t), oe.value = U.value.parentNode, X.value.observe(oe.value);
345
+ }
346
+ }
347
+ Vt(() => {
348
+ X.value && (oe.value && X.value.unobserve(oe.value), X.value.disconnect());
349
+ });
350
+ const re = k(() => G.value.map((t, o) => ({
351
+ ...t,
352
+ color: ce(t.color) || de.value[o] || A[o] || A[o % A.length]
353
+ })).filter((t) => !L.value.includes(t.id))), ae = k(() => R.value.filter((t) => !L.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), Je = k({
354
+ get() {
355
+ let t = [...re.value];
356
+ return e.value.style.chart.layout.sorted && (t = [...re.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 Qe(t, o) {
365
+ return t.value / o;
366
+ }
367
+ function At(t, o, l) {
368
+ const a = e.value.style.chart.layout.rects.colorRatio - Qe(o, l);
369
+ return ft(t, a < 0 ? 0 : a);
370
+ }
371
+ function et(t, o, l, a) {
372
+ return t.map((h, T) => {
373
+ const me = At(ce(o) || de.value[T] || A[T] || A[T % A.length], h, a), Rt = Qe(h, a);
374
+ return {
375
+ ...h,
376
+ color: me,
377
+ proportion: Rt,
378
+ parentName: l,
379
+ children: h.children ? et(h.children, me, h.name, a) : void 0
380
+ };
381
+ });
382
+ }
383
+ const ie = k(() => vl(
384
+ Je.value.map((t, o) => {
385
+ const l = t.children ? t.children.reduce((a, h) => a + h.value, 0) : t.value;
386
+ return {
387
+ value: t.value,
388
+ id: t.id || be(),
389
+ children: t.children ? et(t.children.sort((a, h) => h.value - a.value), t.color, t.name, l) : void 0,
390
+ color: t.color,
391
+ name: t.name
392
+ };
393
+ }),
394
+ { x0: Z.value.left * 2, y0: Z.value.top, x1: Z.value.width, y1: Z.value.height }
395
+ ));
396
+ function tt({ y0: t, y1: o }) {
397
+ return o - t <= 0 ? 1e-4 : o - t;
398
+ }
399
+ function lt({ x0: t, x1: o }) {
400
+ return o - t <= 0 ? 1e-4 : o - t;
401
+ }
402
+ function K(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 ot(t) {
407
+ le.value = t, Le.value += 1;
408
+ }
409
+ const ne = k(() => {
410
+ let t = 0;
411
+ return $e.value && (t = $e.value.getBoundingClientRect().height), {
412
+ startX: 0,
413
+ startY: 0,
414
+ width: Z.value.vbWidth,
415
+ height: Z.value.vbHeight - t
416
+ };
417
+ });
418
+ function q(t, o = R.value) {
419
+ for (const l of o) {
420
+ if (l.id === t)
421
+ return l;
422
+ if (l.children) {
423
+ const a = q(t, l.children);
424
+ if (a)
425
+ return a;
426
+ }
427
+ }
428
+ return null;
429
+ }
430
+ const J = k(() => $.value.length > 0);
431
+ function he(t, o) {
432
+ if (!t) {
433
+ G.value = R.value.slice(), O("selectDatapoint", void 0), $.value = [];
434
+ return;
435
+ }
436
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
437
+ const l = q(t.id);
438
+ if (l && l.children?.length)
439
+ $.value.push(l.id), G.value = l.children.slice(), O("selectDatapoint", t);
440
+ else if (t.parentId) {
441
+ $.value.push(t.parentId);
442
+ const a = q(t.parentId);
443
+ G.value = a.children.slice(), O("selectDatapoint", t);
444
+ } else if ($.value.length > 0) {
445
+ $.value.pop();
446
+ const a = $.value[$.value.length - 1];
447
+ if (a) {
448
+ const h = q(a);
449
+ G.value = h.children.slice();
450
+ } else
451
+ G.value = R.value.slice(), $.value = [], O("selectDatapoint", void 0);
452
+ }
453
+ }
454
+ function St(t) {
455
+ return !!(q(t.id)?.children?.length || t.parentId);
456
+ }
457
+ const Y = k(() => {
458
+ const t = [
459
+ { id: null, label: "All" }
460
+ ];
461
+ if ($.value.length > 0) {
462
+ let o = q($.value[$.value.length - 1]);
463
+ const l = [];
464
+ for (; o; )
465
+ l.unshift(o), o = o.parentId ? q(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
+ }), M = E(null), at = k(() => R.value.map((t, o) => ({
475
+ ...t,
476
+ color: ce(t.color) || de.value[o] || A[o] || A[o % A.length],
477
+ shape: "square"
478
+ })).sort((t, o) => o.value - t.value).map((t, o) => ({
479
+ ...t,
480
+ proportion: t.value / R.value.map((l) => l.value).reduce((l, a) => l + a, 0),
481
+ opacity: L.value.includes(t.id) ? 0.5 : 1
482
+ }))), It = k(() => ({
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 nt(t) {
491
+ M.value = null, L.value.includes(t.id) ? L.value = L.value.filter((o) => o !== t.id) : L.value.length < b.dataset.length - 1 && L.value.push(t.id), O("selectLegend", Je.value);
492
+ }
493
+ function Ft({ datapoint: t, seriesIndex: o }) {
494
+ M.value = null, D.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
495
+ }
496
+ const Oe = y(null);
497
+ function Nt({ datapoint: t, seriesIndex: o }) {
498
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o }), M.value = t, Oe.value = { datapoint: t, seriesIndex: o, config: e.value, series: re.value };
499
+ const l = e.value.style.chart.tooltip.customFormat;
500
+ if (mt(l) && Zt(() => l({
501
+ seriesIndex: o,
502
+ datapoint: t,
503
+ series: re.value,
504
+ config: e.value
505
+ })))
506
+ z.value = l({
507
+ seriesIndex: o,
508
+ datapoint: t,
509
+ series: re.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>${we(
515
+ e.value.style.chart.layout.labels.formatter,
516
+ t.value,
517
+ ve({
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>`, z.value = `<div>${a}</div>`;
525
+ }
526
+ D.value = !0;
527
+ }
528
+ const B = k(() => {
529
+ const t = ie.value.map((l) => ({
530
+ name: l.name,
531
+ color: l.color
532
+ })), o = ie.value.map((l) => l.value);
533
+ return { head: t, body: o };
534
+ });
535
+ function st(t = null) {
536
+ Bt(() => {
537
+ const o = B.value.head.map((h, T) => [[
538
+ h.name
539
+ ], [B.value.body[T]], [isNaN(B.value.body[T] / ae.value) ? "-" : B.value.body[T] / ae.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Yt(l);
540
+ t ? t(a) : jt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
541
+ });
542
+ }
543
+ const pe = k(() => {
544
+ const t = [
545
+ e.value.table.columnNames.series,
546
+ e.value.table.columnNames.value,
547
+ e.value.table.columnNames.percentage
548
+ ], o = B.value.head.map((h, T) => {
549
+ const me = we(
550
+ e.value.style.chart.layout.labels.formatter,
551
+ B.value.body[T],
552
+ ve({
553
+ p: e.value.style.chart.layout.labels.prefix,
554
+ v: B.value.body[T],
555
+ s: e.value.style.chart.layout.labels.suffix,
556
+ r: e.value.table.td.roundingValue
557
+ })
558
+ );
559
+ return [
560
+ {
561
+ color: h.color,
562
+ name: h.name,
563
+ shape: "square"
564
+ },
565
+ me,
566
+ isNaN(B.value.body[T] / ae.value) ? "-" : ve({
567
+ v: B.value.body[T] / ae.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 zt() {
596
+ return ie.value;
597
+ }
598
+ function ut() {
599
+ P.value.showTable = !P.value.showTable;
600
+ }
601
+ function rt() {
602
+ P.value.showTooltip = !P.value.showTooltip;
603
+ }
604
+ const fe = y(!1);
605
+ function Ae() {
606
+ fe.value = !fe.value;
607
+ }
608
+ const ge = y(null);
609
+ function it(t) {
610
+ ge.value = t;
611
+ }
612
+ function ct() {
613
+ ge.value = null;
614
+ }
615
+ async function Pt({ scale: t = 2 } = {}) {
616
+ if (!U.value) return;
617
+ const { width: o, height: l } = U.value.getBoundingClientRect(), a = o / l, { imageUri: h, base64: T } = await nl({ domElement: U.value, base64: !0, img: !0, scale: t });
618
+ return {
619
+ imageUri: h,
620
+ base64: T,
621
+ title: e.value.style.chart.title.text,
622
+ width: o,
623
+ height: l,
624
+ aspectRatio: a
625
+ };
626
+ }
627
+ return i({
628
+ getData: zt,
629
+ getImage: Pt,
630
+ generateCsv: st,
631
+ generateImage: Ye,
632
+ generatePdf: qe,
633
+ toggleTable: ut,
634
+ toggleTooltip: rt,
635
+ toggleAnnotator: Ae,
636
+ toggleFullscreen: ot
637
+ }), (t, o) => (p(), m("div", {
638
+ ref_key: "treemapChart",
639
+ ref: U,
640
+ class: Ie(`vue-ui-treemap ${le.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
641
+ style: V(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
642
+ id: `treemap_${I.value}`,
643
+ onMouseenter: o[2] || (o[2] = () => r(He)(!0)),
644
+ onMouseleave: o[3] || (o[3] = () => r(He)(!1))
645
+ }, [
646
+ e.value.userOptions.buttons.annotator ? (p(), Q(r(u), {
647
+ key: 0,
648
+ svgRef: r(We),
649
+ backgroundColor: e.value.style.chart.backgroundColor,
650
+ color: e.value.style.chart.color,
651
+ active: fe.value,
652
+ onClose: Ae
653
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : x("", !0),
654
+ Tt.value ? (p(), m("div", {
655
+ key: 1,
656
+ ref_key: "noTitle",
657
+ ref: Be,
658
+ class: "vue-data-ui-no-title-space",
659
+ style: "height:36px; width: 100%;background:transparent"
660
+ }, null, 512)) : x("", !0),
661
+ e.value.style.chart.title.text ? (p(), m("div", {
662
+ key: 2,
663
+ ref_key: "chartTitle",
664
+ ref: Me,
665
+ style: V(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
666
+ }, [
667
+ (p(), Q(ol, {
668
+ key: `title_${Ee.value}`,
669
+ config: {
670
+ title: {
671
+ cy: "treemap-div-title",
672
+ ...e.value.style.chart.title
673
+ },
674
+ subtitle: {
675
+ cy: "treemap-div-subtitle",
676
+ ...e.value.style.chart.title.subtitle
677
+ }
678
+ }
679
+ }, null, 8, ["config"]))
680
+ ], 4)) : x("", !0),
681
+ e.value.userOptions.show && w.value && (r(Ue) || r(xe)) ? (p(), Q(r(g), {
682
+ ref: "details",
683
+ key: `user_option_${Le.value}`,
684
+ backgroundColor: e.value.style.chart.backgroundColor,
685
+ color: e.value.style.chart.color,
686
+ isPrinting: r(Ge),
687
+ isImaging: r(Xe),
688
+ uid: I.value,
689
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
690
+ hasPdf: e.value.userOptions.buttons.pdf,
691
+ hasXls: e.value.userOptions.buttons.csv,
692
+ hasImg: e.value.userOptions.buttons.img,
693
+ hasTable: e.value.userOptions.buttons.table,
694
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
695
+ isFullscreen: le.value,
696
+ isTooltip: P.value.showTooltip,
697
+ titles: { ...e.value.userOptions.buttonTitles },
698
+ chartElement: U.value,
699
+ position: e.value.userOptions.position,
700
+ hasAnnotator: e.value.userOptions.buttons.annotator,
701
+ isAnnotation: fe.value,
702
+ callbacks: e.value.userOptions.callbacks,
703
+ printScale: e.value.userOptions.print.scale,
704
+ onToggleFullscreen: ot,
705
+ onGeneratePdf: r(qe),
706
+ onGenerateCsv: st,
707
+ onGenerateImage: r(Ye),
708
+ onToggleTable: ut,
709
+ onToggleTooltip: rt,
710
+ onToggleAnnotator: Ae,
711
+ style: V({
712
+ visibility: r(Ue) ? r(xe) ? "visible" : "hidden" : "visible"
713
+ })
714
+ }, Dt({ _: 2 }, [
715
+ t.$slots.menuIcon ? {
716
+ name: "menuIcon",
717
+ fn: _(({ isOpen: l, color: a }) => [
718
+ C(t.$slots, "menuIcon", ee(te({ isOpen: l, color: a })), void 0, !0)
719
+ ]),
720
+ key: "0"
721
+ } : void 0,
722
+ t.$slots.optionTooltip ? {
723
+ name: "optionTooltip",
724
+ fn: _(() => [
725
+ C(t.$slots, "optionTooltip", {}, void 0, !0)
726
+ ]),
727
+ key: "1"
728
+ } : void 0,
729
+ t.$slots.optionPdf ? {
730
+ name: "optionPdf",
731
+ fn: _(() => [
732
+ C(t.$slots, "optionPdf", {}, void 0, !0)
733
+ ]),
734
+ key: "2"
735
+ } : void 0,
736
+ t.$slots.optionCsv ? {
737
+ name: "optionCsv",
738
+ fn: _(() => [
739
+ C(t.$slots, "optionCsv", {}, void 0, !0)
740
+ ]),
741
+ key: "3"
742
+ } : void 0,
743
+ t.$slots.optionImg ? {
744
+ name: "optionImg",
745
+ fn: _(() => [
746
+ C(t.$slots, "optionImg", {}, void 0, !0)
747
+ ]),
748
+ key: "4"
749
+ } : void 0,
750
+ t.$slots.optionTable ? {
751
+ name: "optionTable",
752
+ fn: _(() => [
753
+ C(t.$slots, "optionTable", {}, void 0, !0)
754
+ ]),
755
+ key: "5"
756
+ } : void 0,
757
+ t.$slots.optionFullscreen ? {
758
+ name: "optionFullscreen",
759
+ fn: _(({ toggleFullscreen: l, isFullscreen: a }) => [
760
+ C(t.$slots, "optionFullscreen", ee(te({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
761
+ ]),
762
+ key: "6"
763
+ } : void 0,
764
+ t.$slots.optionAnnotator ? {
765
+ name: "optionAnnotator",
766
+ fn: _(({ toggleAnnotator: l, isAnnotator: a }) => [
767
+ C(t.$slots, "optionAnnotator", ee(te({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
768
+ ]),
769
+ key: "7"
770
+ } : void 0
771
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : x("", !0),
772
+ Y.value.length > 1 ? (p(), m("nav", {
773
+ key: 4,
774
+ class: "vue-ui-treemap-breadcrumbs",
775
+ "data-dom-to-png-ignore": "",
776
+ ref_key: "breadcrumbsNav",
777
+ ref: $e
778
+ }, [
779
+ (p(!0), m(ye, null, Ne(Y.value, (l, a) => (p(), m("span", {
780
+ role: "button",
781
+ tabindex: a < Y.value.length - 1 ? 0 : void 0,
782
+ key: l.id || "root",
783
+ onClick: (h) => a === Y.value.length - 1 ? () => {
784
+ } : he(l.node),
785
+ onKeydown: [
786
+ dt(ze((h) => a === Y.value.length - 1 ? void 0 : he(l.node), ["prevent"]), ["enter"]),
787
+ dt(ze((h) => a === Y.value.length - 1 ? void 0 : he(l.node), ["prevent"]), ["space"])
788
+ ],
789
+ class: "vue-ui-treemap-crumb",
790
+ "data-last-crumb": a === Y.value.length - 1,
791
+ style: V({
792
+ color: e.value.style.chart.color
793
+ }),
794
+ onMouseenter: (h) => it(a),
795
+ onMouseleave: ct,
796
+ onFocus: (h) => it(a),
797
+ onBlur: ct
798
+ }, [
799
+ F("span", bl, [
800
+ F("span", wl, [
801
+ C(t.$slots, "breadcrumb-label", ht({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: ge.value === a }), () => [
802
+ a === 0 ? (p(), m("div", kl, [
803
+ Fe(ll, {
804
+ name: ge.value === 0 ? "homeFilled" : "home",
805
+ stroke: e.value.style.chart.color
806
+ }, null, 8, ["name", "stroke"])
807
+ ])) : (p(), m(ye, { key: 1 }, [
808
+ Pe(j(l.label), 1)
809
+ ], 64))
810
+ ], !0)
811
+ ]),
812
+ a < Y.value.length - 1 ? (p(), m("span", Cl, [
813
+ C(t.$slots, "breadcrumb-arrow", {}, () => [
814
+ o[4] || (o[4] = Pe(" › "))
815
+ ], !0)
816
+ ])) : x("", !0)
817
+ ])
818
+ ], 44, yl))), 128))
819
+ ], 512)) : x("", !0),
820
+ (p(), m("svg", {
821
+ ref_key: "svgRef",
822
+ ref: We,
823
+ xmlns: r(qt),
824
+ class: Ie({ "vue-data-ui-fullscreen--on": le.value, "vue-data-ui-fulscreen--off": !le.value, "vue-data-ui-zoom-plus": !J.value, "vue-data-ui-zoom-minus": J.value, loading: r(ue) }),
825
+ viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
826
+ style: V(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
827
+ }, [
828
+ Fe(r(f)),
829
+ (p(!0), m(ye, null, Ne(ie.value, (l, a) => (p(), m("g", {
830
+ key: `tgrad_${l.id}`
831
+ }, [
832
+ e.value.style.chart.layout.rects.gradient.show ? (p(), m("defs", Tl, [
833
+ F("radialGradient", {
834
+ id: `tgrad_${l.id}`,
835
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
836
+ }, [
837
+ F("stop", {
838
+ offset: "18%",
839
+ "stop-color": l.color
840
+ }, null, 8, _l),
841
+ F("stop", {
842
+ offset: "100%",
843
+ "stop-color": r(ft)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
844
+ }, null, 8, Ol)
845
+ ], 8, xl)
846
+ ])) : x("", !0)
847
+ ]))), 128)),
848
+ (p(!0), m(ye, null, Ne(ie.value, (l, a) => (p(), m("g", {
849
+ key: `k_${l.id}`
850
+ }, [
851
+ F("rect", {
852
+ x: l.x0,
853
+ y: l.y0,
854
+ height: tt(l),
855
+ width: lt(l),
856
+ fill: N.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
857
+ rx: e.value.style.chart.layout.rects.borderRadius,
858
+ stroke: M.value && M.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
859
+ "stroke-width": M.value && M.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
860
+ onClick: ze((h) => he(l, a), ["stop"]),
861
+ onMouseenter: () => Nt({
862
+ datapoint: l,
863
+ seriesIndex: a
864
+ }),
865
+ onMouseleave: (h) => Ft({ datapoint: l, seriesIndex: a }),
866
+ style: V(`opacity:${M.value ? M.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
867
+ class: Ie([
868
+ "vue-ui-treemap-rect",
869
+ St(l) ? "vue-data-ui-zoom-plus" : J.value ? "vue-data-ui-zoom-minus" : ""
870
+ ])
871
+ }, null, 46, Al),
872
+ (p(), m("foreignObject", {
873
+ x: l.x0,
874
+ y: l.y0,
875
+ height: tt(l),
876
+ width: lt(l),
877
+ class: "vue-ui-treemap-cell-foreignObject"
878
+ }, [
879
+ F("div", Il, [
880
+ e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || J.value) ? (p(), m("div", {
881
+ key: 0,
882
+ class: "vue-ui-treemap-cell-default",
883
+ style: V(`width:calc(100% - ${K(l) / 1.5}px);text-align:left;line-height:${K(l) < 14 ? 14 : K(l)}px;padding:${K(l) / 3}px; color:${r(gt)(l.color)}`)
884
+ }, [
885
+ F("span", {
886
+ style: V(`width:100%;font-size:${K(l)}px;`)
887
+ }, j(l.name), 5),
888
+ o[5] || (o[5] = F("br", null, null, -1)),
889
+ F("span", {
890
+ style: V(`width:100%;font-size:${K(l)}px;`)
891
+ }, j(r(we)(
892
+ e.value.style.chart.layout.labels.formatter,
893
+ l.value,
894
+ r(ve)({
895
+ p: e.value.style.chart.layout.labels.prefix,
896
+ v: l.value,
897
+ s: e.value.style.chart.layout.labels.suffix,
898
+ r: e.value.style.chart.layout.labels.rounding
899
+ }),
900
+ { datapoint: l }
901
+ )), 5)
902
+ ], 4)) : x("", !0),
903
+ r(ue) ? x("", !0) : C(t.$slots, "rect", ht({
904
+ key: 1,
905
+ ref_for: !0
906
+ }, {
907
+ rect: l,
908
+ shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || J.value,
909
+ fontSize: K(l),
910
+ isZoom: J.value,
911
+ textColor: r(gt)(l.color)
912
+ }), void 0, !0)
913
+ ])
914
+ ], 8, Sl))
915
+ ]))), 128)),
916
+ C(t.$slots, "svg", ee(te({ svg: Z.value, isZoom: J.value, rect: M.value, config: e.value })), void 0, !0)
917
+ ], 14, $l)),
918
+ t.$slots.watermark ? (p(), m("div", Fl, [
919
+ C(t.$slots, "watermark", ee(te({ isPrinting: r(Ge) || r(Xe) })), void 0, !0)
920
+ ])) : x("", !0),
921
+ F("div", {
922
+ ref_key: "chartLegend",
923
+ ref: Ve
924
+ }, [
925
+ e.value.style.chart.legend.show ? (p(), Q(al, {
926
+ key: `legend_${Ce.value}`,
927
+ legendSet: at.value,
928
+ config: It.value,
929
+ id: `treemap_legend_${I.value}`,
930
+ onClickMarker: o[0] || (o[0] = ({ legend: l }) => nt(l))
931
+ }, {
932
+ item: _(({ legend: l, index: a }) => [
933
+ r(ue) ? x("", !0) : (p(), m("div", {
934
+ key: 0,
935
+ onClick: (h) => nt(l),
936
+ style: V(`opacity:${L.value.includes(l.id) ? 0.5 : 1}`)
937
+ }, j(l.name) + j(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + j(e.value.style.chart.legend.showValue ? r(we)(
938
+ e.value.style.chart.layout.labels.formatter,
939
+ l.value,
940
+ r(ve)({
941
+ p: e.value.style.chart.layout.labels.prefix,
942
+ v: l.value,
943
+ s: e.value.style.chart.layout.labels.suffix,
944
+ r: e.value.style.chart.legend.roundingValue
945
+ }),
946
+ { datapoint: l }
947
+ ) : "") + " " + j(e.value.style.chart.legend.showPercentage ? L.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 / ae.value) ? "-" : (l.value / ae.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Nl))
948
+ ]),
949
+ _: 1
950
+ }, 8, ["legendSet", "config", "id"])) : C(t.$slots, "legend", {
951
+ key: 1,
952
+ legend: at.value
953
+ }, void 0, !0)
954
+ ], 512),
955
+ t.$slots.source ? (p(), m("div", {
956
+ key: 6,
957
+ ref_key: "source",
958
+ ref: De,
959
+ dir: "auto"
960
+ }, [
961
+ C(t.$slots, "source", {}, void 0, !0)
962
+ ], 512)) : x("", !0),
963
+ Fe(r(v), {
964
+ show: P.value.showTooltip && D.value,
965
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
966
+ color: e.value.style.chart.tooltip.color,
967
+ fontSize: e.value.style.chart.tooltip.fontSize,
968
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
969
+ borderColor: e.value.style.chart.tooltip.borderColor,
970
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
971
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
972
+ position: e.value.style.chart.tooltip.position,
973
+ offsetY: e.value.style.chart.tooltip.offsetY,
974
+ parent: U.value,
975
+ content: z.value,
976
+ isFullscreen: le.value,
977
+ isCustom: r(mt)(e.value.style.chart.tooltip.customFormat),
978
+ smooth: e.value.style.chart.tooltip.smooth,
979
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
980
+ }, {
981
+ "tooltip-before": _(() => [
982
+ C(t.$slots, "tooltip-before", ee(te({ ...Oe.value })), void 0, !0)
983
+ ]),
984
+ "tooltip-after": _(() => [
985
+ C(t.$slots, "tooltip-after", ee(te({ ...Oe.value })), void 0, !0)
986
+ ]),
987
+ _: 3
988
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
989
+ w.value ? (p(), Q(r(d), {
990
+ key: 7,
991
+ hideDetails: "",
992
+ config: {
993
+ open: P.value.showTable,
994
+ maxHeight: 1e4,
995
+ body: {
996
+ backgroundColor: e.value.style.chart.backgroundColor,
997
+ color: e.value.style.chart.color
998
+ },
999
+ head: {
1000
+ backgroundColor: e.value.style.chart.backgroundColor,
1001
+ color: e.value.style.chart.color
1002
+ }
1003
+ }
1004
+ }, {
1005
+ content: _(() => [
1006
+ (p(), Q(r(c), {
1007
+ key: `table_${ke.value}`,
1008
+ colNames: pe.value.colNames,
1009
+ head: pe.value.head,
1010
+ body: pe.value.body,
1011
+ config: pe.value.config,
1012
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1013
+ onClose: o[1] || (o[1] = (l) => P.value.showTable = !1)
1014
+ }, {
1015
+ th: _(({ th: l }) => [
1016
+ F("div", {
1017
+ innerHTML: l,
1018
+ style: { display: "flex", "align-items": "center" }
1019
+ }, null, 8, zl)
1020
+ ]),
1021
+ td: _(({ td: l }) => [
1022
+ Pe(j(l.name || l), 1)
1023
+ ]),
1024
+ _: 1
1025
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1026
+ ]),
1027
+ _: 1
1028
+ }, 8, ["config"])) : x("", !0),
1029
+ r(ue) ? (p(), Q(ul, { key: 8 })) : x("", !0)
1030
+ ], 46, ml));
1031
+ }
1032
+ }, Yl = /* @__PURE__ */ rl(Pl, [["__scopeId", "data-v-3b96c525"]]);
1033
+ export {
1034
+ Yl as default
1035
+ };