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

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-fzydFjfE.js → Arrow-CMSMde41.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BwazM8ka.js → BaseDraggableDialog-BuO_En6p.js} +2 -2
  3. package/dist/{BaseIcon-BnbvQjs5.js → BaseIcon-C_HE-fPU.js} +1 -1
  4. package/dist/{ColorPicker-DR1Yr4kR.js → ColorPicker-Cn82Up5w.js} +2 -2
  5. package/dist/{DataTable-CKpA_OA_.js → DataTable-DMCB2CPj.js} +2 -2
  6. package/dist/{Legend-ChXhJNzd.js → Legend-C96fnhZD.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-CPOpM7Os.js → NonSvgPenAndPaper-BRi2CtMk.js} +3 -3
  8. package/dist/{PackageVersion-CBHvscRY.js → PackageVersion-B8cypgdJ.js} +1 -1
  9. package/dist/{PenAndPaper-BCcfYvgR.js → PenAndPaper-DjXtQYum.js} +3 -3
  10. package/dist/{Shape-C1rNfsMY.js → Shape-DZSz-yYr.js} +1 -1
  11. package/dist/{Slicer-D8a4Wv1q.js → Slicer-BOc4PzAR.js} +2 -2
  12. package/dist/{SparkTooltip-BUdf02cs.js → SparkTooltip-4K9Ezba0.js} +1 -1
  13. package/dist/{Title-feqCv0Si.js → Title-DnqOjg_N.js} +1 -1
  14. package/dist/{Tooltip-DQbksria.js → Tooltip-Cy2owh0T.js} +1 -1
  15. package/dist/{UserOptions-CGnAZpYs.js → UserOptions-Tx_9Xl_c.js} +2 -2
  16. package/dist/{dom-to-png-DTPmkDTK.js → dom-to-png-CDSxjzSn.js} +1 -1
  17. package/dist/{img-_RMhslMZ.js → img-D_LTOBii.js} +1 -1
  18. package/dist/{index-CnY41r21.js → index-Bzm4bjdY.js} +1380 -1337
  19. package/dist/{pdf-C02XBmhm.js → pdf-BZQLWJMc.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +12 -0
  22. package/dist/types/vue-data-ui.d.ts +12 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-DVYZBwNc.js → useAutoSizeLabelsInsideViewbox-Rg0B250v.js} +1 -1
  24. package/dist/{useNestedProp-DtUATNAU.js → useNestedProp-FhaE2yv-.js} +1 -1
  25. package/dist/{usePrinter-CJ1uZx0D.js → usePrinter-DZsH7qQs.js} +2 -2
  26. package/dist/{vue-data-ui-DDBabVWX.js → vue-data-ui-0ns7pHNm.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CtPXePUa.js → vue-ui-3d-bar-CY9hrF9C.js} +6 -6
  29. package/dist/{vue-ui-accordion-CnLY8CrQ.js → vue-ui-accordion-ywMTtl25.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-CvrNLE47.js → vue-ui-age-pyramid-Qd4BtrXy.js} +6 -6
  31. package/dist/{vue-ui-annotator-NuSwWka4.js → vue-ui-annotator-DmOJnYF9.js} +2 -2
  32. package/dist/{vue-ui-bullet-CpIVgkPB.js → vue-ui-bullet-B_xIDBAw.js} +7 -7
  33. package/dist/{vue-ui-candlestick-DGWKUeJp.js → vue-ui-candlestick-D3Vsh4Rw.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-DWbQS8F3.js → vue-ui-carousel-table-D0UgiRmJ.js} +4 -4
  35. package/dist/{vue-ui-chestnut-K4-oOYff.js → vue-ui-chestnut-CbMOcXYQ.js} +664 -536
  36. package/dist/{vue-ui-chord-DqmP8yTR.js → vue-ui-chord-DDzp12Vp.js} +8 -8
  37. package/dist/{vue-ui-circle-pack-D_ufubH5.js → vue-ui-circle-pack-DOXx17NQ.js} +6 -6
  38. package/dist/{vue-ui-cursor-B0tP4woK.js → vue-ui-cursor-Bg-6DHbI.js} +2 -2
  39. package/dist/{vue-ui-dashboard-D_7qyx3P.js → vue-ui-dashboard-DY2lvJ7A.js} +62 -62
  40. package/dist/{vue-ui-digits-pUQErY07.js → vue-ui-digits-De2GmG2N.js} +2 -2
  41. package/dist/{vue-ui-donut-Dl__PVfq.js → vue-ui-donut-BWQ6g1O7.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-BCGGTZZI.js → vue-ui-donut-evolution-DAzSv9V-.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-KzCa3k9g.js → vue-ui-dumbbell-B32YuCNM.js} +7 -7
  44. package/dist/{vue-ui-flow-B1AOqk14.js → vue-ui-flow-BZkt6OKd.js} +7 -7
  45. package/dist/{vue-ui-funnel-DCl9v71X.js → vue-ui-funnel-8WAXLQAo.js} +6 -6
  46. package/dist/vue-ui-galaxy-gfw2BThf.js +680 -0
  47. package/dist/{vue-ui-gauge-Cg4qAOEf.js → vue-ui-gauge-Ch5vl4T9.js} +7 -7
  48. package/dist/{vue-ui-gizmo-CQmMkODw.js → vue-ui-gizmo-CU8ddGLr.js} +3 -3
  49. package/dist/{vue-ui-heatmap-CgkgUDI0.js → vue-ui-heatmap-YO1tESN5.js} +7 -7
  50. package/dist/{vue-ui-history-plot-CYvkTszV.js → vue-ui-history-plot-C41s9ybF.js} +7 -7
  51. package/dist/{vue-ui-kpi-BDuOZbc2.js → vue-ui-kpi-H6MYZwLY.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-BZaU_YD-.js → vue-ui-mini-loader-Bnjg3O7d.js} +2 -2
  53. package/dist/{vue-ui-molecule-HYjHgVuN.js → vue-ui-molecule-DF4leieh.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-4pYtL93A.js → vue-ui-mood-radar-NrPILZdk.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-BVbvVm19.js → vue-ui-nested-donuts-BLnO_Mgf.js} +9 -9
  56. package/dist/{vue-ui-onion-DQg97Dwm.js → vue-ui-onion-66T65iJH.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-KQ4FTUda.js → vue-ui-parallel-coordinate-plot-B5N_TkrQ.js} +8 -8
  58. package/dist/{vue-ui-quadrant-D8OU7TFs.js → vue-ui-quadrant-BoCrqBMk.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-BOKDoHdK.js → vue-ui-quick-chart-B0VC0eh-.js} +6 -6
  60. package/dist/{vue-ui-radar-2hTf-Qrf.js → vue-ui-radar-CFVWdaIn.js} +8 -8
  61. package/dist/{vue-ui-rating-QriKDSO7.js → vue-ui-rating-A58gcO8T.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-DqLiKEHw.js → vue-ui-relation-circle-DU5SHiGv.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-CvFlsavM.js → vue-ui-ridgeline-DbL2yTIh.js} +8 -8
  64. package/dist/{vue-ui-rings-B2ges9Ud.js → vue-ui-rings-Bv6MCURJ.js} +8 -8
  65. package/dist/{vue-ui-scatter-DQJeFlv4.js → vue-ui-scatter-BmN7rTrR.js} +8 -8
  66. package/dist/{vue-ui-skeleton-Bghm5obp.js → vue-ui-skeleton-C4h4fFuO.js} +3 -3
  67. package/dist/{vue-ui-smiley-C3SkDNoz.js → vue-ui-smiley-7OtzDLyY.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-dd8h3N7H.js → vue-ui-spark-trend-CDJGeE9c.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BTj8M7fY.js → vue-ui-sparkbar-D77zOuEC.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-BBQAo-W1.js → vue-ui-sparkgauge-BksxAHf4.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-C4ZEcb8S.js → vue-ui-sparkhistogram-dgigFSzZ.js} +4 -4
  72. package/dist/{vue-ui-sparkline-Bm3GpqJx.js → vue-ui-sparkline-Dy1tSgMy.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-Dde4iayd.js → vue-ui-sparkstackbar-DVPYzftP.js} +3 -3
  74. package/dist/{vue-ui-stackbar-DPvfNjwH.js → vue-ui-stackbar-BSsTXQJ2.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-iZIN9U90.js → vue-ui-strip-plot-F41CWin2.js} +7 -7
  76. package/dist/{vue-ui-table-C4EoviSd.js → vue-ui-table-BmnsgnjO.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-D-eqO3LU.js → vue-ui-table-heatmap-GuaexCA-.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-CD7IH49g.js → vue-ui-table-sparkline-DktY9A1C.js} +4 -4
  79. package/dist/{vue-ui-thermometer-BKEFH2Xt.js → vue-ui-thermometer-EhgTVfFj.js} +7 -7
  80. package/dist/{vue-ui-timer-hhKj1gPp.js → vue-ui-timer-Cd3Yt7HA.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-CmNwCnVC.js → vue-ui-tiremarks-DjDnFHWc.js} +6 -6
  82. package/dist/{vue-ui-treemap-BL7T8x_B.js → vue-ui-treemap-BGLUEQit.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-CGn_OX3P.js → vue-ui-vertical-bar-DhVF0WZY.js} +9 -9
  84. package/dist/{vue-ui-waffle-qfT-wDhI.js → vue-ui-waffle-gXnHM7Qo.js} +8 -8
  85. package/dist/{vue-ui-wheel-B8J8C3AN.js → vue-ui-wheel-Ce2IQFq7.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-B6oHFfEK.js → vue-ui-word-cloud-BDFn0rUl.js} +6 -6
  87. package/dist/{vue-ui-world-BEv_oTrC.js → vue-ui-world-Cev3j25p.js} +6 -6
  88. package/dist/{vue-ui-xy-DPBrciAR.js → vue-ui-xy-CNMFnao9.js} +9 -9
  89. package/dist/{vue-ui-xy-canvas-BXT3mXj5.js → vue-ui-xy-canvas-B04eI10U.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-galaxy-0rAzDHe5.js +0 -619
@@ -0,0 +1,680 @@
1
+ import { defineAsyncComponent as C, ref as u, computed as v, toRefs as ut, onMounted as nt, watch as rt, createElementBlock as i, openBlock as n, unref as o, normalizeStyle as z, normalizeClass as R, createBlock as S, createCommentVNode as d, createElementVNode as O, createVNode as Te, createSlots as it, withCtx as g, renderSlot as h, normalizeProps as _, guardReactiveProps as I, Fragment as Se, renderList as Pe, toDisplayString as F, createTextVNode as ct, nextTick as vt } from "vue";
2
+ import { u as dt, c as Oe, t as ht, o as gt, f as _e, g as pt, a as yt, p as W, b as ft, d as bt, G as Ie, e as mt, M as kt, i as $, X as wt, k as Le, y as Ae, v as Ct, w as $t, z as xt } from "./index-Bzm4bjdY.js";
3
+ import { t as Tt, u as St } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Pt, B as Ot } from "./useLoading-D7YHNtLX.js";
5
+ import { u as _t } from "./usePrinter-DZsH7qQs.js";
6
+ import { u as Ne } from "./useNestedProp-FhaE2yv-.js";
7
+ import { u as It } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as Lt } from "./useChartAccessibility-9icAAmYg.js";
9
+ import At from "./img-D_LTOBii.js";
10
+ import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const Ft = ["id"], Vt = ["xmlns", "viewBox"], Dt = ["width", "height"], Bt = ["id"], Mt = ["stdDeviation"], Et = ["d", "stroke", "stroke-width"], zt = ["d", "stroke", "stroke-width"], Rt = ["filter"], Wt = ["d", "stroke", "stroke-width"], Gt = ["d", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Ht = {
12
+ key: 4,
13
+ class: "vue-data-ui-watermark"
14
+ }, Ut = ["onClick"], Xt = ["innerHTML"], Yt = {
15
+ __name: "vue-ui-galaxy",
16
+ props: {
17
+ config: {
18
+ type: Object,
19
+ default() {
20
+ return {};
21
+ }
22
+ },
23
+ dataset: {
24
+ type: Array,
25
+ default() {
26
+ return [];
27
+ }
28
+ }
29
+ },
30
+ emits: ["selectLegend", "selectDatapoint"],
31
+ setup(Fe, { expose: Ve, emit: De }) {
32
+ const Be = C(() => import("./Title-DnqOjg_N.js")), Me = C(() => import("./Legend-C96fnhZD.js")), Ee = C(() => import("./vue-ui-accordion-ywMTtl25.js")), ze = C(() => import("./DataTable-DMCB2CPj.js")), Re = C(() => import("./Tooltip-Cy2owh0T.js")), We = C(() => import("./PenAndPaper-DjXtQYum.js")), Ge = C(() => import("./UserOptions-Tx_9Xl_c.js")), He = C(() => import("./PackageVersion-B8cypgdJ.js")), { vue_ui_galaxy: Ue } = dt(), b = Fe, L = u(Oe()), m = u(null), Xe = u(null), G = u(!1), H = u(""), x = u(null), Q = u(0), Z = u(0), ee = u(0), te = u(0), le = u(null), ae = u(null), oe = u(null), se = u(null), A = u(null), V = u(null), ue = v(() => !!b.dataset && b.dataset.length), e = u(Y()), { loading: U, FINAL_DATASET: ne } = Pt({
33
+ ...ut(b),
34
+ FINAL_CONFIG: e,
35
+ prepareConfig: Y,
36
+ skeletonDataset: [
37
+ { name: "_", values: [21], color: "#DBDBDB" },
38
+ { name: "_", values: [13], color: "#C4C4C4" },
39
+ { name: "_", values: [8], color: "#ADADAD" }
40
+ ],
41
+ skeletonConfig: ht({
42
+ defaultConfig: e.value,
43
+ userConfig: {
44
+ userOptions: { show: !1 },
45
+ table: { show: !1 },
46
+ useCssAnimation: !1,
47
+ style: {
48
+ chart: {
49
+ backgroundColor: "#99999930",
50
+ legend: {
51
+ backgroundColor: "transparent"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ })
57
+ });
58
+ nt(() => {
59
+ ie();
60
+ });
61
+ const re = v(() => !!e.value.debug);
62
+ function ie() {
63
+ if (gt(b.dataset) ? _e({
64
+ componentName: "VueUiGalaxy",
65
+ type: "dataset",
66
+ debug: re.value
67
+ }) : b.dataset.forEach((t, a) => {
68
+ pt({
69
+ datasetObject: t,
70
+ requiredAttributes: ["name", "values"]
71
+ }).forEach((l) => {
72
+ _e({
73
+ componentName: "VueUiGalaxy",
74
+ type: "datasetSerieAttribute",
75
+ property: l,
76
+ index: a,
77
+ debug: re.value
78
+ });
79
+ });
80
+ }), e.value.responsive) {
81
+ const t = Tt(() => {
82
+ const { width: a, height: l } = St({
83
+ chart: m.value,
84
+ title: e.value.style.chart.title.text ? le.value : null,
85
+ legend: e.value.style.chart.legend.show ? ae.value : null,
86
+ noTitle: se.value,
87
+ source: oe.value
88
+ });
89
+ requestAnimationFrame(() => {
90
+ D.value = Math.max(0.1, a), B.value = Math.max(0.1, l - 12);
91
+ });
92
+ });
93
+ A.value && (V.value && A.value.unobserve(V.value), A.value.disconnect()), A.value = new ResizeObserver(t), V.value = m.value.parentNode, A.value.observe(V.value);
94
+ }
95
+ }
96
+ const { userOptionsVisible: X, setUserOptionsVisibility: ce, keepUserOptionState: ve } = It({ config: e.value }), { svgRef: de } = Lt({ config: e.value.style.chart.title });
97
+ function Y() {
98
+ const t = Ne({
99
+ userConfig: b.config,
100
+ defaultConfig: Ue
101
+ });
102
+ return t.theme ? {
103
+ ...Ne({
104
+ userConfig: ft.vue_ui_galaxy[t.theme] || b.config,
105
+ defaultConfig: t
106
+ }),
107
+ customPalette: yt[t.theme] || W
108
+ } : t;
109
+ }
110
+ rt(() => b.config, (t) => {
111
+ e.value = Y(), X.value = !e.value.userOptions.showOnChartHover, ie(), Z.value += 1, ee.value += 1, te.value += 1, p.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, p.value.showTable = e.value.table.show, p.value.showTooltip = e.value.style.chart.tooltip.show;
112
+ }, { deep: !0 });
113
+ const { isPrinting: he, isImaging: ge, generatePdf: pe, generateImage: ye } = _t({
114
+ elementId: `galaxy_${L.value}`,
115
+ fileName: e.value.style.chart.title.text || "vue-ui-galaxy",
116
+ options: e.value.userOptions.print
117
+ }), Ye = v(() => e.value.userOptions.show && !e.value.style.chart.title.text), je = v(() => bt(e.value.customPalette)), p = u({
118
+ dataLabels: {
119
+ show: e.value.style.chart.layout.labels.dataLabels.show
120
+ },
121
+ showTable: e.value.table.show,
122
+ showTooltip: e.value.style.chart.tooltip.show
123
+ }), D = u(250), B = u(180), qe = u(0), Je = u(0), k = v(() => ({
124
+ width: D.value,
125
+ height: B.value,
126
+ viewBox: `${qe.value} ${Je.value} ${D.value} ${B.value}`
127
+ })), fe = De, y = u([]);
128
+ function j(t) {
129
+ y.value.includes(t.id) ? y.value = y.value.filter((a) => a !== t.id) : y.value.push(t.id), fe("selectLegend", N.value.map((a) => ({
130
+ name: a.name,
131
+ color: a.color,
132
+ value: a.value
133
+ })));
134
+ }
135
+ const T = v(() => ne.value.map((t, a) => ({
136
+ name: t.name,
137
+ color: mt(t.color) || je.value[a] || W[a] || W[a % W.length],
138
+ value: t.values ? Ie(t.values).reduce((l, s) => l + s, 0) : 0,
139
+ absoluteValues: Ie(t.values),
140
+ id: Oe()
141
+ })).sort((t, a) => a.value - t.value).map((t, a) => ({
142
+ ...t,
143
+ absoluteIndex: a
144
+ })));
145
+ function Ke() {
146
+ return T.value.map((t) => ({
147
+ name: t.name,
148
+ color: t.color,
149
+ value: t.value
150
+ }));
151
+ }
152
+ const f = v(() => T.value.filter((t) => !y.value.includes(t.id)).map((t) => t.value).reduce((t, a) => t + a, 0)), be = u(190), me = v(() => T.value.filter((t) => !y.value.includes(t.id))), Qe = v(
153
+ () => (e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth) / 2 + (e.value.style.chart.layout.padding ?? 12)
154
+ ), Ze = v(() => kt({
155
+ maxPoints: be.value,
156
+ a: e.value.style.chart.layout.arcs.a ?? 6,
157
+ b: e.value.style.chart.layout.arcs.b ?? 6,
158
+ angleStep: e.value.style.chart.layout.arcs.angleStep ?? 0.07,
159
+ startX: k.value.width / 2 + e.value.style.chart.layout.arcs.offsetX,
160
+ startY: k.value.height / 2 + e.value.style.chart.layout.arcs.offsetY,
161
+ boxWidth: k.value.width,
162
+ boxHeight: k.value.height,
163
+ padding: Qe.value
164
+ })), N = v(() => {
165
+ const t = [];
166
+ for (let a = 0; a < me.value.length; a += 1) {
167
+ const l = me.value[a], s = l.value / f.value * be.value + (a > 0 && t.length ? t[a - 1].points : 0);
168
+ t.push({
169
+ points: s,
170
+ ...l,
171
+ seriesIndex: a,
172
+ proportion: l.value / f.value,
173
+ path: Ze.value(s)
174
+ });
175
+ }
176
+ return t.filter((a) => !y.value.includes(a.id)).toSorted((a, l) => l.points - a.points);
177
+ });
178
+ function q(t) {
179
+ const a = Math.min(D.value, B.value), l = x.value === t.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1, s = (e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth) * l, r = e.value.style.chart.layout.arcs.strokeWidth * l, c = e.value.style.chart.layout.arcs.strokeWidth / 2 * l;
180
+ return {
181
+ border: s / 180 * a,
182
+ path: r / 180 * a,
183
+ blur: c / 180 * a
184
+ };
185
+ }
186
+ const P = u(!1);
187
+ function ke(t) {
188
+ P.value = t, Q.value += 1;
189
+ }
190
+ const J = u(null);
191
+ function et(t) {
192
+ G.value = !1, x.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.absoluteIndex });
193
+ }
194
+ function tt(t) {
195
+ fe("selectDatapoint", t), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.absoluteIndex });
196
+ }
197
+ function lt({ datapoint: t, _relativeIndex: a, seriesIndex: l, show: s = !1 }) {
198
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.absoluteIndex }), J.value = {
199
+ datapoint: t,
200
+ seriesIndex: l,
201
+ series: T.value,
202
+ config: e.value
203
+ }, G.value = s, x.value = t.id;
204
+ let r = "";
205
+ const c = e.value.style.chart.tooltip.customFormat;
206
+ Ae(c) && xt(() => c({
207
+ seriesIndex: l,
208
+ datapoint: t,
209
+ series: T.value,
210
+ config: e.value
211
+ })) ? H.value = c({
212
+ seriesIndex: l,
213
+ datapoint: t,
214
+ series: T.value,
215
+ config: e.value
216
+ }) : (r += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, r += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (r += `<b>${Le(
217
+ e.value.style.chart.layout.labels.dataLabels.formatter,
218
+ t.value,
219
+ $({
220
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
221
+ v: t.value,
222
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
223
+ r: e.value.style.chart.tooltip.roundingValue
224
+ }),
225
+ { datapoint: t, seriesIndex: l }
226
+ )}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? r += `<span>(${$({
227
+ v: t.proportion * 100,
228
+ s: "%",
229
+ r: e.value.style.chart.tooltip.roundingPercentage
230
+ })})</span></div>` : r += `<b>${$({
231
+ v: t.proportion * 100,
232
+ s: "%",
233
+ r: e.value.style.chart.tooltip.roundingPercentage
234
+ })}</b></div>`), H.value = `<div>${r}</div>`);
235
+ }
236
+ const we = v(() => T.value.map((t, a) => ({
237
+ ...t,
238
+ proportion: (t.value || 0) / ne.value.map((l) => (l.values || []).reduce((s, r) => s + r, 0)).reduce((l, s) => l + s, 0),
239
+ opacity: y.value.includes(t.id) ? 0.5 : 1,
240
+ shape: t.shape || "circle",
241
+ segregate: () => j(t),
242
+ isSegregated: y.value.includes(t.id)
243
+ }))), at = v(() => ({
244
+ cy: "galaxy-div-legend",
245
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
246
+ color: e.value.style.chart.legend.color,
247
+ fontSize: e.value.style.chart.legend.fontSize,
248
+ paddingBottom: 12,
249
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
250
+ })), w = v(() => {
251
+ const t = N.value.map((l) => ({
252
+ name: l.name,
253
+ color: l.color
254
+ })), a = N.value.map((l) => l.value);
255
+ return { head: t, body: a };
256
+ });
257
+ function Ce(t = null) {
258
+ vt(() => {
259
+ const a = w.value.head.map((r, c) => [[
260
+ r.name
261
+ ], [w.value.body[c]], [isNaN(w.value.body[c] / f.value) ? "-" : w.value.body[c] / f.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), s = Ct(l);
262
+ t ? t(s) : $t({ csvContent: s, title: e.value.style.chart.title.text || "vue-ui-galaxy" });
263
+ });
264
+ }
265
+ const M = v(() => {
266
+ const t = [
267
+ ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
268
+ $({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: f.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
269
+ "100%"
270
+ ], a = w.value.head.map((r, c) => {
271
+ const st = $({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value.body[c], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
272
+ return [
273
+ {
274
+ color: r.color,
275
+ name: r.name
276
+ },
277
+ st,
278
+ isNaN(w.value.body[c] / f.value) ? "-" : $({
279
+ v: w.value.body[c] / f.value * 100,
280
+ s: "%",
281
+ r: e.value.table.td.roundingPercentage
282
+ })
283
+ ];
284
+ }), l = {
285
+ th: {
286
+ backgroundColor: e.value.table.th.backgroundColor,
287
+ color: e.value.table.th.color,
288
+ outline: e.value.table.th.outline
289
+ },
290
+ td: {
291
+ backgroundColor: e.value.table.td.backgroundColor,
292
+ color: e.value.table.td.color,
293
+ outline: e.value.table.td.outline
294
+ },
295
+ breakpoint: e.value.table.responsiveBreakpoint
296
+ };
297
+ return {
298
+ colNames: [
299
+ e.value.table.columnNames.series,
300
+ e.value.table.columnNames.value,
301
+ e.value.table.columnNames.percentage
302
+ ],
303
+ head: t,
304
+ body: a,
305
+ config: l
306
+ };
307
+ });
308
+ function $e() {
309
+ p.value.showTable = !p.value.showTable;
310
+ }
311
+ function xe() {
312
+ p.value.showTooltip = !p.value.showTooltip;
313
+ }
314
+ const E = u(!1);
315
+ function K() {
316
+ E.value = !E.value;
317
+ }
318
+ async function ot({ scale: t = 2 } = {}) {
319
+ if (!m.value) return;
320
+ const { width: a, height: l } = m.value.getBoundingClientRect(), s = a / l, { imageUri: r, base64: c } = await At({ domElement: m.value, base64: !0, img: !0, scale: t });
321
+ return {
322
+ imageUri: r,
323
+ base64: c,
324
+ title: e.value.style.chart.title.text,
325
+ width: a,
326
+ height: l,
327
+ aspectRatio: s
328
+ };
329
+ }
330
+ return Ve({
331
+ getData: Ke,
332
+ getImage: ot,
333
+ generatePdf: pe,
334
+ generateCsv: Ce,
335
+ generateImage: ye,
336
+ toggleTable: $e,
337
+ toggleTooltip: xe,
338
+ toggleAnnotator: K,
339
+ toggleFullscreen: ke
340
+ }), (t, a) => (n(), i("div", {
341
+ ref_key: "galaxyChart",
342
+ ref: m,
343
+ class: R(`vue-ui-galaxy ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"} ${o(U) ? "loading" : ""}`),
344
+ style: z(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
345
+ id: `galaxy_${L.value}`,
346
+ onMouseenter: a[2] || (a[2] = () => o(ce)(!0)),
347
+ onMouseleave: a[3] || (a[3] = () => o(ce)(!1))
348
+ }, [
349
+ e.value.userOptions.buttons.annotator ? (n(), S(o(We), {
350
+ key: 0,
351
+ svgRef: o(de),
352
+ backgroundColor: e.value.style.chart.backgroundColor,
353
+ color: e.value.style.chart.color,
354
+ active: E.value,
355
+ onClose: K
356
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : d("", !0),
357
+ Ye.value ? (n(), i("div", {
358
+ key: 1,
359
+ ref_key: "noTitle",
360
+ ref: se,
361
+ class: "vue-data-ui-no-title-space",
362
+ style: "height:36px; width: 100%;background:transparent"
363
+ }, null, 512)) : d("", !0),
364
+ e.value.style.chart.title.text ? (n(), i("div", {
365
+ key: 2,
366
+ ref_key: "chartTitle",
367
+ ref: le,
368
+ style: "width:100%;background:transparent;padding-bottom:24px"
369
+ }, [
370
+ (n(), S(o(Be), {
371
+ key: `title_${Z.value}`,
372
+ config: {
373
+ title: {
374
+ cy: "galaxy-div-title",
375
+ ...e.value.style.chart.title
376
+ },
377
+ subtitle: {
378
+ cy: "galaxy-div-subtitle",
379
+ ...e.value.style.chart.title.subtitle
380
+ }
381
+ }
382
+ }, null, 8, ["config"]))
383
+ ], 512)) : d("", !0),
384
+ e.value.userOptions.show && ue.value && (o(ve) || o(X)) ? (n(), S(o(Ge), {
385
+ ref_key: "details",
386
+ ref: Xe,
387
+ key: `user_option_${Q.value}`,
388
+ backgroundColor: e.value.style.chart.backgroundColor,
389
+ color: e.value.style.chart.color,
390
+ isPrinting: o(he),
391
+ isImaging: o(ge),
392
+ uid: L.value,
393
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
394
+ hasPdf: e.value.userOptions.buttons.pdf,
395
+ hasXls: e.value.userOptions.buttons.csv,
396
+ hasImg: e.value.userOptions.buttons.img,
397
+ hasTable: e.value.userOptions.buttons.table,
398
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
399
+ isTooltip: p.value.showTooltip,
400
+ isFullscreen: P.value,
401
+ titles: { ...e.value.userOptions.buttonTitles },
402
+ chartElement: m.value,
403
+ position: e.value.userOptions.position,
404
+ hasAnnotator: e.value.userOptions.buttons.annotator,
405
+ isAnnotation: E.value,
406
+ callbacks: e.value.userOptions.callbacks,
407
+ printScale: e.value.userOptions.print.scale,
408
+ onToggleFullscreen: ke,
409
+ onGeneratePdf: o(pe),
410
+ onGenerateCsv: Ce,
411
+ onGenerateImage: o(ye),
412
+ onToggleTable: $e,
413
+ onToggleTooltip: xe,
414
+ onToggleAnnotator: K,
415
+ style: z({
416
+ visibility: o(ve) ? o(X) ? "visible" : "hidden" : "visible"
417
+ })
418
+ }, it({ _: 2 }, [
419
+ t.$slots.menuIcon ? {
420
+ name: "menuIcon",
421
+ fn: g(({ isOpen: l, color: s }) => [
422
+ h(t.$slots, "menuIcon", _(I({ isOpen: l, color: s })), void 0, !0)
423
+ ]),
424
+ key: "0"
425
+ } : void 0,
426
+ t.$slots.optionTooltip ? {
427
+ name: "optionTooltip",
428
+ fn: g(() => [
429
+ h(t.$slots, "optionTooltip", {}, void 0, !0)
430
+ ]),
431
+ key: "1"
432
+ } : void 0,
433
+ t.$slots.optionPdf ? {
434
+ name: "optionPdf",
435
+ fn: g(() => [
436
+ h(t.$slots, "optionPdf", {}, void 0, !0)
437
+ ]),
438
+ key: "2"
439
+ } : void 0,
440
+ t.$slots.optionCsv ? {
441
+ name: "optionCsv",
442
+ fn: g(() => [
443
+ h(t.$slots, "optionCsv", {}, void 0, !0)
444
+ ]),
445
+ key: "3"
446
+ } : void 0,
447
+ t.$slots.optionImg ? {
448
+ name: "optionImg",
449
+ fn: g(() => [
450
+ h(t.$slots, "optionImg", {}, void 0, !0)
451
+ ]),
452
+ key: "4"
453
+ } : void 0,
454
+ t.$slots.optionTable ? {
455
+ name: "optionTable",
456
+ fn: g(() => [
457
+ h(t.$slots, "optionTable", {}, void 0, !0)
458
+ ]),
459
+ key: "5"
460
+ } : void 0,
461
+ t.$slots.optionFullscreen ? {
462
+ name: "optionFullscreen",
463
+ fn: g(({ toggleFullscreen: l, isFullscreen: s }) => [
464
+ h(t.$slots, "optionFullscreen", _(I({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
465
+ ]),
466
+ key: "6"
467
+ } : void 0,
468
+ t.$slots.optionAnnotator ? {
469
+ name: "optionAnnotator",
470
+ fn: g(({ toggleAnnotator: l, isAnnotator: s }) => [
471
+ h(t.$slots, "optionAnnotator", _(I({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
472
+ ]),
473
+ key: "7"
474
+ } : void 0
475
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
476
+ (n(), i("svg", {
477
+ ref_key: "svgRef",
478
+ ref: de,
479
+ xmlns: o(wt),
480
+ class: R({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
481
+ viewBox: k.value.viewBox,
482
+ style: z(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
483
+ }, [
484
+ Te(o(He)),
485
+ t.$slots["chart-background"] ? (n(), i("foreignObject", {
486
+ key: 0,
487
+ x: 0,
488
+ y: 0,
489
+ width: k.value.width,
490
+ height: k.value.height,
491
+ style: {
492
+ pointerEvents: "none"
493
+ }
494
+ }, [
495
+ h(t.$slots, "chart-background", {}, void 0, !0)
496
+ ], 8, Dt)) : d("", !0),
497
+ O("defs", null, [
498
+ O("filter", {
499
+ id: `blur_${L.value}`,
500
+ x: "-50%",
501
+ y: "-50%",
502
+ width: "200%",
503
+ height: "200%"
504
+ }, [
505
+ O("feGaussianBlur", {
506
+ in: "SourceGraphic",
507
+ stdDeviation: 100 / e.value.style.chart.layout.arcs.gradient.intensity
508
+ }, null, 8, Mt)
509
+ ], 8, Bt)
510
+ ]),
511
+ (n(!0), i(Se, null, Pe(N.value, (l) => (n(), i("g", null, [
512
+ l.value ? (n(), i("path", {
513
+ key: 0,
514
+ d: l.path,
515
+ fill: "none",
516
+ stroke: e.value.style.chart.backgroundColor,
517
+ "stroke-width": q(l).border,
518
+ "stroke-linecap": "round"
519
+ }, null, 8, Et)) : d("", !0),
520
+ l.value ? (n(), i("path", {
521
+ key: 1,
522
+ d: l.path,
523
+ fill: "none",
524
+ stroke: l.color,
525
+ "stroke-width": q(l).path,
526
+ "stroke-linecap": "round",
527
+ class: R(`${x.value && x.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
528
+ }, null, 10, zt)) : d("", !0),
529
+ l.value && e.value.style.chart.layout.arcs.gradient.show ? (n(), i("g", {
530
+ key: 2,
531
+ filter: `url(#blur_${L.value})`
532
+ }, [
533
+ O("path", {
534
+ d: l.path,
535
+ fill: "none",
536
+ stroke: e.value.style.chart.layout.arcs.gradient.color,
537
+ "stroke-width": q(l).blur,
538
+ "stroke-linecap": "round",
539
+ class: R(`vue-ui-galaxy-gradient ${x.value && x.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
540
+ }, null, 10, Wt)
541
+ ], 8, Rt)) : d("", !0)
542
+ ]))), 256)),
543
+ (n(!0), i(Se, null, Pe(N.value, (l, s) => (n(), i("g", null, [
544
+ l.value ? (n(), i("path", {
545
+ key: 0,
546
+ d: l.path,
547
+ fill: "none",
548
+ stroke: "transparent",
549
+ "stroke-width": e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth,
550
+ "stroke-linecap": "round",
551
+ onMouseenter: (r) => lt({
552
+ datapoint: l,
553
+ seriesIndex: l.seriesIndex,
554
+ show: !0
555
+ }),
556
+ onMouseleave: (r) => et(l),
557
+ onClick: (r) => tt(l)
558
+ }, null, 40, Gt)) : d("", !0)
559
+ ]))), 256)),
560
+ h(t.$slots, "svg", { svg: k.value }, void 0, !0)
561
+ ], 14, Vt)),
562
+ t.$slots.watermark ? (n(), i("div", Ht, [
563
+ h(t.$slots, "watermark", _(I({ isPrinting: o(he) || o(ge) })), void 0, !0)
564
+ ])) : d("", !0),
565
+ O("div", {
566
+ ref_key: "chartLegend",
567
+ ref: ae
568
+ }, [
569
+ e.value.style.chart.legend.show ? (n(), S(o(Me), {
570
+ key: `legend_${te.value}`,
571
+ legendSet: we.value,
572
+ config: at.value,
573
+ onClickMarker: a[0] || (a[0] = ({ legend: l }) => j(l))
574
+ }, {
575
+ item: g(({ legend: l, index: s }) => [
576
+ o(U) ? d("", !0) : (n(), i("div", {
577
+ key: 0,
578
+ onClick: (r) => j(l),
579
+ style: z(`opacity:${y.value.includes(l.id) ? 0.5 : 1}`)
580
+ }, F(l.name) + F(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + F(e.value.style.chart.legend.showValue ? o(Le)(
581
+ e.value.style.chart.layout.labels.dataLabels.formatter,
582
+ l.value,
583
+ o($)({
584
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
585
+ v: l.value,
586
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
587
+ r: e.value.style.chart.legend.roundingValue
588
+ }),
589
+ { datapoint: l, seriesIndex: s }
590
+ ) : "") + " " + F(e.value.style.chart.legend.showPercentage ? y.value.includes(l.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / f.value) ? "-" : o($)({
591
+ v: l.value / f.value * 100,
592
+ s: "%",
593
+ r: e.value.style.chart.legend.roundingPercentage
594
+ })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Ut))
595
+ ]),
596
+ _: 1
597
+ }, 8, ["legendSet", "config"])) : d("", !0),
598
+ h(t.$slots, "legend", { legend: we.value }, void 0, !0)
599
+ ], 512),
600
+ t.$slots.source ? (n(), i("div", {
601
+ key: 5,
602
+ ref_key: "source",
603
+ ref: oe,
604
+ dir: "auto"
605
+ }, [
606
+ h(t.$slots, "source", {}, void 0, !0)
607
+ ], 512)) : d("", !0),
608
+ Te(o(Re), {
609
+ show: p.value.showTooltip && G.value,
610
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
611
+ color: e.value.style.chart.tooltip.color,
612
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
613
+ borderColor: e.value.style.chart.tooltip.borderColor,
614
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
615
+ fontSize: e.value.style.chart.tooltip.fontSize,
616
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
617
+ position: e.value.style.chart.tooltip.position,
618
+ offsetY: e.value.style.chart.tooltip.offsetY,
619
+ parent: m.value,
620
+ content: H.value,
621
+ isFullscreen: P.value,
622
+ isCustom: o(Ae)(e.value.style.chart.tooltip.customFormat),
623
+ smooth: e.value.style.chart.tooltip.smooth,
624
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
625
+ }, {
626
+ "tooltip-before": g(() => [
627
+ h(t.$slots, "tooltip-before", _(I({ ...J.value })), void 0, !0)
628
+ ]),
629
+ "tooltip-after": g(() => [
630
+ h(t.$slots, "tooltip-after", _(I({ ...J.value })), void 0, !0)
631
+ ]),
632
+ _: 3
633
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
634
+ ue.value ? (n(), S(o(Ee), {
635
+ key: 6,
636
+ hideDetails: "",
637
+ config: {
638
+ open: p.value.showTable,
639
+ maxHeight: 1e4,
640
+ body: {
641
+ backgroundColor: e.value.style.chart.backgroundColor,
642
+ color: e.value.style.chart.color
643
+ },
644
+ head: {
645
+ backgroundColor: e.value.style.chart.backgroundColor,
646
+ color: e.value.style.chart.color
647
+ }
648
+ }
649
+ }, {
650
+ content: g(() => [
651
+ (n(), S(o(ze), {
652
+ key: `table_${ee.value}`,
653
+ colNames: M.value.colNames,
654
+ head: M.value.head,
655
+ body: M.value.body,
656
+ config: M.value.config,
657
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
658
+ onClose: a[1] || (a[1] = (l) => p.value.showTable = !1)
659
+ }, {
660
+ th: g(({ th: l }) => [
661
+ O("div", {
662
+ innerHTML: l,
663
+ style: { display: "flex", "align-items": "center" }
664
+ }, null, 8, Xt)
665
+ ]),
666
+ td: g(({ td: l }) => [
667
+ ct(F(l.name || l), 1)
668
+ ]),
669
+ _: 1
670
+ }, 8, ["colNames", "head", "body", "config", "title"]))
671
+ ]),
672
+ _: 1
673
+ }, 8, ["config"])) : d("", !0),
674
+ o(U) ? (n(), S(Ot, { key: 7 })) : d("", !0)
675
+ ], 46, Ft));
676
+ }
677
+ }, ol = /* @__PURE__ */ Nt(Yt, [["__scopeId", "data-v-5de20f8f"]]);
678
+ export {
679
+ ol as default
680
+ };