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
@@ -1,673 +0,0 @@
1
- import { useCssVars as at, computed as z, defineAsyncComponent as V, ref as b, watch as Re, shallowRef as Ee, onMounted as ot, onBeforeUnmount as st, watchEffect as nt, createElementBlock as g, openBlock as y, unref as u, normalizeStyle as le, normalizeClass as Me, createBlock as B, createCommentVNode as k, renderSlot as x, createSlots as rt, withCtx as $, normalizeProps as q, guardReactiveProps as X, createVNode as ut, Fragment as ae, renderList as it, createElementVNode as _, mergeProps as Ae, toDisplayString as Y, createTextVNode as ct, nextTick as De } from "vue";
2
- import { u as vt, c as Le, a as de, p as oe, b as dt, o as ht, f as ft, d as yt, e as mt, j as Ve, i as he, X as pt, l as bt, F as Z, al as gt, v as kt, w as xt, k as Be } from "./index-Bzm4bjdY.js";
3
- import { u as He } from "./useNestedProp-FhaE2yv-.js";
4
- import { u as wt } from "./usePrinter-DZsH7qQs.js";
5
- import { u as Ct } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as zt } from "./useChartAccessibility-9icAAmYg.js";
7
- import { t as _t, u as $t } from "./useResponsive-DfdjqQps.js";
8
- import Tt from "./Title-DnqOjg_N.js";
9
- import Pt from "./img-D_LTOBii.js";
10
- import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- function Ue(r, i = 0) {
12
- const f = r.reduce((a, { x: n, r: v }) => Math.min(a, n - v - i), 1 / 0), m = r.reduce((a, { x: n, r: v }) => Math.max(a, n + v + i), -1 / 0), c = r.reduce((a, { y: n, r: v }) => Math.min(a, n - v - i), 1 / 0), o = r.reduce((a, { y: n, r: v }) => Math.max(a, n + v + i), -1 / 0);
13
- return [f, c, m - f, o - c];
14
- }
15
- function Ot(r, i, f) {
16
- const m = r._, c = r.next._, o = m.r + c.r, a = (m.x * c.r + c.x * m.r) / o, n = (m.y * c.r + c.y * m.r) / o;
17
- return Math.max(Math.abs(a * f), Math.abs(n * i));
18
- }
19
- function je(r, i, f) {
20
- const m = Ot, c = r.length;
21
- if (!c) return r;
22
- let o, a, n;
23
- if (o = r[0], o.x = 0, o.y = 0, !(c > 1) || (a = r[1], o.x = -a.r, a.x = o.r, a.y = 0, !(c > 2))) return r;
24
- Ge(a, o, n = r[2]), o = new se(o), a = new se(a), n = new se(n), o.next = n.previous = a, a.next = o.previous = n, n.next = a.previous = o;
25
- e: for (let v = 3; v < c; ++v) {
26
- Ge(o._, a._, n = r[v]), n = new se(n);
27
- let p = a.next, T = o.previous, J = a._.r, N = o._.r;
28
- do
29
- if (J <= N) {
30
- if (We(p._, n._)) {
31
- a = p, o.next = a, a.previous = o, --v;
32
- continue e;
33
- }
34
- J += p._.r, p = p.next;
35
- } else {
36
- if (We(T._, n._)) {
37
- o = T, o.next = a, a.previous = o, --v;
38
- continue e;
39
- }
40
- N += T._.r, T = T.previous;
41
- }
42
- while (p !== T.next);
43
- n.previous = o, n.next = a, o.next = a.previous = a = n;
44
- let P = m(o, f, i), w;
45
- for (; (n = n.next) !== a; )
46
- (w = m(n, f, i)) < P && (o = n, P = w);
47
- a = o.next;
48
- }
49
- return r;
50
- }
51
- function Ge(r, i, f) {
52
- const m = r.x - i.x, c = r.y - i.y, o = m * m + c * c;
53
- if (o) {
54
- const a = (i.r + f.r) ** 2, n = (r.r + f.r) ** 2;
55
- if (a > n) {
56
- const v = (o + n - a) / (2 * o), p = Math.sqrt(Math.max(0, n / o - v * v));
57
- f.x = r.x - v * m - p * c, f.y = r.y - v * c + p * m;
58
- } else {
59
- const v = (o + a - n) / (2 * o), p = Math.sqrt(Math.max(0, a / o - v * v));
60
- f.x = i.x + v * m - p * c, f.y = i.y + v * c + p * m;
61
- }
62
- } else
63
- f.x = i.x + f.r, f.y = i.y;
64
- }
65
- function We(r, i) {
66
- const f = r.r + i.r - 1e-6, m = i.x - r.x, c = i.y - r.y;
67
- return f > 0 && f * f > m * m + c * c;
68
- }
69
- class se {
70
- constructor(i) {
71
- this._ = i, this.next = null, this.previous = null;
72
- }
73
- }
74
- const It = ["id"], Ft = ["xmlns", "viewBox", "height", "width"], Nt = ["x", "y", "width", "height"], Rt = ["id"], Et = ["stop-color"], Mt = ["stop-color"], At = ["stop-color"], Dt = { key: 0 }, Lt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter", "onClick"], Vt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Bt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Ht = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Ut = ["cx", "cy", "r", "opacity", "stroke", "stroke-width", "fill"], jt = {
75
- key: 0,
76
- style: { pointerEvents: "none" }
77
- }, Gt = { key: 1 }, Wt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], qt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Xt = {
78
- key: 6,
79
- class: "vue-data-ui-watermark"
80
- }, Yt = ["innerHTML"], Zt = {
81
- __name: "vue-ui-circle-pack",
82
- props: {
83
- config: {
84
- type: Object,
85
- default() {
86
- return {};
87
- }
88
- },
89
- dataset: {
90
- type: Array,
91
- default() {
92
- return [];
93
- }
94
- }
95
- },
96
- emits: ["selectDatapoint"],
97
- setup(r, { expose: i, emit: f }) {
98
- at((t) => ({
99
- "1096c176": L.value,
100
- "329ac07e": ue.value
101
- }));
102
- const m = V(() => import("./vue-ui-accordion-ywMTtl25.js")), c = V(() => import("./DataTable-DMCB2CPj.js")), o = V(() => import("./PackageVersion-B8cypgdJ.js")), a = V(() => import("./PenAndPaper-DjXtQYum.js")), n = V(() => import("./vue-ui-skeleton-C4h4fFuO.js")), v = V(() => import("./UserOptions-Tx_9Xl_c.js")), p = r, T = f, { vue_ui_circle_pack: J } = vt(), N = z(() => !!p.dataset && p.dataset.length), P = b(Le()), w = b(null), fe = b(null), ye = b(null), me = b(0), pe = b(0), be = b(0), qe = b(null), e = z({
103
- get: () => we(),
104
- set: (t) => t
105
- }), { svgRef: ge } = zt({ config: e.value.style.chart.title }), {
106
- userOptionsVisible: ne,
107
- setUserOptionsVisibility: ke,
108
- keepUserOptionState: xe
109
- } = Ct({ config: e.value });
110
- function we() {
111
- const t = He({
112
- userConfig: p.config,
113
- defaultConfig: J
114
- });
115
- return t.theme ? {
116
- ...He({
117
- userConfig: dt.vue_ui_circle_pack[t.theme] || p.config,
118
- defaultConfig: t
119
- }),
120
- customPalette: de[t.theme] || oe
121
- } : t;
122
- }
123
- Re(() => p.config, (t) => {
124
- e.value = we(), ne.value = !e.value.userOptions.showOnChartHover, re(), me.value += 1, pe.value += 1, H.value.showTable = e.value.table.show;
125
- }, { deep: !0 });
126
- const { isPrinting: Ce, isImaging: ze, generatePdf: _e, generateImage: $e } = wt({
127
- elementId: `vue-ui-circle-pack_${P.value}`,
128
- fileName: e.value.style.chart.title.text || "vue-ui-circle-pack",
129
- options: e.value.userOptions.print
130
- }), Xe = z(() => e.value.userOptions.show && !e.value.style.chart.title.text), H = b({
131
- showTable: e.value.table.show
132
- }), S = Ee(null), E = Ee(null), M = b({ h: 10, w: 10 }), Te = b(0), A = b([0, 0, 100, 100]), K = b({ h: 0, w: 0 });
133
- async function re() {
134
- ht(p.dataset) && ft({
135
- componentName: "VueUiCirclePack",
136
- type: "dataset"
137
- }), D.value = await je(Q.value), O.value = Ue(D.value, 1).join(" "), K.value = Pe(w.value);
138
- const t = _t(() => {
139
- const { width: s, height: l, heightTitle: h, heightNoTitle: C } = $t({
140
- chart: w.value,
141
- title: fe.value,
142
- noTitle: ye.value
143
- }), R = s || 10, ve = l && l > 10 ? l : 10;
144
- Te.value = e.value.style.chart.title.text ? h : C, requestAnimationFrame(() => {
145
- M.value.w = R, M.value.h = ve - Te.value, De(async () => {
146
- const tt = Q.value.map((lt) => ({ ...lt }));
147
- D.value = await je(tt, M.value.h, M.value.w), A.value = Ue(D.value, 1), O.value = A.value.join(" "), K.value = Pe(w.value);
148
- });
149
- });
150
- });
151
- S.value && (E.value && S.value.unobserve(E.value), S.value.disconnect()), S.value = new ResizeObserver(t), E.value = w.value.parentNode, S.value.observe(E.value);
152
- }
153
- ot(re), st(() => {
154
- S.value && (E.value && S.value.unobserve(E.value), S.value.disconnect());
155
- });
156
- function Pe(t) {
157
- if (!t || !t.parentElement)
158
- return console.warn("Component or parent element is missing."), { w: 0, h: 0 };
159
- const s = t.parentElement;
160
- if (s.offsetWidth > 0 && s.offsetHeight > 0)
161
- return { w: s.offsetWidth, h: s.offsetHeight };
162
- const l = window.getComputedStyle(s), h = l.width, C = l.height;
163
- return h !== "auto" && C !== "auto" && parseFloat(h) > 0 && parseFloat(C) > 0 ? { w: parseFloat(h), h: parseFloat(C) } : { w: 0, h: 0 };
164
- }
165
- Re(() => p.dataset, async (t) => {
166
- await re();
167
- }, { deep: !0 });
168
- const Ye = z(() => yt(e.value.customPalette)), Q = z(() => p.dataset.map((t, s) => {
169
- const l = mt(t.color) || Ye.value[s] || de[e.value.theme || "default"][s % de[e.value.theme || "default"].length] || oe[s] || oe[s % oe.length];
170
- return {
171
- ...t,
172
- r: t.value,
173
- id: Le(),
174
- color: l
175
- };
176
- }).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), D = b([]), O = b("0 0 100 100"), U = z(() => Math.max(...D.value.map((t) => t.r)));
177
- function Se(t, s) {
178
- return s / U.value * t;
179
- }
180
- const d = b(null);
181
- function Ze(t) {
182
- e.value.style.chart.circles.zoom.show && (d.value = t);
183
- }
184
- const L = z(() => d.value ? d.value.r : 0), ue = z(() => F.value ? L.value : d.value ? d.value.r > A.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio ? d.value.r : A.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), I = b(0), Je = z(() => ({
185
- pointerEvents: "none",
186
- opacity: I.value,
187
- filter: `drop-shadow(0px 0px 6px ${Ve(d.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
188
- })), j = b(L.value);
189
- nt(() => {
190
- j.value = L.value, I.value = 0;
191
- let t = null;
192
- function s(l) {
193
- t || (t = l);
194
- const h = (l - t) / e.value.style.chart.circles.zoom.animationFrameMs;
195
- h < 1 ? (j.value = L.value + (ue.value - L.value) * h, I.value = 0 + e.value.style.chart.circles.zoom.opacity * h, requestAnimationFrame(s)) : (j.value = ue.value, I.value = e.value.style.chart.circles.zoom.opacity);
196
- }
197
- requestAnimationFrame(s);
198
- });
199
- const G = z(() => ({
200
- name: e.value.style.chart.circles.zoom.label.name.fontSize * A.value[3] / 300,
201
- value: e.value.style.chart.circles.zoom.label.value.fontSize * A.value[3] / 300
202
- }));
203
- function ie(t) {
204
- return Be(
205
- e.value.style.chart.circles.labels.value.formatter,
206
- t.value,
207
- he({
208
- p: e.value.style.chart.circles.labels.value.prefix,
209
- v: t.value,
210
- s: e.value.style.chart.circles.labels.value.suffix,
211
- r: e.value.style.chart.circles.labels.value.rounding
212
- })
213
- );
214
- }
215
- function Ke() {
216
- return Be(
217
- e.value.style.chart.circles.zoom.label.value.formatter,
218
- d.value.value,
219
- he({
220
- p: e.value.style.chart.circles.zoom.label.value.prefix,
221
- v: d.value.value,
222
- s: e.value.style.chart.circles.zoom.label.value.suffix,
223
- r: e.value.style.chart.circles.zoom.label.value.rounding
224
- })
225
- );
226
- }
227
- function Oe(t) {
228
- if (!t)
229
- return 0;
230
- const s = t.r / ie(t).length * (ie(t).length === 1 ? 1 : 2);
231
- return Math.min(t.r / 2.5, s);
232
- }
233
- const W = b(!1);
234
- function Ie(t) {
235
- W.value = t, be.value += 1;
236
- }
237
- const F = b(!1);
238
- function ce() {
239
- F.value = !F.value;
240
- }
241
- const ee = z(() => {
242
- const t = Q.value.map((l) => ({
243
- name: l.name,
244
- value: l.value,
245
- color: l.color
246
- })).toSorted((l, h) => h.value - l.value), s = t.map((l) => l.value);
247
- return { head: t, body: s };
248
- });
249
- function Fe(t = null) {
250
- De(() => {
251
- const s = ee.value.head.map((C, R) => [[
252
- C.name
253
- ], [ee.value.body[R]]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(s), h = kt(l);
254
- t ? t(h) : xt({ csvContent: h, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
255
- });
256
- }
257
- const te = z(() => {
258
- const t = [
259
- e.value.table.columnNames.datapoint,
260
- e.value.table.columnNames.value
261
- ], s = ee.value.head.map((C, R) => {
262
- const ve = he({
263
- p: e.value.style.chart.circles.labels.value.prefix,
264
- v: ee.value.body[R],
265
- s: e.value.style.chart.circles.labels.value.suffix,
266
- r: e.value.style.chart.circles.labels.value.rounding
267
- });
268
- return [
269
- {
270
- color: C.color,
271
- name: C.name
272
- },
273
- ve
274
- ];
275
- }), l = {
276
- th: {
277
- backgroundColor: e.value.table.th.backgroundColor,
278
- color: e.value.table.th.color,
279
- outline: e.value.table.th.outline
280
- },
281
- td: {
282
- backgroundColor: e.value.table.td.backgroundColor,
283
- color: e.value.table.td.color,
284
- outline: e.value.table.td.outline
285
- },
286
- breakpoint: e.value.table.responsiveBreakpoint
287
- };
288
- return {
289
- colNames: [
290
- e.value.table.columnNames.datapoint,
291
- e.value.table.columnNames.value
292
- ],
293
- head: t,
294
- body: s,
295
- config: l
296
- };
297
- });
298
- function Ne() {
299
- H.value.showTable = !H.value.showTable;
300
- }
301
- function Qe() {
302
- return Q.value;
303
- }
304
- async function et({ scale: t = 2 } = {}) {
305
- if (!w.value) return;
306
- const { width: s, height: l } = w.value.getBoundingClientRect(), h = s / l, { imageUri: C, base64: R } = await Pt({ domElement: w.value, base64: !0, img: !0, scale: t });
307
- return {
308
- imageUri: C,
309
- base64: R,
310
- title: e.value.style.chart.title.text,
311
- width: s,
312
- height: l,
313
- aspectRatio: h
314
- };
315
- }
316
- return i({
317
- getData: Qe,
318
- getImage: et,
319
- generateCsv: Fe,
320
- generatePdf: _e,
321
- generateImage: $e,
322
- toggleTable: Ne,
323
- toggleAnnotator: ce,
324
- toggleFullscreen: Ie
325
- }), (t, s) => (y(), g("div", {
326
- id: `vue-ui-circle-pack_${P.value}`,
327
- class: Me(`vue-ui-circle-pack ${W.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
328
- ref_key: "circlePackChart",
329
- ref: w,
330
- style: le(`font-family:${e.value.style.fontFamily};text-align:center;background:${e.value.style.chart.backgroundColor}; height: ${K.value.h}px; width:${K.value.w}px`),
331
- onMouseenter: s[2] || (s[2] = () => u(ke)(!0)),
332
- onMouseleave: s[3] || (s[3] = () => u(ke)(!1))
333
- }, [
334
- e.value.userOptions.buttons.annotator ? (y(), B(u(a), {
335
- key: 0,
336
- svgRef: u(ge),
337
- backgroundColor: e.value.style.chart.backgroundColor,
338
- color: e.value.style.chart.color,
339
- active: F.value,
340
- scale: U.value / 100,
341
- onClose: ce
342
- }, null, 8, ["svgRef", "backgroundColor", "color", "active", "scale"])) : k("", !0),
343
- x(t.$slots, "userConfig", {}, void 0, !0),
344
- Xe.value ? (y(), g("div", {
345
- key: 1,
346
- ref_key: "noTitle",
347
- ref: ye,
348
- class: "vue-data-ui-no-title-space",
349
- style: "height:36px; width: 100%;background:transparent"
350
- }, null, 512)) : k("", !0),
351
- e.value.style.chart.title.text ? (y(), g("div", {
352
- key: 2,
353
- ref_key: "chartTitle",
354
- ref: fe,
355
- style: "width:100%;background:transparent;padding-bottom:12px"
356
- }, [
357
- (y(), B(Tt, {
358
- key: `title_${me.value}`,
359
- config: {
360
- title: {
361
- cy: "donut-div-title",
362
- ...e.value.style.chart.title
363
- },
364
- subtitle: {
365
- cy: "donut-div-subtitle",
366
- ...e.value.style.chart.title.subtitle
367
- }
368
- }
369
- }, null, 8, ["config"]))
370
- ], 512)) : k("", !0),
371
- e.value.userOptions.show && N.value && (u(xe) || u(ne)) ? (y(), B(u(v), {
372
- ref: "details",
373
- key: `user_option_${be.value}`,
374
- backgroundColor: e.value.style.chart.backgroundColor,
375
- color: e.value.style.chart.color,
376
- isPrinting: u(Ce),
377
- isImaging: u(ze),
378
- uid: P.value,
379
- hasTooltip: !1,
380
- hasLabel: !1,
381
- hasPdf: e.value.userOptions.buttons.pdf,
382
- hasImg: e.value.userOptions.buttons.img,
383
- hasXls: e.value.userOptions.buttons.csv,
384
- hasTable: e.value.userOptions.buttons.table,
385
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
386
- isFullscreen: W.value,
387
- chartElement: w.value,
388
- position: e.value.userOptions.position,
389
- callbacks: e.value.userOptions.callbacks,
390
- printScale: e.value.userOptions.print.scale,
391
- titles: { ...e.value.userOptions.buttonTitles },
392
- hasAnnotator: e.value.userOptions.buttons.annotator,
393
- isAnnotation: F.value,
394
- onToggleFullscreen: Ie,
395
- onGeneratePdf: u(_e),
396
- onGenerateCsv: Fe,
397
- onGenerateImage: u($e),
398
- onToggleTable: Ne,
399
- onToggleAnnotator: ce,
400
- style: le({
401
- visibility: u(xe) ? u(ne) ? "visible" : "hidden" : "visible"
402
- })
403
- }, rt({ _: 2 }, [
404
- t.$slots.menuIcon ? {
405
- name: "menuIcon",
406
- fn: $(({ isOpen: l, color: h }) => [
407
- x(t.$slots, "menuIcon", q(X({ isOpen: l, color: h })), void 0, !0)
408
- ]),
409
- key: "0"
410
- } : void 0,
411
- t.$slots.optionPdf ? {
412
- name: "optionPdf",
413
- fn: $(() => [
414
- x(t.$slots, "optionPdf", {}, void 0, !0)
415
- ]),
416
- key: "1"
417
- } : void 0,
418
- t.$slots.optionCsv ? {
419
- name: "optionCsv",
420
- fn: $(() => [
421
- x(t.$slots, "optionCsv", {}, void 0, !0)
422
- ]),
423
- key: "2"
424
- } : void 0,
425
- t.$slots.optionImg ? {
426
- name: "optionImg",
427
- fn: $(() => [
428
- x(t.$slots, "optionImg", {}, void 0, !0)
429
- ]),
430
- key: "3"
431
- } : void 0,
432
- t.$slots.optionTable ? {
433
- name: "optionTable",
434
- fn: $(() => [
435
- x(t.$slots, "optionTable", {}, void 0, !0)
436
- ]),
437
- key: "4"
438
- } : void 0,
439
- t.$slots.optionFullscreen ? {
440
- name: "optionFullscreen",
441
- fn: $(({ toggleFullscreen: l, isFullscreen: h }) => [
442
- x(t.$slots, "optionFullscreen", q(X({ toggleFullscreen: l, isFullscreen: h })), void 0, !0)
443
- ]),
444
- key: "5"
445
- } : void 0,
446
- t.$slots.optionAnnotator ? {
447
- name: "optionAnnotator",
448
- fn: $(({ toggleAnnotator: l, isAnnotator: h }) => [
449
- x(t.$slots, "optionAnnotator", q(X({ toggleAnnotator: l, isAnnotator: h })), void 0, !0)
450
- ]),
451
- key: "6"
452
- } : void 0
453
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "printScale", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : k("", !0),
454
- N.value ? (y(), g("svg", {
455
- key: 4,
456
- ref_key: "svgRef",
457
- ref: ge,
458
- xmlns: u(pt),
459
- viewBox: O.value,
460
- height: M.value.h,
461
- width: M.value.w,
462
- class: Me({ "vue-data-ui-fullscreen--on": W.value, "vue-data-ui-fulscreen--off": !W.value }),
463
- style: le(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};background:${e.value.style.chart.backgroundColor};`)
464
- }, [
465
- ut(u(o)),
466
- t.$slots["chart-background"] ? (y(), g("foreignObject", {
467
- key: 0,
468
- x: O.value.x,
469
- y: O.value.y,
470
- width: O.value.width,
471
- height: O.value.height,
472
- style: {
473
- pointerEvents: "none"
474
- }
475
- }, [
476
- x(t.$slots, "chart-background", {}, void 0, !0)
477
- ], 8, Nt)) : k("", !0),
478
- (y(!0), g(ae, null, it(D.value, (l) => (y(), g(ae, null, [
479
- _("defs", null, [
480
- _("radialGradient", {
481
- id: l.id,
482
- fy: "30%"
483
- }, [
484
- _("stop", {
485
- offset: "10%",
486
- "stop-color": u(bt)(l.color, e.value.style.chart.circles.gradient.intensity / 100)
487
- }, null, 8, Et),
488
- _("stop", {
489
- offset: "90%",
490
- "stop-color": u(Ve)(l.color, 0.1)
491
- }, null, 8, Mt),
492
- _("stop", {
493
- offset: "100%",
494
- "stop-color": l.color
495
- }, null, 8, At)
496
- ], 8, Rt)
497
- ]),
498
- t.$slots.pattern ? (y(), g("g", Dt, [
499
- _("defs", null, [
500
- x(t.$slots, "pattern", Ae({ ref_for: !0 }, { ...l, patternId: `pattern_${P.value}_${l.id}` }), void 0, !0)
501
- ])
502
- ])) : k("", !0),
503
- _("rect", {
504
- x: l.x - l.r,
505
- y: l.y - l.r,
506
- width: l.r * 2,
507
- height: l.r * 2,
508
- stroke: e.value.style.chart.circles.stroke,
509
- "stroke-width": e.value.style.chart.circles.strokeWidth * U.value / 100,
510
- fill: e.value.style.chart.circles.gradient.show ? `url(#${l.id})` : l.color,
511
- rx: l.r,
512
- onMouseenter: () => Ze(l),
513
- onMouseout: s[0] || (s[0] = (h) => d.value = null),
514
- onClick: (h) => T("selectDatapoint", l)
515
- }, null, 40, Lt),
516
- t.$slots.pattern ? (y(), g("rect", {
517
- key: 1,
518
- x: l.x - l.r,
519
- y: l.y - l.r,
520
- width: l.r * 2,
521
- height: l.r * 2,
522
- stroke: e.value.style.chart.circles.stroke,
523
- "stroke-width": e.value.style.chart.circles.strokeWidth * U.value / 100,
524
- fill: `url(#pattern_${P.value}_${l.id})`,
525
- rx: l.r,
526
- style: {
527
- pointerEvents: "none"
528
- }
529
- }, null, 8, Vt)) : k("", !0),
530
- t.$slots["data-label"] ? x(t.$slots, "data-label", Ae({
531
- key: 2,
532
- ref_for: !0
533
- }, { ...l, createTSpans: u(gt), fontSize: { name: l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio, value: Oe(l) * 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 : u(Z)(l.color) }), void 0, !0) : (y(), g(ae, { key: 3 }, [
534
- e.value.style.chart.circles.labels.name.show && l.name ? (y(), g("text", {
535
- key: 0,
536
- style: {
537
- pointerEvents: "none",
538
- transition: "opacity 0.2s ease-in-out"
539
- },
540
- opacity: d.value && !F.value ? 0.2 : 1,
541
- x: l.x,
542
- y: l.y + Se(l.r, e.value.style.chart.circles.labels.name.offsetY) - l.r / 10,
543
- "font-size": l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio,
544
- fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : u(Z)(l.color),
545
- "font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
546
- "text-anchor": "middle"
547
- }, Y(l.name), 9, Bt)) : k("", !0),
548
- e.value.style.chart.circles.labels.value.show ? (y(), g("text", {
549
- key: 1,
550
- style: {
551
- pointerEvents: "none",
552
- transition: "opacity 0.2s ease-in-out"
553
- },
554
- opacity: d.value && !F.value ? 0.2 : 1,
555
- x: l.x,
556
- y: l.y + Se(l.r, e.value.style.chart.circles.labels.value.offsetY) + l.r / 2.5,
557
- "font-size": Oe(l) * e.value.style.chart.circles.labels.value.fontSizeRatio,
558
- fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : u(Z)(l.color),
559
- "font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
560
- "text-anchor": "middle"
561
- }, Y(ie(l)), 9, Ht)) : k("", !0)
562
- ], 64))
563
- ], 64))), 256)),
564
- d.value && e.value.style.chart.circles.zoom.show && !F.value ? (y(), g(ae, { key: 1 }, [
565
- _("circle", {
566
- style: le(Je.value),
567
- cx: d.value.x,
568
- cy: d.value.y,
569
- r: j.value,
570
- opacity: I.value,
571
- stroke: e.value.style.chart.circles.stroke,
572
- "stroke-width": e.value.style.chart.circles.strokeWidth * U.value / 100,
573
- fill: e.value.style.chart.circles.gradient.show ? `url(#${d.value.id})` : d.value.color
574
- }, null, 12, Ut),
575
- t.$slots["zoom-label"] ? (y(), g("g", jt, [
576
- x(t.$slots, "zoom-label", q(X({ ...d.value, zoomOpacity: I.value, currentRadius: j.value, fontSize: G.value })), void 0, !0)
577
- ])) : (y(), g("g", Gt, [
578
- _("text", {
579
- style: {
580
- pointerEvents: "none"
581
- },
582
- opacity: I.value,
583
- x: d.value.x,
584
- y: d.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - G.value.name / 4,
585
- "text-anchor": "middle",
586
- "font-size": G.value.name,
587
- fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : u(Z)(d.value.color),
588
- "font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
589
- }, Y(d.value.name), 9, Wt),
590
- _("text", {
591
- style: {
592
- pointerEvents: "none"
593
- },
594
- opacity: I.value,
595
- x: d.value.x,
596
- y: d.value.y + G.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
597
- "text-anchor": "middle",
598
- "font-size": G.value.value,
599
- fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : u(Z)(d.value.color),
600
- "font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
601
- }, Y(Ke()), 9, qt)
602
- ]))
603
- ], 64)) : k("", !0),
604
- x(t.$slots, "svg", {
605
- svg: { ...O.value }
606
- }, void 0, !0)
607
- ], 14, Ft)) : k("", !0),
608
- N.value ? k("", !0) : (y(), B(u(n), {
609
- key: 5,
610
- config: {
611
- type: "circlePack",
612
- style: {
613
- color: "#CCCCCC"
614
- }
615
- }
616
- })),
617
- t.$slots.watermark ? (y(), g("div", Xt, [
618
- x(t.$slots, "watermark", q(X({ isPrinting: u(Ce) || u(ze) })), void 0, !0)
619
- ])) : k("", !0),
620
- t.$slots.source ? (y(), g("div", {
621
- key: 7,
622
- ref_key: "source",
623
- ref: qe,
624
- dir: "auto"
625
- }, [
626
- x(t.$slots, "source", {}, void 0, !0)
627
- ], 512)) : k("", !0),
628
- N.value ? (y(), B(u(m), {
629
- key: 8,
630
- hideDetails: "",
631
- config: {
632
- open: H.value.showTable,
633
- maxHeight: 1e4,
634
- body: {
635
- backgroundColor: e.value.style.chart.backgroundColor,
636
- color: e.value.style.chart.color
637
- },
638
- head: {
639
- backgroundColor: e.value.style.chart.backgroundColor,
640
- color: e.value.style.chart.color
641
- }
642
- }
643
- }, {
644
- content: $(() => [
645
- (y(), B(u(c), {
646
- key: `table_${pe.value}`,
647
- colNames: te.value.colNames,
648
- head: te.value.head,
649
- body: te.value.body,
650
- config: te.value.config,
651
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
652
- onClose: s[1] || (s[1] = (l) => H.value.showTable = !1)
653
- }, {
654
- th: $(({ th: l }) => [
655
- _("div", {
656
- innerHTML: l,
657
- style: { display: "flex", "align-items": "center" }
658
- }, null, 8, Yt)
659
- ]),
660
- td: $(({ td: l }) => [
661
- ct(Y(l.name || l), 1)
662
- ]),
663
- _: 1
664
- }, 8, ["colNames", "head", "body", "config", "title"]))
665
- ]),
666
- _: 1
667
- }, 8, ["config"])) : k("", !0)
668
- ], 46, It));
669
- }
670
- }, rl = /* @__PURE__ */ St(Zt, [["__scopeId", "data-v-49649767"]]);
671
- export {
672
- rl as default
673
- };