vue-data-ui 3.0.0-next.72 → 3.0.0-next.74

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 (91) hide show
  1. package/dist/{Arrow-CMSMde41.js → Arrow-DlebInbO.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BuO_En6p.js → BaseDraggableDialog-tQB04SOs.js} +2 -2
  3. package/dist/{BaseIcon-C_HE-fPU.js → BaseIcon-DxXLzb15.js} +1 -1
  4. package/dist/{ColorPicker-Cn82Up5w.js → ColorPicker-Bpc6e5mE.js} +2 -2
  5. package/dist/{DataTable-DMCB2CPj.js → DataTable-CuJplxJU.js} +2 -2
  6. package/dist/{Legend-C96fnhZD.js → Legend-ioFJsYH-.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-BRi2CtMk.js → NonSvgPenAndPaper-CH2Z9b2e.js} +3 -3
  8. package/dist/{PackageVersion-B8cypgdJ.js → PackageVersion-Cqvb9VXZ.js} +1 -1
  9. package/dist/{PenAndPaper-DjXtQYum.js → PenAndPaper-BqhD2pOj.js} +3 -3
  10. package/dist/{Shape-DZSz-yYr.js → Shape-CSkkoa5p.js} +1 -1
  11. package/dist/{Slicer-BOc4PzAR.js → Slicer-Dsw544JD.js} +2 -2
  12. package/dist/{SparkTooltip-4K9Ezba0.js → SparkTooltip-CwUOWLYh.js} +1 -1
  13. package/dist/{Title-DnqOjg_N.js → Title-DM17sbc-.js} +1 -1
  14. package/dist/{Tooltip-Cy2owh0T.js → Tooltip-DSoDpjRJ.js} +1 -1
  15. package/dist/{UserOptions-Tx_9Xl_c.js → UserOptions-gH1Ahkhe.js} +2 -2
  16. package/dist/{dom-to-png-CDSxjzSn.js → dom-to-png-BHtbi9J3.js} +1 -1
  17. package/dist/{img-D_LTOBii.js → img-WAJVcEH2.js} +1 -1
  18. package/dist/{index-Bzm4bjdY.js → index-Be3YloBf.js} +862 -778
  19. package/dist/{pdf-BZQLWJMc.js → pdf-BgW32I8a.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +71 -22
  22. package/dist/types/vue-data-ui.d.ts +71 -22
  23. package/dist/{useAutoSizeLabelsInsideViewbox-Rg0B250v.js → useAutoSizeLabelsInsideViewbox-BF4GVlCH.js} +1 -1
  24. package/dist/{useNestedProp-FhaE2yv-.js → useNestedProp-BPkXaKa1.js} +1 -1
  25. package/dist/{usePrinter-DZsH7qQs.js → usePrinter-BV33Qwmk.js} +2 -2
  26. package/dist/{vue-data-ui-0ns7pHNm.js → vue-data-ui-DD8WUltQ.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CY9hrF9C.js → vue-ui-3d-bar-Dxjd1sN7.js} +6 -6
  29. package/dist/{vue-ui-accordion-ywMTtl25.js → vue-ui-accordion-KpWnxkbY.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-Qd4BtrXy.js → vue-ui-age-pyramid-BD2EOye9.js} +59 -58
  31. package/dist/{vue-ui-annotator-DmOJnYF9.js → vue-ui-annotator-DE6HLQ7K.js} +2 -2
  32. package/dist/{vue-ui-bullet-B_xIDBAw.js → vue-ui-bullet-vQsnc5Td.js} +7 -7
  33. package/dist/{vue-ui-candlestick-D3Vsh4Rw.js → vue-ui-candlestick-DiuBIQFo.js} +96 -95
  34. package/dist/{vue-ui-carousel-table-D0UgiRmJ.js → vue-ui-carousel-table-IWjiIJOo.js} +4 -4
  35. package/dist/{vue-ui-chestnut-CbMOcXYQ.js → vue-ui-chestnut-867kjoDn.js} +5 -5
  36. package/dist/{vue-ui-chord-DDzp12Vp.js → vue-ui-chord-DkfouYyb.js} +8 -8
  37. package/dist/vue-ui-circle-pack-BgIxgce3.js +709 -0
  38. package/dist/{vue-ui-cursor-Bg-6DHbI.js → vue-ui-cursor-DKwYaoFO.js} +2 -2
  39. package/dist/{vue-ui-dashboard-DY2lvJ7A.js → vue-ui-dashboard-nb_Tdvwb.js} +62 -62
  40. package/dist/{vue-ui-digits-De2GmG2N.js → vue-ui-digits-DZ3HnXon.js} +2 -2
  41. package/dist/{vue-ui-donut-BWQ6g1O7.js → vue-ui-donut-CzCl9JR8.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-DAzSv9V-.js → vue-ui-donut-evolution-BQ2OSYUs.js} +12 -11
  43. package/dist/{vue-ui-dumbbell-B32YuCNM.js → vue-ui-dumbbell-BqXhujgy.js} +11 -10
  44. package/dist/{vue-ui-flow-BZkt6OKd.js → vue-ui-flow-DJk5nDXA.js} +7 -7
  45. package/dist/{vue-ui-funnel-8WAXLQAo.js → vue-ui-funnel-BDwH3FtD.js} +6 -6
  46. package/dist/{vue-ui-galaxy-gfw2BThf.js → vue-ui-galaxy-EY8HRZXp.js} +5 -5
  47. package/dist/{vue-ui-gauge-Ch5vl4T9.js → vue-ui-gauge-DMcHPKUR.js} +7 -7
  48. package/dist/{vue-ui-gizmo-CU8ddGLr.js → vue-ui-gizmo-6FSB-WDl.js} +3 -3
  49. package/dist/{vue-ui-heatmap-YO1tESN5.js → vue-ui-heatmap-C_xD3d6M.js} +13 -13
  50. package/dist/{vue-ui-history-plot-C41s9ybF.js → vue-ui-history-plot-2xIA6g8q.js} +38 -37
  51. package/dist/{vue-ui-kpi-H6MYZwLY.js → vue-ui-kpi-BrjdXiVR.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-Bnjg3O7d.js → vue-ui-mini-loader-itxvZl1j.js} +2 -2
  53. package/dist/{vue-ui-molecule-DF4leieh.js → vue-ui-molecule-B1CXM01Y.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-NrPILZdk.js → vue-ui-mood-radar-C2lpLvo4.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-BLnO_Mgf.js → vue-ui-nested-donuts-ByE-C9zx.js} +9 -9
  56. package/dist/{vue-ui-onion-66T65iJH.js → vue-ui-onion-D6xfskcr.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-B5N_TkrQ.js → vue-ui-parallel-coordinate-plot-Dx_-SFUT.js} +38 -37
  58. package/dist/{vue-ui-quadrant-BoCrqBMk.js → vue-ui-quadrant-C6SCZK03.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-B0VC0eh-.js → vue-ui-quick-chart-ENmRTJJa.js} +72 -71
  60. package/dist/{vue-ui-radar-CFVWdaIn.js → vue-ui-radar-DfdSM-Il.js} +8 -8
  61. package/dist/{vue-ui-rating-A58gcO8T.js → vue-ui-rating-CHMK4MLu.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-DU5SHiGv.js → vue-ui-relation-circle-DwuyPmGj.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-DbL2yTIh.js → vue-ui-ridgeline-CvyCWHmy.js} +16 -12
  64. package/dist/{vue-ui-rings-Bv6MCURJ.js → vue-ui-rings-DuRAZ4PD.js} +8 -8
  65. package/dist/{vue-ui-scatter-BmN7rTrR.js → vue-ui-scatter-Cj4In9o1.js} +8 -8
  66. package/dist/{vue-ui-skeleton-C4h4fFuO.js → vue-ui-skeleton-DpHEVrfC.js} +3 -3
  67. package/dist/{vue-ui-smiley-7OtzDLyY.js → vue-ui-smiley-Dvi-xiM1.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-CDJGeE9c.js → vue-ui-spark-trend-Bq7OOC27.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-D77zOuEC.js → vue-ui-sparkbar-Ct7dyPaA.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-BksxAHf4.js → vue-ui-sparkgauge-BZHWmTFZ.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-dgigFSzZ.js → vue-ui-sparkhistogram-CCa5tbpq.js} +4 -4
  72. package/dist/{vue-ui-sparkline-Dy1tSgMy.js → vue-ui-sparkline-bZCi8CR7.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-DVPYzftP.js → vue-ui-sparkstackbar-CJX-bUJj.js} +3 -3
  74. package/dist/{vue-ui-stackbar-BSsTXQJ2.js → vue-ui-stackbar-DALCNLjV.js} +13 -12
  75. package/dist/{vue-ui-strip-plot-F41CWin2.js → vue-ui-strip-plot-dvRLKPb2.js} +11 -10
  76. package/dist/{vue-ui-table-BmnsgnjO.js → vue-ui-table-BotcBqEH.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-GuaexCA-.js → vue-ui-table-heatmap-Ac60woo0.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-DktY9A1C.js → vue-ui-table-sparkline-CUEGfm0y.js} +4 -4
  79. package/dist/{vue-ui-thermometer-EhgTVfFj.js → vue-ui-thermometer-DgzA1aXg.js} +7 -7
  80. package/dist/{vue-ui-timer-Cd3Yt7HA.js → vue-ui-timer-ZMIxKbzb.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-DjDnFHWc.js → vue-ui-tiremarks-Cj8qpTiw.js} +6 -6
  82. package/dist/{vue-ui-treemap-BGLUEQit.js → vue-ui-treemap-BhPlPsmp.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-DhVF0WZY.js → vue-ui-vertical-bar-CI6CfNMA.js} +9 -9
  84. package/dist/{vue-ui-waffle-gXnHM7Qo.js → vue-ui-waffle-Kht4b0uT.js} +8 -8
  85. package/dist/{vue-ui-wheel-Ce2IQFq7.js → vue-ui-wheel-CbbKmXVB.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-BDFn0rUl.js → vue-ui-word-cloud-5zpZS9-4.js} +6 -6
  87. package/dist/{vue-ui-world-Cev3j25p.js → vue-ui-world-e0l9EEdQ.js} +6 -6
  88. package/dist/{vue-ui-xy-CNMFnao9.js → vue-ui-xy-DxjJ5aYg.js} +13 -12
  89. package/dist/{vue-ui-xy-canvas-B04eI10U.js → vue-ui-xy-canvas-DKMqvCTi.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-circle-pack-DOXx17NQ.js +0 -673
@@ -0,0 +1,709 @@
1
+ import { useCssVars as rt, computed as _, defineAsyncComponent as X, ref as p, toRefs as it, watch as he, shallowRef as Ne, onMounted as ct, onBeforeUnmount as vt, watchEffect as dt, createElementBlock as b, openBlock as m, unref as i, normalizeStyle as ae, normalizeClass as Re, createBlock as B, createCommentVNode as w, renderSlot as k, createSlots as ht, withCtx as $, normalizeProps as Y, guardReactiveProps as Z, createVNode as ft, Fragment as le, renderList as mt, createElementVNode as z, mergeProps as De, toDisplayString as J, createTextVNode as yt, nextTick as Le } from "vue";
2
+ import { u as pt, c as Be, t as bt, a as fe, p as oe, b as gt, o as kt, f as xt, d as wt, e as Ct, j as Ve, i as me, X as _t, l as zt, F as K, al as $t, v as Tt, w as St, k as He } from "./index-Be3YloBf.js";
3
+ import { t as Ft, u as Ot } from "./useResponsive-DfdjqQps.js";
4
+ import { u as It } from "./usePrinter-BV33Qwmk.js";
5
+ import { u as Pt, B as At } from "./useLoading-D7YHNtLX.js";
6
+ import { u as Ue } from "./useNestedProp-BPkXaKa1.js";
7
+ import { u as Mt } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as Et } from "./useChartAccessibility-9icAAmYg.js";
9
+ import Nt from "./img-WAJVcEH2.js";
10
+ import Rt from "./Title-DM17sbc-.js";
11
+ import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ function je(r, v = 0) {
13
+ const f = r.reduce((o, { x: s, r: u }) => Math.min(o, s - u - v), 1 / 0), y = r.reduce((o, { x: s, r: u }) => Math.max(o, s + u + v), -1 / 0), d = r.reduce((o, { y: s, r: u }) => Math.min(o, s - u - v), 1 / 0), n = r.reduce((o, { y: s, r: u }) => Math.max(o, s + u + v), -1 / 0);
14
+ return [f, d, y - f, n - d];
15
+ }
16
+ function Lt(r, v, f) {
17
+ const y = r._, d = r.next._, n = y.r + d.r, o = (y.x * d.r + d.x * y.r) / n, s = (y.y * d.r + d.y * y.r) / n;
18
+ return Math.max(Math.abs(o * f), Math.abs(s * v));
19
+ }
20
+ function Ge(r, v, f) {
21
+ const y = Lt, d = r.length;
22
+ if (!d) return r;
23
+ let n, o, s;
24
+ if (n = r[0], n.x = 0, n.y = 0, !(d > 1) || (o = r[1], n.x = -o.r, o.x = n.r, o.y = 0, !(d > 2))) return r;
25
+ We(o, n, s = r[2]), n = new ne(n), o = new ne(o), s = new ne(s), n.next = s.previous = o, o.next = n.previous = s, s.next = o.previous = n;
26
+ e: for (let u = 3; u < d; ++u) {
27
+ We(n._, o._, s = r[u]), s = new ne(s);
28
+ let x = o.next, T = n.previous, V = o._.r, S = n._.r;
29
+ do
30
+ if (V <= S) {
31
+ if (qe(x._, s._)) {
32
+ o = x, n.next = o, o.previous = n, --u;
33
+ continue e;
34
+ }
35
+ V += x._.r, x = x.next;
36
+ } else {
37
+ if (qe(T._, s._)) {
38
+ n = T, n.next = o, o.previous = n, --u;
39
+ continue e;
40
+ }
41
+ S += T._.r, T = T.previous;
42
+ }
43
+ while (x !== T.next);
44
+ s.previous = n, s.next = o, n.next = o.previous = o = s;
45
+ let C = y(n, f, v), H;
46
+ for (; (s = s.next) !== o; )
47
+ (H = y(s, f, v)) < C && (n = s, C = H);
48
+ o = n.next;
49
+ }
50
+ return r;
51
+ }
52
+ function We(r, v, f) {
53
+ const y = r.x - v.x, d = r.y - v.y, n = y * y + d * d;
54
+ if (n) {
55
+ const o = (v.r + f.r) ** 2, s = (r.r + f.r) ** 2;
56
+ if (o > s) {
57
+ const u = (n + s - o) / (2 * n), x = Math.sqrt(Math.max(0, s / n - u * u));
58
+ f.x = r.x - u * y - x * d, f.y = r.y - u * d + x * y;
59
+ } else {
60
+ const u = (n + o - s) / (2 * n), x = Math.sqrt(Math.max(0, o / n - u * u));
61
+ f.x = v.x + u * y - x * d, f.y = v.y + u * d + x * y;
62
+ }
63
+ } else
64
+ f.x = v.x + f.r, f.y = v.y;
65
+ }
66
+ function qe(r, v) {
67
+ const f = r.r + v.r - 1e-6, y = v.x - r.x, d = v.y - r.y;
68
+ return f > 0 && f * f > y * y + d * d;
69
+ }
70
+ class ne {
71
+ constructor(v) {
72
+ this._ = v, this.next = null, this.previous = null;
73
+ }
74
+ }
75
+ const Bt = ["id"], Vt = ["xmlns", "viewBox", "height", "width"], Ht = ["x", "y", "width", "height"], Ut = ["id"], jt = ["stop-color"], Gt = ["stop-color"], Wt = ["stop-color"], qt = { key: 0 }, Xt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter", "onMouseout", "onClick"], Yt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Zt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Jt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Kt = ["cx", "cy", "r", "opacity", "stroke", "stroke-width", "fill"], Qt = {
76
+ key: 0,
77
+ style: { pointerEvents: "none" }
78
+ }, ea = { key: 1 }, ta = ["opacity", "x", "y", "font-size", "fill", "font-weight"], aa = ["opacity", "x", "y", "font-size", "fill", "font-weight"], la = {
79
+ key: 4,
80
+ class: "vue-data-ui-watermark"
81
+ }, oa = ["innerHTML"], na = {
82
+ __name: "vue-ui-circle-pack",
83
+ props: {
84
+ config: {
85
+ type: Object,
86
+ default() {
87
+ return {};
88
+ }
89
+ },
90
+ dataset: {
91
+ type: Array,
92
+ default() {
93
+ return [];
94
+ }
95
+ }
96
+ },
97
+ emits: ["selectDatapoint"],
98
+ setup(r, { expose: v, emit: f }) {
99
+ rt((t) => ({
100
+ "336045f2": L.value,
101
+ b72ba32a: ie.value
102
+ }));
103
+ const y = X(() => import("./vue-ui-accordion-KpWnxkbY.js")), d = X(() => import("./DataTable-CuJplxJU.js")), n = X(() => import("./UserOptions-gH1Ahkhe.js")), o = X(() => import("./PenAndPaper-BqhD2pOj.js")), s = X(() => import("./PackageVersion-Cqvb9VXZ.js")), u = r, x = f, { vue_ui_circle_pack: T } = pt(), V = _(() => !!u.dataset && u.dataset.length), S = p(Be()), C = p(null), H = p(null), ye = p(null), pe = p(0), be = p(0), ge = p(0), Xe = p(null), e = p(ue()), { loading: ke, FINAL_DATASET: xe } = Pt({
104
+ ...it(u),
105
+ FINAL_CONFIG: e,
106
+ prepareConfig: ue,
107
+ skeletonDataset: [
108
+ { name: "_", value: 13, color: "#F2F2F2" },
109
+ { name: "_", value: 8, color: "#DBDBDB" },
110
+ { name: "_", value: 5, color: "#ADADAD" },
111
+ { name: "_", value: 3, color: "#969696" },
112
+ { name: "_", value: 2, color: "#808080" },
113
+ { name: "_", value: 1, color: "#696969" }
114
+ ],
115
+ skeletonConfig: bt({
116
+ defaultConfig: e.value,
117
+ userConfig: {
118
+ userOptions: { show: !1 },
119
+ table: { show: !1 },
120
+ style: {
121
+ chart: {
122
+ backgroundColor: "#99999930",
123
+ circles: {
124
+ stroke: "#6A6A6A",
125
+ labels: {
126
+ name: { show: !1 },
127
+ value: { show: !1 }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ })
134
+ }), { svgRef: we } = Et({ config: e.value.style.chart.title }), {
135
+ userOptionsVisible: se,
136
+ setUserOptionsVisibility: Ce,
137
+ keepUserOptionState: _e
138
+ } = Mt({ config: e.value });
139
+ function ue() {
140
+ const t = Ue({
141
+ userConfig: u.config,
142
+ defaultConfig: T
143
+ });
144
+ return t.theme ? {
145
+ ...Ue({
146
+ userConfig: gt.vue_ui_circle_pack[t.theme] || u.config,
147
+ defaultConfig: t
148
+ }),
149
+ customPalette: fe[t.theme] || oe
150
+ } : t;
151
+ }
152
+ he(() => u.config, (t) => {
153
+ e.value = ue(), se.value = !e.value.userOptions.showOnChartHover, re(), pe.value += 1, be.value += 1, N.value.showTable = e.value.table.show;
154
+ }, { deep: !0 });
155
+ const { isPrinting: ze, isImaging: $e, generatePdf: Te, generateImage: Se } = It({
156
+ elementId: `vue-ui-circle-pack_${S.value}`,
157
+ fileName: e.value.style.chart.title.text || "vue-ui-circle-pack",
158
+ options: e.value.userOptions.print
159
+ }), Ye = _(() => e.value.userOptions.show && !e.value.style.chart.title.text), N = p({
160
+ showTable: e.value.table.show
161
+ });
162
+ he(e, () => {
163
+ N.value = {
164
+ showTable: e.value.table.show
165
+ };
166
+ }, { immediate: !0 });
167
+ const F = Ne(null), R = Ne(null), A = p({ h: 10, w: 10 }), Fe = p(0), M = p([0, 0, 100, 100]), U = p({ h: 0, w: 0 }), Ze = _(() => e.value.debug);
168
+ async function re() {
169
+ kt(u.dataset) && xt({
170
+ componentName: "VueUiCirclePack",
171
+ type: "dataset",
172
+ debug: Ze.value
173
+ }), A.value = { h: 10, w: 10 }, M.value = [0, 0, 100, 100], U.value = { h: 0, w: 0 }, D.value = await Ge(Q.value), O.value = je(D.value, 1).join(" "), U.value = Oe(C.value);
174
+ const t = Ft(() => {
175
+ const { width: l, height: a, heightTitle: c, heightNoTitle: g } = Ot({
176
+ chart: C.value,
177
+ title: H.value,
178
+ noTitle: ye.value
179
+ }), E = Math.max(10, l), de = Math.max(10, a - 12);
180
+ Fe.value = e.value.style.chart.title.text ? c : g, requestAnimationFrame(() => {
181
+ A.value.w = E, A.value.h = de - Fe.value, Le(async () => {
182
+ const st = Q.value.map((ut) => ({ ...ut }));
183
+ D.value = await Ge(st, A.value.h, A.value.w), M.value = je(D.value, 1), O.value = M.value.join(" "), U.value = Oe(C.value);
184
+ });
185
+ });
186
+ });
187
+ F.value && (R.value && F.value.unobserve(R.value), F.value.disconnect()), F.value = new ResizeObserver(t), R.value = C.value.parentNode, F.value.observe(R.value);
188
+ }
189
+ ct(re), vt(() => {
190
+ F.value && (R.value && F.value.unobserve(R.value), F.value.disconnect());
191
+ });
192
+ function Oe(t) {
193
+ if (!t || !t.parentElement)
194
+ return console.warn("Component or parent element is missing."), { w: 0, h: 0 };
195
+ const l = t.parentElement;
196
+ if (l.offsetWidth > 0 && l.offsetHeight > 0)
197
+ return { w: l.offsetWidth, h: l.offsetHeight };
198
+ const a = window.getComputedStyle(l), c = a.width, g = a.height;
199
+ return c !== "auto" && g !== "auto" && parseFloat(c) > 0 && parseFloat(g) > 0 ? { w: parseFloat(c), h: parseFloat(g) } : { w: 0, h: 0 };
200
+ }
201
+ he(() => xe.value, async (t) => {
202
+ await re();
203
+ }, { deep: !0 });
204
+ const Je = _(() => wt(e.value.customPalette)), Q = _(() => xe.value.map((t, l) => {
205
+ const a = Ct(t.color) || Je.value[l] || fe[e.value.theme || "default"][l % fe[e.value.theme || "default"].length] || oe[l] || oe[l % oe.length];
206
+ return {
207
+ ...t,
208
+ r: t.value,
209
+ id: Be(),
210
+ color: a
211
+ };
212
+ }).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), D = p([]), O = p("0 0 100 100"), j = _(() => Math.max(...D.value.map((t) => t.r)));
213
+ function Ie(t, l) {
214
+ return l / j.value * t;
215
+ }
216
+ function Ke(t, l) {
217
+ h.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l });
218
+ }
219
+ function Qe(t, l) {
220
+ x("selectDatapoint", t), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
221
+ }
222
+ function et(t, l) {
223
+ tt(t), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l });
224
+ }
225
+ const h = p(null);
226
+ function tt(t) {
227
+ e.value.style.chart.circles.zoom.show && (h.value = t);
228
+ }
229
+ const L = _(() => h.value ? h.value.r : 0), ie = _(() => P.value ? L.value : h.value ? h.value.r > M.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio ? h.value.r : M.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), I = p(0), at = _(() => ({
230
+ pointerEvents: "none",
231
+ opacity: I.value,
232
+ filter: `drop-shadow(0px 0px 6px ${Ve(h.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
233
+ })), G = p(L.value);
234
+ dt(() => {
235
+ G.value = L.value, I.value = 0;
236
+ let t = null;
237
+ function l(a) {
238
+ t || (t = a);
239
+ const c = (a - t) / e.value.style.chart.circles.zoom.animationFrameMs;
240
+ c < 1 ? (G.value = L.value + (ie.value - L.value) * c, I.value = 0 + e.value.style.chart.circles.zoom.opacity * c, requestAnimationFrame(l)) : (G.value = ie.value, I.value = e.value.style.chart.circles.zoom.opacity);
241
+ }
242
+ requestAnimationFrame(l);
243
+ });
244
+ const W = _(() => ({
245
+ name: e.value.style.chart.circles.zoom.label.name.fontSize * M.value[3] / 300,
246
+ value: e.value.style.chart.circles.zoom.label.value.fontSize * M.value[3] / 300
247
+ }));
248
+ function ce(t) {
249
+ return He(
250
+ e.value.style.chart.circles.labels.value.formatter,
251
+ t.value,
252
+ me({
253
+ p: e.value.style.chart.circles.labels.value.prefix,
254
+ v: t.value,
255
+ s: e.value.style.chart.circles.labels.value.suffix,
256
+ r: e.value.style.chart.circles.labels.value.rounding
257
+ })
258
+ );
259
+ }
260
+ function lt() {
261
+ return He(
262
+ e.value.style.chart.circles.zoom.label.value.formatter,
263
+ h.value.value,
264
+ me({
265
+ p: e.value.style.chart.circles.zoom.label.value.prefix,
266
+ v: h.value.value,
267
+ s: e.value.style.chart.circles.zoom.label.value.suffix,
268
+ r: e.value.style.chart.circles.zoom.label.value.rounding
269
+ })
270
+ );
271
+ }
272
+ function Pe(t) {
273
+ if (!t)
274
+ return 0;
275
+ const l = t.r / ce(t).length * (ce(t).length === 1 ? 1 : 2);
276
+ return Math.min(t.r / 2.5, l);
277
+ }
278
+ const q = p(!1);
279
+ function Ae(t) {
280
+ q.value = t, ge.value += 1;
281
+ }
282
+ const P = p(!1);
283
+ function ve() {
284
+ P.value = !P.value;
285
+ }
286
+ const ee = _(() => {
287
+ const t = Q.value.map((a) => ({
288
+ name: a.name,
289
+ value: a.value,
290
+ color: a.color
291
+ })).toSorted((a, c) => c.value - a.value), l = t.map((a) => a.value);
292
+ return { head: t, body: l };
293
+ });
294
+ function Me(t = null) {
295
+ Le(() => {
296
+ const l = ee.value.head.map((g, E) => [[
297
+ g.name
298
+ ], [ee.value.body[E]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(l), c = Tt(a);
299
+ t ? t(c) : St({ csvContent: c, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
300
+ });
301
+ }
302
+ const te = _(() => {
303
+ const t = [
304
+ e.value.table.columnNames.datapoint,
305
+ e.value.table.columnNames.value
306
+ ], l = ee.value.head.map((g, E) => {
307
+ const de = me({
308
+ p: e.value.style.chart.circles.labels.value.prefix,
309
+ v: ee.value.body[E],
310
+ s: e.value.style.chart.circles.labels.value.suffix,
311
+ r: e.value.style.chart.circles.labels.value.rounding
312
+ });
313
+ return [
314
+ {
315
+ color: g.color,
316
+ name: g.name
317
+ },
318
+ de
319
+ ];
320
+ }), a = {
321
+ th: {
322
+ backgroundColor: e.value.table.th.backgroundColor,
323
+ color: e.value.table.th.color,
324
+ outline: e.value.table.th.outline
325
+ },
326
+ td: {
327
+ backgroundColor: e.value.table.td.backgroundColor,
328
+ color: e.value.table.td.color,
329
+ outline: e.value.table.td.outline
330
+ },
331
+ breakpoint: e.value.table.responsiveBreakpoint
332
+ };
333
+ return {
334
+ colNames: [
335
+ e.value.table.columnNames.datapoint,
336
+ e.value.table.columnNames.value
337
+ ],
338
+ head: t,
339
+ body: l,
340
+ config: a
341
+ };
342
+ });
343
+ function Ee() {
344
+ N.value.showTable = !N.value.showTable;
345
+ }
346
+ function ot() {
347
+ return Q.value;
348
+ }
349
+ async function nt({ scale: t = 2 } = {}) {
350
+ if (!C.value) return;
351
+ const { width: l, height: a } = C.value.getBoundingClientRect(), c = l / a, { imageUri: g, base64: E } = await Nt({ domElement: C.value, base64: !0, img: !0, scale: t });
352
+ return {
353
+ imageUri: g,
354
+ base64: E,
355
+ title: e.value.style.chart.title.text,
356
+ width: l,
357
+ height: a,
358
+ aspectRatio: c
359
+ };
360
+ }
361
+ return v({
362
+ getData: ot,
363
+ getImage: nt,
364
+ generateCsv: Me,
365
+ generatePdf: Te,
366
+ generateImage: Se,
367
+ toggleTable: Ee,
368
+ toggleAnnotator: ve,
369
+ toggleFullscreen: Ae
370
+ }), (t, l) => (m(), b("div", {
371
+ id: `vue-ui-circle-pack_${S.value}`,
372
+ class: Re(`vue-ui-circle-pack ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${i(ke) ? "loading" : ""}`),
373
+ ref_key: "circlePackChart",
374
+ ref: C,
375
+ style: ae(`font-family:${e.value.style.fontFamily};text-align:center;background:${e.value.style.chart.backgroundColor}; height: ${U.value.h}px; width:${U.value.w}px`),
376
+ onMouseenter: l[1] || (l[1] = () => i(Ce)(!0)),
377
+ onMouseleave: l[2] || (l[2] = () => i(Ce)(!1))
378
+ }, [
379
+ e.value.userOptions.buttons.annotator ? (m(), B(i(o), {
380
+ key: 0,
381
+ svgRef: i(we),
382
+ backgroundColor: e.value.style.chart.backgroundColor,
383
+ color: e.value.style.chart.color,
384
+ active: P.value,
385
+ scale: j.value / 100,
386
+ onClose: ve
387
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active", "scale"])) : w("", !0),
388
+ k(t.$slots, "userConfig", {}, void 0, !0),
389
+ Ye.value ? (m(), b("div", {
390
+ key: 1,
391
+ ref_key: "noTitle",
392
+ ref: ye,
393
+ class: "vue-data-ui-no-title-space",
394
+ style: "height:36px; width: 100%;background:transparent"
395
+ }, null, 512)) : w("", !0),
396
+ e.value.style.chart.title.text ? (m(), b("div", {
397
+ key: 2,
398
+ ref_key: "chartTitle",
399
+ ref: H,
400
+ style: "width:100%;background:transparent;padding-bottom:12px"
401
+ }, [
402
+ (m(), B(Rt, {
403
+ key: `title_${pe.value}`,
404
+ config: {
405
+ title: {
406
+ cy: "donut-div-title",
407
+ ...e.value.style.chart.title
408
+ },
409
+ subtitle: {
410
+ cy: "donut-div-subtitle",
411
+ ...e.value.style.chart.title.subtitle
412
+ }
413
+ }
414
+ }, null, 8, ["config"]))
415
+ ], 512)) : w("", !0),
416
+ e.value.userOptions.show && V.value && (i(_e) || i(se)) ? (m(), B(i(n), {
417
+ ref: "details",
418
+ key: `user_option_${ge.value}`,
419
+ backgroundColor: e.value.style.chart.backgroundColor,
420
+ color: e.value.style.chart.color,
421
+ isPrinting: i(ze),
422
+ isImaging: i($e),
423
+ uid: S.value,
424
+ hasTooltip: !1,
425
+ hasLabel: !1,
426
+ hasPdf: e.value.userOptions.buttons.pdf,
427
+ hasImg: e.value.userOptions.buttons.img,
428
+ hasXls: e.value.userOptions.buttons.csv,
429
+ hasTable: e.value.userOptions.buttons.table,
430
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
431
+ isFullscreen: q.value,
432
+ chartElement: C.value,
433
+ position: e.value.userOptions.position,
434
+ callbacks: e.value.userOptions.callbacks,
435
+ printScale: e.value.userOptions.print.scale,
436
+ titles: { ...e.value.userOptions.buttonTitles },
437
+ hasAnnotator: e.value.userOptions.buttons.annotator,
438
+ isAnnotation: P.value,
439
+ onToggleFullscreen: Ae,
440
+ onGeneratePdf: i(Te),
441
+ onGenerateCsv: Me,
442
+ onGenerateImage: i(Se),
443
+ onToggleTable: Ee,
444
+ onToggleAnnotator: ve,
445
+ style: ae({
446
+ visibility: i(_e) ? i(se) ? "visible" : "hidden" : "visible"
447
+ })
448
+ }, ht({ _: 2 }, [
449
+ t.$slots.menuIcon ? {
450
+ name: "menuIcon",
451
+ fn: $(({ isOpen: a, color: c }) => [
452
+ k(t.$slots, "menuIcon", Y(Z({ isOpen: a, color: c })), void 0, !0)
453
+ ]),
454
+ key: "0"
455
+ } : void 0,
456
+ t.$slots.optionPdf ? {
457
+ name: "optionPdf",
458
+ fn: $(() => [
459
+ k(t.$slots, "optionPdf", {}, void 0, !0)
460
+ ]),
461
+ key: "1"
462
+ } : void 0,
463
+ t.$slots.optionCsv ? {
464
+ name: "optionCsv",
465
+ fn: $(() => [
466
+ k(t.$slots, "optionCsv", {}, void 0, !0)
467
+ ]),
468
+ key: "2"
469
+ } : void 0,
470
+ t.$slots.optionImg ? {
471
+ name: "optionImg",
472
+ fn: $(() => [
473
+ k(t.$slots, "optionImg", {}, void 0, !0)
474
+ ]),
475
+ key: "3"
476
+ } : void 0,
477
+ t.$slots.optionTable ? {
478
+ name: "optionTable",
479
+ fn: $(() => [
480
+ k(t.$slots, "optionTable", {}, void 0, !0)
481
+ ]),
482
+ key: "4"
483
+ } : void 0,
484
+ t.$slots.optionFullscreen ? {
485
+ name: "optionFullscreen",
486
+ fn: $(({ toggleFullscreen: a, isFullscreen: c }) => [
487
+ k(t.$slots, "optionFullscreen", Y(Z({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
488
+ ]),
489
+ key: "5"
490
+ } : void 0,
491
+ t.$slots.optionAnnotator ? {
492
+ name: "optionAnnotator",
493
+ fn: $(({ toggleAnnotator: a, isAnnotator: c }) => [
494
+ k(t.$slots, "optionAnnotator", Y(Z({ toggleAnnotator: a, isAnnotator: c })), void 0, !0)
495
+ ]),
496
+ key: "6"
497
+ } : void 0
498
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "printScale", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : w("", !0),
499
+ (m(), b("svg", {
500
+ ref_key: "svgRef",
501
+ ref: we,
502
+ xmlns: i(_t),
503
+ viewBox: O.value,
504
+ height: Math.max(10, A.value.h),
505
+ width: Math.max(10, A.value.w),
506
+ class: Re({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
507
+ style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};background:${e.value.style.chart.backgroundColor};`)
508
+ }, [
509
+ ft(i(s)),
510
+ t.$slots["chart-background"] ? (m(), b("foreignObject", {
511
+ key: 0,
512
+ x: O.value.x,
513
+ y: O.value.y,
514
+ width: O.value.width,
515
+ height: O.value.height,
516
+ style: {
517
+ pointerEvents: "none"
518
+ }
519
+ }, [
520
+ k(t.$slots, "chart-background", {}, void 0, !0)
521
+ ], 8, Ht)) : w("", !0),
522
+ (m(!0), b(le, null, mt(D.value, (a, c) => (m(), b(le, null, [
523
+ z("defs", null, [
524
+ z("radialGradient", {
525
+ id: a.id,
526
+ fy: "30%"
527
+ }, [
528
+ z("stop", {
529
+ offset: "10%",
530
+ "stop-color": i(zt)(a.color, e.value.style.chart.circles.gradient.intensity / 100)
531
+ }, null, 8, jt),
532
+ z("stop", {
533
+ offset: "90%",
534
+ "stop-color": i(Ve)(a.color, 0.1)
535
+ }, null, 8, Gt),
536
+ z("stop", {
537
+ offset: "100%",
538
+ "stop-color": a.color
539
+ }, null, 8, Wt)
540
+ ], 8, Ut)
541
+ ]),
542
+ t.$slots.pattern ? (m(), b("g", qt, [
543
+ z("defs", null, [
544
+ k(t.$slots, "pattern", De({ ref_for: !0 }, { ...a, patternId: `pattern_${S.value}_${a.id}` }), void 0, !0)
545
+ ])
546
+ ])) : w("", !0),
547
+ z("rect", {
548
+ x: a.x - a.r,
549
+ y: a.y - a.r,
550
+ width: a.r * 2,
551
+ height: a.r * 2,
552
+ stroke: e.value.style.chart.circles.stroke,
553
+ "stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
554
+ fill: e.value.style.chart.circles.gradient.show ? `url(#${a.id})` : a.color,
555
+ rx: a.r,
556
+ onMouseenter: (g) => et(a, c),
557
+ onMouseout: (g) => Ke(a, c),
558
+ onClick: (g) => Qe(a, c)
559
+ }, null, 40, Xt),
560
+ t.$slots.pattern ? (m(), b("rect", {
561
+ key: 1,
562
+ x: a.x - a.r,
563
+ y: a.y - a.r,
564
+ width: a.r * 2,
565
+ height: a.r * 2,
566
+ stroke: e.value.style.chart.circles.stroke,
567
+ "stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
568
+ fill: `url(#pattern_${S.value}_${a.id})`,
569
+ rx: a.r,
570
+ style: {
571
+ pointerEvents: "none"
572
+ }
573
+ }, null, 8, Yt)) : w("", !0),
574
+ t.$slots["data-label"] ? k(t.$slots, "data-label", De({
575
+ key: 2,
576
+ ref_for: !0
577
+ }, { ...a, createTSpans: i($t), fontSize: { name: a.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio, value: Pe(a) * e.value.style.chart.circles.labels.value.fontSizeRatio }, color: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : i(K)(a.color) }), void 0, !0) : (m(), b(le, { key: 3 }, [
578
+ e.value.style.chart.circles.labels.name.show && a.name ? (m(), b("text", {
579
+ key: 0,
580
+ style: {
581
+ pointerEvents: "none",
582
+ transition: "opacity 0.2s ease-in-out"
583
+ },
584
+ opacity: h.value && !P.value ? 0.2 : 1,
585
+ x: a.x,
586
+ y: a.y + Ie(a.r, e.value.style.chart.circles.labels.name.offsetY) - a.r / 10,
587
+ "font-size": a.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio,
588
+ fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : i(K)(a.color),
589
+ "font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
590
+ "text-anchor": "middle"
591
+ }, J(a.name), 9, Zt)) : w("", !0),
592
+ e.value.style.chart.circles.labels.value.show ? (m(), b("text", {
593
+ key: 1,
594
+ style: {
595
+ pointerEvents: "none",
596
+ transition: "opacity 0.2s ease-in-out"
597
+ },
598
+ opacity: h.value && !P.value ? 0.2 : 1,
599
+ x: a.x,
600
+ y: a.y + Ie(a.r, e.value.style.chart.circles.labels.value.offsetY) + a.r / 2.5,
601
+ "font-size": Pe(a) * e.value.style.chart.circles.labels.value.fontSizeRatio,
602
+ fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : i(K)(a.color),
603
+ "font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
604
+ "text-anchor": "middle"
605
+ }, J(ce(a)), 9, Jt)) : w("", !0)
606
+ ], 64))
607
+ ], 64))), 256)),
608
+ h.value && e.value.style.chart.circles.zoom.show && !P.value ? (m(), b(le, { key: 1 }, [
609
+ z("circle", {
610
+ style: ae(at.value),
611
+ cx: h.value.x,
612
+ cy: h.value.y,
613
+ r: G.value,
614
+ opacity: I.value,
615
+ stroke: e.value.style.chart.circles.stroke,
616
+ "stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
617
+ fill: e.value.style.chart.circles.gradient.show ? `url(#${h.value.id})` : h.value.color
618
+ }, null, 12, Kt),
619
+ t.$slots["zoom-label"] ? (m(), b("g", Qt, [
620
+ k(t.$slots, "zoom-label", Y(Z({ ...h.value, zoomOpacity: I.value, currentRadius: G.value, fontSize: W.value })), void 0, !0)
621
+ ])) : (m(), b("g", ea, [
622
+ z("text", {
623
+ style: {
624
+ pointerEvents: "none"
625
+ },
626
+ opacity: I.value,
627
+ x: h.value.x,
628
+ y: h.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - W.value.name / 4,
629
+ "text-anchor": "middle",
630
+ "font-size": W.value.name,
631
+ fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : i(K)(h.value.color),
632
+ "font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
633
+ }, J(h.value.name), 9, ta),
634
+ z("text", {
635
+ style: {
636
+ pointerEvents: "none"
637
+ },
638
+ opacity: I.value,
639
+ x: h.value.x,
640
+ y: h.value.y + W.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
641
+ "text-anchor": "middle",
642
+ "font-size": W.value.value,
643
+ fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : i(K)(h.value.color),
644
+ "font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
645
+ }, J(lt()), 9, aa)
646
+ ]))
647
+ ], 64)) : w("", !0),
648
+ k(t.$slots, "svg", {
649
+ svg: { ...O.value }
650
+ }, void 0, !0)
651
+ ], 14, Vt)),
652
+ t.$slots.watermark ? (m(), b("div", la, [
653
+ k(t.$slots, "watermark", Y(Z({ isPrinting: i(ze) || i($e) })), void 0, !0)
654
+ ])) : w("", !0),
655
+ t.$slots.source ? (m(), b("div", {
656
+ key: 5,
657
+ ref_key: "source",
658
+ ref: Xe,
659
+ dir: "auto"
660
+ }, [
661
+ k(t.$slots, "source", {}, void 0, !0)
662
+ ], 512)) : w("", !0),
663
+ V.value ? (m(), B(i(y), {
664
+ key: 6,
665
+ hideDetails: "",
666
+ config: {
667
+ open: N.value.showTable,
668
+ maxHeight: 1e4,
669
+ body: {
670
+ backgroundColor: e.value.style.chart.backgroundColor,
671
+ color: e.value.style.chart.color
672
+ },
673
+ head: {
674
+ backgroundColor: e.value.style.chart.backgroundColor,
675
+ color: e.value.style.chart.color
676
+ }
677
+ }
678
+ }, {
679
+ content: $(() => [
680
+ (m(), B(i(d), {
681
+ key: `table_${be.value}`,
682
+ colNames: te.value.colNames,
683
+ head: te.value.head,
684
+ body: te.value.body,
685
+ config: te.value.config,
686
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
687
+ onClose: l[0] || (l[0] = (a) => N.value.showTable = !1)
688
+ }, {
689
+ th: $(({ th: a }) => [
690
+ z("div", {
691
+ innerHTML: a,
692
+ style: { display: "flex", "align-items": "center" }
693
+ }, null, 8, oa)
694
+ ]),
695
+ td: $(({ td: a }) => [
696
+ yt(J(a.name || a), 1)
697
+ ]),
698
+ _: 1
699
+ }, 8, ["colNames", "head", "body", "config", "title"]))
700
+ ]),
701
+ _: 1
702
+ }, 8, ["config"])) : w("", !0),
703
+ i(ke) ? (m(), B(At, { key: 7 })) : w("", !0)
704
+ ], 46, Bt));
705
+ }
706
+ }, pa = /* @__PURE__ */ Dt(na, [["__scopeId", "data-v-4906f000"]]);
707
+ export {
708
+ pa as default
709
+ };