vue-data-ui 3.0.0-next.45 → 3.0.0-next.46

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 (90) hide show
  1. package/dist/{Arrow-DgEzQzMT.js → Arrow-V1c_7Iuc.js} +1 -1
  2. package/dist/{BaseDraggableDialog-xCzNGVIr.js → BaseDraggableDialog-DcM8rbEA.js} +2 -2
  3. package/dist/{BaseIcon-CHz9WY7G.js → BaseIcon-CZuQH6nS.js} +1 -1
  4. package/dist/{ColorPicker--Tbj2qVg.js → ColorPicker-D9KkQSZJ.js} +2 -2
  5. package/dist/{DataTable-H7_j42qO.js → DataTable-B4zQoLvw.js} +2 -2
  6. package/dist/{Legend-Dfxs1-GD.js → Legend-BECWLhu3.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-C9gTKP8G.js → NonSvgPenAndPaper-bHMTpqgE.js} +3 -3
  8. package/dist/{PackageVersion-D0sIZGN2.js → PackageVersion-CfP-kRpV.js} +1 -1
  9. package/dist/{PenAndPaper-BNUfeOLb.js → PenAndPaper-D9kGHbcS.js} +3 -3
  10. package/dist/{Shape-Cre3W1M8.js → Shape-Bn0zkM0Z.js} +1 -1
  11. package/dist/{Slicer-7n_Mlm0i.js → Slicer-DZWj1AFl.js} +2 -2
  12. package/dist/{SparkTooltip-BbxlUnOg.js → SparkTooltip-ChekaEit.js} +1 -1
  13. package/dist/{Title-ovZyH-bw.js → Title-DDz8cvnd.js} +1 -1
  14. package/dist/{Tooltip-ECEmqPxW.js → Tooltip-PH1oamMs.js} +1 -1
  15. package/dist/{UserOptions-CA02tiU5.js → UserOptions-zFlvEx4s.js} +2 -2
  16. package/dist/{dom-to-png-BMnJicCF.js → dom-to-png-BWNK3ntP.js} +1 -1
  17. package/dist/{img-0LqWW2Ex.js → img-CBBL2nM6.js} +1 -1
  18. package/dist/{index-DUNyLppr.js → index-DZwm5g6W.js} +15 -2
  19. package/dist/{pdf-DqTTCU-h.js → pdf-D5CM2mLk.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +9 -0
  22. package/dist/types/vue-data-ui.d.ts +9 -0
  23. package/dist/{useNestedProp-DhAyQ4OD.js → useNestedProp-Ccr6UR4f.js} +1 -1
  24. package/dist/{usePrinter-BgLgX4pp.js → usePrinter-BpeW57d7.js} +2 -2
  25. package/dist/{vue-data-ui-DM9ESiFH.js → vue-data-ui-CaALX1cE.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-Shd_FKOm.js → vue-ui-3d-bar-CbXAXCrP.js} +6 -6
  28. package/dist/{vue-ui-accordion-BaRXVy_w.js → vue-ui-accordion-QGd9qcX5.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-BA5AoA6T.js → vue-ui-age-pyramid-DfOzyUtY.js} +6 -6
  30. package/dist/{vue-ui-annotator-GGdGlvgw.js → vue-ui-annotator-D2Y_kSr9.js} +2 -2
  31. package/dist/{vue-ui-bullet-DCvfW39D.js → vue-ui-bullet-BO054Yc2.js} +7 -7
  32. package/dist/{vue-ui-candlestick-CU7cLFmN.js → vue-ui-candlestick-321O2wNC.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-BHi3YhW1.js → vue-ui-carousel-table-EFpGLPVu.js} +4 -4
  34. package/dist/{vue-ui-chestnut-C4lh2sS7.js → vue-ui-chestnut-u9OTEs3b.js} +5 -5
  35. package/dist/{vue-ui-chord-Dek6mj60.js → vue-ui-chord-BdJsmbkH.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-D3CR4Awy.js → vue-ui-circle-pack-CcHd6tgT.js} +6 -6
  37. package/dist/{vue-ui-cursor-DAeccmuy.js → vue-ui-cursor-fe5rhpR7.js} +2 -2
  38. package/dist/{vue-ui-dashboard-CqQyrQaK.js → vue-ui-dashboard-pyEtswEm.js} +62 -62
  39. package/dist/{vue-ui-digits-B8beH3IH.js → vue-ui-digits-DECvoqJY.js} +2 -2
  40. package/dist/{vue-ui-donut-BYA4b3rG.js → vue-ui-donut-Cl3HImIJ.js} +8 -8
  41. package/dist/{vue-ui-donut-evolution-CqRnKnod.js → vue-ui-donut-evolution-BIkEVmIX.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-DWO524KW.js → vue-ui-dumbbell-Bzzz9egM.js} +7 -7
  43. package/dist/{vue-ui-flow-CMTGI20f.js → vue-ui-flow-DKBOm8Ly.js} +7 -7
  44. package/dist/{vue-ui-funnel-DL89UvEA.js → vue-ui-funnel-DJBUaWKY.js} +6 -6
  45. package/dist/{vue-ui-galaxy-FVeYk3Ru.js → vue-ui-galaxy-hvUrHTog.js} +5 -5
  46. package/dist/{vue-ui-gauge-D88yEkE-.js → vue-ui-gauge-Bg34WxCo.js} +6 -6
  47. package/dist/{vue-ui-gizmo-Cij7bBzH.js → vue-ui-gizmo-z962Lw4y.js} +3 -3
  48. package/dist/{vue-ui-heatmap-CzB7iKi6.js → vue-ui-heatmap-CfCTb5rc.js} +7 -7
  49. package/dist/{vue-ui-history-plot-pSkrE5NB.js → vue-ui-history-plot-DXSWYC7X.js} +7 -7
  50. package/dist/{vue-ui-kpi-CKQLAW0k.js → vue-ui-kpi-DNfzah-A.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-CHsEDrqu.js → vue-ui-mini-loader-COg2jo4z.js} +2 -2
  52. package/dist/{vue-ui-molecule-C1uJN7Tq.js → vue-ui-molecule-DzOl447I.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-DzJ79aVN.js → vue-ui-mood-radar-BwZIMppC.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-RQRhd3S9.js → vue-ui-nested-donuts-DpGhq449.js} +9 -9
  55. package/dist/{vue-ui-onion-DIyr7lAX.js → vue-ui-onion-DJSRYPHH.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-0pV8xmkI.js → vue-ui-parallel-coordinate-plot-D-YWnkYC.js} +8 -8
  57. package/dist/{vue-ui-quadrant-BSZs47n-.js → vue-ui-quadrant-atZKuW-R.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-BORR5gB-.js → vue-ui-quick-chart-CyqgjhMA.js} +6 -6
  59. package/dist/{vue-ui-radar-CZdotZii.js → vue-ui-radar-D7bfBtuC.js} +7 -7
  60. package/dist/{vue-ui-rating-BnyBBAi2.js → vue-ui-rating-emZD5fey.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-BxEz7R4c.js → vue-ui-relation-circle-BshAMPTk.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-BpXENB67.js → vue-ui-ridgeline-wv6bxiwj.js} +8 -8
  63. package/dist/vue-ui-rings-CgMxqvcZ.js +728 -0
  64. package/dist/{vue-ui-scatter-BW2r6fZY.js → vue-ui-scatter-ogXsQ4pc.js} +8 -8
  65. package/dist/{vue-ui-skeleton-_0yYISMA.js → vue-ui-skeleton-CblyYOEP.js} +3 -3
  66. package/dist/{vue-ui-smiley-6EoELJwf.js → vue-ui-smiley-DdZEficV.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-Dr4-9tPB.js → vue-ui-spark-trend-DQE2Uj-6.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-DBoFnnmf.js → vue-ui-sparkbar-DT1SKJJH.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-ByNxRCxn.js → vue-ui-sparkgauge-C6J8kV1u.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-DTTlaprU.js → vue-ui-sparkhistogram--TuX5Kqt.js} +4 -4
  71. package/dist/{vue-ui-sparkline-CHJ0zSWA.js → vue-ui-sparkline--WZw1wv7.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-Dx3v_B_V.js → vue-ui-sparkstackbar-mYek0uGr.js} +3 -3
  73. package/dist/{vue-ui-stackbar-Cu4V8Rkq.js → vue-ui-stackbar-BguicNbU.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-DO6UPV5d.js → vue-ui-strip-plot-BIi9ymxg.js} +7 -7
  75. package/dist/{vue-ui-table-CCCZjmAo.js → vue-ui-table-AZTSOqWN.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-Cd2mymaB.js → vue-ui-table-heatmap-XP01kcIl.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-GdtNr8d3.js → vue-ui-table-sparkline-BGmTm0wX.js} +4 -4
  78. package/dist/{vue-ui-thermometer-B5N3wZgz.js → vue-ui-thermometer-DZ2j88MJ.js} +6 -6
  79. package/dist/{vue-ui-timer-BP5ZlzSE.js → vue-ui-timer-Drh2_FuY.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-4haJ0VT4.js → vue-ui-tiremarks-BCWrtCkn.js} +6 -6
  81. package/dist/{vue-ui-treemap-Dkk846Tq.js → vue-ui-treemap-CwAjGMug.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-CwFc2JaR.js → vue-ui-vertical-bar-Bh4FTGGh.js} +9 -9
  83. package/dist/{vue-ui-waffle-CjgCVEN5.js → vue-ui-waffle-B2s-YgBH.js} +8 -8
  84. package/dist/{vue-ui-wheel-Bb1sXcqP.js → vue-ui-wheel-BUrxZvmU.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-BMZ3INRy.js → vue-ui-word-cloud-CX7FNV0u.js} +6 -6
  86. package/dist/{vue-ui-world-DZty9slh.js → vue-ui-world-prPApFsl.js} +6 -6
  87. package/dist/{vue-ui-xy-Cze2MXJb.js → vue-ui-xy-KViks--h.js} +9 -9
  88. package/dist/{vue-ui-xy-canvas-DiXFRGFz.js → vue-ui-xy-canvas-BuBtTw3Y.js} +8 -8
  89. package/package.json +1 -1
  90. package/dist/vue-ui-rings-CgzrMaMS.js +0 -687
@@ -1,687 +0,0 @@
1
- import { defineAsyncComponent as P, useSlots as et, ref as i, computed as f, watch as tt, shallowRef as _e, onMounted as lt, onBeforeUnmount as ot, createElementBlock as p, openBlock as r, unref as s, normalizeStyle as S, normalizeClass as U, createBlock as N, createCommentVNode as m, createElementVNode as T, createVNode as Q, createSlots as Oe, withCtx as g, renderSlot as d, normalizeProps as R, guardReactiveProps as M, Fragment as Z, renderList as ee, mergeProps as at, toDisplayString as B, createTextVNode as st, nextTick as nt } from "vue";
2
- import { u as ut, c as Ie, t as rt, p as A, a as it, o as vt, e as te, g as ct, b as dt, G as ht, d as Pe, f as F, X as pt, s as gt, x as ft, w as j, i as Se, q as yt, r as mt, y as bt, z as kt } from "./index-DUNyLppr.js";
3
- import { t as wt, u as Ct } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ne } from "./useNestedProp-DhAyQ4OD.js";
5
- import { u as $t } from "./usePrinter-BgLgX4pp.js";
6
- import { u as Tt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as xt } from "./useChartAccessibility-9icAAmYg.js";
8
- import _t from "./Legend-Dfxs1-GD.js";
9
- import Ot from "./Title-ovZyH-bw.js";
10
- import { _ as It } from "./Shape-Cre3W1M8.js";
11
- import Pt from "./img-0LqWW2Ex.js";
12
- import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const Nt = ["id"], At = ["xmlns", "viewBox"], Ft = ["width", "height"], Lt = ["id"], Vt = ["stop-color"], Rt = ["stop-color"], Mt = { key: 1 }, zt = ["stroke", "cx", "cy", "r", "fill"], Ut = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Bt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Et = ["cx", "cy", "r", "onMouseenter"], Wt = {
14
- key: 5,
15
- class: "vue-data-ui-watermark"
16
- }, Dt = ["onClick"], Gt = ["innerHTML"], Ht = {
17
- __name: "vue-ui-rings",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- emits: ["selectLegend"],
33
- setup(Ae, { expose: Fe, emit: Le }) {
34
- const Ve = P(() => import("./vue-ui-accordion-BaRXVy_w.js")), Re = P(() => import("./DataTable-H7_j42qO.js")), Me = P(() => import("./PackageVersion-D0sIZGN2.js")), ze = P(() => import("./PenAndPaper-BNUfeOLb.js")), Ue = P(() => import("./vue-ui-skeleton-_0yYISMA.js")), Be = P(() => import("./Tooltip-ECEmqPxW.js")), Ee = P(() => import("./UserOptions-CA02tiU5.js")), { vue_ui_rings: We } = ut(), De = et(), b = Ae, I = i(!1), E = f(() => !!b.dataset && b.dataset.length), C = i(Ie()), Ge = i(null), W = i(!1), X = i(""), $ = i(null), le = i(0), x = i(null), oe = i(null), ae = i(null), se = i(null), ne = i(null), ue = i(0), re = i(0), ie = i(0), e = f({
35
- get: () => he(),
36
- set: (t) => t
37
- }), { userOptionsVisible: q, setUserOptionsVisibility: ve, keepUserOptionState: ce } = Tt({ config: e.value }), { svgRef: de } = xt({ config: e.value.style.chart.title });
38
- function he() {
39
- const t = Ne({
40
- userConfig: b.config,
41
- defaultConfig: We
42
- });
43
- return t.theme ? {
44
- ...Ne({
45
- userConfig: it.vue_ui_rings[t.theme] || b.config,
46
- defaultConfig: t
47
- }),
48
- customPalette: rt[t.theme] || A
49
- } : t;
50
- }
51
- tt(() => b.config, (t) => {
52
- e.value = he(), q.value = !e.value.userOptions.showOnChartHover, pe(), ue.value += 1, re.value += 1, ie.value += 1, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.chart.tooltip.show;
53
- }, { deep: !0 });
54
- const _ = _e(null), L = _e(null);
55
- lt(() => {
56
- pe();
57
- });
58
- function pe() {
59
- if (vt(b.dataset) ? te({
60
- componentName: "VueUiRings",
61
- type: "dataset"
62
- }) : b.dataset.forEach((t, o) => {
63
- t.values.length || te({
64
- componentName: "VueUiRings",
65
- type: "dataset"
66
- }), ct({
67
- datasetObject: t,
68
- requiredAttributes: ["name", "values"]
69
- }).forEach((l) => {
70
- te({
71
- componentName: "VueUiRings",
72
- type: "datasetSerieAttribute",
73
- property: l,
74
- index: o
75
- });
76
- });
77
- }), e.value.responsive) {
78
- const t = wt(() => {
79
- const { width: o, height: l } = Ct({
80
- chart: x.value,
81
- title: e.value.style.chart.title.text ? oe.value : null,
82
- legend: e.value.style.chart.legend.show ? ae.value : null,
83
- source: se.value,
84
- noTitle: ne.value
85
- });
86
- requestAnimationFrame(() => {
87
- n.value.width = o, n.value.height = l;
88
- });
89
- });
90
- _.value && (L.value && _.value.unobserve(L.value), _.value.disconnect()), _.value = new ResizeObserver(t), L.value = x.value.parentNode, _.value.observe(L.value);
91
- }
92
- setTimeout(() => {
93
- I.value = !0;
94
- }, 600);
95
- }
96
- ot(() => {
97
- _.value && (L.value && _.value.unobserve(L.value), _.value.disconnect());
98
- });
99
- const { isPrinting: ge, isImaging: fe, generatePdf: ye, generateImage: me } = $t({
100
- elementId: `rings_${C.value}`,
101
- fileName: e.value.style.chart.title.text || "vue-ui-rings",
102
- options: e.value.userOptions.print
103
- }), He = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), be = f(() => dt(e.value.customPalette)), k = i({
104
- showTable: e.value.table.show,
105
- showTooltip: e.value.style.chart.tooltip.show
106
- }), n = i({
107
- height: 360,
108
- width: 360
109
- }), je = f(() => Math.min(n.value.height, n.value.width)), Xe = Le, y = i([]);
110
- function Y(t) {
111
- y.value.includes(t) ? y.value = y.value.filter((o) => o !== t) : y.value.push(t), Xe("selectLegend", h.value.map((o) => ({
112
- name: o.name,
113
- color: o.color,
114
- value: o.value
115
- })));
116
- }
117
- const qe = f(() => Math.max(
118
- ...D.value.filter((t) => !y.value.includes(t.uid)).map(({ value: t }) => t)
119
- ));
120
- function ke(t) {
121
- return t / qe.value;
122
- }
123
- const D = f(() => b.dataset.map(({ values: t, name: o, color: l = null }, a) => {
124
- const u = ht(t).reduce((v, z) => v + z, 0);
125
- return {
126
- name: o,
127
- color: l || Pe(l) || be.value[a] || A[a] || A[a % A.length],
128
- value: u,
129
- proportion: u / b.dataset.map((v) => (v.values || []).reduce((z, Ze) => z + Ze, 0)).reduce((v, z) => v + z, 0),
130
- uid: Ie(),
131
- absoluteIndex: a
132
- };
133
- })), we = f(() => D.value.map((t) => ({
134
- ...t,
135
- shape: "circle",
136
- opacity: y.value.includes(t.uid) ? 0.5 : 1,
137
- segregate: () => Y(t.uid),
138
- isSegregated: y.value.includes(t.uid)
139
- })).toSorted((t, o) => o.value - t.value)), Ye = f(() => ({
140
- cy: "rings-div-legend",
141
- backgroundColor: e.value.style.chart.legend.backgroundColor,
142
- color: e.value.style.chart.legend.color,
143
- fontSize: e.value.style.chart.legend.fontSize,
144
- paddingBottom: 12,
145
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
146
- })), w = f(() => D.value.filter((t) => !y.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), h = f(() => D.value.filter((t) => !y.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a, absoluteIndex: u }, v) => ({
147
- absoluteIndex: u,
148
- uid: a,
149
- name: t,
150
- color: l || Pe(l) || be.value[v] || A[v] || A[v % A.length],
151
- value: o,
152
- proportion: ke(o),
153
- percentage: o / w.value * 100,
154
- strokeWidth: e.value.style.chart.layout.rings.strokeWidth * ke(o)
155
- })).toSorted((t, o) => o.value - t.value));
156
- function Je() {
157
- return h.value.map(
158
- ({ name: t, color: o, value: l, absoluteValues: a, percentage: u }) => ({
159
- name: t,
160
- color: o,
161
- value: l,
162
- absoluteValues: a,
163
- percentage: u
164
- })
165
- );
166
- }
167
- const c = f(() => je.value - e.value.style.chart.layout.rings.strokeWidth * 2), J = i(null);
168
- function Ke(t, o) {
169
- if (y.value.length === b.dataset.length) return;
170
- J.value = {
171
- datapoint: o,
172
- seriesIndex: t,
173
- series: h.value,
174
- config: e.value
175
- }, $.value = t;
176
- const l = h.value[t], a = e.value.style.chart.tooltip.customFormat;
177
- if (bt(a) && kt(() => a({
178
- seriesIndex: t,
179
- datapoint: o,
180
- series: h.value,
181
- config: e.value
182
- })))
183
- X.value = a({
184
- seriesIndex: t,
185
- datapoint: o,
186
- series: h.value,
187
- config: e.value
188
- });
189
- else {
190
- let u = "";
191
- u += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, u += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}" />${De.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${C.value}_${o.absoluteIndex})" />` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${Se(
192
- e.value.style.chart.layout.labels.dataLabels.formatter,
193
- l.value,
194
- F({
195
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
196
- v: l.value,
197
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
198
- r: e.value.style.chart.tooltip.roundingValue
199
- }),
200
- { datapoint: o, seriesIndex: t }
201
- )}
202
- </b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${F({
203
- v: l.value / w.value * 100,
204
- s: "%",
205
- r: e.value.style.chart.tooltip.roundingPercentage
206
- })})</span></div>` : u += `<b>${F({
207
- v: l.value / w.value * 100,
208
- s: "%",
209
- r: e.value.style.chart.tooltip.roundingPercentage
210
- })}</b></div>`), X.value = u;
211
- }
212
- W.value = !0;
213
- }
214
- const O = f(() => {
215
- const t = h.value.map((l) => ({
216
- name: l.name,
217
- color: l.color
218
- })), o = h.value.map((l) => l.value);
219
- return { head: t, body: o };
220
- }), G = f(() => {
221
- const t = [
222
- ' <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>',
223
- F({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
224
- "100%"
225
- ], o = O.value.head.map((u, v) => [
226
- {
227
- color: u.color,
228
- name: u.name
229
- },
230
- F({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: O.value.body[v], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
231
- isNaN(O.value.body[v] / w.value) ? "-" : (O.value.body[v] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
232
- ]), l = {
233
- th: {
234
- backgroundColor: e.value.table.th.backgroundColor,
235
- color: e.value.table.th.color,
236
- outline: e.value.table.th.outline
237
- },
238
- td: {
239
- backgroundColor: e.value.table.td.backgroundColor,
240
- color: e.value.table.td.color,
241
- outline: e.value.table.td.outline
242
- },
243
- breakpoint: e.value.table.responsiveBreakpoint
244
- }, a = [
245
- e.value.table.columnNames.series,
246
- e.value.table.columnNames.value,
247
- e.value.table.columnNames.percentage
248
- ];
249
- return {
250
- head: t,
251
- body: o,
252
- config: l,
253
- colNames: a
254
- };
255
- });
256
- function Ce(t = null) {
257
- nt(() => {
258
- const o = O.value.head.map((u, v) => [[
259
- u.name
260
- ], [O.value.body[v]], [isNaN(O.value.body[v] / w.value) ? "-" : O.value.body[v] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = yt(l);
261
- t ? t(a) : mt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-rings" });
262
- });
263
- }
264
- const V = i(!1);
265
- function $e(t) {
266
- V.value = t, le.value += 1;
267
- }
268
- function Te() {
269
- k.value.showTable = !k.value.showTable;
270
- }
271
- function xe() {
272
- k.value.showTooltip = !k.value.showTooltip;
273
- }
274
- const H = i(!1);
275
- function K() {
276
- H.value = !H.value;
277
- }
278
- async function Qe({ scale: t = 2 } = {}) {
279
- if (!x.value) return;
280
- const { width: o, height: l } = x.value.getBoundingClientRect(), a = o / l, { imageUri: u, base64: v } = await Pt({ domElement: x.value, base64: !0, img: !0, scale: t });
281
- return {
282
- imageUri: u,
283
- base64: v,
284
- title: e.value.style.chart.title.text,
285
- width: o,
286
- height: l,
287
- aspectRatio: a
288
- };
289
- }
290
- return Fe({
291
- getData: Je,
292
- getImage: Qe,
293
- generatePdf: ye,
294
- generateCsv: Ce,
295
- generateImage: me,
296
- toggleTable: Te,
297
- toggleTooltip: xe,
298
- toggleAnnotator: K,
299
- toggleFullscreen: $e
300
- }), (t, o) => (r(), p("div", {
301
- ref_key: "ringsChart",
302
- ref: x,
303
- class: U(`vue-ui-rings ${V.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
304
- style: S(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
305
- id: `rings_${C.value}`,
306
- onMouseleave: o[3] || (o[3] = (l) => {
307
- $.value = null, W.value = !1, s(ve)(!1);
308
- }),
309
- onMouseenter: o[4] || (o[4] = () => s(ve)(!0))
310
- }, [
311
- e.value.userOptions.buttons.annotator ? (r(), N(s(ze), {
312
- key: 0,
313
- svgRef: s(de),
314
- backgroundColor: e.value.style.chart.backgroundColor,
315
- color: e.value.style.chart.color,
316
- active: H.value,
317
- onClose: K
318
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
319
- He.value ? (r(), p("div", {
320
- key: 1,
321
- ref_key: "noTitle",
322
- ref: ne,
323
- class: "vue-data-ui-no-title-space",
324
- style: "height:36px; width: 100%;background:transparent"
325
- }, null, 512)) : m("", !0),
326
- e.value.style.chart.title.text ? (r(), p("div", {
327
- key: 2,
328
- ref_key: "chartTitle",
329
- ref: oe,
330
- style: "width:100%;background:transparent"
331
- }, [
332
- (r(), N(Ot, {
333
- key: `title_${ue.value}`,
334
- config: {
335
- title: {
336
- cy: "rings-div-title",
337
- ...e.value.style.chart.title
338
- },
339
- subtitle: {
340
- cy: "rings-div-subtitle",
341
- ...e.value.style.chart.title.subtitle
342
- }
343
- }
344
- }, null, 8, ["config"]))
345
- ], 512)) : m("", !0),
346
- e.value.userOptions.show && E.value && (s(ce) || s(q)) ? (r(), N(s(Ee), {
347
- ref_key: "details",
348
- ref: Ge,
349
- key: `user_options_${le.value}`,
350
- backgroundColor: e.value.style.chart.backgroundColor,
351
- color: e.value.style.chart.color,
352
- isPrinting: s(ge),
353
- isImaging: s(fe),
354
- uid: C.value,
355
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
356
- hasPdf: e.value.userOptions.buttons.pdf,
357
- hasXls: e.value.userOptions.buttons.csv,
358
- hasImg: e.value.userOptions.buttons.img,
359
- hasTable: e.value.userOptions.buttons.table,
360
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
361
- isTooltip: k.value.showTooltip,
362
- isFullscreen: V.value,
363
- titles: { ...e.value.userOptions.buttonTitles },
364
- chartElement: x.value,
365
- position: e.value.userOptions.position,
366
- hasAnnotator: e.value.userOptions.buttons.annotator,
367
- isAnnotation: H.value,
368
- callbacks: e.value.userOptions.callbacks,
369
- printScale: e.value.userOptions.print.scale,
370
- onToggleFullscreen: $e,
371
- onGeneratePdf: s(ye),
372
- onGenerateCsv: Ce,
373
- onGenerateImage: s(me),
374
- onToggleTable: Te,
375
- onToggleTooltip: xe,
376
- onToggleAnnotator: K,
377
- style: S({
378
- visibility: s(ce) ? s(q) ? "visible" : "hidden" : "visible"
379
- })
380
- }, Oe({ _: 2 }, [
381
- t.$slots.menuIcon ? {
382
- name: "menuIcon",
383
- fn: g(({ isOpen: l, color: a }) => [
384
- d(t.$slots, "menuIcon", R(M({ isOpen: l, color: a })), void 0, !0)
385
- ]),
386
- key: "0"
387
- } : void 0,
388
- t.$slots.optionTooltip ? {
389
- name: "optionTooltip",
390
- fn: g(() => [
391
- d(t.$slots, "optionTooltip", {}, void 0, !0)
392
- ]),
393
- key: "1"
394
- } : void 0,
395
- t.$slots.optionPdf ? {
396
- name: "optionPdf",
397
- fn: g(() => [
398
- d(t.$slots, "optionPdf", {}, void 0, !0)
399
- ]),
400
- key: "2"
401
- } : void 0,
402
- t.$slots.optionCsv ? {
403
- name: "optionCsv",
404
- fn: g(() => [
405
- d(t.$slots, "optionCsv", {}, void 0, !0)
406
- ]),
407
- key: "3"
408
- } : void 0,
409
- t.$slots.optionImg ? {
410
- name: "optionImg",
411
- fn: g(() => [
412
- d(t.$slots, "optionImg", {}, void 0, !0)
413
- ]),
414
- key: "4"
415
- } : void 0,
416
- t.$slots.optionTable ? {
417
- name: "optionTable",
418
- fn: g(() => [
419
- d(t.$slots, "optionTable", {}, void 0, !0)
420
- ]),
421
- key: "5"
422
- } : void 0,
423
- t.$slots.optionFullscreen ? {
424
- name: "optionFullscreen",
425
- fn: g(({ toggleFullscreen: l, isFullscreen: a }) => [
426
- d(t.$slots, "optionFullscreen", R(M({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
427
- ]),
428
- key: "6"
429
- } : void 0,
430
- t.$slots.optionAnnotator ? {
431
- name: "optionAnnotator",
432
- fn: g(({ toggleAnnotator: l, isAnnotator: a }) => [
433
- d(t.$slots, "optionAnnotator", R(M({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
434
- ]),
435
- key: "7"
436
- } : void 0
437
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
438
- E.value ? (r(), p("svg", {
439
- key: 4,
440
- ref_key: "svgRef",
441
- ref: de,
442
- xmlns: s(pt),
443
- class: U({ "vue-data-ui-fullscreen--on": V.value, "vue-data-ui-fulscreen--off": !V.value }),
444
- viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
445
- style: S(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
446
- }, [
447
- Q(s(Me)),
448
- t.$slots["chart-background"] ? (r(), p("foreignObject", {
449
- key: 0,
450
- x: 0,
451
- y: 0,
452
- width: n.value.width <= 0 ? 10 : n.value.width,
453
- height: n.value.height <= 0 ? 10 : n.value.height,
454
- style: {
455
- pointerEvents: "none"
456
- }
457
- }, [
458
- d(t.$slots, "chart-background", {}, void 0, !0)
459
- ], 8, Ft)) : m("", !0),
460
- T("defs", null, [
461
- (r(!0), p(Z, null, ee(h.value, (l, a) => (r(), p("radialGradient", {
462
- cx: "50%",
463
- cy: "30%",
464
- r: "50%",
465
- fx: "50%",
466
- fy: "50%",
467
- id: `gradient_${C.value}_${a}`
468
- }, [
469
- T("stop", {
470
- offset: "0%",
471
- "stop-color": s(gt)(s(ft)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
472
- }, null, 8, Vt),
473
- T("stop", {
474
- offset: "100%",
475
- "stop-color": l.color
476
- }, null, 8, Rt)
477
- ], 8, Lt))), 256))
478
- ]),
479
- t.$slots.pattern ? (r(), p("g", Mt, [
480
- (r(!0), p(Z, null, ee(h.value, (l) => (r(), p("defs", null, [
481
- d(t.$slots, "pattern", at({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${C.value}_${l.absoluteIndex}` }), void 0, !0)
482
- ]))), 256))
483
- ])) : m("", !0),
484
- (r(!0), p(Z, null, ee(h.value, (l, a) => (r(), p("g", null, [
485
- T("circle", {
486
- class: U({
487
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
488
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
489
- "vue-ui-rings-opacity": $.value !== null && $.value !== a
490
- }),
491
- style: S(`animation-delay:${a * 100}ms`),
492
- stroke: e.value.style.chart.layout.rings.stroke,
493
- cx: n.value.width / 2,
494
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
495
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
496
- fill: e.value.style.chart.layout.rings.gradient.underlayerColor
497
- }, null, 14, zt),
498
- T("circle", {
499
- class: U({
500
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
501
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
502
- "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
503
- "vue-ui-rings-blur": $.value !== null && $.value !== a
504
- }),
505
- style: S(`animation-delay:${a * 100}ms`),
506
- stroke: e.value.style.chart.layout.rings.stroke,
507
- "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
508
- cx: n.value.width / 2,
509
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
510
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
511
- fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${C.value}_${a})` : l.color
512
- }, null, 14, Ut),
513
- t.$slots.pattern ? (r(), p("circle", {
514
- key: 0,
515
- class: U({
516
- "vue-ui-rings-item": I.value && e.value.useCssAnimation,
517
- "vue-rings-item-onload": !I.value && e.value.useCssAnimation,
518
- "vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
519
- "vue-ui-rings-blur": $.value !== null && $.value !== a
520
- }),
521
- style: S(`animation-delay:${a * 100}ms`),
522
- stroke: e.value.style.chart.layout.rings.stroke,
523
- "stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
524
- cx: n.value.width / 2,
525
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
526
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
527
- fill: `url(#pattern_${C.value}_${l.absoluteIndex})`
528
- }, null, 14, Bt)) : m("", !0),
529
- T("circle", {
530
- stroke: "none",
531
- cx: n.value.width / 2,
532
- cy: a === 0 ? n.value.height / 2 : n.value.height / 2 + c.value * h.value[0].proportion / 2 - c.value * l.proportion / 2 - 2 * (a + 1),
533
- r: s(j)(c.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : c.value * l.proportion / 2 * 0.9),
534
- fill: "transparent",
535
- onMouseenter: (u) => Ke(a, l),
536
- onMouseleave: o[0] || (o[0] = (u) => {
537
- $.value = null, W.value = !1;
538
- })
539
- }, null, 40, Et)
540
- ]))), 256)),
541
- d(t.$slots, "svg", { svg: n.value }, void 0, !0)
542
- ], 14, At)) : m("", !0),
543
- t.$slots.watermark ? (r(), p("div", Wt, [
544
- d(t.$slots, "watermark", R(M({ isPrinting: s(ge) || s(fe) })), void 0, !0)
545
- ])) : m("", !0),
546
- E.value ? m("", !0) : (r(), N(s(Ue), {
547
- key: 6,
548
- config: {
549
- type: "rings",
550
- style: {
551
- backgroundColor: e.value.style.chart.backgroundColor,
552
- rings: {
553
- color: "#CCCCCC"
554
- }
555
- }
556
- }
557
- }, null, 8, ["config"])),
558
- T("div", {
559
- ref_key: "chartLegend",
560
- ref: ae
561
- }, [
562
- e.value.style.chart.legend.show ? (r(), N(_t, {
563
- key: `legend_${ie.value}`,
564
- legendSet: we.value,
565
- config: Ye.value,
566
- onClickMarker: o[1] || (o[1] = ({ legend: l }) => Y(l.uid))
567
- }, Oe({
568
- item: g(({ legend: l, index: a }) => [
569
- T("div", {
570
- onClick: (u) => Y(l.uid),
571
- style: S(`opacity:${y.value.includes(l.uid) ? 0.5 : 1}`)
572
- }, B(l.name) + B(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + B(e.value.style.chart.legend.showValue ? s(Se)(
573
- e.value.style.chart.layout.labels.dataLabels.formatter,
574
- l.value,
575
- s(F)({
576
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
577
- v: l.value,
578
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
579
- r: e.value.style.chart.legend.roundingValue
580
- }),
581
- { datapoint: l, seriesIndex: a }
582
- ) : "") + " " + B(e.value.style.chart.legend.showPercentage ? y.value.includes(l.uid) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / w.value) ? "-" : s(F)({
583
- v: l.value / w.value * 100,
584
- s: "%",
585
- r: e.value.style.chart.legend.roundingPercentage
586
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Dt)
587
- ]),
588
- _: 2
589
- }, [
590
- t.$slots.pattern ? {
591
- name: "legend-pattern",
592
- fn: g(({ legend: l, index: a }) => [
593
- Q(It, {
594
- shape: l.shape,
595
- radius: 30,
596
- stroke: "none",
597
- plot: { x: 30, y: 30 },
598
- fill: `url(#pattern_${C.value}_${a})`
599
- }, null, 8, ["shape", "fill"])
600
- ]),
601
- key: "0"
602
- } : void 0
603
- ]), 1032, ["legendSet", "config"])) : d(t.$slots, "legend", {
604
- key: 1,
605
- legend: we.value
606
- }, void 0, !0)
607
- ], 512),
608
- t.$slots.source ? (r(), p("div", {
609
- key: 7,
610
- ref_key: "source",
611
- ref: se,
612
- dir: "auto"
613
- }, [
614
- d(t.$slots, "source", {}, void 0, !0)
615
- ], 512)) : m("", !0),
616
- Q(s(Be), {
617
- show: k.value.showTooltip && W.value && y.value.length < b.dataset.length,
618
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
619
- color: e.value.style.chart.tooltip.color,
620
- borderRadius: e.value.style.chart.tooltip.borderRadius,
621
- borderColor: e.value.style.chart.tooltip.borderColor,
622
- borderWidth: e.value.style.chart.tooltip.borderWidth,
623
- fontSize: e.value.style.chart.tooltip.fontSize,
624
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
625
- position: e.value.style.chart.tooltip.position,
626
- offsetY: e.value.style.chart.tooltip.offsetY,
627
- parent: x.value,
628
- content: X.value,
629
- isFullscreen: V.value,
630
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
631
- smooth: e.value.style.chart.tooltip.smooth,
632
- backdropFilter: e.value.style.chart.tooltip.backdropFilter
633
- }, {
634
- "tooltip-before": g(() => [
635
- d(t.$slots, "tooltip-before", R(M({ ...J.value })), void 0, !0)
636
- ]),
637
- "tooltip-after": g(() => [
638
- d(t.$slots, "tooltip-after", R(M({ ...J.value })), void 0, !0)
639
- ]),
640
- _: 3
641
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
642
- E.value ? (r(), N(s(Ve), {
643
- key: 8,
644
- hideDetails: "",
645
- config: {
646
- open: k.value.showTable,
647
- maxHeight: 1e4,
648
- body: {
649
- backgroundColor: e.value.style.chart.backgroundColor,
650
- color: e.value.style.chart.color
651
- },
652
- head: {
653
- backgroundColor: e.value.style.chart.backgroundColor,
654
- color: e.value.style.chart.color
655
- }
656
- }
657
- }, {
658
- content: g(() => [
659
- (r(), N(s(Re), {
660
- key: `table_${re.value}`,
661
- colNames: G.value.colNames,
662
- head: G.value.head,
663
- body: G.value.body,
664
- config: G.value.config,
665
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
666
- onClose: o[2] || (o[2] = (l) => k.value.showTable = !1)
667
- }, {
668
- th: g(({ th: l }) => [
669
- T("div", {
670
- innerHTML: l,
671
- style: { display: "flex", "align-items": "center" }
672
- }, null, 8, Gt)
673
- ]),
674
- td: g(({ td: l }) => [
675
- st(B(l.name || l), 1)
676
- ]),
677
- _: 1
678
- }, 8, ["colNames", "head", "body", "config", "title"]))
679
- ]),
680
- _: 1
681
- }, 8, ["config"])) : m("", !0)
682
- ], 46, Nt));
683
- }
684
- }, al = /* @__PURE__ */ St(Ht, [["__scopeId", "data-v-2a21f700"]]);
685
- export {
686
- al as default
687
- };