vue-data-ui 2.12.5 → 2.12.7-beta.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 (112) hide show
  1. package/README.md +56 -1
  2. package/dist/{Arrow-CD7YT-M0.js → Arrow-CmqjRRUl.js} +1 -1
  3. package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
  4. package/dist/{BaseIcon-CgSWwnK7.js → BaseIcon-CZdMutjs.js} +1 -1
  5. package/dist/{ColorPicker-w8R8Tqdv.js → ColorPicker-DvVKgyAl.js} +23 -24
  6. package/dist/{DataTable-CicthvOV.js → DataTable-Cv9CIz-a.js} +11 -11
  7. package/dist/{Legend-0UY0Mmli.js → Legend-DFunFf8i.js} +8 -8
  8. package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
  9. package/dist/PackageVersion-CLY-udAA.js +10 -0
  10. package/dist/{PenAndPaper-DLsvRwoD.js → PenAndPaper-B9na2mbr.js} +8 -10
  11. package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
  12. package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
  13. package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
  14. package/dist/{Shape-DICeBEtN.js → Shape-D3w9qas1.js} +2 -2
  15. package/dist/{Slicer-D1nsbsWE.js → Slicer-ncY8krrM.js} +2 -2
  16. package/dist/SparkTooltip-CwThutH2.js +68 -0
  17. package/dist/{Title-xO1jFsSw.js → Title-B5qqUI3M.js} +2 -2
  18. package/dist/Tooltip-C9rxJ-Ru.js +149 -0
  19. package/dist/{usePrinter-CcgJXHIK.js → UserOptions-Ddy6CuLC.js} +172 -231
  20. package/dist/{dom-to-png-CS4NRYd_.js → dom-to-png-DDlooC9r.js} +1 -1
  21. package/dist/{img-CsXjm5I4.js → img-m9g7lR5d.js} +1 -1
  22. package/dist/{index-vjCxtaM0.js → index-BiHmNd1-.js} +153 -118
  23. package/dist/{pdf-DHexTTpK.js → pdf-BqM953uL.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +96 -2
  26. package/dist/types/vue-data-ui.d.ts +96 -2
  27. package/dist/useChartAccessibility-9icAAmYg.js +12 -0
  28. package/dist/useMouse-AicQS8Vf.js +13 -0
  29. package/dist/{useNestedProp-Du1hnYFA.js → useNestedProp-tRqS0ZAM.js} +1 -1
  30. package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
  31. package/dist/usePrinter-CRCbl1WG.js +53 -0
  32. package/dist/vClickOutside-C6WiFswA.js +13 -0
  33. package/dist/{vue-data-ui-BOrA3Tc9.js → vue-data-ui-D9uTDt73.js} +63 -63
  34. package/dist/vue-data-ui.js +42 -40
  35. package/dist/{vue-ui-3d-bar-Z8yAd4bw.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
  36. package/dist/{vue-ui-accordion-CAN430Oy.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
  37. package/dist/{vue-ui-age-pyramid-C6PZU9Ez.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
  38. package/dist/{vue-ui-annotator-CqoDLx3t.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
  39. package/dist/{vue-ui-bullet-DZC3aY3d.js → vue-ui-bullet-D25qNQfb.js} +137 -140
  40. package/dist/{vue-ui-candlestick-B5mq_lgW.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
  41. package/dist/{vue-ui-carousel-table-CBwerU49.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
  42. package/dist/{vue-ui-chestnut-COyOAY28.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
  43. package/dist/{vue-ui-chord-Cw0F_jHM.js → vue-ui-chord-C4evlXYB.js} +356 -365
  44. package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
  45. package/dist/{vue-ui-cursor-CWXqmlVy.js → vue-ui-cursor-DgpSttlt.js} +2 -2
  46. package/dist/{vue-ui-dashboard-Ba2tF4md.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
  47. package/dist/{vue-ui-digits-BV7yyUdY.js → vue-ui-digits-BhjAxXgm.js} +2 -2
  48. package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
  49. package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
  50. package/dist/{vue-ui-dumbbell-SDCcLJIc.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
  51. package/dist/{vue-ui-flow-CrqGSDNK.js → vue-ui-flow-BVRkH0PS.js} +291 -300
  52. package/dist/{vue-ui-funnel-CcDOoxp8.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
  53. package/dist/{vue-ui-galaxy-jlDp0DRJ.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
  54. package/dist/{vue-ui-gauge-8t8rWb1C.js → vue-ui-gauge-B48eMvOR.js} +240 -243
  55. package/dist/{vue-ui-gizmo-CFwdrMYP.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
  56. package/dist/{vue-ui-heatmap-BT-mIeZp.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
  57. package/dist/{vue-ui-history-plot-crLloc7J.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
  58. package/dist/{vue-ui-kpi-96v4ZIYo.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
  59. package/dist/{vue-ui-mini-loader-rBHBxNIT.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
  60. package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
  61. package/dist/{vue-ui-mood-radar-DrVSXIY4.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
  62. package/dist/{vue-ui-nested-donuts-C9Ah9lgv.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
  63. package/dist/{vue-ui-onion-DwNPyn4X.js → vue-ui-onion-P8k6T724.js} +252 -258
  64. package/dist/{vue-ui-parallel-coordinate-plot-tSuK6xWu.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
  65. package/dist/{vue-ui-quadrant-C0Kaoo7K.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
  66. package/dist/{vue-ui-quick-chart-xMh_Ygct.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
  67. package/dist/{vue-ui-radar-C1jSDQt_.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
  68. package/dist/{vue-ui-rating-6Kb7hsKF.js → vue-ui-rating-gryk_h_6.js} +2 -2
  69. package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
  70. package/dist/{vue-ui-ridgeline-BBvPVQjC.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
  71. package/dist/{vue-ui-rings-B92cXv7f.js → vue-ui-rings-BRBXektJ.js} +262 -269
  72. package/dist/{vue-ui-scatter-Bt1aty87.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
  73. package/dist/{vue-ui-skeleton-DfOIDTJM.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
  74. package/dist/{vue-ui-smiley-sVgBnkbx.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
  75. package/dist/{vue-ui-spark-trend-D6uzJ4Qd.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
  76. package/dist/{vue-ui-sparkbar-D4c2EE7J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
  77. package/dist/{vue-ui-sparkgauge-DaQ6iz98.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
  78. package/dist/{vue-ui-sparkhistogram-D_YnmM2T.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
  79. package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
  80. package/dist/{vue-ui-sparkstackbar-DecnmqgJ.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
  81. package/dist/{vue-ui-stackbar-D1eNs1j_.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
  82. package/dist/{vue-ui-strip-plot-iPZ8Hhmr.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
  83. package/dist/{vue-ui-table-BFjE28sw.js → vue-ui-table-DBaT_TfA.js} +3 -3
  84. package/dist/{vue-ui-table-heatmap-DipFDu39.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
  85. package/dist/{vue-ui-table-sparkline-CGAecOZh.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
  86. package/dist/{vue-ui-thermometer-Cx_yr-hs.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
  87. package/dist/{vue-ui-timer-ClVmS8MH.js → vue-ui-timer-D9FfRWN5.js} +180 -181
  88. package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
  89. package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
  90. package/dist/{vue-ui-vertical-bar-BHYCnFEN.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
  91. package/dist/{vue-ui-waffle-DEPUbrOt.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
  92. package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
  93. package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
  94. package/dist/{vue-ui-world-DStJ5i0i.js → vue-ui-world-CPIGEswq.js} +430 -442
  95. package/dist/{vue-ui-xy-CEop49z6.js → vue-ui-xy-9e_epIN4.js} +845 -846
  96. package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
  97. package/package.json +6 -6
  98. package/dist/BaseDraggableDialog-BjFEob7i.js +0 -186
  99. package/dist/PackageVersion-Cw2caN1c.js +0 -10
  100. package/dist/Tooltip-LKe8L-Mg.js +0 -158
  101. package/dist/useChartAccessibility-BWojgys7.js +0 -13
  102. package/dist/vue-ui-circle-pack-BtpaZLYs.js +0 -659
  103. package/dist/vue-ui-donut-CRdQFQgA.js +0 -1292
  104. package/dist/vue-ui-donut-evolution-De3-5OgR.js +0 -871
  105. package/dist/vue-ui-molecule-DSr_bHGG.js +0 -782
  106. package/dist/vue-ui-relation-circle-fh0Hl9m0.js +0 -528
  107. package/dist/vue-ui-sparkline-C2HuTMDz.js +0 -519
  108. package/dist/vue-ui-tiremarks-4Sa3RCSv.js +0 -344
  109. package/dist/vue-ui-treemap-CD5pPg7v.js +0 -956
  110. package/dist/vue-ui-wheel-qU0bgJsi.js +0 -338
  111. package/dist/vue-ui-word-cloud-z2ZguOdy.js +0 -648
  112. package/dist/vue-ui-xy-canvas-DV0BVdZb.js +0 -1673
@@ -0,0 +1,656 @@
1
+ import { useCssVars as lt, computed as w, defineAsyncComponent as L, ref as b, watch as Ne, shallowRef as Me, onMounted as at, onBeforeUnmount as ot, watchEffect as st, createElementBlock as g, openBlock as f, unref as u, normalizeStyle as te, normalizeClass as Ee, createBlock as V, createCommentVNode as k, renderSlot as x, createSlots as nt, withCtx as _, normalizeProps as q, guardReactiveProps as W, createVNode as rt, Fragment as le, renderList as ut, createElementVNode as C, mergeProps as Re, toDisplayString as X, createTextVNode as it, nextTick as Ae } from "vue";
2
+ import { u as ct, c as De, t as de, p as ae, a as vt, o as dt, e as ht, b as ft, d as yt, h as Le, f as he, X as mt, l as pt, G as Y, af as bt, q as gt, r as kt, i as Ve } from "./index-BiHmNd1-.js";
3
+ import { u as He } from "./useNestedProp-tRqS0ZAM.js";
4
+ import { u as xt } from "./usePrinter-CRCbl1WG.js";
5
+ import { u as wt } from "./useUserOptionState-BIvW1Kz7.js";
6
+ import { u as Ct } from "./useChartAccessibility-9icAAmYg.js";
7
+ import { t as zt, u as _t } from "./useResponsive-JZ9xq-JV.js";
8
+ import $t from "./Title-B5qqUI3M.js";
9
+ import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ function Be(r, i = 0) {
11
+ const h = r.reduce((a, { x: s, r: v }) => Math.min(a, s - v - i), 1 / 0), y = r.reduce((a, { x: s, r: v }) => Math.max(a, s + v + i), -1 / 0), c = r.reduce((a, { y: s, r: v }) => Math.min(a, s - v - i), 1 / 0), o = r.reduce((a, { y: s, r: v }) => Math.max(a, s + v + i), -1 / 0);
12
+ return [h, c, y - h, o - c];
13
+ }
14
+ function Pt(r, i, h) {
15
+ const y = r._, c = r.next._, o = y.r + c.r, a = (y.x * c.r + c.x * y.r) / o, s = (y.y * c.r + c.y * y.r) / o;
16
+ return Math.max(Math.abs(a * h), Math.abs(s * i));
17
+ }
18
+ function Ge(r, i, h) {
19
+ const y = Pt, c = r.length;
20
+ if (!c) return r;
21
+ let o, a, s;
22
+ 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;
23
+ Ue(a, o, s = r[2]), o = new oe(o), a = new oe(a), s = new oe(s), o.next = s.previous = a, a.next = o.previous = s, s.next = a.previous = o;
24
+ e: for (let v = 3; v < c; ++v) {
25
+ Ue(o._, a._, s = r[v]), s = new oe(s);
26
+ let p = a.next, T = o.previous, Z = a._.r, N = o._.r;
27
+ do
28
+ if (Z <= N) {
29
+ if (je(p._, s._)) {
30
+ a = p, o.next = a, a.previous = o, --v;
31
+ continue e;
32
+ }
33
+ Z += p._.r, p = p.next;
34
+ } else {
35
+ if (je(T._, s._)) {
36
+ o = T, o.next = a, a.previous = o, --v;
37
+ continue e;
38
+ }
39
+ N += T._.r, T = T.previous;
40
+ }
41
+ while (p !== T.next);
42
+ s.previous = o, s.next = a, o.next = a.previous = a = s;
43
+ let P = y(o, h, i), $;
44
+ for (; (s = s.next) !== a; )
45
+ ($ = y(s, h, i)) < P && (o = s, P = $);
46
+ a = o.next;
47
+ }
48
+ return r;
49
+ }
50
+ function Ue(r, i, h) {
51
+ const y = r.x - i.x, c = r.y - i.y, o = y * y + c * c;
52
+ if (o) {
53
+ const a = (i.r + h.r) ** 2, s = (r.r + h.r) ** 2;
54
+ if (a > s) {
55
+ const v = (o + s - a) / (2 * o), p = Math.sqrt(Math.max(0, s / o - v * v));
56
+ h.x = r.x - v * y - p * c, h.y = r.y - v * c + p * y;
57
+ } else {
58
+ const v = (o + a - s) / (2 * o), p = Math.sqrt(Math.max(0, a / o - v * v));
59
+ h.x = i.x + v * y - p * c, h.y = i.y + v * c + p * y;
60
+ }
61
+ } else
62
+ h.x = i.x + h.r, h.y = i.y;
63
+ }
64
+ function je(r, i) {
65
+ const h = r.r + i.r - 1e-6, y = i.x - r.x, c = i.y - r.y;
66
+ return h > 0 && h * h > y * y + c * c;
67
+ }
68
+ class oe {
69
+ constructor(i) {
70
+ this._ = i, this.next = null, this.previous = null;
71
+ }
72
+ }
73
+ const St = ["id"], It = ["xmlns", "viewBox", "height", "width"], Ot = ["x", "y", "width", "height"], Ft = ["id"], Nt = ["stop-color"], Mt = ["stop-color"], Et = ["stop-color"], Rt = { key: 0 }, At = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter", "onClick"], Dt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Lt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Vt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Ht = ["cx", "cy", "r", "opacity", "stroke", "stroke-width", "fill"], Bt = {
74
+ key: 0,
75
+ style: { pointerEvents: "none" }
76
+ }, Gt = { key: 1 }, Ut = ["opacity", "x", "y", "font-size", "fill", "font-weight"], jt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], qt = {
77
+ key: 6,
78
+ class: "vue-data-ui-watermark"
79
+ }, Wt = ["innerHTML"], Xt = {
80
+ __name: "vue-ui-circle-pack",
81
+ props: {
82
+ config: {
83
+ type: Object,
84
+ default() {
85
+ return {};
86
+ }
87
+ },
88
+ dataset: {
89
+ type: Array,
90
+ default() {
91
+ return [];
92
+ }
93
+ }
94
+ },
95
+ emits: ["selectDatapoint"],
96
+ setup(r, { expose: i, emit: h }) {
97
+ lt((t) => ({
98
+ f5f64da8: D.value,
99
+ "76ae4825": re.value
100
+ }));
101
+ const y = L(() => import("./vue-ui-accordion-CmCs2yR2.js")), c = L(() => import("./DataTable-Cv9CIz-a.js")), o = L(() => import("./PackageVersion-CLY-udAA.js")), a = L(() => import("./PenAndPaper-B9na2mbr.js")), s = L(() => import("./vue-ui-skeleton-CbYQYRvD.js")), v = L(() => import("./UserOptions-Ddy6CuLC.js")), p = r, T = h, { vue_ui_circle_pack: Z } = ct(), N = w(() => !!p.dataset && p.dataset.length), P = b(De()), $ = b(null), fe = b(null), ye = b(null), me = b(0), pe = b(0), be = b(0), qe = b(null), e = w({
102
+ get: () => we(),
103
+ set: (t) => t
104
+ }), { svgRef: ge } = Ct({ config: e.value.style.chart.title }), {
105
+ userOptionsVisible: se,
106
+ setUserOptionsVisibility: ke,
107
+ keepUserOptionState: xe
108
+ } = wt({ config: e.value });
109
+ function we() {
110
+ const t = He({
111
+ userConfig: p.config,
112
+ defaultConfig: Z
113
+ });
114
+ return t.theme ? {
115
+ ...He({
116
+ userConfig: vt.vue_ui_circle_pack[t.theme] || p.config,
117
+ defaultConfig: t
118
+ }),
119
+ customPalette: de[t.theme] || ae
120
+ } : t;
121
+ }
122
+ Ne(() => p.config, (t) => {
123
+ e.value = we(), se.value = !e.value.userOptions.showOnChartHover, ne(), me.value += 1, pe.value += 1, H.value.showTable = e.value.table.show;
124
+ }, { deep: !0 });
125
+ const { isPrinting: Ce, isImaging: ze, generatePdf: _e, generateImage: $e } = xt({
126
+ elementId: `vue-ui-circle-pack_${P.value}`,
127
+ fileName: e.value.style.chart.title.text || "vue-ui-circle-pack",
128
+ options: e.value.userOptions.print
129
+ }), We = w(() => e.value.userOptions.show && !e.value.style.chart.title.text), H = b({
130
+ showTable: e.value.table.show
131
+ }), S = Me(null), M = Me(null), E = b({ h: 10, w: 10 }), Te = b(0), R = b([0, 0, 100, 100]), J = b({ h: 0, w: 0 });
132
+ async function ne() {
133
+ dt(p.dataset) && ht({
134
+ componentName: "VueUiCirclePack",
135
+ type: "dataset"
136
+ }), A.value = await Ge(K.value), I.value = Be(A.value, 1).join(" "), J.value = Pe($.value);
137
+ const t = zt(() => {
138
+ const { width: n, height: l, heightTitle: m, heightNoTitle: z } = _t({
139
+ chart: $.value,
140
+ title: fe.value,
141
+ noTitle: ye.value
142
+ }), ce = n || 10, ve = l && l > 10 ? l : 10;
143
+ Te.value = e.value.style.chart.title.text ? m : z, requestAnimationFrame(() => {
144
+ E.value.w = ce, E.value.h = ve - Te.value, Ae(async () => {
145
+ const et = K.value.map((tt) => ({ ...tt }));
146
+ A.value = await Ge(et, E.value.h, E.value.w), R.value = Be(A.value, 1), I.value = R.value.join(" "), J.value = Pe($.value);
147
+ });
148
+ });
149
+ });
150
+ S.value && (M.value && S.value.unobserve(M.value), S.value.disconnect()), S.value = new ResizeObserver(t), M.value = $.value.parentNode, S.value.observe(M.value);
151
+ }
152
+ at(ne), ot(() => {
153
+ S.value && (M.value && S.value.unobserve(M.value), S.value.disconnect());
154
+ });
155
+ function Pe(t) {
156
+ if (!t || !t.parentElement)
157
+ return console.warn("Component or parent element is missing."), { w: 0, h: 0 };
158
+ const n = t.parentElement;
159
+ if (n.offsetWidth > 0 && n.offsetHeight > 0)
160
+ return { w: n.offsetWidth, h: n.offsetHeight };
161
+ const l = window.getComputedStyle(n), m = l.width, z = l.height;
162
+ return m !== "auto" && z !== "auto" && parseFloat(m) > 0 && parseFloat(z) > 0 ? { w: parseFloat(m), h: parseFloat(z) } : { w: 0, h: 0 };
163
+ }
164
+ Ne(() => p.dataset, async (t) => {
165
+ await ne();
166
+ }, { deep: !0 });
167
+ const Xe = w(() => ft(e.value.customPalette)), K = w(() => p.dataset.map((t, n) => {
168
+ const l = yt(t.color) || Xe.value[n] || de[e.value.theme || "default"][n % de[e.value.theme || "default"].length] || ae[n] || ae[n % ae.length];
169
+ return {
170
+ ...t,
171
+ r: t.value,
172
+ id: De(),
173
+ color: l
174
+ };
175
+ }).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), A = b([]), I = b("0 0 100 100"), B = w(() => Math.max(...A.value.map((t) => t.r)));
176
+ function Se(t, n) {
177
+ return n / B.value * t;
178
+ }
179
+ const d = b(null);
180
+ function Ye(t) {
181
+ e.value.style.chart.circles.zoom.show && (d.value = t);
182
+ }
183
+ const D = w(() => d.value ? d.value.r : 0), re = w(() => F.value ? D.value : d.value ? d.value.r > R.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio ? d.value.r : R.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), O = b(0), Ze = w(() => ({
184
+ pointerEvents: "none",
185
+ opacity: O.value,
186
+ filter: `drop-shadow(0px 0px 6px ${Le(d.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
187
+ })), G = b(D.value);
188
+ st(() => {
189
+ G.value = D.value, O.value = 0;
190
+ let t = null;
191
+ function n(l) {
192
+ t || (t = l);
193
+ const m = (l - t) / e.value.style.chart.circles.zoom.animationFrameMs;
194
+ m < 1 ? (G.value = D.value + (re.value - D.value) * m, O.value = 0 + e.value.style.chart.circles.zoom.opacity * m, requestAnimationFrame(n)) : (G.value = re.value, O.value = e.value.style.chart.circles.zoom.opacity);
195
+ }
196
+ requestAnimationFrame(n);
197
+ });
198
+ const U = w(() => ({
199
+ name: e.value.style.chart.circles.zoom.label.name.fontSize * R.value[3] / 300,
200
+ value: e.value.style.chart.circles.zoom.label.value.fontSize * R.value[3] / 300
201
+ }));
202
+ function ue(t) {
203
+ return Ve(
204
+ e.value.style.chart.circles.labels.value.formatter,
205
+ t.value,
206
+ he({
207
+ p: e.value.style.chart.circles.labels.value.prefix,
208
+ v: t.value,
209
+ s: e.value.style.chart.circles.labels.value.suffix,
210
+ r: e.value.style.chart.circles.labels.value.rounding
211
+ })
212
+ );
213
+ }
214
+ function Je() {
215
+ return Ve(
216
+ e.value.style.chart.circles.zoom.label.value.formatter,
217
+ d.value.value,
218
+ he({
219
+ p: e.value.style.chart.circles.zoom.label.value.prefix,
220
+ v: d.value.value,
221
+ s: e.value.style.chart.circles.zoom.label.value.suffix,
222
+ r: e.value.style.chart.circles.zoom.label.value.rounding
223
+ })
224
+ );
225
+ }
226
+ function Ie(t) {
227
+ if (!t)
228
+ return 0;
229
+ const n = t.r / ue(t).length * (ue(t).length === 1 ? 1 : 2);
230
+ return Math.min(t.r / 2.5, n);
231
+ }
232
+ const j = b(!1);
233
+ function Ke(t) {
234
+ j.value = t, be.value += 1;
235
+ }
236
+ const F = b(!1);
237
+ function ie() {
238
+ F.value = !F.value;
239
+ }
240
+ const Q = w(() => {
241
+ const t = K.value.map((l) => ({
242
+ name: l.name,
243
+ value: l.value,
244
+ color: l.color
245
+ })).toSorted((l, m) => m.value - l.value), n = t.map((l) => l.value);
246
+ return { head: t, body: n };
247
+ });
248
+ function Oe() {
249
+ Ae(() => {
250
+ const t = Q.value.head.map((m, z) => [[
251
+ m.name
252
+ ], [Q.value.body[z]]]), n = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), l = gt(n);
253
+ kt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
254
+ });
255
+ }
256
+ const ee = w(() => {
257
+ const t = [
258
+ e.value.table.columnNames.datapoint,
259
+ e.value.table.columnNames.value
260
+ ], n = Q.value.head.map((z, ce) => {
261
+ const ve = he({
262
+ p: e.value.style.chart.circles.labels.value.prefix,
263
+ v: Q.value.body[ce],
264
+ s: e.value.style.chart.circles.labels.value.suffix,
265
+ r: e.value.style.chart.circles.labels.value.rounding
266
+ });
267
+ return [
268
+ {
269
+ color: z.color,
270
+ name: z.name
271
+ },
272
+ ve
273
+ ];
274
+ }), l = {
275
+ th: {
276
+ backgroundColor: e.value.table.th.backgroundColor,
277
+ color: e.value.table.th.color,
278
+ outline: e.value.table.th.outline
279
+ },
280
+ td: {
281
+ backgroundColor: e.value.table.td.backgroundColor,
282
+ color: e.value.table.td.color,
283
+ outline: e.value.table.td.outline
284
+ },
285
+ breakpoint: e.value.table.responsiveBreakpoint
286
+ };
287
+ return {
288
+ colNames: [
289
+ e.value.table.columnNames.datapoint,
290
+ e.value.table.columnNames.value
291
+ ],
292
+ head: t,
293
+ body: n,
294
+ config: l
295
+ };
296
+ });
297
+ function Fe() {
298
+ H.value.showTable = !H.value.showTable;
299
+ }
300
+ function Qe() {
301
+ return K.value;
302
+ }
303
+ return i({
304
+ getData: Qe,
305
+ generateCsv: Oe,
306
+ generatePdf: _e,
307
+ generateImage: $e,
308
+ toggleTable: Fe,
309
+ toggleAnnotator: ie
310
+ }), (t, n) => (f(), g("div", {
311
+ id: `vue-ui-circle-pack_${P.value}`,
312
+ class: Ee(`vue-ui-circle-pack ${j.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
313
+ ref_key: "circlePackChart",
314
+ ref: $,
315
+ style: te(`font-family:${e.value.style.fontFamily};text-align:center;background:${e.value.style.chart.backgroundColor}; height: ${J.value.h}px; width:${J.value.w}px`),
316
+ onMouseenter: n[2] || (n[2] = () => u(ke)(!0)),
317
+ onMouseleave: n[3] || (n[3] = () => u(ke)(!1))
318
+ }, [
319
+ e.value.userOptions.buttons.annotator ? (f(), V(u(a), {
320
+ key: 0,
321
+ svgRef: u(ge),
322
+ backgroundColor: e.value.style.chart.backgroundColor,
323
+ color: e.value.style.chart.color,
324
+ active: F.value,
325
+ scale: B.value / 100,
326
+ onClose: ie
327
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active", "scale"])) : k("", !0),
328
+ x(t.$slots, "userConfig", {}, void 0, !0),
329
+ We.value ? (f(), g("div", {
330
+ key: 1,
331
+ ref_key: "noTitle",
332
+ ref: ye,
333
+ class: "vue-data-ui-no-title-space",
334
+ style: "height:36px; width: 100%;background:transparent"
335
+ }, null, 512)) : k("", !0),
336
+ e.value.style.chart.title.text ? (f(), g("div", {
337
+ key: 2,
338
+ ref_key: "chartTitle",
339
+ ref: fe,
340
+ style: "width:100%;background:transparent;padding-bottom:12px"
341
+ }, [
342
+ (f(), V($t, {
343
+ key: `title_${me.value}`,
344
+ config: {
345
+ title: {
346
+ cy: "donut-div-title",
347
+ ...e.value.style.chart.title
348
+ },
349
+ subtitle: {
350
+ cy: "donut-div-subtitle",
351
+ ...e.value.style.chart.title.subtitle
352
+ }
353
+ }
354
+ }, null, 8, ["config"]))
355
+ ], 512)) : k("", !0),
356
+ e.value.userOptions.show && N.value && (u(xe) || u(se)) ? (f(), V(u(v), {
357
+ ref: "details",
358
+ key: `user_option_${be.value}`,
359
+ backgroundColor: e.value.style.chart.backgroundColor,
360
+ color: e.value.style.chart.color,
361
+ isPrinting: u(Ce),
362
+ isImaging: u(ze),
363
+ uid: P.value,
364
+ hasTooltip: !1,
365
+ hasLabel: !1,
366
+ hasPdf: e.value.userOptions.buttons.pdf,
367
+ hasImg: e.value.userOptions.buttons.img,
368
+ hasXls: e.value.userOptions.buttons.csv,
369
+ hasTable: e.value.userOptions.buttons.table,
370
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
371
+ isFullscreen: j.value,
372
+ chartElement: $.value,
373
+ position: e.value.userOptions.position,
374
+ titles: { ...e.value.userOptions.buttonTitles },
375
+ hasAnnotator: e.value.userOptions.buttons.annotator,
376
+ isAnnotation: F.value,
377
+ onToggleFullscreen: Ke,
378
+ onGeneratePdf: u(_e),
379
+ onGenerateCsv: Oe,
380
+ onGenerateImage: u($e),
381
+ onToggleTable: Fe,
382
+ onToggleAnnotator: ie,
383
+ style: te({
384
+ visibility: u(xe) ? u(se) ? "visible" : "hidden" : "visible"
385
+ })
386
+ }, nt({ _: 2 }, [
387
+ t.$slots.menuIcon ? {
388
+ name: "menuIcon",
389
+ fn: _(({ isOpen: l, color: m }) => [
390
+ x(t.$slots, "menuIcon", q(W({ isOpen: l, color: m })), void 0, !0)
391
+ ]),
392
+ key: "0"
393
+ } : void 0,
394
+ t.$slots.optionPdf ? {
395
+ name: "optionPdf",
396
+ fn: _(() => [
397
+ x(t.$slots, "optionPdf", {}, void 0, !0)
398
+ ]),
399
+ key: "1"
400
+ } : void 0,
401
+ t.$slots.optionCsv ? {
402
+ name: "optionCsv",
403
+ fn: _(() => [
404
+ x(t.$slots, "optionCsv", {}, void 0, !0)
405
+ ]),
406
+ key: "2"
407
+ } : void 0,
408
+ t.$slots.optionImg ? {
409
+ name: "optionImg",
410
+ fn: _(() => [
411
+ x(t.$slots, "optionImg", {}, void 0, !0)
412
+ ]),
413
+ key: "3"
414
+ } : void 0,
415
+ t.$slots.optionTable ? {
416
+ name: "optionTable",
417
+ fn: _(() => [
418
+ x(t.$slots, "optionTable", {}, void 0, !0)
419
+ ]),
420
+ key: "4"
421
+ } : void 0,
422
+ t.$slots.optionFullscreen ? {
423
+ name: "optionFullscreen",
424
+ fn: _(({ toggleFullscreen: l, isFullscreen: m }) => [
425
+ x(t.$slots, "optionFullscreen", q(W({ toggleFullscreen: l, isFullscreen: m })), void 0, !0)
426
+ ]),
427
+ key: "5"
428
+ } : void 0,
429
+ t.$slots.optionAnnotator ? {
430
+ name: "optionAnnotator",
431
+ fn: _(({ toggleAnnotator: l, isAnnotator: m }) => [
432
+ x(t.$slots, "optionAnnotator", q(W({ toggleAnnotator: l, isAnnotator: m })), void 0, !0)
433
+ ]),
434
+ key: "6"
435
+ } : void 0
436
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : k("", !0),
437
+ N.value ? (f(), g("svg", {
438
+ key: 4,
439
+ ref_key: "svgRef",
440
+ ref: ge,
441
+ xmlns: u(mt),
442
+ viewBox: I.value,
443
+ height: E.value.h,
444
+ width: E.value.w,
445
+ class: Ee({ "vue-data-ui-fullscreen--on": j.value, "vue-data-ui-fulscreen--off": !j.value }),
446
+ style: te(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};background:${e.value.style.chart.backgroundColor};`)
447
+ }, [
448
+ rt(u(o)),
449
+ t.$slots["chart-background"] ? (f(), g("foreignObject", {
450
+ key: 0,
451
+ x: I.value.x,
452
+ y: I.value.y,
453
+ width: I.value.width,
454
+ height: I.value.height,
455
+ style: {
456
+ pointerEvents: "none"
457
+ }
458
+ }, [
459
+ x(t.$slots, "chart-background", {}, void 0, !0)
460
+ ], 8, Ot)) : k("", !0),
461
+ (f(!0), g(le, null, ut(A.value, (l) => (f(), g(le, null, [
462
+ C("defs", null, [
463
+ C("radialGradient", {
464
+ id: l.id,
465
+ fy: "30%"
466
+ }, [
467
+ C("stop", {
468
+ offset: "10%",
469
+ "stop-color": u(pt)(l.color, e.value.style.chart.circles.gradient.intensity / 100)
470
+ }, null, 8, Nt),
471
+ C("stop", {
472
+ offset: "90%",
473
+ "stop-color": u(Le)(l.color, 0.1)
474
+ }, null, 8, Mt),
475
+ C("stop", {
476
+ offset: "100%",
477
+ "stop-color": l.color
478
+ }, null, 8, Et)
479
+ ], 8, Ft)
480
+ ]),
481
+ t.$slots.pattern ? (f(), g("g", Rt, [
482
+ C("defs", null, [
483
+ x(t.$slots, "pattern", Re({ ref_for: !0 }, { ...l, patternId: `pattern_${P.value}_${l.id}` }), void 0, !0)
484
+ ])
485
+ ])) : k("", !0),
486
+ C("rect", {
487
+ x: l.x - l.r,
488
+ y: l.y - l.r,
489
+ width: l.r * 2,
490
+ height: l.r * 2,
491
+ stroke: e.value.style.chart.circles.stroke,
492
+ "stroke-width": e.value.style.chart.circles.strokeWidth * B.value / 100,
493
+ fill: e.value.style.chart.circles.gradient.show ? `url(#${l.id})` : l.color,
494
+ rx: l.r,
495
+ onMouseenter: () => Ye(l),
496
+ onMouseout: n[0] || (n[0] = (m) => d.value = null),
497
+ onClick: (m) => T("selectDatapoint", l)
498
+ }, null, 40, At),
499
+ t.$slots.pattern ? (f(), g("rect", {
500
+ key: 1,
501
+ x: l.x - l.r,
502
+ y: l.y - l.r,
503
+ width: l.r * 2,
504
+ height: l.r * 2,
505
+ stroke: e.value.style.chart.circles.stroke,
506
+ "stroke-width": e.value.style.chart.circles.strokeWidth * B.value / 100,
507
+ fill: `url(#pattern_${P.value}_${l.id})`,
508
+ rx: l.r,
509
+ style: {
510
+ pointerEvents: "none"
511
+ }
512
+ }, null, 8, Dt)) : k("", !0),
513
+ t.$slots["data-label"] ? x(t.$slots, "data-label", Re({
514
+ key: 2,
515
+ ref_for: !0
516
+ }, { ...l, createTSpans: u(bt), fontSize: { name: l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio, value: Ie(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(Y)(l.color) }), void 0, !0) : (f(), g(le, { key: 3 }, [
517
+ e.value.style.chart.circles.labels.name.show && l.name ? (f(), g("text", {
518
+ key: 0,
519
+ style: {
520
+ pointerEvents: "none",
521
+ transition: "opacity 0.2s ease-in-out"
522
+ },
523
+ opacity: d.value && !F.value ? 0.2 : 1,
524
+ x: l.x,
525
+ y: l.y + Se(l.r, e.value.style.chart.circles.labels.name.offsetY) - l.r / 10,
526
+ "font-size": l.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio,
527
+ fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : u(Y)(l.color),
528
+ "font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
529
+ "text-anchor": "middle"
530
+ }, X(l.name), 9, Lt)) : k("", !0),
531
+ e.value.style.chart.circles.labels.value.show ? (f(), g("text", {
532
+ key: 1,
533
+ style: {
534
+ pointerEvents: "none",
535
+ transition: "opacity 0.2s ease-in-out"
536
+ },
537
+ opacity: d.value && !F.value ? 0.2 : 1,
538
+ x: l.x,
539
+ y: l.y + Se(l.r, e.value.style.chart.circles.labels.value.offsetY) + l.r / 2.5,
540
+ "font-size": Ie(l) * e.value.style.chart.circles.labels.value.fontSizeRatio,
541
+ fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : u(Y)(l.color),
542
+ "font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
543
+ "text-anchor": "middle"
544
+ }, X(ue(l)), 9, Vt)) : k("", !0)
545
+ ], 64))
546
+ ], 64))), 256)),
547
+ d.value && e.value.style.chart.circles.zoom.show && !F.value ? (f(), g(le, { key: 1 }, [
548
+ C("circle", {
549
+ style: te(Ze.value),
550
+ cx: d.value.x,
551
+ cy: d.value.y,
552
+ r: G.value,
553
+ opacity: O.value,
554
+ stroke: e.value.style.chart.circles.stroke,
555
+ "stroke-width": e.value.style.chart.circles.strokeWidth * B.value / 100,
556
+ fill: e.value.style.chart.circles.gradient.show ? `url(#${d.value.id})` : d.value.color
557
+ }, null, 12, Ht),
558
+ t.$slots["zoom-label"] ? (f(), g("g", Bt, [
559
+ x(t.$slots, "zoom-label", q(W({ ...d.value, zoomOpacity: O.value, currentRadius: G.value, fontSize: U.value })), void 0, !0)
560
+ ])) : (f(), g("g", Gt, [
561
+ C("text", {
562
+ style: {
563
+ pointerEvents: "none"
564
+ },
565
+ opacity: O.value,
566
+ x: d.value.x,
567
+ y: d.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - U.value.name / 4,
568
+ "text-anchor": "middle",
569
+ "font-size": U.value.name,
570
+ fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : u(Y)(d.value.color),
571
+ "font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
572
+ }, X(d.value.name), 9, Ut),
573
+ C("text", {
574
+ style: {
575
+ pointerEvents: "none"
576
+ },
577
+ opacity: O.value,
578
+ x: d.value.x,
579
+ y: d.value.y + U.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
580
+ "text-anchor": "middle",
581
+ "font-size": U.value.value,
582
+ fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : u(Y)(d.value.color),
583
+ "font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
584
+ }, X(Je()), 9, jt)
585
+ ]))
586
+ ], 64)) : k("", !0),
587
+ x(t.$slots, "svg", {
588
+ svg: { ...I.value }
589
+ }, void 0, !0)
590
+ ], 14, It)) : k("", !0),
591
+ N.value ? k("", !0) : (f(), V(u(s), {
592
+ key: 5,
593
+ config: {
594
+ type: "circlePack",
595
+ style: {
596
+ color: "#CCCCCC"
597
+ }
598
+ }
599
+ })),
600
+ t.$slots.watermark ? (f(), g("div", qt, [
601
+ x(t.$slots, "watermark", q(W({ isPrinting: u(Ce) || u(ze) })), void 0, !0)
602
+ ])) : k("", !0),
603
+ t.$slots.source ? (f(), g("div", {
604
+ key: 7,
605
+ ref_key: "source",
606
+ ref: qe,
607
+ dir: "auto"
608
+ }, [
609
+ x(t.$slots, "source", {}, void 0, !0)
610
+ ], 512)) : k("", !0),
611
+ N.value ? (f(), V(u(y), {
612
+ key: 8,
613
+ hideDetails: "",
614
+ config: {
615
+ open: H.value.showTable,
616
+ maxHeight: 1e4,
617
+ body: {
618
+ backgroundColor: e.value.style.chart.backgroundColor,
619
+ color: e.value.style.chart.color
620
+ },
621
+ head: {
622
+ backgroundColor: e.value.style.chart.backgroundColor,
623
+ color: e.value.style.chart.color
624
+ }
625
+ }
626
+ }, {
627
+ content: _(() => [
628
+ (f(), V(u(c), {
629
+ key: `table_${pe.value}`,
630
+ colNames: ee.value.colNames,
631
+ head: ee.value.head,
632
+ body: ee.value.body,
633
+ config: ee.value.config,
634
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
635
+ onClose: n[1] || (n[1] = (l) => H.value.showTable = !1)
636
+ }, {
637
+ th: _(({ th: l }) => [
638
+ C("div", {
639
+ innerHTML: l,
640
+ style: { display: "flex", "align-items": "center" }
641
+ }, null, 8, Wt)
642
+ ]),
643
+ td: _(({ td: l }) => [
644
+ it(X(l.name || l), 1)
645
+ ]),
646
+ _: 1
647
+ }, 8, ["colNames", "head", "body", "config", "title"]))
648
+ ]),
649
+ _: 1
650
+ }, 8, ["config"])) : k("", !0)
651
+ ], 46, St));
652
+ }
653
+ }, ol = /* @__PURE__ */ Tt(Xt, [["__scopeId", "data-v-2a1a3780"]]);
654
+ export {
655
+ ol as default
656
+ };
@@ -1,6 +1,6 @@
1
1
  import { ref as c, computed as _, onMounted as R, onBeforeUnmount as S, createElementBlock as l, createCommentVNode as o, openBlock as i, normalizeStyle as E, unref as m, createElementVNode as r, normalizeClass as C, toDisplayString as p, nextTick as b } from "vue";
2
- import { u as F } from "./useNestedProp-Du1hnYFA.js";
3
- import { u as L, c as z, X as O, s as I } from "./index-vjCxtaM0.js";
2
+ import { u as F } from "./useNestedProp-tRqS0ZAM.js";
3
+ import { u as L, c as z, X as O, s as I } from "./index-BiHmNd1-.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const N = ["xmlns", "height", "width"], T = {
6
6
  id: "follower",