vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,701 +0,0 @@
1
- import { defineAsyncComponent as O, computed as h, ref as u, watch as xe, shallowRef as Te, onMounted as et, onBeforeUnmount as tt, createElementBlock as i, openBlock as s, unref as r, normalizeStyle as X, normalizeClass as E, createBlock as P, createCommentVNode as p, createElementVNode as S, createVNode as Oe, createSlots as at, withCtx as f, renderSlot as v, normalizeProps as F, guardReactiveProps as M, Fragment as D, renderList as L, toDisplayString as R, createTextVNode as lt, nextTick as ot } from "vue";
2
- import { u as nt, c as st, t as rt, p as Pe, a as ut, b as it, o as ct, e as Z, d as vt, X as dt, f as V, i as ee, x as _e, q as ht, r as ft, y as gt } from "./index-Cg-RjxqH.js";
3
- import { t as pt, u as yt } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ie } from "./useNestedProp-C_G5E08Y.js";
5
- import { u as mt } from "./usePrinter-BUzmyQf9.js";
6
- import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as kt } from "./useChartAccessibility-9icAAmYg.js";
8
- import wt from "./Title-B7Xb3YuE.js";
9
- import $t from "./Legend-B2hrDh4G.js";
10
- import Ct from "./img-D72yZNUg.js";
11
- import { _ as xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- const Tt = ["id"], Ot = ["xmlns", "viewBox"], Pt = ["width", "height"], _t = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], It = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], At = ["id"], St = ["stdDeviation"], Ft = ["filter"], Mt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Rt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], Nt = { key: 2 }, Dt = ["onMouseenter"], Lt = ["x", "y", "font-size", "fill", "font-weight"], Vt = {
13
- key: 5,
14
- class: "vue-data-ui-watermark"
15
- }, zt = ["onClick"], Bt = ["innerHTML"], Yt = {
16
- __name: "vue-ui-onion",
17
- props: {
18
- config: {
19
- type: Object,
20
- default() {
21
- return {};
22
- }
23
- },
24
- dataset: {
25
- type: Array,
26
- default() {
27
- return [];
28
- }
29
- }
30
- },
31
- emits: ["selectLegend"],
32
- setup(Ae, { expose: Se, emit: Fe }) {
33
- const Me = O(() => import("./vue-ui-accordion-CRomxzaL.js")), Re = O(() => import("./DataTable-mQ6Wd-rR.js")), Ne = O(() => import("./PackageVersion-CeEYZfaH.js")), De = O(() => import("./PenAndPaper-DhSxfUrQ.js")), Le = O(() => import("./vue-ui-skeleton-CUOhCY4p.js")), Ve = O(() => import("./Tooltip-BidRoM5E.js")), ze = O(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_onion: Be } = nt(), $ = Ae, z = h(() => !!$.dataset && $.dataset.length), _ = u(st()), Ye = u(null), te = u(0), B = u(!1), G = u(""), y = u([]), C = u(null), ae = u(null), le = u(null), oe = u(null), ne = u(null), se = u(0), re = u(0), ue = u(0), e = h({
34
- get: () => de(),
35
- set: (t) => t
36
- }), { userOptionsVisible: H, setUserOptionsVisibility: ie, keepUserOptionState: ce } = bt({ config: e.value }), { svgRef: ve } = kt({ config: e.value.style.chart.title });
37
- function de() {
38
- const t = Ie({
39
- userConfig: $.config,
40
- defaultConfig: Be
41
- });
42
- return t.theme ? {
43
- ...Ie({
44
- userConfig: ut.vue_ui_onion[t.theme] || $.config,
45
- defaultConfig: t
46
- }),
47
- customPalette: rt[t.theme] || Pe
48
- } : t;
49
- }
50
- xe(() => $.config, (t) => {
51
- e.value = de(), H.value = !e.value.userOptions.showOnChartHover, ye(), se.value += 1, re.value += 1, ue.value += 1, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show;
52
- }, { deep: !0 });
53
- const { isPrinting: he, isImaging: fe, generatePdf: ge, generateImage: pe } = mt({
54
- elementId: `vue-ui-onion_${_.value}`,
55
- fileName: e.value.style.chart.title.text || "vue-ui-onion",
56
- options: e.value.userOptions.print
57
- }), Ue = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), Xe = h(() => it(e.value.customPalette)), m = u({
58
- showTable: e.value.table.show,
59
- showTooltip: e.value.style.chart.tooltip.show
60
- }), n = u({
61
- height: 512,
62
- width: 512,
63
- padding: {
64
- top: 64,
65
- left: 64,
66
- right: 64,
67
- bottom: 64
68
- },
69
- minRadius: 64
70
- }), x = Te(null), I = Te(null);
71
- et(() => {
72
- ye();
73
- });
74
- function ye() {
75
- if (ct($.dataset) && Z({
76
- componentName: "VueUiOnion",
77
- type: "dataset"
78
- }), e.value.responsive) {
79
- const o = pt(() => {
80
- const { width: a, height: l } = yt({
81
- chart: C.value,
82
- title: e.value.style.chart.title.text ? ae.value : null,
83
- legend: e.value.style.chart.legend.show ? le.value : null,
84
- source: oe.value,
85
- noTitle: ne.value
86
- });
87
- requestAnimationFrame(() => {
88
- n.value.width = a, n.value.height = l, n.value.padding.top = Math.max(a, l) * 0.125, n.value.padding.right = Math.max(a, l) * 0.125, n.value.padding.bottom = Math.max(a, l) * 0.125, n.value.padding.left = Math.max(a, l) * 0.125, n.value.minRadius = Math.min(a, l) * 0.125;
89
- });
90
- });
91
- x.value && (I.value && x.value.unobserve(I.value), x.value.disconnect()), x.value = new ResizeObserver(o), I.value = C.value.parentNode, x.value.observe(I.value);
92
- }
93
- }
94
- tt(() => {
95
- x.value && (I.value && x.value.unobserve(I.value), x.value.disconnect());
96
- });
97
- const c = h(() => ({
98
- top: n.value.padding.top,
99
- left: n.value.padding.left,
100
- right: n.value.width - n.value.padding.right,
101
- bottom: n.value.height - n.value.padding.bottom,
102
- centerX: n.value.width / 2,
103
- centerY: n.value.height / 2,
104
- width: n.value.width - n.value.padding.right - n.value.padding.left,
105
- height: n.value.height - n.value.padding.bottom - n.value.padding.top,
106
- minRadius: n.value.minRadius,
107
- maxRadius: Math.min(n.value.width, n.value.height) - n.value.padding.top * 2
108
- })), d = h(() => ($.dataset.forEach((t, o) => {
109
- [null, void 0].includes(t.name) && Z({
110
- componentName: "VueUiOnion",
111
- type: "datasetSerieAttribute",
112
- property: "name",
113
- index: o
114
- }), [void 0].includes(t.percentage) && Z({
115
- componentName: "VueUiOnion",
116
- type: "datasetSerieAttribute",
117
- property: "percentage",
118
- index: o
119
- });
120
- }), $.dataset.map((t, o) => {
121
- const a = `onion_serie_${o}_${_.value}`;
122
- return {
123
- ...t,
124
- percentage: t.percentage || 0,
125
- targetPercentage: t.percentage || 0,
126
- color: vt(t.color) || Xe.value[o] || Pe[o],
127
- id: a,
128
- shape: "circle",
129
- opacity: y.value.includes(a) ? 0.5 : 1,
130
- absoluteIndex: o,
131
- segregate: () => me(a),
132
- isSegregated: y.value.includes(a)
133
- };
134
- }))), N = u(d.value), Ee = h(() => e.value.useStartAnimation), Ge = u(null), He = h(() => Math.max(...d.value.map((t) => t.percentage))), W = u(!1);
135
- xe(() => d.value, We, { immediate: !0 });
136
- function We() {
137
- if (Ee.value && !W.value) {
138
- let o = function() {
139
- t >= He.value ? (cancelAnimationFrame(Ge.value), N.value = d.value, W.value = !0) : (N.value = d.value.map((a) => ({
140
- ...a,
141
- percentage: t < a.targetPercentage ? t : a.targetPercentage
142
- })), t += 1, requestAnimationFrame(o), W.value = !0);
143
- };
144
- N.value = d.value.map((a) => ({
145
- ...a,
146
- percentage: 0
147
- }));
148
- let t = 0;
149
- o();
150
- } else
151
- N.value = d.value;
152
- }
153
- const je = h(() => ({
154
- cy: "onion-div-legend",
155
- backgroundColor: e.value.style.chart.legend.backgroundColor,
156
- color: e.value.style.chart.legend.color,
157
- fontSize: e.value.style.chart.legend.fontSize,
158
- paddingBottom: 12,
159
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
160
- })), qe = h(() => d.value.filter((t) => !y.value.includes(t.id)).length), T = h(() => {
161
- const t = Math.min(c.value.width, c.value.height) / 2 / d.value.length;
162
- return {
163
- gutter: (t > e.value.style.chart.layout.maxThickness ? e.value.style.chart.layout.maxThickness : t) * e.value.style.chart.layout.gutter.width,
164
- track: (t > e.value.style.chart.layout.maxThickness ? e.value.style.chart.layout.maxThickness : t) * e.value.style.chart.layout.track.width
165
- };
166
- }), k = h(() => N.value.filter((t) => !y.value.includes(t.id)).map((t, o) => {
167
- const a = (c.value.maxRadius - T.value.track) / qe.value / 2 * (1 + o), l = c.value.centerY - a;
168
- return {
169
- percentage: t.percentage || 0,
170
- ...t,
171
- labelY: l,
172
- radius: a,
173
- path: Je(a, t.percentage || 0)
174
- };
175
- }));
176
- function Je(t, o) {
177
- const a = 2 * Math.PI * t, l = a * 0.75, g = `${l} ${a}`, b = l * (1 - o / 100);
178
- return {
179
- bgDashArray: `${l} ${a}`,
180
- bgDashOffset: 0,
181
- dashArray: g,
182
- dashOffset: b,
183
- fullOffset: 0,
184
- active: `
185
- M ${c.value.centerX},${c.value.centerY - t}
186
- A ${t},${t} 0 1 1
187
- ${c.value.centerX + t * Math.cos(Math.PI * 3 / 4)},${c.value.centerY + t * Math.sin(Math.PI * 3 / 4)}
188
- `.trim()
189
- };
190
- }
191
- const Ke = Fe;
192
- function me(t) {
193
- y.value.includes(t) ? y.value = y.value.filter((o) => o !== t) : y.value.push(t), Ke("selectLegend", k.value);
194
- }
195
- function Qe() {
196
- return k.value;
197
- }
198
- const j = h(() => {
199
- const t = [e.value.table.translations.serie, e.value.table.translations.percentage, e.value.table.translations.value], o = k.value.map((a) => [
200
- a.name,
201
- a.percentage,
202
- a.value
203
- ]);
204
- return { head: t, body: o };
205
- }), Y = h(() => {
206
- const t = j.value.head, o = k.value.map((l) => [
207
- `<span style="color:${l.color}">⬤</span> ${l.name}`,
208
- `${Number(l.percentage ?? 0).toFixed(e.value.table.td.roundingPercentage).toLocaleString()}%`,
209
- `${l.prefix || ""}${[null, void 0, NaN, "NaN"].includes(l.value) ? "-" : l.value.toFixed(e.value.table.td.roundingValue).toLocaleString()}${l.suffix || ""}`
210
- ]), a = {
211
- th: {
212
- backgroundColor: e.value.table.th.backgroundColor,
213
- color: e.value.table.th.color,
214
- outline: e.value.table.th.outline
215
- },
216
- td: {
217
- backgroundColor: e.value.table.td.backgroundColor,
218
- color: e.value.table.td.color,
219
- outline: e.value.table.td.outline
220
- },
221
- breakpoint: e.value.table.responsiveBreakpoint
222
- };
223
- return { head: t, body: o, config: a, colNames: t };
224
- });
225
- function be(t = null) {
226
- ot(() => {
227
- const o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = j.value.head, l = j.value.body, g = o.concat([a]).concat(l), b = ht(g);
228
- t ? t(b) : ft({ csvContent: b, title: e.value.style.chart.title.text || "vue-ui-onion" });
229
- });
230
- }
231
- const w = u(void 0), A = u(!1);
232
- function ke(t) {
233
- A.value = t, te.value += 1;
234
- }
235
- const q = u(null);
236
- function we({ datapoint: t, seriesIndex: o, show: a = !0 }) {
237
- const l = t.absoluteIndex;
238
- w.value = o, q.value = {
239
- datapoint: t,
240
- seriesIndex: l,
241
- series: d.value,
242
- config: e.value
243
- }, B.value = a;
244
- let g = "";
245
- const b = e.value.style.chart.tooltip.customFormat;
246
- if (_e(b) && gt(() => b({
247
- seriesIndex: l,
248
- datapoint: t,
249
- series: d.value,
250
- config: e.value
251
- })))
252
- G.value = b({
253
- seriesIndex: l,
254
- datapoint: t,
255
- series: d.value,
256
- config: e.value
257
- });
258
- else {
259
- const K = e.value.style.chart.tooltip.showPercentage, Q = e.value.style.chart.tooltip.showValue;
260
- g += `<div style="width: 100%; border-bottom: 1px solid ${e.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;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><span></span>${t.name}</span></div>`, g += `<div style="width:100%;text-align:left;"><b>${K ? V({ p: "", v: t.percentage, s: "%", r: e.value.style.chart.tooltip.roundingPercentage }) : ""}</b> ${K && Q ? "(" : ""}${Q ? ee(
261
- e.value.style.chart.layout.labels.value.formatter,
262
- t.value,
263
- V({
264
- p: t.prefix || "",
265
- v: t.value,
266
- s: t.suffix || "",
267
- r: e.value.style.chart.tooltip.roundingValue
268
- }),
269
- { datapoint: t, seriesIndex: o }
270
- ) : ""}${K && Q ? ")" : ""}</div>`, G.value = `<div>${g}</div>`;
271
- }
272
- }
273
- function $e() {
274
- m.value.showTable = !m.value.showTable;
275
- }
276
- function Ce() {
277
- m.value.showTooltip = !m.value.showTooltip;
278
- }
279
- const U = u(!1);
280
- function J() {
281
- U.value = !U.value;
282
- }
283
- async function Ze({ scale: t = 2 } = {}) {
284
- if (!C.value) return;
285
- const { width: o, height: a } = C.value.getBoundingClientRect(), l = o / a, { imageUri: g, base64: b } = await Ct({ domElement: C.value, base64: !0, img: !0, scale: t });
286
- return {
287
- imageUri: g,
288
- base64: b,
289
- title: e.value.style.chart.title.text,
290
- width: o,
291
- height: a,
292
- aspectRatio: l
293
- };
294
- }
295
- return Se({
296
- getData: Qe,
297
- getImage: Ze,
298
- generatePdf: ge,
299
- generateCsv: be,
300
- generateImage: pe,
301
- toggleTable: $e,
302
- toggleTooltip: Ce,
303
- toggleAnnotator: J,
304
- toggleFullscreen: ke
305
- }), (t, o) => (s(), i("div", {
306
- class: E(`vue-ui-onion ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
307
- ref_key: "onionChart",
308
- ref: C,
309
- id: `vue-ui-onion_${_.value}`,
310
- style: X(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
311
- onMouseenter: o[4] || (o[4] = () => r(ie)(!0)),
312
- onMouseleave: o[5] || (o[5] = () => r(ie)(!1))
313
- }, [
314
- e.value.userOptions.buttons.annotator ? (s(), P(r(De), {
315
- key: 0,
316
- svgRef: r(ve),
317
- backgroundColor: e.value.style.chart.backgroundColor,
318
- color: e.value.style.chart.color,
319
- active: U.value,
320
- onClose: J
321
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : p("", !0),
322
- Ue.value ? (s(), i("div", {
323
- key: 1,
324
- ref_key: "noTitle",
325
- ref: ne,
326
- class: "vue-data-ui-no-title-space",
327
- style: "height:36px; width: 100%;background:transparent"
328
- }, null, 512)) : p("", !0),
329
- e.value.style.chart.title.text ? (s(), i("div", {
330
- key: 2,
331
- ref_key: "chartTitle",
332
- ref: ae,
333
- style: "width:100%;background:transparent"
334
- }, [
335
- (s(), P(wt, {
336
- key: `title_${se.value}`,
337
- config: {
338
- title: {
339
- cy: "onion-div-title",
340
- ...e.value.style.chart.title
341
- },
342
- subtitle: {
343
- cy: "onion-div-subtitle",
344
- ...e.value.style.chart.title.subtitle
345
- }
346
- }
347
- }, null, 8, ["config"]))
348
- ], 512)) : p("", !0),
349
- e.value.userOptions.show && z.value && (r(ce) || r(H)) ? (s(), P(r(ze), {
350
- ref_key: "details",
351
- ref: Ye,
352
- key: `user_options${te.value}`,
353
- backgroundColor: e.value.style.chart.backgroundColor,
354
- color: e.value.style.chart.color,
355
- isImaging: r(fe),
356
- isPrinting: r(he),
357
- uid: _.value,
358
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
359
- hasPdf: e.value.userOptions.buttons.pdf,
360
- hasImg: e.value.userOptions.buttons.img,
361
- hasXls: e.value.userOptions.buttons.csv,
362
- hasTable: e.value.userOptions.buttons.table,
363
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
364
- isFullscreen: A.value,
365
- isTooltip: m.value.showTooltip,
366
- titles: { ...e.value.userOptions.buttonTitles },
367
- chartElement: C.value,
368
- position: e.value.userOptions.position,
369
- hasAnnotator: e.value.userOptions.buttons.annotator,
370
- isAnnotation: U.value,
371
- callbacks: e.value.userOptions.callbacks,
372
- printScale: e.value.userOptions.print.scale,
373
- onToggleFullscreen: ke,
374
- onGeneratePdf: r(ge),
375
- onGenerateCsv: be,
376
- onGenerateImage: r(pe),
377
- onToggleTable: $e,
378
- onToggleTooltip: Ce,
379
- onToggleAnnotator: J,
380
- style: X({
381
- visibility: r(ce) ? r(H) ? "visible" : "hidden" : "visible"
382
- })
383
- }, at({ _: 2 }, [
384
- t.$slots.menuIcon ? {
385
- name: "menuIcon",
386
- fn: f(({ isOpen: a, color: l }) => [
387
- v(t.$slots, "menuIcon", F(M({ isOpen: a, color: l })), void 0, !0)
388
- ]),
389
- key: "0"
390
- } : void 0,
391
- t.$slots.optionTooltip ? {
392
- name: "optionTooltip",
393
- fn: f(() => [
394
- v(t.$slots, "optionTooltip", {}, void 0, !0)
395
- ]),
396
- key: "1"
397
- } : void 0,
398
- t.$slots.optionPdf ? {
399
- name: "optionPdf",
400
- fn: f(() => [
401
- v(t.$slots, "optionPdf", {}, void 0, !0)
402
- ]),
403
- key: "2"
404
- } : void 0,
405
- t.$slots.optionCsv ? {
406
- name: "optionCsv",
407
- fn: f(() => [
408
- v(t.$slots, "optionCsv", {}, void 0, !0)
409
- ]),
410
- key: "3"
411
- } : void 0,
412
- t.$slots.optionImg ? {
413
- name: "optionImg",
414
- fn: f(() => [
415
- v(t.$slots, "optionImg", {}, void 0, !0)
416
- ]),
417
- key: "4"
418
- } : void 0,
419
- t.$slots.optionTable ? {
420
- name: "optionTable",
421
- fn: f(() => [
422
- v(t.$slots, "optionTable", {}, void 0, !0)
423
- ]),
424
- key: "5"
425
- } : void 0,
426
- t.$slots.optionFullscreen ? {
427
- name: "optionFullscreen",
428
- fn: f(({ toggleFullscreen: a, isFullscreen: l }) => [
429
- v(t.$slots, "optionFullscreen", F(M({ toggleFullscreen: a, isFullscreen: l })), void 0, !0)
430
- ]),
431
- key: "6"
432
- } : void 0,
433
- t.$slots.optionAnnotator ? {
434
- name: "optionAnnotator",
435
- fn: f(({ toggleAnnotator: a, isAnnotator: l }) => [
436
- v(t.$slots, "optionAnnotator", F(M({ toggleAnnotator: a, isAnnotator: l })), void 0, !0)
437
- ]),
438
- key: "7"
439
- } : void 0
440
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : p("", !0),
441
- z.value ? (s(), i("svg", {
442
- key: 4,
443
- ref_key: "svgRef",
444
- ref: ve,
445
- xmlns: r(dt),
446
- class: E({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
447
- viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
448
- style: X(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
449
- }, [
450
- Oe(r(Ne)),
451
- t.$slots["chart-background"] ? (s(), i("foreignObject", {
452
- key: 0,
453
- x: 0,
454
- y: 0,
455
- width: n.value.width <= 0 ? 10 : n.value.width,
456
- height: n.value.height <= 0 ? 10 : n.value.height,
457
- style: {
458
- pointerEvents: "none"
459
- }
460
- }, [
461
- v(t.$slots, "chart-background", {}, void 0, !0)
462
- ], 8, Pt)) : p("", !0),
463
- (s(!0), i(D, null, L(k.value, (a, l) => (s(), i("circle", {
464
- cx: c.value.centerX,
465
- cy: c.value.centerY,
466
- r: a.radius <= 0 ? 1e-4 : a.radius,
467
- stroke: e.value.style.chart.layout.gutter.color,
468
- "stroke-width": T.value.gutter,
469
- fill: "none",
470
- "stroke-dasharray": a.path.bgDashArray,
471
- "stroke-dashoffset": a.path.fullOffset,
472
- "stroke-linecap": "round",
473
- class: E({ "vue-ui-onion-path": !0, "vue-ui-onion-blur": e.value.useBlurOnHover && ![null, void 0].includes(w.value) && w.value !== l }),
474
- style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
475
- }, null, 10, _t))), 256)),
476
- (s(!0), i(D, null, L(k.value, (a, l) => (s(), i("circle", {
477
- cx: c.value.centerX,
478
- cy: c.value.centerY,
479
- r: a.radius < 0 ? 1e-4 : a.radius,
480
- stroke: `${a.color}`,
481
- "stroke-width": T.value.track,
482
- fill: "none",
483
- "stroke-dasharray": a.path.dashArray,
484
- "stroke-dashoffset": a.path.dashOffset,
485
- class: E({ "vue-ui-onion-path": !0, "vue-ui-onion-blur": e.value.useBlurOnHover && ![null, void 0].includes(w.value) && w.value !== l }),
486
- "stroke-linecap": "round",
487
- style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
488
- }, null, 10, It))), 256)),
489
- S("defs", null, [
490
- S("filter", {
491
- id: `blur_${_.value}`,
492
- x: "-50%",
493
- y: "-50%",
494
- width: "200%",
495
- height: "200%"
496
- }, [
497
- S("feGaussianBlur", {
498
- in: "SourceGraphic",
499
- stdDeviation: 100 / e.value.style.chart.gradientIntensity
500
- }, null, 8, St)
501
- ], 8, At)
502
- ]),
503
- e.value.style.chart.useGradient ? (s(), i("g", {
504
- key: 1,
505
- filter: `url(#blur_${_.value})`
506
- }, [
507
- (s(!0), i(D, null, L(k.value, (a, l) => (s(), i("circle", {
508
- cx: c.value.centerX,
509
- cy: c.value.centerY,
510
- r: a.radius <= 0 ? 1e-4 : a.radius,
511
- stroke: "white",
512
- "stroke-width": T.value.track / 3,
513
- fill: "none",
514
- "stroke-linecap": "round",
515
- "stroke-dasharray": a.path.dashArray,
516
- "stroke-dashoffset": a.path.dashOffset,
517
- style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
518
- }, null, 8, Mt))), 256))
519
- ], 8, Ft)) : p("", !0),
520
- (s(!0), i(D, null, L(k.value, (a, l) => (s(), i("circle", {
521
- cx: c.value.centerX,
522
- cy: c.value.centerY,
523
- r: a.radius <= 0 ? 1e-4 : a.radius,
524
- stroke: "transparent",
525
- "stroke-width": Math.max(T.value.track, T.value.gutter),
526
- fill: "none",
527
- "stroke-dasharray": a.path.bgDashArray,
528
- "stroke-dashoffset": a.path.fullOffset,
529
- "stroke-linecap": "round",
530
- class: "vue-ui-onion-path",
531
- style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" },
532
- onMouseenter: (g) => we({
533
- datapoint: a,
534
- show: !0,
535
- seriesIndex: l
536
- }),
537
- onMouseleave: o[0] || (o[0] = (g) => {
538
- w.value = void 0, B.value = !1;
539
- })
540
- }, null, 40, Rt))), 256)),
541
- e.value.style.chart.layout.labels.show ? (s(), i("g", Nt, [
542
- (s(!0), i(D, null, L(k.value, (a, l) => (s(), i("g", {
543
- onMouseenter: (g) => we({
544
- datapoint: a,
545
- show: !0,
546
- seriesIndex: l
547
- }),
548
- onMouseleave: o[1] || (o[1] = (g) => {
549
- w.value = void 0, B.value = !1;
550
- })
551
- }, [
552
- y.value.includes(a.id) ? p("", !0) : (s(), i("text", {
553
- key: 0,
554
- x: n.value.width / 2 - T.value.gutter * 0.8 + e.value.style.chart.layout.labels.offsetX,
555
- y: a.labelY + e.value.style.chart.layout.labels.offsetY,
556
- "text-anchor": "end",
557
- "font-size": e.value.style.chart.layout.labels.fontSize,
558
- fill: e.value.useBlurOnHover && ![null, void 0].includes(w.value) && w.value === l ? a.color : e.value.style.chart.layout.labels.color,
559
- "font-weight": e.value.style.chart.layout.labels.bold ? "bold" : "normal"
560
- }, R(a.name ? a.name + ": " : "") + " " + R(e.value.style.chart.layout.labels.percentage.show ? r(V)({
561
- v: a.percentage,
562
- s: "%",
563
- r: e.value.style.chart.layout.labels.roundingPercentage
564
- }) : "") + " " + R(!e.value.style.chart.layout.labels.percentage.show && e.value.style.chart.layout.labels.value.show ? `: ${r(ee)(
565
- e.value.style.chart.layout.labels.value.formatter,
566
- a.value,
567
- r(V)({
568
- p: a.prefix || "",
569
- v: a.value || 0,
570
- s: a.suffix || "",
571
- r: e.value.style.chart.layout.labels.roundingValue
572
- }),
573
- { datapoint: a, seriesIndex: l }
574
- )}` : `${e.value.style.chart.layout.labels.value.show && a.value ? `(${r(ee)(
575
- e.value.style.chart.layout.labels.value.formatter,
576
- a.value,
577
- r(V)({
578
- p: a.prefix || "",
579
- v: a.value || 0,
580
- s: a.suffix || "",
581
- r: e.value.style.chart.layout.labels.roundingValue
582
- }),
583
- { datapoint: a, seriesIndex: l }
584
- )})` : ""}`), 9, Lt))
585
- ], 40, Dt))), 256))
586
- ])) : p("", !0),
587
- v(t.$slots, "svg", { svg: n.value }, void 0, !0)
588
- ], 14, Ot)) : p("", !0),
589
- t.$slots.watermark ? (s(), i("div", Vt, [
590
- v(t.$slots, "watermark", F(M({ isPrinting: r(he) || r(fe) })), void 0, !0)
591
- ])) : p("", !0),
592
- z.value ? p("", !0) : (s(), P(r(Le), {
593
- key: 6,
594
- config: {
595
- type: "onion",
596
- style: {
597
- backgroundColor: e.value.style.chart.backgroundColor,
598
- onion: {
599
- color: e.value.style.chart.layout.gutter.color
600
- }
601
- }
602
- }
603
- }, null, 8, ["config"])),
604
- S("div", {
605
- ref_key: "chartLegend",
606
- ref: le
607
- }, [
608
- e.value.style.chart.legend.show ? (s(), P($t, {
609
- key: `legend_${ue.value}`,
610
- legendSet: d.value,
611
- config: je.value,
612
- onClickMarker: o[2] || (o[2] = ({ legend: a }) => me(a.id))
613
- }, {
614
- item: f(({ legend: a }) => [
615
- S("div", {
616
- "data-cy-legend-item": "",
617
- onClick: (l) => a.segregate(),
618
- style: X(`opacity:${y.value.includes(a.id) ? 0.5 : 1}`)
619
- }, R(a.name ? a.name + ": " : "") + " " + R((a.percentage || 0).toFixed(e.value.style.chart.legend.roundingPercentage)) + "% ", 13, zt)
620
- ]),
621
- _: 1
622
- }, 8, ["legendSet", "config"])) : v(t.$slots, "legend", {
623
- key: 1,
624
- legend: d.value
625
- }, void 0, !0)
626
- ], 512),
627
- t.$slots.source ? (s(), i("div", {
628
- key: 7,
629
- ref_key: "source",
630
- ref: oe,
631
- dir: "auto"
632
- }, [
633
- v(t.$slots, "source", {}, void 0, !0)
634
- ], 512)) : p("", !0),
635
- Oe(r(Ve), {
636
- show: m.value.showTooltip && B.value,
637
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
638
- color: e.value.style.chart.tooltip.color,
639
- borderRadius: e.value.style.chart.tooltip.borderRadius,
640
- borderColor: e.value.style.chart.tooltip.borderColor,
641
- borderWidth: e.value.style.chart.tooltip.borderWidth,
642
- fontSize: e.value.style.chart.tooltip.fontSize,
643
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
644
- position: e.value.style.chart.tooltip.position,
645
- offsetY: e.value.style.chart.tooltip.offsetY,
646
- parent: C.value,
647
- content: G.value,
648
- isFullscreen: A.value,
649
- isCustom: r(_e)(e.value.style.chart.tooltip.customFormat)
650
- }, {
651
- "tooltip-before": f(() => [
652
- v(t.$slots, "tooltip-before", F(M({ ...q.value })), void 0, !0)
653
- ]),
654
- "tooltip-after": f(() => [
655
- v(t.$slots, "tooltip-after", F(M({ ...q.value })), void 0, !0)
656
- ]),
657
- _: 3
658
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
659
- z.value ? (s(), P(r(Me), {
660
- key: 8,
661
- hideDetails: "",
662
- config: {
663
- open: m.value.showTable,
664
- maxHeight: 1e4,
665
- head: {
666
- backgroundColor: e.value.style.chart.backgroundColor,
667
- color: e.value.style.chart.color
668
- },
669
- body: {
670
- backgroundColor: e.value.style.chart.backgroundColor,
671
- color: e.value.style.chart.color
672
- }
673
- }
674
- }, {
675
- content: f(() => [
676
- (s(), P(r(Re), {
677
- key: `table_${re.value}`,
678
- colNames: Y.value.colNames,
679
- head: Y.value.head,
680
- body: Y.value.body,
681
- config: Y.value.config,
682
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
683
- onClose: o[3] || (o[3] = (a) => m.value.showTable = !1)
684
- }, {
685
- th: f(({ th: a }) => [
686
- lt(R(a), 1)
687
- ]),
688
- td: f(({ td: a }) => [
689
- S("div", { innerHTML: a }, null, 8, Bt)
690
- ]),
691
- _: 1
692
- }, 8, ["colNames", "head", "body", "config", "title"]))
693
- ]),
694
- _: 1
695
- }, 8, ["config"])) : p("", !0)
696
- ], 46, Tt));
697
- }
698
- }, Zt = /* @__PURE__ */ xt(Yt, [["__scopeId", "data-v-d3a1937a"]]);
699
- export {
700
- Zt as default
701
- };