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