vue-data-ui 3.0.22 → 3.1.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 (109) hide show
  1. package/dist/{Arrow-C3_2GkYQ.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BhxUDwEm.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-B717hnWR.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-CH5_RNaK.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/Legend-2-dC7DVb.js +72 -0
  8. package/dist/{NonSvgPenAndPaper-DCJGSteM.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-CE7HSich.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-BMHsOtT8.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-C3J8aKNH.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BEBDljWA.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CVSZQtoP.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-BL-IjQmj.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-CCnDaboi.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-BWMV0_Ze.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DwUGURhV.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-DsVqerdt.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BHb_mcWF.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-Ckt8JtYf.js → pdf-Dd-LIJqz.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-Cy946l1e.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-aC9S6EFJ.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-B7rhbRrT.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-Bu7qDtf0.js → vue-data-ui-DcNYz3cZ.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
  30. package/dist/{vue-ui-accordion-DsnF0JuK.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-s8xyb3Gf.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DRacM62z.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-DdDrdyOJ.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-BsNnInNt.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-Ci9mrUBd.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-fHfJNK0V.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
  37. package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
  38. package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
  39. package/dist/{vue-ui-cursor-Bk5LHg5V.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CjZMEYs6.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-nDIvHyRB.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-CF9FdxfC.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-f5k-Yu3N.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-Dm3gsrzi.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
  45. package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
  46. package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
  47. package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
  48. package/dist/{vue-ui-gauge-DkDpUAN7.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-BD5fLs8r.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
  50. package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
  51. package/dist/{vue-ui-history-plot-ICoBBO-y.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-Dp2M2EFo.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-C5672jjA.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
  54. package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
  55. package/dist/{vue-ui-mood-radar-B-qhYUcB.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-V6BvP3pF.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-BKqqbWbg.js → vue-ui-onion-ZgsErXis.js} +363 -317
  58. package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
  59. package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
  60. package/dist/{vue-ui-quick-chart-BVZSdQeT.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
  61. package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
  62. package/dist/{vue-ui-rating-CncrxDCY.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-VYM1dclx.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
  64. package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
  65. package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
  66. package/dist/{vue-ui-scatter-D2b-u5dv.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-BTuBaaE_.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-D1UxJNbV.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-BCP0BWMI.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-eBo-RSvE.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-DberOXWX.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-CoKQGG5X.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-B_L4UNES.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-iAaRIyqb.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-B_0PJ7R2.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-CWkA4l9P.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-CILVy7YP.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-DL2n2Z7p.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-DOt2EKpe.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BTP1ic_T.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-Bc-zJH9j.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-B9n528e1.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
  83. package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
  84. package/dist/{vue-ui-vertical-bar-CK2j09gJ.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-DJkqgqlR.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-CcbgpIUr.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
  87. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
  88. package/dist/{vue-ui-world-DLmB_Z96.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-KmrNT6qh.js → vue-ui-xy-B1nqNbzw.js} +1559 -1508
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-Y5T9UxMO.js +0 -133
  93. package/dist/Legend-DkU3at-b.js +0 -72
  94. package/dist/vue-ui-3d-bar-CBfQ3Pcb.js +0 -1323
  95. package/dist/vue-ui-chord-0wf798ls.js +0 -1049
  96. package/dist/vue-ui-circle-pack-CuRHG8gr.js +0 -709
  97. package/dist/vue-ui-flow-K7UBguES.js +0 -852
  98. package/dist/vue-ui-funnel-DoDZbsTp.js +0 -620
  99. package/dist/vue-ui-galaxy-BsDlHxzE.js +0 -691
  100. package/dist/vue-ui-heatmap-DOT2tBy_.js +0 -1078
  101. package/dist/vue-ui-molecule-DgqVh2k0.js +0 -656
  102. package/dist/vue-ui-parallel-coordinate-plot-BZf24Zur.js +0 -927
  103. package/dist/vue-ui-quadrant-S58B2LrQ.js +0 -1432
  104. package/dist/vue-ui-radar-Dh67mQ9E.js +0 -807
  105. package/dist/vue-ui-ridgeline-CsByERvm.js +0 -1157
  106. package/dist/vue-ui-rings-CR2UfgnV.js +0 -739
  107. package/dist/vue-ui-treemap-Cl9qo9O-.js +0 -1046
  108. package/dist/vue-ui-word-cloud-CZ_TRf4o.js +0 -765
  109. package/dist/vue-ui-xy-canvas-6VYNyX6a.js +0 -1243
@@ -1,1046 +0,0 @@
1
- import { defineAsyncComponent as se, useSlots as Mt, onMounted as vt, computed as k, ref as y, shallowRef as E, toRefs as Vt, watch as Se, onBeforeUnmount as Dt, createElementBlock as m, openBlock as v, unref as r, normalizeStyle as V, normalizeClass as Ie, createBlock as j, createCommentVNode as x, createElementVNode as O, createVNode as Fe, createSlots as Bt, withCtx as A, renderSlot as C, normalizeProps as ee, guardReactiveProps as te, Fragment as me, renderList as Ne, withKeys as ht, withModifiers as ze, mergeProps as pt, createTextVNode as Pe, toDisplayString as Z, Teleport as Et, nextTick as Ht } from "vue";
2
- import { u as Ut, c as be, t as Wt, a as Gt, p as I, b as Xt, d as qt, o as ft, f as Yt, e as ce, k as we, i as de, X as jt, l as gt, F as yt, y as mt, v as Zt, w as Kt, z as Jt } from "./index-BHb_mcWF.js";
3
- import { t as Qt, u as el } from "./useResponsive-DfdjqQps.js";
4
- import { u as bt } from "./useNestedProp-aC9S6EFJ.js";
5
- import { u as tl } from "./usePrinter-B7rhbRrT.js";
6
- import { u as ll } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as ol } from "./useChartAccessibility-9icAAmYg.js";
8
- import al from "./BaseIcon-B717hnWR.js";
9
- import nl from "./Title-BL-IjQmj.js";
10
- import sl from "./Legend-DkU3at-b.js";
11
- import ul from "./img-DsVqerdt.js";
12
- import { u as rl, B as il } from "./useLoading-D7YHNtLX.js";
13
- import { _ as cl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- function wt(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, h = 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), h += f;
23
- }
24
- return Math.max(
25
- i ** 2 * u / h ** 2,
26
- h ** 2 / (i ** 2 * c)
27
- );
28
- }
29
- }
30
- function kt(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 dl(n, i, s) {
40
- if (n.length === 0)
41
- return !0;
42
- {
43
- const c = n.concat(i), u = wt(
44
- n,
45
- s
46
- ), h = wt(c, s);
47
- return u >= h;
48
- }
49
- }
50
- function vl(n) {
51
- const i = [], s = n.length;
52
- for (let c = 0; c < s; c += 1) {
53
- const u = n[c], h = u.length;
54
- for (let d = 0; d < h; d += 1)
55
- i.push(u[d]);
56
- }
57
- return i;
58
- }
59
- function hl(n, i) {
60
- const s = {
61
- ...i,
62
- children: n
63
- };
64
- return $t(s);
65
- }
66
- function pl(n) {
67
- return (n.x1 - n.x0) * (n.y1 - n.y0);
68
- }
69
- function Ct(n, i) {
70
- const { width: s, height: c, xOffset: u, yOffset: h } = Re(i), d = 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, S = h;
72
- const F = [];
73
- if (s >= c) {
74
- for (let w = 0; w < d; w += 1) {
75
- const N = n[w], $ = S + N.normalizedValue / f, D = {
76
- x0: b,
77
- y0: S,
78
- x1: b + f,
79
- y1: $
80
- }, z = Object.assign({}, N, D);
81
- S = $, F.push(z);
82
- }
83
- return F;
84
- } else {
85
- for (let w = 0; w < d; w += 1) {
86
- const N = n[w], $ = b + N.normalizedValue / H, D = {
87
- x0: b,
88
- y0: S,
89
- x1: $,
90
- y1: S + H
91
- }, z = Object.assign({}, N, D);
92
- b = $, F.push(z);
93
- }
94
- return F;
95
- }
96
- }
97
- function fl(n) {
98
- const i = Re(n), s = i.width, c = i.height;
99
- return Math.min(s, c);
100
- }
101
- function gl(n, i) {
102
- const s = n.length, c = n.map((f) => f.value ?? 0).reduce((f, H) => f + H, 0), u = i / c, h = [];
103
- let d, g;
104
- for (let f = 0; f < s; f += 1)
105
- g = n[f], d = Object.assign({}, g, {
106
- normalizedValue: g.value * (u || 0)
107
- }), h.push(d);
108
- return h;
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 yl(n, i, s, c) {
120
- let u = n, h = i, d = s, g = c;
121
- for (; ; ) {
122
- const f = u.length;
123
- if (f === 0) {
124
- const F = Ct(h, d);
125
- return g.concat(F);
126
- }
127
- const H = fl(d), b = u[0], S = u.slice(1, f);
128
- if (dl(h, b, H)) {
129
- const F = h.concat(b);
130
- u = S, h = F, d = d, g = g;
131
- } else {
132
- const F = h.length;
133
- let w = 0;
134
- for (let z = 0; z < F; z += 1)
135
- w += h[z].normalizedValue;
136
- const N = ml(d, w), $ = Ct(h, d), D = g.concat($);
137
- u = u, h = [], d = N, g = D;
138
- }
139
- }
140
- }
141
- function $t(n) {
142
- if (typeof n.children > "u" || !n.children.length)
143
- return [n];
144
- {
145
- const i = gl(
146
- n.children,
147
- pl(n)
148
- ), s = yl(i, [], n, []), c = s.length, u = [];
149
- for (let d = 0; d < c; d += 1)
150
- u.push($t(s[d]));
151
- return vl(u);
152
- }
153
- }
154
- function ml(n, i) {
155
- const { width: s, height: c, xOffset: u, yOffset: h } = Re(n);
156
- if (s >= c) {
157
- const d = i / c, g = s - d, f = {
158
- xOffset: u + d,
159
- yOffset: h,
160
- width: g,
161
- height: c
162
- };
163
- return kt(f);
164
- } else {
165
- const d = i / s, g = c - d, f = {
166
- xOffset: u,
167
- yOffset: h + d,
168
- width: s,
169
- height: g
170
- };
171
- return kt(f);
172
- }
173
- }
174
- const bl = ["id"], wl = ["id"], kl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], Cl = { class: "vue-ui-treemap-crumb-unit" }, $l = { class: "vue-ui-treemap-crumb-unit-label" }, Tl = {
175
- key: 0,
176
- style: { width: "24px", display: "flex", "align-items": "center" }
177
- }, xl = {
178
- key: 0,
179
- class: "vue-ui-treemap-crumb-unit-arrow"
180
- }, _l = ["xmlns", "viewBox"], Ol = { key: 0 }, Al = ["id"], Sl = ["stop-color"], Il = ["stop-color"], Fl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Nl = ["x", "y", "height", "width"], zl = {
181
- style: { width: "100%", height: "100%" },
182
- class: "vue-ui-treemap-cell"
183
- }, Pl = {
184
- key: 5,
185
- class: "vue-data-ui-watermark"
186
- }, Rl = ["id"], Ll = ["onClick"], Ml = ["innerHTML"], Vl = {
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-Y5T9UxMO.js")), u = se(() => import("./PenAndPaper-BMHsOtT8.js")), h = se(() => import("./vue-ui-accordion-DsnF0JuK.js")), d = se(() => import("./Tooltip-CCnDaboi.js")), g = se(() => import("./UserOptions-BWMV0_Ze.js")), f = se(() => import("./PackageVersion-CE7HSich.js")), { vue_ui_treemap: H } = Ut(), b = n, S = s, F = Mt();
205
- vt(() => {
206
- F["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)), $ = 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), T = y([]), $e = y(null), He = y(!1), e = y(_e()), { loading: ue, FINAL_DATASET: Te, manualLoading: Tt } = rl({
209
- ...Vt(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: Wt({
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: Ue, keepUserOptionState: We } = ll({ config: e.value }), { svgRef: Ge } = ol({ config: e.value.style.chart.title });
251
- function _e() {
252
- const t = bt({
253
- userConfig: b.config,
254
- defaultConfig: H
255
- });
256
- return t.theme ? {
257
- ...bt({
258
- userConfig: Xt.vue_ui_treemap[t.theme] || b.config,
259
- defaultConfig: t
260
- }),
261
- customPalette: Gt[t.theme] || I
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: Xe, isImaging: qe, generatePdf: Ye, generateImage: je } = tl({
268
- elementId: `treemap_${$.value}`,
269
- fileName: e.value.style.chart.title.text || "vue-ui-treemap",
270
- options: e.value.userOptions.print
271
- }), xt = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), ve = k(() => qt(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
- }), K = 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), Ze = E(/* @__PURE__ */ new Map());
294
- function Ke(t) {
295
- Array.isArray(t) && t.forEach((o, l) => {
296
- o.id || (o.id = be());
297
- let a = ce(o.color) || Ze.value.get(o.id) || ve.value[l] || I[l] || I[l % I.length];
298
- a = ce(a), Ze.value.set(o.id, a), o.color = a, Je(o, a);
299
- });
300
- }
301
- function Je(t, o) {
302
- Array.isArray(t.children) && t.children.forEach((l) => {
303
- l.id || (l.id = be()), l.parentId = t.id, l.color = o, Je(l, o);
304
- });
305
- }
306
- function _t() {
307
- if (!T.value.length)
308
- G.value = R.value.slice();
309
- else {
310
- const t = T.value[T.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, Ke(R.value), _t(), 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
- He.value = !0, At();
324
- });
325
- const Ot = k(() => e.value.debug);
326
- function At() {
327
- if (ft(b.dataset) && Yt({
328
- componentName: "VueUiTreemap",
329
- type: "dataset",
330
- debug: Ot.value
331
- }), Ke(R.value), ft(b.dataset) || (Tt.value = e.value.loading), e.value.responsive) {
332
- const t = Qt(() => {
333
- const { width: o, height: l } = el({
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
- Dt(() => {
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) || ve.value[o] || I[o] || I[o % I.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)), Qe = 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 et(t, o) {
365
- return t.value / o;
366
- }
367
- function St(t, o, l) {
368
- const a = e.value.style.chart.layout.rects.colorRatio - et(o, l);
369
- return gt(t, a < 0 ? 0 : a);
370
- }
371
- function tt(t, o, l, a) {
372
- return t.map((p, _) => {
373
- const ye = St(ce(o) || ve.value[_] || I[_] || I[_ % I.length], p, a), Lt = et(p, a);
374
- return {
375
- ...p,
376
- color: ye,
377
- proportion: Lt,
378
- parentName: l,
379
- children: p.children ? tt(p.children, ye, p.name, a) : void 0
380
- };
381
- });
382
- }
383
- const ie = k(() => hl(
384
- Qe.value.map((t, o) => {
385
- const l = t.children ? t.children.reduce((a, p) => a + p.value, 0) : t.value;
386
- return {
387
- value: t.value,
388
- id: t.id || be(),
389
- children: t.children ? tt(t.children.sort((a, p) => p.value - a.value), t.color, t.name, l) : void 0,
390
- color: t.color,
391
- name: t.name
392
- };
393
- }),
394
- { x0: K.value.left * 2, y0: K.value.top, x1: K.value.width, y1: K.value.height }
395
- ));
396
- function lt({ y0: t, y1: o }) {
397
- return o - t <= 0 ? 1e-4 : o - t;
398
- }
399
- function ot({ x0: t, x1: o }) {
400
- return o - t <= 0 ? 1e-4 : o - t;
401
- }
402
- function J(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 at(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: K.value.vbWidth,
415
- height: K.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 Q = k(() => T.value.length > 0);
431
- function he(t, o) {
432
- if (!t) {
433
- G.value = R.value.slice(), S("selectDatapoint", void 0), T.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
- T.value.push(l.id), G.value = l.children.slice(), S("selectDatapoint", t);
440
- else if (t.parentId) {
441
- T.value.push(t.parentId);
442
- const a = q(t.parentId);
443
- G.value = a.children.slice(), S("selectDatapoint", t);
444
- } else if (T.value.length > 0) {
445
- T.value.pop();
446
- const a = T.value[T.value.length - 1];
447
- if (a) {
448
- const p = q(a);
449
- G.value = p.children.slice();
450
- } else
451
- G.value = R.value.slice(), T.value = [], S("selectDatapoint", void 0);
452
- }
453
- }
454
- function It(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 (T.value.length > 0) {
462
- let o = q(T.value[T.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), nt = k(() => R.value.map((t, o) => ({
475
- ...t,
476
- color: ce(t.color) || ve.value[o] || I[o] || I[o % I.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
- }))), Ft = 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 st(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), S("selectLegend", Qe.value);
492
- }
493
- function Nt({ 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 zt({ 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) && Jt(() => 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
- de({
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 ut(t = null) {
536
- Ht(() => {
537
- const o = B.value.head.map((p, _) => [[
538
- p.name
539
- ], [B.value.body[_]], [isNaN(B.value.body[_] / ae.value) ? "-" : B.value.body[_] / ae.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Zt(l);
540
- t ? t(a) : Kt({ 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((p, _) => {
549
- const ye = we(
550
- e.value.style.chart.layout.labels.formatter,
551
- B.value.body[_],
552
- de({
553
- p: e.value.style.chart.layout.labels.prefix,
554
- v: B.value.body[_],
555
- s: e.value.style.chart.layout.labels.suffix,
556
- r: e.value.table.td.roundingValue
557
- })
558
- );
559
- return [
560
- {
561
- color: p.color,
562
- name: p.name,
563
- shape: "square"
564
- },
565
- ye,
566
- isNaN(B.value.body[_] / ae.value) ? "-" : de({
567
- v: B.value.body[_] / 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 Pt() {
596
- return ie.value;
597
- }
598
- function rt() {
599
- P.value.showTable = !P.value.showTable;
600
- }
601
- function it() {
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 ct(t) {
610
- ge.value = t;
611
- }
612
- function dt() {
613
- ge.value = null;
614
- }
615
- async function Rt({ scale: t = 2 } = {}) {
616
- if (!U.value) return;
617
- const { width: o, height: l } = U.value.getBoundingClientRect(), a = o / l, { imageUri: p, base64: _ } = await ul({ domElement: U.value, base64: !0, img: !0, scale: t });
618
- return {
619
- imageUri: p,
620
- base64: _,
621
- title: e.value.style.chart.title.text,
622
- width: o,
623
- height: l,
624
- aspectRatio: a
625
- };
626
- }
627
- return i({
628
- getData: Pt,
629
- getImage: Rt,
630
- generateCsv: ut,
631
- generateImage: je,
632
- generatePdf: Ye,
633
- toggleTable: rt,
634
- toggleTooltip: it,
635
- toggleAnnotator: Ae,
636
- toggleFullscreen: at
637
- }), (t, o) => (v(), 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_${$.value}`,
643
- onMouseenter: o[2] || (o[2] = () => r(Ue)(!0)),
644
- onMouseleave: o[3] || (o[3] = () => r(Ue)(!1))
645
- }, [
646
- e.value.userOptions.buttons.annotator ? (v(), j(r(u), {
647
- key: 0,
648
- svgRef: r(Ge),
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
- xt.value ? (v(), 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 ? (v(), 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
- (v(), j(nl, {
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
- O("div", {
682
- id: `legend-top-${$.value}`
683
- }, null, 8, wl),
684
- e.value.userOptions.show && w.value && (r(We) || r(xe)) ? (v(), j(r(g), {
685
- ref: "details",
686
- key: `user_option_${Le.value}`,
687
- backgroundColor: e.value.style.chart.backgroundColor,
688
- color: e.value.style.chart.color,
689
- isPrinting: r(Xe),
690
- isImaging: r(qe),
691
- uid: $.value,
692
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
693
- hasPdf: e.value.userOptions.buttons.pdf,
694
- hasXls: e.value.userOptions.buttons.csv,
695
- hasImg: e.value.userOptions.buttons.img,
696
- hasTable: e.value.userOptions.buttons.table,
697
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
698
- isFullscreen: le.value,
699
- isTooltip: P.value.showTooltip,
700
- titles: { ...e.value.userOptions.buttonTitles },
701
- chartElement: U.value,
702
- position: e.value.userOptions.position,
703
- hasAnnotator: e.value.userOptions.buttons.annotator,
704
- isAnnotation: fe.value,
705
- callbacks: e.value.userOptions.callbacks,
706
- printScale: e.value.userOptions.print.scale,
707
- onToggleFullscreen: at,
708
- onGeneratePdf: r(Ye),
709
- onGenerateCsv: ut,
710
- onGenerateImage: r(je),
711
- onToggleTable: rt,
712
- onToggleTooltip: it,
713
- onToggleAnnotator: Ae,
714
- style: V({
715
- visibility: r(We) ? r(xe) ? "visible" : "hidden" : "visible"
716
- })
717
- }, Bt({ _: 2 }, [
718
- t.$slots.menuIcon ? {
719
- name: "menuIcon",
720
- fn: A(({ isOpen: l, color: a }) => [
721
- C(t.$slots, "menuIcon", ee(te({ isOpen: l, color: a })), void 0, !0)
722
- ]),
723
- key: "0"
724
- } : void 0,
725
- t.$slots.optionTooltip ? {
726
- name: "optionTooltip",
727
- fn: A(() => [
728
- C(t.$slots, "optionTooltip", {}, void 0, !0)
729
- ]),
730
- key: "1"
731
- } : void 0,
732
- t.$slots.optionPdf ? {
733
- name: "optionPdf",
734
- fn: A(() => [
735
- C(t.$slots, "optionPdf", {}, void 0, !0)
736
- ]),
737
- key: "2"
738
- } : void 0,
739
- t.$slots.optionCsv ? {
740
- name: "optionCsv",
741
- fn: A(() => [
742
- C(t.$slots, "optionCsv", {}, void 0, !0)
743
- ]),
744
- key: "3"
745
- } : void 0,
746
- t.$slots.optionImg ? {
747
- name: "optionImg",
748
- fn: A(() => [
749
- C(t.$slots, "optionImg", {}, void 0, !0)
750
- ]),
751
- key: "4"
752
- } : void 0,
753
- t.$slots.optionTable ? {
754
- name: "optionTable",
755
- fn: A(() => [
756
- C(t.$slots, "optionTable", {}, void 0, !0)
757
- ]),
758
- key: "5"
759
- } : void 0,
760
- t.$slots.optionFullscreen ? {
761
- name: "optionFullscreen",
762
- fn: A(({ toggleFullscreen: l, isFullscreen: a }) => [
763
- C(t.$slots, "optionFullscreen", ee(te({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
764
- ]),
765
- key: "6"
766
- } : void 0,
767
- t.$slots.optionAnnotator ? {
768
- name: "optionAnnotator",
769
- fn: A(({ toggleAnnotator: l, isAnnotator: a }) => [
770
- C(t.$slots, "optionAnnotator", ee(te({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
771
- ]),
772
- key: "7"
773
- } : void 0
774
- ]), 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),
775
- Y.value.length > 1 ? (v(), m("nav", {
776
- key: 4,
777
- class: "vue-ui-treemap-breadcrumbs",
778
- "data-dom-to-png-ignore": "",
779
- ref_key: "breadcrumbsNav",
780
- ref: $e
781
- }, [
782
- (v(!0), m(me, null, Ne(Y.value, (l, a) => (v(), m("span", {
783
- role: "button",
784
- tabindex: a < Y.value.length - 1 ? 0 : void 0,
785
- key: l.id || "root",
786
- onClick: (p) => a === Y.value.length - 1 ? () => {
787
- } : he(l.node),
788
- onKeydown: [
789
- ht(ze((p) => a === Y.value.length - 1 ? void 0 : he(l.node), ["prevent"]), ["enter"]),
790
- ht(ze((p) => a === Y.value.length - 1 ? void 0 : he(l.node), ["prevent"]), ["space"])
791
- ],
792
- class: "vue-ui-treemap-crumb",
793
- "data-last-crumb": a === Y.value.length - 1,
794
- style: V({
795
- color: e.value.style.chart.color
796
- }),
797
- onMouseenter: (p) => ct(a),
798
- onMouseleave: dt,
799
- onFocus: (p) => ct(a),
800
- onBlur: dt
801
- }, [
802
- O("span", Cl, [
803
- O("span", $l, [
804
- C(t.$slots, "breadcrumb-label", pt({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: ge.value === a }), () => [
805
- a === 0 ? (v(), m("div", Tl, [
806
- Fe(al, {
807
- name: ge.value === 0 ? "homeFilled" : "home",
808
- stroke: e.value.style.chart.color
809
- }, null, 8, ["name", "stroke"])
810
- ])) : (v(), m(me, { key: 1 }, [
811
- Pe(Z(l.label), 1)
812
- ], 64))
813
- ], !0)
814
- ]),
815
- a < Y.value.length - 1 ? (v(), m("span", xl, [
816
- C(t.$slots, "breadcrumb-arrow", {}, () => [
817
- o[4] || (o[4] = Pe(" › ", -1))
818
- ], !0)
819
- ])) : x("", !0)
820
- ])
821
- ], 44, kl))), 128))
822
- ], 512)) : x("", !0),
823
- (v(), m("svg", {
824
- ref_key: "svgRef",
825
- ref: Ge,
826
- xmlns: r(jt),
827
- class: Ie({ "vue-data-ui-fullscreen--on": le.value, "vue-data-ui-fulscreen--off": !le.value, "vue-data-ui-zoom-plus": !Q.value, "vue-data-ui-zoom-minus": Q.value, loading: r(ue) }),
828
- viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
829
- style: V(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
830
- }, [
831
- Fe(r(f)),
832
- (v(!0), m(me, null, Ne(ie.value, (l, a) => (v(), m("g", {
833
- key: `tgrad_${l.id}`
834
- }, [
835
- e.value.style.chart.layout.rects.gradient.show ? (v(), m("defs", Ol, [
836
- O("radialGradient", {
837
- id: `tgrad_${l.id}`,
838
- gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
839
- }, [
840
- O("stop", {
841
- offset: "18%",
842
- "stop-color": l.color
843
- }, null, 8, Sl),
844
- O("stop", {
845
- offset: "100%",
846
- "stop-color": r(gt)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
847
- }, null, 8, Il)
848
- ], 8, Al)
849
- ])) : x("", !0)
850
- ]))), 128)),
851
- (v(!0), m(me, null, Ne(ie.value, (l, a) => (v(), m("g", {
852
- key: `k_${l.id}`
853
- }, [
854
- O("rect", {
855
- x: l.x0,
856
- y: l.y0,
857
- height: lt(l),
858
- width: ot(l),
859
- fill: N.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
860
- rx: e.value.style.chart.layout.rects.borderRadius,
861
- stroke: M.value && M.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
862
- "stroke-width": M.value && M.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
863
- onClick: ze((p) => he(l, a), ["stop"]),
864
- onMouseenter: () => zt({
865
- datapoint: l,
866
- seriesIndex: a
867
- }),
868
- onMouseleave: (p) => Nt({ datapoint: l, seriesIndex: a }),
869
- style: V(`opacity:${M.value ? M.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
870
- class: Ie([
871
- "vue-ui-treemap-rect",
872
- It(l) ? "vue-data-ui-zoom-plus" : Q.value ? "vue-data-ui-zoom-minus" : ""
873
- ])
874
- }, null, 46, Fl),
875
- (v(), m("foreignObject", {
876
- x: l.x0,
877
- y: l.y0,
878
- height: lt(l),
879
- width: ot(l),
880
- class: "vue-ui-treemap-cell-foreignObject"
881
- }, [
882
- O("div", zl, [
883
- e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Q.value) ? (v(), m("div", {
884
- key: 0,
885
- class: "vue-ui-treemap-cell-default",
886
- style: V(`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:${r(yt)(l.color)}`)
887
- }, [
888
- O("span", {
889
- style: V(`width:100%;font-size:${J(l)}px;`)
890
- }, Z(l.name), 5),
891
- o[5] || (o[5] = O("br", null, null, -1)),
892
- O("span", {
893
- style: V(`width:100%;font-size:${J(l)}px;`)
894
- }, Z(r(we)(
895
- e.value.style.chart.layout.labels.formatter,
896
- l.value,
897
- r(de)({
898
- p: e.value.style.chart.layout.labels.prefix,
899
- v: l.value,
900
- s: e.value.style.chart.layout.labels.suffix,
901
- r: e.value.style.chart.layout.labels.rounding
902
- }),
903
- { datapoint: l }
904
- )), 5)
905
- ], 4)) : x("", !0),
906
- r(ue) ? x("", !0) : C(t.$slots, "rect", pt({
907
- key: 1,
908
- ref_for: !0
909
- }, {
910
- rect: l,
911
- shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Q.value,
912
- fontSize: J(l),
913
- isZoom: Q.value,
914
- textColor: r(yt)(l.color)
915
- }), void 0, !0)
916
- ])
917
- ], 8, Nl))
918
- ]))), 128)),
919
- C(t.$slots, "svg", ee(te({ svg: K.value, isZoom: Q.value, rect: M.value, config: e.value })), void 0, !0)
920
- ], 14, _l)),
921
- t.$slots.watermark ? (v(), m("div", Pl, [
922
- C(t.$slots, "watermark", ee(te({ isPrinting: r(Xe) || r(qe) })), void 0, !0)
923
- ])) : x("", !0),
924
- O("div", {
925
- id: `legend-bottom-${$.value}`
926
- }, null, 8, Rl),
927
- He.value ? (v(), j(Et, {
928
- key: 6,
929
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${$.value}` : `#legend-bottom-${$.value}`
930
- }, [
931
- O("div", {
932
- ref_key: "chartLegend",
933
- ref: Ve
934
- }, [
935
- e.value.style.chart.legend.show ? (v(), j(sl, {
936
- key: `legend_${Ce.value}`,
937
- legendSet: nt.value,
938
- config: Ft.value,
939
- id: `treemap_legend_${$.value}`,
940
- onClickMarker: o[0] || (o[0] = ({ legend: l }) => st(l))
941
- }, {
942
- item: A(({ legend: l, index: a }) => [
943
- r(ue) ? x("", !0) : (v(), m("div", {
944
- key: 0,
945
- onClick: (p) => st(l),
946
- style: V(`opacity:${L.value.includes(l.id) ? 0.5 : 1}`)
947
- }, Z(l.name) + Z(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + Z(e.value.style.chart.legend.showValue ? r(we)(
948
- e.value.style.chart.layout.labels.formatter,
949
- l.value,
950
- r(de)({
951
- p: e.value.style.chart.layout.labels.prefix,
952
- v: l.value,
953
- s: e.value.style.chart.layout.labels.suffix,
954
- r: e.value.style.chart.legend.roundingValue
955
- }),
956
- { datapoint: l }
957
- ) : "") + " " + Z(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, Ll))
958
- ]),
959
- _: 1
960
- }, 8, ["legendSet", "config", "id"])) : C(t.$slots, "legend", {
961
- key: 1,
962
- legend: nt.value
963
- }, void 0, !0)
964
- ], 512)
965
- ], 8, ["to"])) : x("", !0),
966
- t.$slots.source ? (v(), m("div", {
967
- key: 7,
968
- ref_key: "source",
969
- ref: De,
970
- dir: "auto"
971
- }, [
972
- C(t.$slots, "source", {}, void 0, !0)
973
- ], 512)) : x("", !0),
974
- Fe(r(d), {
975
- show: P.value.showTooltip && D.value,
976
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
977
- color: e.value.style.chart.tooltip.color,
978
- fontSize: e.value.style.chart.tooltip.fontSize,
979
- borderRadius: e.value.style.chart.tooltip.borderRadius,
980
- borderColor: e.value.style.chart.tooltip.borderColor,
981
- borderWidth: e.value.style.chart.tooltip.borderWidth,
982
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
983
- position: e.value.style.chart.tooltip.position,
984
- offsetY: e.value.style.chart.tooltip.offsetY,
985
- parent: U.value,
986
- content: z.value,
987
- isFullscreen: le.value,
988
- isCustom: r(mt)(e.value.style.chart.tooltip.customFormat),
989
- smooth: e.value.style.chart.tooltip.smooth,
990
- backdropFilter: e.value.style.chart.tooltip.backdropFilter
991
- }, {
992
- "tooltip-before": A(() => [
993
- C(t.$slots, "tooltip-before", ee(te({ ...Oe.value })), void 0, !0)
994
- ]),
995
- "tooltip-after": A(() => [
996
- C(t.$slots, "tooltip-after", ee(te({ ...Oe.value })), void 0, !0)
997
- ]),
998
- _: 3
999
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
1000
- w.value ? (v(), j(r(h), {
1001
- key: 8,
1002
- hideDetails: "",
1003
- config: {
1004
- open: P.value.showTable,
1005
- maxHeight: 1e4,
1006
- body: {
1007
- backgroundColor: e.value.style.chart.backgroundColor,
1008
- color: e.value.style.chart.color
1009
- },
1010
- head: {
1011
- backgroundColor: e.value.style.chart.backgroundColor,
1012
- color: e.value.style.chart.color
1013
- }
1014
- }
1015
- }, {
1016
- content: A(() => [
1017
- (v(), j(r(c), {
1018
- key: `table_${ke.value}`,
1019
- colNames: pe.value.colNames,
1020
- head: pe.value.head,
1021
- body: pe.value.body,
1022
- config: pe.value.config,
1023
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1024
- onClose: o[1] || (o[1] = (l) => P.value.showTable = !1)
1025
- }, {
1026
- th: A(({ th: l }) => [
1027
- O("div", {
1028
- innerHTML: l,
1029
- style: { display: "flex", "align-items": "center" }
1030
- }, null, 8, Ml)
1031
- ]),
1032
- td: A(({ td: l }) => [
1033
- Pe(Z(l.name || l), 1)
1034
- ]),
1035
- _: 1
1036
- }, 8, ["colNames", "head", "body", "config", "title"]))
1037
- ]),
1038
- _: 1
1039
- }, 8, ["config"])) : x("", !0),
1040
- r(ue) ? (v(), j(il, { key: 9 })) : x("", !0)
1041
- ], 46, bl));
1042
- }
1043
- }, Jl = /* @__PURE__ */ cl(Vl, [["__scopeId", "data-v-adb108e4"]]);
1044
- export {
1045
- Jl as default
1046
- };