vue-data-ui 3.0.22 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{Arrow-C3_2GkYQ.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BhxUDwEm.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-B717hnWR.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-CH5_RNaK.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/Legend-2-dC7DVb.js +72 -0
  8. package/dist/{NonSvgPenAndPaper-DCJGSteM.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-CE7HSich.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-BMHsOtT8.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-C3J8aKNH.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BEBDljWA.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CVSZQtoP.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-BL-IjQmj.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-CCnDaboi.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-BWMV0_Ze.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DwUGURhV.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-DsVqerdt.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BHb_mcWF.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-Ckt8JtYf.js → pdf-Dd-LIJqz.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-Cy946l1e.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-aC9S6EFJ.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-B7rhbRrT.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-Bu7qDtf0.js → vue-data-ui-DcNYz3cZ.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
  30. package/dist/{vue-ui-accordion-DsnF0JuK.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-s8xyb3Gf.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DRacM62z.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-DdDrdyOJ.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-BsNnInNt.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-Ci9mrUBd.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-fHfJNK0V.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
  37. package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
  38. package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
  39. package/dist/{vue-ui-cursor-Bk5LHg5V.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CjZMEYs6.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-nDIvHyRB.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-CF9FdxfC.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-f5k-Yu3N.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-Dm3gsrzi.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
  45. package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
  46. package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
  47. package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
  48. package/dist/{vue-ui-gauge-DkDpUAN7.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-BD5fLs8r.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
  50. package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
  51. package/dist/{vue-ui-history-plot-ICoBBO-y.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-Dp2M2EFo.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-C5672jjA.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
  54. package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
  55. package/dist/{vue-ui-mood-radar-B-qhYUcB.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-V6BvP3pF.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-BKqqbWbg.js → vue-ui-onion-ZgsErXis.js} +363 -317
  58. package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
  59. package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
  60. package/dist/{vue-ui-quick-chart-BVZSdQeT.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
  61. package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
  62. package/dist/{vue-ui-rating-CncrxDCY.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-VYM1dclx.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
  64. package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
  65. package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
  66. package/dist/{vue-ui-scatter-D2b-u5dv.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-BTuBaaE_.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-D1UxJNbV.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-BCP0BWMI.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-eBo-RSvE.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-DberOXWX.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-CoKQGG5X.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-B_L4UNES.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-iAaRIyqb.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-B_0PJ7R2.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-CWkA4l9P.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-CILVy7YP.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-DL2n2Z7p.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-DOt2EKpe.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BTP1ic_T.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-Bc-zJH9j.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-B9n528e1.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
  83. package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
  84. package/dist/{vue-ui-vertical-bar-CK2j09gJ.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-DJkqgqlR.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-CcbgpIUr.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
  87. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
  88. package/dist/{vue-ui-world-DLmB_Z96.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-KmrNT6qh.js → vue-ui-xy-B1nqNbzw.js} +1559 -1508
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-Y5T9UxMO.js +0 -133
  93. package/dist/Legend-DkU3at-b.js +0 -72
  94. package/dist/vue-ui-3d-bar-CBfQ3Pcb.js +0 -1323
  95. package/dist/vue-ui-chord-0wf798ls.js +0 -1049
  96. package/dist/vue-ui-circle-pack-CuRHG8gr.js +0 -709
  97. package/dist/vue-ui-flow-K7UBguES.js +0 -852
  98. package/dist/vue-ui-funnel-DoDZbsTp.js +0 -620
  99. package/dist/vue-ui-galaxy-BsDlHxzE.js +0 -691
  100. package/dist/vue-ui-heatmap-DOT2tBy_.js +0 -1078
  101. package/dist/vue-ui-molecule-DgqVh2k0.js +0 -656
  102. package/dist/vue-ui-parallel-coordinate-plot-BZf24Zur.js +0 -927
  103. package/dist/vue-ui-quadrant-S58B2LrQ.js +0 -1432
  104. package/dist/vue-ui-radar-Dh67mQ9E.js +0 -807
  105. package/dist/vue-ui-ridgeline-CsByERvm.js +0 -1157
  106. package/dist/vue-ui-rings-CR2UfgnV.js +0 -739
  107. package/dist/vue-ui-treemap-Cl9qo9O-.js +0 -1046
  108. package/dist/vue-ui-word-cloud-CZ_TRf4o.js +0 -765
  109. package/dist/vue-ui-xy-canvas-6VYNyX6a.js +0 -1243
@@ -0,0 +1,666 @@
1
+ import { useCssVars as je, computed as d, defineAsyncComponent as x, ref as h, shallowRef as ke, onMounted as He, onBeforeUnmount as Xe, watch as Ce, createElementBlock as i, openBlock as n, unref as s, normalizeStyle as A, normalizeClass as N, createBlock as P, createCommentVNode as b, createSlots as we, withCtx as m, renderSlot as g, normalizeProps as G, guardReactiveProps as j, createVNode as $e, createElementVNode as C, mergeProps as H, Fragment as X, renderList as W, toDisplayString as U, resolveDynamicComponent as We, createTextVNode as xe, nextTick as Ye } from "vue";
2
+ import { u as qe, c as Je, o as Ke, f as Le, g as Qe, e as Ze, l as et, k as Y, i as q, X as tt, F as at, E as ee, b as lt, v as st, w as ot } from "./index-CDQbCd41.js";
3
+ import { t as nt, u as rt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as ut } from "./usePrinter-Bnl1YeUU.js";
5
+ import { u as _e } from "./useNestedProp-BPEHGiYX.js";
6
+ import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as ct } from "./useChartAccessibility-9icAAmYg.js";
8
+ import vt from "./img-JOqdlnUs.js";
9
+ import dt from "./Title-Dq2_Z9kR.js";
10
+ import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const ft = ["id"], bt = ["xmlns", "viewBox"], mt = ["width", "height"], gt = ["id"], yt = ["stop-color"], pt = ["stop-color"], kt = ["stop-color"], Ct = ["stroke", "stroke-width"], wt = ["stroke", "stroke-width"], $t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["points", "fill"], Lt = ["stroke", "stroke-width", "rx"], _t = ["x", "y", "font-size", "fill", "font-weight"], Tt = ["x", "y", "font-size", "fill", "font-weight"], At = {
12
+ key: 5,
13
+ class: "vue-data-ui-watermark"
14
+ }, Ot = ["innerHTML"], St = {
15
+ __name: "vue-ui-funnel",
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
+ setup(Te, { expose: Ae }) {
31
+ je((t) => ({
32
+ "37f515f8": Ee.value
33
+ }));
34
+ const Oe = x(() => import("./BaseIcon-DHtro8us.js")), Se = x(() => import("./vue-ui-skeleton-CFxBU2-p.js")), ze = x(() => import("./vue-ui-accordion-Bf_LHFFX.js")), De = x(() => import("./DataTable-DJjA2_wf.js")), Ne = x(() => import("./UserOptions-BuGfCdAY.js")), Pe = x(() => import("./PenAndPaper-B7QEDgx4.js")), Ie = x(() => import("./PackageVersion-DU12WH3O.js")), Fe = x(() => import("./BaseDraggableDialog-O7900pGp.js")), { vue_ui_funnel: Be } = qe(), y = Te, w = h(null), I = h(Je()), te = h(0), ae = h(0), le = h(0), se = h(null), oe = h(null), ne = h(null), $ = ke(null), O = ke(null), L = h(!1), F = h(null), S = d(() => !!y.dataset && y.dataset.length);
35
+ He(re);
36
+ function re() {
37
+ if (Ke(y.dataset) ? Le({
38
+ componentName: "VueUiFunnel",
39
+ type: "dataset"
40
+ }) : y.dataset.forEach((t, l) => {
41
+ Qe({
42
+ datasetObject: t,
43
+ requiredAttributes: ["name", "value"]
44
+ }).forEach((a) => {
45
+ S.value = !1, Le({
46
+ componentName: "VueUiFunnel",
47
+ type: "datasetSerieAttribute",
48
+ property: a,
49
+ index: l
50
+ });
51
+ });
52
+ }), e.value.responsive) {
53
+ const t = nt(() => {
54
+ const { width: l, height: a } = rt({
55
+ chart: w.value,
56
+ title: e.value.style.chart.title.text ? ne.value : null,
57
+ source: oe.value,
58
+ noTitle: se.value
59
+ });
60
+ requestAnimationFrame(() => {
61
+ v.value.height = a, v.value.width = l, k.value = me(), e.value.responsiveProportionalSizing ? (c.value.circles = ee({
62
+ relator: Math.min(l, a),
63
+ adjuster: 600,
64
+ source: e.value.style.chart.circles.dataLabels.fontSize,
65
+ threshold: 10,
66
+ fallback: 10
67
+ }), c.value.names = ee({
68
+ relator: Math.min(l, a),
69
+ adjuster: 600,
70
+ source: e.value.style.chart.bars.dataLabels.name.fontSize,
71
+ threshold: 10,
72
+ fallback: 10
73
+ }), c.value.values = ee({
74
+ relator: Math.min(l, a),
75
+ adjuster: 600,
76
+ source: e.value.style.chart.bars.dataLabels.value.fontSize,
77
+ threshold: 10,
78
+ fallback: 10
79
+ })) : (c.value.circles = e.value.style.chart.circles.dataLabels.fontSize, c.value.names = e.value.style.chart.bars.dataLabels.name.fontSize, c.value.values = e.value.style.chart.bars.dataLabels.value.fontSize);
80
+ });
81
+ });
82
+ $.value && (O.value && $.value.unobserve(O.value), $.value.disconnect()), $.value = new ResizeObserver(t), O.value = w.value.parentNode, $.value.observe(O.value);
83
+ }
84
+ }
85
+ Xe(() => {
86
+ $.value && (O.value && $.value.unobserve(O.value), $.value.disconnect());
87
+ });
88
+ function ue() {
89
+ const t = _e({
90
+ userConfig: y.config,
91
+ defaultConfig: Be
92
+ });
93
+ return t.theme ? {
94
+ ..._e({
95
+ userConfig: lt.vue_ui_funnel[t.theme] || y.config,
96
+ defaultConfig: t
97
+ })
98
+ } : t;
99
+ }
100
+ const e = d({
101
+ get: () => ue(),
102
+ set: (t) => t
103
+ }), { userOptionsVisible: J, setUserOptionsVisibility: ie, keepUserOptionState: ce } = it({ config: e.value }), { svgRef: ve } = ct({ config: e.value.style.chart.title });
104
+ Ce(() => y.config, (t) => {
105
+ e.value = ue(), J.value = !e.value.userOptions.showOnChartHover, re(), ae.value += 1, le.value += 1, c.value.circles = e.value.style.chart.circles.dataLabels.fontSize, c.value.names = e.value.style.chart.bars.dataLabels.name.fontSize, c.value.values = e.value.style.chart.bars.dataLabels.value.fontSize, _.value.showTable = e.value.table.show;
106
+ }, { deep: !0 });
107
+ const { isPrinting: de, isImaging: he, generatePdf: fe, generateImage: be } = ut({
108
+ elementId: `funnel_${I.value}`,
109
+ fileName: e.value.style.chart.title.text || "vue-ui-funnel",
110
+ options: e.value.userOptions.print
111
+ }), Re = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), _ = h({
112
+ showTable: e.value.table.show
113
+ }), c = h({
114
+ circles: e.value.style.chart.circles.dataLabels.fontSize,
115
+ names: e.value.style.chart.bars.dataLabels.name.fontSize,
116
+ values: e.value.style.chart.bars.dataLabels.value.fontSize
117
+ }), v = d({
118
+ get: () => ({
119
+ height: e.value.style.chart.height,
120
+ width: e.value.style.chart.width
121
+ }),
122
+ set: (t) => t
123
+ }), p = d(() => S.value ? y.dataset.map((t, l) => ({
124
+ ...t,
125
+ color: t.color ? Ze(t.color) : et(e.value.style.chart.bars.defaultColor, l / y.dataset.length)
126
+ })) : []);
127
+ setTimeout(() => {
128
+ L.value = !0;
129
+ }, p.value.length * 150);
130
+ function me() {
131
+ const t = e.value.style.chart.padding.left, l = e.value.style.chart.padding.top;
132
+ return {
133
+ left: t,
134
+ top: l,
135
+ right: v.value.width - e.value.style.chart.padding.right,
136
+ bottom: v.value.height - e.value.style.chart.padding.bottom,
137
+ width: v.value.width - t - e.value.style.chart.padding.right,
138
+ height: v.value.height - l - e.value.style.chart.padding.bottom
139
+ };
140
+ }
141
+ const k = h(me()), z = d(() => k.value.height / y.dataset.length), T = d(() => z.value * e.value.style.chart.bars.gapRatio), ge = d(() => k.value.width * e.value.style.chart.barCircleSpacingRatio), r = d(() => p.value.map((t, l) => {
142
+ const a = z.value - T.value, o = k.value.top + T.value / 2 * l + (z.value - T.value / 2) * l + T.value / 2, f = t.value / p.value[0].value, u = (k.value.width - a - ge.value) * (t.value / p.value[0].value);
143
+ return {
144
+ ...t,
145
+ cx: k.value.left + a / 2,
146
+ cy: o + a / 2,
147
+ datapointIndex: l,
148
+ fill: t.color,
149
+ height: Math.max(a, 0),
150
+ proportion: f,
151
+ r: Math.max(a / 2, 0),
152
+ width: Math.max(u, 0),
153
+ x: k.value.left + a + ge.value,
154
+ y: o
155
+ };
156
+ })), Me = d(() => {
157
+ const t = r.value.map((l) => `${l.x + l.width},${l.y + (z.value - T.value) / 2}`);
158
+ return `${r.value[0].x},${r.value[0].y + (z.value - T.value) / 2} ${t.toString()} ${r.value.at(-1).x},${r.value.at(-1).y + (z.value - T.value) / 2}`;
159
+ }), Ue = d(() => ({
160
+ x1: r.value[0].cx,
161
+ y1: r.value[0].cy,
162
+ x2: r.value.at(-1).cx,
163
+ y2: r.value.at(-1).cy
164
+ })), D = h(!1);
165
+ function ye(t) {
166
+ D.value = t, te.value += 1;
167
+ }
168
+ const Ee = d(() => `${p.value.length * 150}ms`), E = h(!1);
169
+ function K() {
170
+ E.value = !E.value;
171
+ }
172
+ function pe() {
173
+ _.value.showTable = !_.value.showTable;
174
+ }
175
+ const B = d(() => {
176
+ const t = p.value.map((a) => ({
177
+ name: a.name,
178
+ color: a.color
179
+ })), l = p.value.map((a) => a.value);
180
+ return { head: t, body: l };
181
+ }), V = d(() => {
182
+ const t = [
183
+ e.value.table.columnNames.series,
184
+ e.value.table.columnNames.value,
185
+ e.value.table.columnNames.percentage
186
+ ], l = B.value.head.map((f, u) => {
187
+ const M = Y(
188
+ e.value.style.chart.bars.dataLabels.value.formatter,
189
+ B.value.body[u],
190
+ q({
191
+ p: e.value.style.chart.bars.dataLabels.value.prefix,
192
+ v: B.value.body[u],
193
+ s: e.value.style.chart.bars.dataLabels.value.suffix,
194
+ r: e.value.table.td.roundingValue
195
+ }),
196
+ { datapoint: r.value[u] }
197
+ ), Z = Y(
198
+ e.value.style.chart.circles.dataLabels.formatter,
199
+ r.value[u].proportion * 100,
200
+ q({
201
+ v: r.value[u].proportion * 100,
202
+ s: "%",
203
+ r: e.value.table.td.roundingPercentage
204
+ }),
205
+ { datapoint: r.value[u] }
206
+ );
207
+ return [
208
+ { color: f.color, name: f.name },
209
+ M,
210
+ Z
211
+ ];
212
+ }), a = {
213
+ th: {
214
+ backgroundColor: e.value.table.th.backgroundColor,
215
+ color: e.value.table.th.color,
216
+ outline: e.value.table.th.outline
217
+ },
218
+ td: {
219
+ backgroundColor: e.value.table.td.backgroundColor,
220
+ color: e.value.table.td.color,
221
+ outline: e.value.table.td.outline
222
+ },
223
+ breakpoint: e.value.table.responsiveBreakpoint
224
+ };
225
+ return {
226
+ colNames: [
227
+ e.value.table.columnNames.series,
228
+ e.value.table.columnNames.value,
229
+ e.value.table.columnNames.percentage
230
+ ],
231
+ head: t,
232
+ body: l,
233
+ config: a
234
+ };
235
+ });
236
+ function Q(t = null) {
237
+ Ye(() => {
238
+ const l = B.value.head.map((f, u) => [[
239
+ f.name
240
+ ], [B.value.body[u]], [r.value[u].proportion * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value], ["%"]]].concat(l), o = st(a);
241
+ t ? t(o) : ot({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-funnel" });
242
+ });
243
+ }
244
+ function Ve() {
245
+ return p.value;
246
+ }
247
+ async function Ge({ scale: t = 2 } = {}) {
248
+ if (!w.value) return;
249
+ const { width: l, height: a } = w.value.getBoundingClientRect(), o = l / a, { imageUri: f, base64: u } = await vt({ domElement: w.value, base64: !0, img: !0, scale: t });
250
+ return {
251
+ imageUri: f,
252
+ base64: u,
253
+ title: e.value.style.chart.title.text,
254
+ width: l,
255
+ height: a,
256
+ aspectRatio: o
257
+ };
258
+ }
259
+ const R = d(() => {
260
+ const t = e.value.table.useDialog && !e.value.table.show, l = _.value.showTable;
261
+ return {
262
+ component: t ? Fe : ze,
263
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
264
+ props: t ? {
265
+ backgroundColor: e.value.table.th.backgroundColor,
266
+ color: e.value.table.th.color,
267
+ headerColor: e.value.table.th.color,
268
+ headerBg: e.value.table.th.backgroundColor,
269
+ isFullscreen: D.value,
270
+ fullscreenParent: w.value,
271
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
272
+ } : {
273
+ hideDetails: !0,
274
+ config: {
275
+ open: l,
276
+ maxHeight: 1e4,
277
+ body: {
278
+ backgroundColor: e.value.style.chart.backgroundColor,
279
+ color: e.value.style.chart.color
280
+ },
281
+ head: {
282
+ backgroundColor: e.value.style.chart.backgroundColor,
283
+ color: e.value.style.chart.color
284
+ }
285
+ }
286
+ }
287
+ };
288
+ });
289
+ return Ce(() => _.value.showTable, (t) => {
290
+ e.value.table.show || (t && e.value.table.useDialog && F.value ? F.value.open() : "close" in F.value && F.value.close());
291
+ }), Ae({
292
+ getData: Ve,
293
+ getImage: Ge,
294
+ generatePdf: fe,
295
+ generateCsv: Q,
296
+ generateImage: be,
297
+ toggleTable: pe,
298
+ toggleAnnotator: K,
299
+ toggleFullscreen: ye
300
+ }), (t, l) => (n(), i("div", {
301
+ ref_key: "funnelChart",
302
+ ref: w,
303
+ class: N(`vue-ui-funnel ${D.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
304
+ style: A(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
305
+ id: `funnel_${I.value}`,
306
+ onMouseenter: l[3] || (l[3] = () => s(ie)(!0)),
307
+ onMouseleave: l[4] || (l[4] = () => s(ie)(!1))
308
+ }, [
309
+ e.value.userOptions.buttons.annotator ? (n(), P(s(Pe), {
310
+ key: 0,
311
+ svgRef: s(ve),
312
+ backgroundColor: e.value.style.chart.backgroundColor,
313
+ color: e.value.style.chart.color,
314
+ active: E.value,
315
+ onClose: K
316
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
317
+ Re.value ? (n(), i("div", {
318
+ key: 1,
319
+ ref_key: "noTitle",
320
+ ref: se,
321
+ class: "vue-data-ui-no-title-space",
322
+ style: "height:36px; width: 100%;background:transparent"
323
+ }, null, 512)) : b("", !0),
324
+ e.value.style.chart.title.text ? (n(), i("div", {
325
+ key: 2,
326
+ ref_key: "chartTitle",
327
+ ref: ne,
328
+ style: "width:100%;background:transparent;padding-bottom:24px"
329
+ }, [
330
+ (n(), P(dt, {
331
+ key: `title_${ae.value}`,
332
+ config: {
333
+ title: {
334
+ cy: "funnel-div-title",
335
+ ...e.value.style.chart.title
336
+ },
337
+ subtitle: {
338
+ cy: "funnel-div-subtitle",
339
+ ...e.value.style.chart.title.subtitle
340
+ }
341
+ }
342
+ }, null, 8, ["config"]))
343
+ ], 512)) : b("", !0),
344
+ e.value.userOptions.show && S.value && (s(ce) || s(J)) ? (n(), P(s(Ne), {
345
+ ref: "details",
346
+ key: `user_option_${te.value}`,
347
+ backgroundColor: e.value.style.chart.backgroundColor,
348
+ color: e.value.style.chart.color,
349
+ isPrinting: s(de),
350
+ isImaging: s(he),
351
+ uid: I.value,
352
+ hasTooltip: !1,
353
+ hasPdf: e.value.userOptions.buttons.pdf,
354
+ hasImg: e.value.userOptions.buttons.img,
355
+ hasXls: e.value.userOptions.buttons.csv,
356
+ hasTable: e.value.userOptions.buttons.table,
357
+ hasLabel: !1,
358
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
359
+ isFullscreen: D.value,
360
+ chartElement: w.value,
361
+ position: e.value.userOptions.position,
362
+ titles: { ...e.value.userOptions.buttonTitles },
363
+ hasAnnotator: e.value.userOptions.buttons.annotator,
364
+ isAnnotation: E.value,
365
+ callbacks: e.value.userOptions.callbacks,
366
+ printScale: e.value.userOptions.print.scale,
367
+ onToggleAnnotator: K,
368
+ onToggleFullscreen: ye,
369
+ onGeneratePdf: s(fe),
370
+ onGenerateImage: s(be),
371
+ onToggleTable: pe,
372
+ onGenerateCsv: Q,
373
+ style: A({
374
+ visibility: s(ce) ? s(J) ? "visible" : "hidden" : "visible"
375
+ })
376
+ }, we({ _: 2 }, [
377
+ t.$slots.menuIcon ? {
378
+ name: "menuIcon",
379
+ fn: m(({ isOpen: a, color: o }) => [
380
+ g(t.$slots, "menuIcon", G(j({ isOpen: a, color: o })), void 0, !0)
381
+ ]),
382
+ key: "0"
383
+ } : void 0,
384
+ t.$slots.optionPdf ? {
385
+ name: "optionPdf",
386
+ fn: m(() => [
387
+ g(t.$slots, "optionPdf", {}, void 0, !0)
388
+ ]),
389
+ key: "1"
390
+ } : void 0,
391
+ t.$slots.optionCsv ? {
392
+ name: "optionCsv",
393
+ fn: m(() => [
394
+ g(t.$slots, "optionCsv", {}, void 0, !0)
395
+ ]),
396
+ key: "2"
397
+ } : void 0,
398
+ t.$slots.optionImg ? {
399
+ name: "optionImg",
400
+ fn: m(() => [
401
+ g(t.$slots, "optionImg", {}, void 0, !0)
402
+ ]),
403
+ key: "3"
404
+ } : void 0,
405
+ t.$slots.optionTable ? {
406
+ name: "optionTable",
407
+ fn: m(() => [
408
+ g(t.$slots, "optionTable", {}, void 0, !0)
409
+ ]),
410
+ key: "4"
411
+ } : void 0,
412
+ t.$slots.optionFullscreen ? {
413
+ name: "optionFullscreen",
414
+ fn: m(({ toggleFullscreen: a, isFullscreen: o }) => [
415
+ g(t.$slots, "optionFullscreen", G(j({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
416
+ ]),
417
+ key: "5"
418
+ } : void 0,
419
+ t.$slots.optionAnnotator ? {
420
+ name: "optionAnnotator",
421
+ fn: m(({ toggleAnnotator: a, isAnnotator: o }) => [
422
+ g(t.$slots, "optionAnnotator", G(j({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
423
+ ]),
424
+ key: "6"
425
+ } : void 0
426
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0),
427
+ S.value ? (n(), i("svg", {
428
+ key: 4,
429
+ ref_key: "svgRef",
430
+ ref: ve,
431
+ xmlns: s(tt),
432
+ class: N({ "vue-data-ui-fullscreen--on": D.value, "vue-data-ui-fulscreen--off": !D.value }),
433
+ viewBox: `0 0 ${v.value.width <= 0 ? 10 : v.value.width} ${v.value.height <= 0 ? 10 : v.value.height}`,
434
+ style: A(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
435
+ }, [
436
+ $e(s(Ie)),
437
+ t.$slots["chart-background"] ? (n(), i("foreignObject", {
438
+ key: 0,
439
+ x: 0,
440
+ y: 0,
441
+ width: v.value.width <= 0 ? 10 : v.value.width,
442
+ height: v.value.height <= 0 ? 10 : v.value.height,
443
+ style: {
444
+ pointerEvents: "none"
445
+ }
446
+ }, [
447
+ g(t.$slots, "chart-background", {}, void 0, !0)
448
+ ], 8, mt)) : b("", !0),
449
+ C("defs", null, [
450
+ C("linearGradient", {
451
+ id: `funnel_area_${I.value}`,
452
+ x1: "0%",
453
+ x2: "100%",
454
+ y1: "0%",
455
+ y2: "0%"
456
+ }, [
457
+ C("stop", {
458
+ offset: "0%",
459
+ "stop-color": e.value.style.chart.backgroundColor,
460
+ "stop-opacity": 0
461
+ }, null, 8, yt),
462
+ C("stop", {
463
+ offset: "20%",
464
+ "stop-color": e.value.style.chart.area.color
465
+ }, null, 8, pt),
466
+ C("stop", {
467
+ offset: "100%",
468
+ "stop-color": e.value.style.chart.area.color
469
+ }, null, 8, kt)
470
+ ], 8, gt)
471
+ ]),
472
+ e.value.style.chart.circleLinks.show ? (n(), i("line", H({ key: 1 }, Ue.value, {
473
+ stroke: e.value.style.chart.circleLinks.color,
474
+ "stroke-width": 12 * e.value.style.chart.circleLinks.widthRatio,
475
+ "stroke-linecap": "round",
476
+ class: {
477
+ animated: e.value.useCssAnimation
478
+ },
479
+ style: {
480
+ strokeDasharray: e.value.useCssAnimation ? k.value.height : 0,
481
+ strokeDashoffset: e.value.useCssAnimation ? k.value.height : 0
482
+ }
483
+ }), null, 16, Ct)) : b("", !0),
484
+ (n(!0), i(X, null, W(r.value, ({ cx: a, cy: o, r: f, fill: u }, M) => (n(), i("circle", H({ ref_for: !0 }, { cx: a, cy: o, r: f, fill: u }, {
485
+ stroke: e.value.style.chart.circles.stroke,
486
+ "stroke-width": e.value.style.chart.circles.strokeWidth,
487
+ class: {
488
+ animated: e.value.useCssAnimation && !L.value
489
+ },
490
+ style: {
491
+ animationDelay: `${150 * M}ms`
492
+ }
493
+ }), null, 16, wt))), 256)),
494
+ (n(!0), i(X, null, W(r.value, (a, o) => (n(), i("text", {
495
+ x: a.cx,
496
+ y: a.cy + c.value.circles / 3 + e.value.style.chart.circles.dataLabels.offsetY,
497
+ "text-anchor": "middle",
498
+ "font-size": c.value.circles,
499
+ fill: e.value.style.chart.circles.dataLabels.adaptColorToBackground ? s(at)(a.color) : e.value.style.chart.circles.dataLabels.color,
500
+ "font-weight": e.value.style.chart.circles.dataLabels.bold ? "bold" : "normal",
501
+ class: N({
502
+ animated: e.value.useCssAnimation && !L.value
503
+ }),
504
+ style: A({
505
+ animationDelay: `${150 * o}ms`
506
+ })
507
+ }, U(s(Y)(
508
+ e.value.style.chart.circles.dataLabels.formatter,
509
+ a.proportion * 100,
510
+ s(q)({
511
+ v: a.proportion * 100,
512
+ s: "%",
513
+ r: e.value.style.chart.circles.dataLabels.rounding
514
+ }),
515
+ { datapoint: a }
516
+ )), 15, $t))), 256)),
517
+ e.value.style.chart.area.show ? (n(), i("polygon", {
518
+ key: 2,
519
+ points: Me.value,
520
+ fill: `url(#funnel_area_${I.value})`,
521
+ class: N({
522
+ animated: e.value.useCssAnimation && !L.value
523
+ }),
524
+ style: A({
525
+ transition: e.value.useCssAnimation ? `all ${150 * p.value.length}ms ease-in` : "none"
526
+ })
527
+ }, null, 14, xt)) : b("", !0),
528
+ (n(!0), i(X, null, W(r.value, ({ x: a, y: o, height: f, width: u, fill: M }, Z) => (n(), i("rect", H({ ref_for: !0 }, { x: a, y: o, height: f, width: u, fill: M }, {
529
+ stroke: e.value.style.chart.bars.stroke,
530
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
531
+ rx: e.value.style.chart.bars.borderRadius,
532
+ class: {
533
+ animated: e.value.useCssAnimation && !L.value
534
+ },
535
+ style: {
536
+ animationDelay: `${150 * Z}ms`
537
+ }
538
+ }), null, 16, Lt))), 256)),
539
+ (n(!0), i(X, null, W(r.value, (a, o) => (n(), i("g", null, [
540
+ C("text", {
541
+ x: a.x + a.width + e.value.style.chart.bars.dataLabels.name.offsetX + 12,
542
+ y: a.cy - c.value.names / 2 + e.value.style.chart.bars.dataLabels.name.offsetY,
543
+ "text-anchor": "start",
544
+ "font-size": c.value.names,
545
+ fill: e.value.style.chart.bars.dataLabels.name.color,
546
+ "font-weight": e.value.style.chart.bars.dataLabels.name.bold ? "bold" : "normal",
547
+ class: N({
548
+ animated: e.value.useCssAnimation && !L.value
549
+ }),
550
+ style: A({
551
+ animationDelay: `${150 * o}ms`
552
+ })
553
+ }, U(a.name), 15, _t),
554
+ C("text", {
555
+ x: a.x + a.width + e.value.style.chart.bars.dataLabels.value.offsetX + 12,
556
+ y: a.cy + c.value.values + e.value.style.chart.bars.dataLabels.value.offsetY,
557
+ "text-anchor": "start",
558
+ "font-size": c.value.values,
559
+ fill: e.value.style.chart.bars.dataLabels.value.color,
560
+ "font-weight": e.value.style.chart.bars.dataLabels.value.bold ? "bold" : "normal",
561
+ class: N({
562
+ animated: e.value.useCssAnimation && !L.value
563
+ }),
564
+ style: A({
565
+ animationDelay: `${150 * o}ms`
566
+ })
567
+ }, U(s(Y)(
568
+ e.value.style.chart.bars.dataLabels.value.formatter,
569
+ a.value,
570
+ s(q)({
571
+ p: e.value.style.chart.bars.dataLabels.value.prefix,
572
+ v: a.value,
573
+ s: e.value.style.chart.bars.dataLabels.value.suffix,
574
+ r: e.value.style.chart.bars.dataLabels.value.rounding
575
+ }),
576
+ { datapoint: a }
577
+ )), 15, Tt)
578
+ ]))), 256)),
579
+ g(t.$slots, "svg", { svg: v.value }, void 0, !0)
580
+ ], 14, bt)) : b("", !0),
581
+ t.$slots.watermark ? (n(), i("div", At, [
582
+ g(t.$slots, "watermark", G(j({ isPrinting: s(de) || s(he) })), void 0, !0)
583
+ ])) : b("", !0),
584
+ S.value ? b("", !0) : (n(), P(s(Se), {
585
+ key: 6,
586
+ config: {
587
+ type: "verticalBar",
588
+ style: {
589
+ backgroundColor: e.value.style.chart.backgroundColor,
590
+ verticalBar: {
591
+ axis: {
592
+ color: "#CCCCCC"
593
+ },
594
+ color: "#CCCCCC"
595
+ }
596
+ }
597
+ }
598
+ }, null, 8, ["config"])),
599
+ t.$slots.source ? (n(), i("div", {
600
+ key: 7,
601
+ ref_key: "source",
602
+ ref: oe,
603
+ dir: "auto"
604
+ }, [
605
+ g(t.$slots, "source", {}, void 0, !0)
606
+ ], 512)) : b("", !0),
607
+ S.value ? (n(), P(We(R.value.component), H({ key: 8 }, R.value.props, {
608
+ ref_key: "tableUnit",
609
+ ref: F,
610
+ onClose: l[2] || (l[2] = (a) => _.value.showTable = !1)
611
+ }), we({
612
+ content: m(() => [
613
+ (n(), P(s(De), {
614
+ key: `table_${le.value}`,
615
+ colNames: V.value.colNames,
616
+ head: V.value.head,
617
+ body: V.value.body,
618
+ config: V.value.config,
619
+ title: e.value.table.useDialog ? "" : R.value.title,
620
+ withCloseButton: !e.value.table.useDialog,
621
+ onClose: l[1] || (l[1] = (a) => _.value.showTable = !1)
622
+ }, {
623
+ th: m(({ th: a }) => [
624
+ C("div", {
625
+ innerHTML: a,
626
+ style: { display: "flex", "align-items": "center" }
627
+ }, null, 8, Ot)
628
+ ]),
629
+ td: m(({ td: a }) => [
630
+ xe(U(a.name ? a.name : a), 1)
631
+ ]),
632
+ _: 1
633
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
634
+ ]),
635
+ _: 2
636
+ }, [
637
+ e.value.table.useDialog ? {
638
+ name: "title",
639
+ fn: m(() => [
640
+ xe(U(R.value.title), 1)
641
+ ]),
642
+ key: "0"
643
+ } : void 0,
644
+ e.value.table.useDialog ? {
645
+ name: "actions",
646
+ fn: m(() => [
647
+ C("button", {
648
+ tabindex: "0",
649
+ class: "vue-ui-user-options-button",
650
+ onClick: l[0] || (l[0] = (a) => Q(e.value.userOptions.callbacks.csv))
651
+ }, [
652
+ $e(s(Oe), {
653
+ name: "excel",
654
+ stroke: R.value.props.color
655
+ }, null, 8, ["stroke"])
656
+ ])
657
+ ]),
658
+ key: "1"
659
+ } : void 0
660
+ ]), 1040)) : b("", !0)
661
+ ], 46, ft));
662
+ }
663
+ }, Et = /* @__PURE__ */ ht(St, [["__scopeId", "data-v-9bbf1be0"]]);
664
+ export {
665
+ Et as default
666
+ };