vue-data-ui 3.0.0-next.8 → 3.0.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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-BRtNjitS.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CO9ok1PR.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-BuOIF6t5.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-FH6oc0mS.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable-D36ZRtpU.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-DInM-hku.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-B60MxEaz.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-CGQlqnmq.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-B5slIHlh.js → PenAndPaper-D3zudcNI.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-BGr3dQKt.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-BWA23VgJ.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-BSlAPr_H.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-lPcsweXz.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Dn5TCQxg.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Br-eVhJZ.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-CgMUOQnb.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-Cfm5-hMQ.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-BMVHBLq5.js → pdf-DoShrdT5.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-B1Hgs47c.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  35. package/dist/{vue-data-ui-CD674-M3.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-CEDGlyKI.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-CosgP-Fl.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-BG1ItsAb.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-6uKesZW9.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-CkVnNEGn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-D07ivGS7.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-Doidl3Lz.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-CWvzqAAa.js → vue-ui-donut-BtnIwS_E.js} +433 -424
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-D1pFzjJa.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DTeZbrJk.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-itpDcfZU.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-0milmSNS.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-C3QUdrMw.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-P-1SRvsT.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-Cd1bhDuU.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-B1tjuVi0.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap-BI8eIQG7.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-CqBD7xhZ.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-sgO_Z6ja.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-BPay31_q.js → vue-ui-vertical-bar-C-i2dRnU.js} +107 -105
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-DWskeHfE.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-Dkmsguo1.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-O07lQwRC.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-Hh7nGEjp.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-DWtJoryQ.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-DbrA1G0r.js +0 -746
  107. package/dist/vue-ui-bullet-9IB3mGon.js +0 -513
  108. package/dist/vue-ui-candlestick-CWqPF_zW.js +0 -873
  109. package/dist/vue-ui-chord-Crd3l1b6.js +0 -949
  110. package/dist/vue-ui-circle-pack-CAm2gxBi.js +0 -673
  111. package/dist/vue-ui-donut-evolution-Djp_eBqw.js +0 -903
  112. package/dist/vue-ui-dumbbell-B7GySnYf.js +0 -753
  113. package/dist/vue-ui-flow-XDpZAYWI.js +0 -765
  114. package/dist/vue-ui-galaxy-DBQy21se.js +0 -617
  115. package/dist/vue-ui-gauge-FBZaUrBD.js +0 -738
  116. package/dist/vue-ui-gizmo-CDbPxUzE.js +0 -192
  117. package/dist/vue-ui-heatmap-DsDWxYOS.js +0 -877
  118. package/dist/vue-ui-history-plot-CzO1Z1FH.js +0 -924
  119. package/dist/vue-ui-molecule-Ddd3FgID.js +0 -597
  120. package/dist/vue-ui-mood-radar-24XAq8mg.js +0 -670
  121. package/dist/vue-ui-nested-donuts-DjWASp62.js +0 -1212
  122. package/dist/vue-ui-onion-B9thdF_c.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-DT-GhOaA.js +0 -807
  124. package/dist/vue-ui-quick-chart-D0DukVN6.js +0 -1612
  125. package/dist/vue-ui-radar-DY8y6oRc.js +0 -741
  126. package/dist/vue-ui-relation-circle-8Gd7_fxt.js +0 -542
  127. package/dist/vue-ui-ridgeline-iPtG1McW.js +0 -969
  128. package/dist/vue-ui-rings-BXPo4MMo.js +0 -685
  129. package/dist/vue-ui-scatter-26d0eebx.js +0 -1045
  130. package/dist/vue-ui-spark-trend-Dt3ctzpl.js +0 -291
  131. package/dist/vue-ui-sparkbar-RrxErqrU.js +0 -301
  132. package/dist/vue-ui-sparkgauge-CyNi1b0O.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-DPpZCPuE.js +0 -313
  134. package/dist/vue-ui-sparkline-BMjQ_uYx.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-CjO8pfE-.js +0 -381
  136. package/dist/vue-ui-stackbar-wgyvMlE6.js +0 -1207
  137. package/dist/vue-ui-strip-plot-BF1o8lvY.js +0 -761
  138. package/dist/vue-ui-thermometer-CtuxuYVt.js +0 -495
  139. package/dist/vue-ui-tiremarks-DOwj4ZE-.js +0 -358
  140. package/dist/vue-ui-treemap-C4LtyFug.js +0 -965
  141. package/dist/vue-ui-waffle-D8mzGTeo.js +0 -863
  142. package/dist/vue-ui-wheel-C6uAotal.js +0 -352
  143. package/dist/vue-ui-word-cloud-Bge2211V.js +0 -659
  144. package/dist/vue-ui-xy-UzQacbnA.js +0 -2982
@@ -0,0 +1,910 @@
1
+ import { defineAsyncComponent as G, useSlots as Ct, computed as f, ref as i, toRefs as $t, watch as ee, shallowRef as We, onMounted as It, onBeforeUnmount as _t, createElementBlock as v, openBlock as n, unref as c, normalizeStyle as te, normalizeClass as je, createBlock as N, createCommentVNode as b, createElementVNode as C, createVNode as fe, createSlots as qe, withCtx as g, renderSlot as y, normalizeProps as W, guardReactiveProps as j, Fragment as $, renderList as F, mergeProps as He, toDisplayString as q, createTextVNode as Tt, nextTick as At } from "vue";
2
+ import { u as St, c as Pt, t as Lt, a as Ot, p as V, b as Ft, o as Xe, f as pe, g as Bt, d as zt, k as Y, i as P, X as Nt, s as Vt, x as Mt, F as Dt, e as Rt, v as Et, w as Ut, L as Gt, y as Wt, z as jt } from "./index-BtNwOUja.js";
3
+ import { t as qt, u as Ht } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Ye } from "./useNestedProp-f2H3m6Yj.js";
5
+ import { u as Xt } from "./usePrinter-DUNjpQNe.js";
6
+ import { u as Yt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Jt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Kt from "./Title-BGu6gEd2.js";
9
+ import Qt from "./Legend-BUk0WvWJ.js";
10
+ import { _ as Zt } from "./Shape-BRzOzubn.js";
11
+ import el from "./img-DrR839Ot.js";
12
+ import { u as tl, B as ll } from "./useLoading-D7YHNtLX.js";
13
+ import { _ as al } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const ol = ["id"], ul = ["xmlns", "viewBox"], sl = ["id"], nl = ["stop-color"], rl = ["stop-color"], il = ["id"], vl = ["x", "y", "height", "width"], cl = ["height", "width"], dl = { key: 0 }, hl = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], fl = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], pl = { key: 1 }, yl = ["rx", "x", "y", "height", "width", "fill", "filter"], gl = ["textContent", "x", "y", "font-size", "fill", "filter"], ml = ["x", "y", "height", "width", "onMouseover", "onMouseleave", "onClick"], bl = {
15
+ key: 4,
16
+ class: "vue-data-ui-watermark"
17
+ }, wl = ["onClick"], kl = ["innerHTML"], xl = {
18
+ __name: "vue-ui-waffle",
19
+ props: {
20
+ config: {
21
+ type: Object,
22
+ default() {
23
+ return {};
24
+ }
25
+ },
26
+ dataset: {
27
+ type: Array,
28
+ default() {
29
+ return [];
30
+ }
31
+ }
32
+ },
33
+ emits: ["selectLegend"],
34
+ setup(Je, { expose: Ke, emit: Qe }) {
35
+ const Ze = G(() => import("./DataTable-BSSXpM7w.js")), et = G(() => import("./PenAndPaper-D3zudcNI.js")), tt = G(() => import("./vue-ui-accordion-BKUrAowe.js")), lt = G(() => import("./Tooltip-Bh2zYSoM.js")), at = G(() => import("./UserOptions-Ck8fz9f4.js")), ot = G(() => import("./PackageVersion-CJ6Vd7V5.js")), { vue_ui_waffle: ut } = St(), m = Je, st = Ct(), le = f(() => !!m.dataset && m.dataset.length), k = i(Pt()), nt = i(null), ae = i(!1), oe = i(""), M = i(null), ye = i(0), L = i(null), ge = i(null), me = i(null), be = i(null), we = i(null), ke = i(0), xe = i(0), Ce = i(0), e = i(ne()), { loading: $e, FINAL_DATASET: J, manualLoading: ue } = tl({
36
+ ...$t(m),
37
+ FINAL_CONFIG: e,
38
+ prepareConfig: ne,
39
+ callback: () => {
40
+ Promise.resolve().then(async () => {
41
+ h.value = re();
42
+ });
43
+ },
44
+ skeletonDataset: [
45
+ {
46
+ name: "",
47
+ values: [1],
48
+ color: "#AAAAAA"
49
+ },
50
+ {
51
+ name: "",
52
+ values: [1],
53
+ color: "#BABABA"
54
+ },
55
+ {
56
+ name: "",
57
+ values: [1],
58
+ color: "#CACACA"
59
+ }
60
+ ],
61
+ skeletonConfig: Lt({
62
+ defaultConfig: e.value,
63
+ userConfig: {
64
+ useCustomCells: !1,
65
+ userOptions: { show: !1 },
66
+ table: { show: !1 },
67
+ style: {
68
+ chart: {
69
+ backgroundColor: "#99999930",
70
+ layout: {
71
+ labels: {
72
+ captions: { show: !1 }
73
+ },
74
+ rect: {
75
+ stroke: "#999999"
76
+ }
77
+ },
78
+ legend: {
79
+ backgroundColor: "transparent",
80
+ showValue: !1,
81
+ showPercentage: !1
82
+ }
83
+ }
84
+ }
85
+ }
86
+ })
87
+ }), { userOptionsVisible: se, setUserOptionsVisibility: Ie, keepUserOptionState: _e } = Yt({ config: e.value }), { svgRef: Te } = Jt({ config: e.value.style.chart.title });
88
+ function ne() {
89
+ const t = Ye({
90
+ userConfig: m.config,
91
+ defaultConfig: ut
92
+ });
93
+ return t.theme ? {
94
+ ...Ye({
95
+ userConfig: Ft.vue_ui_waffle[t.theme] || m.config,
96
+ defaultConfig: t
97
+ }),
98
+ customPalette: Ot[t.theme] || V
99
+ } : t;
100
+ }
101
+ ee(() => m.config, (t) => {
102
+ $e.value || (e.value = ne()), se.value = !e.value.userOptions.showOnChartHover, Se(), ke.value += 1, xe.value += 1, Ce.value += 1, x.value.showTable = e.value.table.show, x.value.showTooltip = e.value.style.chart.tooltip.show;
103
+ }, { deep: !0 });
104
+ const O = We(null), D = We(null), Ae = f(() => !!e.value.debug);
105
+ function Se() {
106
+ if (Xe(m.dataset) ? (pe({
107
+ componentName: "VueUiWaffle",
108
+ type: "dataset",
109
+ debug: Ae.value
110
+ }), le.value = !1, ue.value = !0) : m.dataset.forEach((t, a) => {
111
+ Bt({
112
+ datasetObject: t,
113
+ requiredAttributes: ["name", "values"]
114
+ }).forEach((l) => {
115
+ pe({
116
+ componentName: "VueUiWaffle",
117
+ type: "datasetSerieAttribute",
118
+ property: l,
119
+ index: a,
120
+ debug: Ae.value
121
+ });
122
+ });
123
+ }), Xe(m.dataset) || (ue.value = e.value.loading), e.value.responsive) {
124
+ const t = qt(() => {
125
+ const { width: a, height: l } = Ht({
126
+ chart: L.value,
127
+ title: e.value.style.chart.title.text ? ge.value : null,
128
+ legend: e.value.style.chart.legend.show ? me.value : null,
129
+ source: be.value,
130
+ noTitle: we.value
131
+ });
132
+ requestAnimationFrame(() => {
133
+ B.value.width = a, B.value.height = l, I.value.width = a, I.value.height = l;
134
+ });
135
+ });
136
+ O.value && (D.value && O.value.unobserve(D.value), O.value.disconnect()), O.value = new ResizeObserver(t), D.value = L.value.parentNode, O.value.observe(D.value);
137
+ }
138
+ }
139
+ It(() => {
140
+ Se();
141
+ }), _t(() => {
142
+ O.value && (D.value && O.value.unobserve(D.value), O.value.disconnect());
143
+ });
144
+ const { isPrinting: Pe, isImaging: Le, generatePdf: Oe, generateImage: Fe } = Xt({
145
+ elementId: `vue-ui-waffle_${k.value}`,
146
+ fileName: e.value.style.chart.title.text || "vue-ui-waffle",
147
+ options: e.value.userOptions.print
148
+ }), rt = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), Be = f(() => zt(e.value.customPalette)), x = i({
149
+ showTable: e.value.table.show,
150
+ showTooltip: e.value.style.chart.tooltip.show
151
+ });
152
+ ee(e, () => {
153
+ x.value = {
154
+ showTable: e.value.table.show,
155
+ showTooltip: e.value.style.chart.tooltip.show
156
+ };
157
+ }, { immediate: !0 });
158
+ const B = i({
159
+ height: 512,
160
+ width: 512
161
+ }), I = i({
162
+ top: 0,
163
+ left: 0,
164
+ height: 512,
165
+ width: 512
166
+ }), _ = f(() => (I.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), T = f(() => (I.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), it = f(() => Math.max(1e-4, I.value.width / e.value.style.chart.layout.grid.size)), ze = f(() => Math.max(1e-4, I.value.height / e.value.style.chart.layout.grid.size));
167
+ function Ne(t) {
168
+ const a = e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.size, l = t.reduce((w, he) => w + he, 0), o = t.map((w) => w / l * a), u = o.map(Math.floor), s = o.map((w) => w % 1);
169
+ let d = a - u.reduce((w, he) => w + he, 0);
170
+ for (; d > 0; ) {
171
+ let w = s.indexOf(Math.max(...s));
172
+ u[w] += 1, s[w] = 0, d -= 1;
173
+ }
174
+ return u;
175
+ }
176
+ const H = i(!1);
177
+ function re() {
178
+ return H.value = J.value.flatMap((t) => t.values.reduce((a, l) => a + l, 0)).reduce((t, a) => t + a, 0) === 0, J.value.map((t, a) => ({
179
+ ...t,
180
+ color: Rt(t.color) || Be.value[a] || V[a] || V[a % V.length],
181
+ uid: `serie_${a}`,
182
+ absoluteIndex: a
183
+ }));
184
+ }
185
+ const ie = f(() => re()), h = i(ie.value);
186
+ ee(() => m.dataset, (t) => {
187
+ Array.isArray(t) && t.length > 0 && (ue.value = !1);
188
+ }, { immediate: !0 }), ee(() => m.dataset, (t) => {
189
+ h.value = re();
190
+ }, { deep: !0 });
191
+ const vt = f(() => {
192
+ const t = h.value.filter((a, l) => !p.value.includes(a.uid)).map((a, l) => H.value ? 1 : (a.values || []).reduce((o, u) => o + u, 0));
193
+ return Ne(t);
194
+ }), ct = f(() => {
195
+ const t = h.value.map((a, l) => H.value ? 1 : (a.values || []).reduce((o, u) => o + u));
196
+ return Ne(t);
197
+ }), X = f(() => (J.value.forEach((t, a) => {
198
+ [null, void 0].includes(t.values) && pe({
199
+ componentName: "VueUiWaffle",
200
+ type: "datasetSerieAttribute",
201
+ property: "values (number[])",
202
+ index: a
203
+ });
204
+ }), h.value.filter((t, a) => !p.value.includes(t.uid)).map((t, a) => ({
205
+ absoluteIndex: t.absoluteIndex,
206
+ uid: t.uid,
207
+ name: t.name,
208
+ color: t.color,
209
+ value: (t.values || []).reduce((l, o) => l + o, 0),
210
+ absoluteValues: t.values || [],
211
+ proportion: vt.value[a]
212
+ })))), dt = f(() => h.value.map((t, a) => ({
213
+ absoluteIndex: t.absoluteIndex,
214
+ uid: t.uid,
215
+ name: t.name,
216
+ color: t.color,
217
+ value: (t.values || []).reduce((l, o) => l + o, 0),
218
+ absoluteValues: t.values || [],
219
+ proportion: ct.value[a]
220
+ })));
221
+ function ht() {
222
+ return dt.value.map((t) => ({
223
+ name: t.name,
224
+ color: t.color,
225
+ value: t.value,
226
+ proportion: t.proportion
227
+ }));
228
+ }
229
+ const ft = f(() => {
230
+ let t = 0;
231
+ return X.value.map((a, l) => {
232
+ const o = t, u = o + a.proportion, s = [];
233
+ for (let d = Math.floor(o); d < Math.floor(u); d += 1)
234
+ s.push(d);
235
+ return t = u, {
236
+ ...a,
237
+ start: o,
238
+ rects: s
239
+ };
240
+ });
241
+ }), r = f(() => ft.value.flatMap((t, a) => t.rects.map((l, o) => ({
242
+ isFirst: o === 0,
243
+ isLongEnough: l.length > 2,
244
+ name: t.name,
245
+ color: t.color,
246
+ value: t.value,
247
+ serieIndex: a,
248
+ absoluteStartIndex: o < 3,
249
+ serieId: t.uid,
250
+ ...t
251
+ }))).map((t, a) => ({
252
+ ...t,
253
+ isAbsoluteFirst: a % e.value.style.chart.layout.grid.size === 0
254
+ }))), R = f(() => {
255
+ const t = [];
256
+ for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
257
+ for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
258
+ t.push({
259
+ isStartOfLine: l === 0,
260
+ position: e.value.style.chart.layout.grid.vertical ? a : l,
261
+ x: (e.value.style.chart.layout.grid.vertical ? a : l) * (_.value + e.value.style.chart.layout.grid.spaceBetween),
262
+ y: (e.value.style.chart.layout.grid.vertical ? l : a) * (T.value + e.value.style.chart.layout.grid.spaceBetween) + I.value.top
263
+ });
264
+ return t;
265
+ }), p = i([]), z = i(!1), Ve = i(null), Me = i(null);
266
+ function De(t) {
267
+ if (H.value) return;
268
+ if (!e.value.useAnimation) {
269
+ p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < E.value.length - 1 && E.value.length > 1 && p.value.push(t);
270
+ return;
271
+ }
272
+ const a = ie.value.find((u) => u.uid === t).values.reduce((u, s) => u + s, 0), l = h.value.find((u) => u.uid === t).values.reduce((u, s) => u + s, 0);
273
+ let o = l;
274
+ if (!(l === 0 && a === 0)) {
275
+ if (p.value.includes(t)) {
276
+ let s = function() {
277
+ o > u ? (cancelAnimationFrame(Ve.value), h.value = h.value.map((d, w) => d.uid === t ? {
278
+ ...d,
279
+ values: [u]
280
+ } : d), z.value = !1) : (z.value = !0, o += u * 0.025, h.value = h.value.map((d, w) => d.uid === t ? {
281
+ ...d,
282
+ values: [o]
283
+ } : d), Ve.value = requestAnimationFrame(s));
284
+ };
285
+ p.value = p.value.filter((d) => d !== t);
286
+ const u = a;
287
+ s();
288
+ } else if (p.value.length < E.value.length - 1 && E.value.length > 1) {
289
+ let u = function() {
290
+ o < l / 100 ? (cancelAnimationFrame(Me.value), p.value.push(t), h.value = h.value.map((s, d) => s.uid === t ? {
291
+ ...s,
292
+ values: [0]
293
+ } : s), z.value = !1) : (z.value = !0, o /= 1.15, h.value = h.value.map((s) => s.uid === t ? {
294
+ ...s,
295
+ values: [o]
296
+ } : s), Me.value = requestAnimationFrame(u));
297
+ };
298
+ u();
299
+ }
300
+ bt("selectLegend", X.value.map((u) => ({
301
+ name: u.name,
302
+ color: u.color,
303
+ value: u.value,
304
+ proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
305
+ })));
306
+ }
307
+ }
308
+ const E = f(() => h.value.map((t, a) => ({
309
+ name: t.name,
310
+ color: t.color || Be[a] || V[a] || V[a % V.length],
311
+ value: (t.values || []).reduce((l, o) => l + o, 0),
312
+ uid: t.uid,
313
+ shape: "square"
314
+ })).map((t) => ({
315
+ ...t,
316
+ proportion: t.value / h.value.map((a) => (a.values || []).reduce((l, o) => l + o, 0)).reduce((a, l) => a + l, 0),
317
+ opacity: p.value.includes(t.uid) ? 0.5 : 1,
318
+ segregate: () => De(t.uid),
319
+ isSegregated: p.value.includes(t.uid)
320
+ }))), pt = f(() => ({
321
+ cy: "waffle-div-legend",
322
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
323
+ color: e.value.style.chart.legend.color,
324
+ fontSize: e.value.style.chart.legend.fontSize,
325
+ paddingBottom: 12,
326
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
327
+ })), A = f(() => X.value.map((t) => t.value).reduce((t, a) => t + a, 0)), ve = i(null), ce = i(null);
328
+ function yt(t) {
329
+ const a = r.value[t];
330
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: a.serieIndex });
331
+ }
332
+ function gt(t) {
333
+ const a = r.value[t];
334
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: a.serieIndex }), ce.value = null, ae.value = !1, M.value = null;
335
+ }
336
+ function mt(t) {
337
+ if (p.value.length === m.dataset.length) return;
338
+ const a = r.value[t];
339
+ ve.value = {
340
+ datapoint: a,
341
+ seriesIndex: a.absoluteIndex,
342
+ series: h.value,
343
+ config: e.value
344
+ }, e.value.events.datapointEnter && ce.value !== a.serieIndex && e.value.events.datapointEnter({ datapoint: a, seriesIndex: a.serieIndex }), ce.value = a.serieIndex, ae.value = !0, M.value = r.value[t].serieIndex;
345
+ const l = e.value.style.chart.tooltip.customFormat;
346
+ if (Wt(l) && jt(() => l({
347
+ seriesIndex: r.value[t].absoluteIndex,
348
+ datapoint: a,
349
+ series: h.value,
350
+ config: e.value
351
+ })))
352
+ oe.value = l({
353
+ seriesIndex: r.value[t].absoluteIndex,
354
+ datapoint: a,
355
+ series: h.value,
356
+ config: e.value
357
+ });
358
+ else {
359
+ let o = "";
360
+ if (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${a.color}" />${st.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${k.value}_${a.absoluteIndex})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${Y(
361
+ e.value.style.chart.layout.labels.dataLabels.formatter,
362
+ a.value,
363
+ P({
364
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
365
+ v: a.value,
366
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
367
+ r: e.value.style.chart.tooltip.roundingValue
368
+ }),
369
+ {
370
+ datapoint: a,
371
+ seriesIndex: r.value[t].absoluteIndex,
372
+ series: h.value
373
+ }
374
+ )}</b>`), e.value.style.chart.tooltip.showPercentage) {
375
+ const u = P({
376
+ v: H.value ? 1 / J.value.length * 100 : a.value / A.value * 100,
377
+ s: "%",
378
+ r: e.value.style.chart.tooltip.roundingPercentage
379
+ });
380
+ e.value.style.chart.tooltip.showValue ? o += `<span>(${u})</span></div>` : o += `<b>${u}%</b></div>`;
381
+ }
382
+ oe.value = o;
383
+ }
384
+ }
385
+ const bt = Qe, S = f(() => {
386
+ const t = X.value.map((l) => ({
387
+ name: l.name,
388
+ color: l.color
389
+ })), a = X.value.map((l) => l.value);
390
+ return { head: t, body: a };
391
+ });
392
+ function K(t) {
393
+ return e.value.useBlurOnHover && ![null, void 0].includes(M.value) && M.value !== t ? `url(#blur_${k.value})` : "";
394
+ }
395
+ function wt(t, a) {
396
+ return e.value.style.chart.layout.labels.captions.show ? r.value.length && !z.value && !e.value.style.chart.layout.grid.vertical && (r.value[t].isFirst && a.position < e.value.style.chart.layout.grid.size - 2 || r.value[t].isAbsoluteFirst && t % e.value.style.chart.layout.grid.size === 0 && r.value[t].absoluteStartIndex) : !1;
397
+ }
398
+ function kt(t, a = null) {
399
+ const l = Y(
400
+ e.value.style.chart.layout.labels.dataLabels.formatter,
401
+ r.value[t].value,
402
+ P({
403
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
404
+ v: r.value[t].value,
405
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
406
+ r: e.value.style.chart.layout.labels.captions.roundingValue
407
+ }),
408
+ { datapoint: r.value[t], position: a }
409
+ ), o = P({ v: r.value[t].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage }), u = (e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? Gt({ source: r.value[t].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : r.value[t].name) + (e.value.style.chart.layout.labels.captions.showPercentage || e.value.style.chart.layout.labels.captions.showValue ? ":" : ""), s = e.value.style.chart.layout.labels.captions.showSerieName ? u : "";
410
+ let d = "";
411
+ return e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? d = `${o} (${l})` : e.value.style.chart.layout.labels.captions.showPercentage && !e.value.style.chart.layout.labels.captions.showValue ? d = o : !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue && (d = l), `${s}${d}`;
412
+ }
413
+ function Re(t = null) {
414
+ At(() => {
415
+ const a = S.value.head.map((u, s) => [[
416
+ u.name
417
+ ], [S.value.body[s]], [isNaN(S.value.body[s] / A.value) ? "-" : S.value.body[s] / A.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = Et(l);
418
+ t ? t(o) : Ut({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-waffle" });
419
+ });
420
+ }
421
+ const Q = f(() => {
422
+ const t = [
423
+ ' <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>',
424
+ Y(
425
+ e.value.style.chart.layout.labels.dataLabels.formatter,
426
+ A.value,
427
+ P({
428
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
429
+ v: A.value,
430
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
431
+ r: e.value.table.td.roundingValue
432
+ })
433
+ ),
434
+ "100%"
435
+ ], a = S.value.head.map((u, s) => [
436
+ {
437
+ color: u.color,
438
+ name: u.name
439
+ },
440
+ Y(
441
+ e.value.style.chart.layout.labels.dataLabels.formatter,
442
+ S.value.body[s],
443
+ P({
444
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
445
+ v: S.value.body[s],
446
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
447
+ r: e.value.table.td.roundingValue
448
+ })
449
+ ),
450
+ isNaN(S.value.body[s] / A.value) ? "-" : P({
451
+ v: S.value.body[s] / A.value * 100,
452
+ s: "%",
453
+ r: e.value.table.td.roundingPercentage
454
+ })
455
+ ]), l = {
456
+ th: {
457
+ backgroundColor: e.value.table.th.backgroundColor,
458
+ color: e.value.table.th.color,
459
+ outline: e.value.table.th.outline
460
+ },
461
+ td: {
462
+ backgroundColor: e.value.table.td.backgroundColor,
463
+ color: e.value.table.td.color,
464
+ outline: e.value.table.td.outline
465
+ },
466
+ shape: "square",
467
+ breakpoint: e.value.table.responsiveBreakpoint
468
+ }, o = [
469
+ e.value.table.columnNames.series,
470
+ e.value.table.columnNames.value,
471
+ e.value.table.columnNames.percentage
472
+ ];
473
+ return {
474
+ head: t,
475
+ body: a,
476
+ config: l,
477
+ colNames: o
478
+ };
479
+ }), U = i(!1);
480
+ function Ee(t) {
481
+ U.value = t, ye.value += 1;
482
+ }
483
+ function Ue() {
484
+ x.value.showTable = !x.value.showTable;
485
+ }
486
+ function Ge() {
487
+ x.value.showTooltip = !x.value.showTooltip;
488
+ }
489
+ const Z = i(!1);
490
+ function de() {
491
+ Z.value = !Z.value;
492
+ }
493
+ async function xt({ scale: t = 2 } = {}) {
494
+ if (!L.value) return;
495
+ const { width: a, height: l } = L.value.getBoundingClientRect(), o = a / l, { imageUri: u, base64: s } = await el({ domElement: L.value, base64: !0, img: !0, scale: t });
496
+ return {
497
+ imageUri: u,
498
+ base64: s,
499
+ title: e.value.style.chart.title.text,
500
+ width: a,
501
+ height: l,
502
+ aspectRatio: o
503
+ };
504
+ }
505
+ return Ke({
506
+ getData: ht,
507
+ getImage: xt,
508
+ generatePdf: Oe,
509
+ generateCsv: Re,
510
+ generateImage: Fe,
511
+ toggleTable: Ue,
512
+ toggleTooltip: Ge,
513
+ toggleAnnotator: de,
514
+ toggleFullscreen: Ee
515
+ }), (t, a) => (n(), v("div", {
516
+ class: je(`vue-ui-waffle ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
517
+ ref_key: "waffleChart",
518
+ ref: L,
519
+ id: `vue-ui-waffle_${k.value}`,
520
+ style: te(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
521
+ onMouseenter: a[2] || (a[2] = () => c(Ie)(!0)),
522
+ onMouseleave: a[3] || (a[3] = () => c(Ie)(!1))
523
+ }, [
524
+ e.value.userOptions.buttons.annotator ? (n(), N(c(et), {
525
+ key: 0,
526
+ svgRef: c(Te),
527
+ backgroundColor: e.value.style.chart.backgroundColor,
528
+ color: e.value.style.chart.color,
529
+ active: Z.value,
530
+ onClose: de
531
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
532
+ rt.value ? (n(), v("div", {
533
+ key: 1,
534
+ ref_key: "noTitle",
535
+ ref: we,
536
+ class: "vue-data-ui-no-title-space",
537
+ style: "height:36px; width: 100%;background:transparent"
538
+ }, null, 512)) : b("", !0),
539
+ e.value.style.chart.title.text ? (n(), v("div", {
540
+ key: 2,
541
+ ref_key: "chartTitle",
542
+ ref: ge,
543
+ style: "width:100%;background:transparent;padding-bottom:12px"
544
+ }, [
545
+ (n(), N(Kt, {
546
+ key: `title_${ke.value}`,
547
+ config: {
548
+ title: {
549
+ cy: "waffle-title",
550
+ ...e.value.style.chart.title
551
+ },
552
+ subtitle: {
553
+ cy: "waffle-subtitle",
554
+ ...e.value.style.chart.title.subtitle
555
+ }
556
+ }
557
+ }, null, 8, ["config"]))
558
+ ], 512)) : b("", !0),
559
+ e.value.userOptions.show && le.value && (c(_e) || c(se)) ? (n(), N(c(at), {
560
+ ref_key: "details",
561
+ ref: nt,
562
+ key: `user_options_${ye.value}`,
563
+ backgroundColor: e.value.style.chart.backgroundColor,
564
+ color: e.value.style.chart.color,
565
+ isPrinting: c(Pe),
566
+ isImaging: c(Le),
567
+ uid: k.value,
568
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
569
+ hasPdf: e.value.userOptions.buttons.pdf,
570
+ hasImg: e.value.userOptions.buttons.img,
571
+ hasXls: e.value.userOptions.buttons.csv,
572
+ hasTable: e.value.userOptions.buttons.table,
573
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
574
+ isFullscreen: U.value,
575
+ isTooltip: x.value.showTooltip,
576
+ titles: { ...e.value.userOptions.buttonTitles },
577
+ chartElement: L.value,
578
+ position: e.value.userOptions.position,
579
+ hasAnnotator: e.value.userOptions.buttons.annotator,
580
+ isAnnotation: Z.value,
581
+ callbacks: e.value.userOptions.callbacks,
582
+ printScale: e.value.userOptions.print.scale,
583
+ onToggleFullscreen: Ee,
584
+ onGeneratePdf: c(Oe),
585
+ onGenerateCsv: Re,
586
+ onGenerateImage: c(Fe),
587
+ onToggleTable: Ue,
588
+ onToggleTooltip: Ge,
589
+ onToggleAnnotator: de,
590
+ style: te({
591
+ visibility: c(_e) ? c(se) ? "visible" : "hidden" : "visible"
592
+ })
593
+ }, qe({ _: 2 }, [
594
+ t.$slots.menuIcon ? {
595
+ name: "menuIcon",
596
+ fn: g(({ isOpen: l, color: o }) => [
597
+ y(t.$slots, "menuIcon", W(j({ isOpen: l, color: o })), void 0, !0)
598
+ ]),
599
+ key: "0"
600
+ } : void 0,
601
+ t.$slots.optionTooltip ? {
602
+ name: "optionTooltip",
603
+ fn: g(() => [
604
+ y(t.$slots, "optionTooltip", {}, void 0, !0)
605
+ ]),
606
+ key: "1"
607
+ } : void 0,
608
+ t.$slots.optionPdf ? {
609
+ name: "optionPdf",
610
+ fn: g(() => [
611
+ y(t.$slots, "optionPdf", {}, void 0, !0)
612
+ ]),
613
+ key: "2"
614
+ } : void 0,
615
+ t.$slots.optionCsv ? {
616
+ name: "optionCsv",
617
+ fn: g(() => [
618
+ y(t.$slots, "optionCsv", {}, void 0, !0)
619
+ ]),
620
+ key: "3"
621
+ } : void 0,
622
+ t.$slots.optionImg ? {
623
+ name: "optionImg",
624
+ fn: g(() => [
625
+ y(t.$slots, "optionImg", {}, void 0, !0)
626
+ ]),
627
+ key: "4"
628
+ } : void 0,
629
+ t.$slots.optionTable ? {
630
+ name: "optionTable",
631
+ fn: g(() => [
632
+ y(t.$slots, "optionTable", {}, void 0, !0)
633
+ ]),
634
+ key: "5"
635
+ } : void 0,
636
+ t.$slots.optionFullscreen ? {
637
+ name: "optionFullscreen",
638
+ fn: g(({ toggleFullscreen: l, isFullscreen: o }) => [
639
+ y(t.$slots, "optionFullscreen", W(j({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
640
+ ]),
641
+ key: "6"
642
+ } : void 0,
643
+ t.$slots.optionAnnotator ? {
644
+ name: "optionAnnotator",
645
+ fn: g(({ toggleAnnotator: l, isAnnotator: o }) => [
646
+ y(t.$slots, "optionAnnotator", W(j({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
647
+ ]),
648
+ key: "7"
649
+ } : void 0
650
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0),
651
+ (n(), v("svg", {
652
+ ref_key: "svgRef",
653
+ ref: Te,
654
+ xmlns: c(Nt),
655
+ class: je({ "vue-data-ui-fullscreen--on": U.value, "vue-data-ui-fulscreen--off": !U.value }),
656
+ viewBox: `0 0 ${B.value.width <= 0 ? 10 : B.value.width} ${B.value.height <= 0 ? 10 : B.value.height}`,
657
+ style: te(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
658
+ }, [
659
+ fe(c(ot)),
660
+ C("defs", null, [
661
+ (n(!0), v($, null, F(r.value, (l, o) => (n(), v("radialGradient", {
662
+ cx: "50%",
663
+ cy: "50%",
664
+ r: "50%",
665
+ fx: "50%",
666
+ fy: "50%",
667
+ id: `gradient_${k.value}_${o}`
668
+ }, [
669
+ C("stop", {
670
+ offset: "0%",
671
+ "stop-color": c(Vt)(c(Mt)(l.color, 0.05), 100 - e.value.style.chart.layout.rect.gradientIntensity)
672
+ }, null, 8, nl),
673
+ C("stop", {
674
+ offset: "100%",
675
+ "stop-color": l.color
676
+ }, null, 8, rl)
677
+ ], 8, sl))), 256))
678
+ ]),
679
+ C("defs", null, [
680
+ C("filter", {
681
+ id: `blur_${k.value}`,
682
+ x: "-50%",
683
+ y: "-50%",
684
+ width: "200%",
685
+ height: "200%"
686
+ }, [...a[4] || (a[4] = [
687
+ C("feGaussianBlur", {
688
+ in: "SourceGraphic",
689
+ stdDeviation: 2
690
+ }, null, -1),
691
+ C("feColorMatrix", {
692
+ type: "saturate",
693
+ values: "0"
694
+ }, null, -1)
695
+ ])], 8, il)
696
+ ]),
697
+ e.value.useCustomCells && r.value.length ? (n(!0), v($, { key: 0 }, F(R.value, (l, o) => (n(), v("foreignObject", {
698
+ x: l.x,
699
+ y: l.y,
700
+ height: T.value <= 0 ? 1e-4 : T.value,
701
+ width: _.value <= 0 ? 1e-4 : _.value,
702
+ class: "vue-ui-waffle-custom-cell-foreignObject"
703
+ }, [
704
+ y(t.$slots, "cell", He({ ref_for: !0 }, { cell: { ...l, color: r.value[o].color, ...r.value[o] }, isSelected: [null, void 0].includes(M.value) ? !0 : r.value[o].serieIndex === M.value }), void 0, !0)
705
+ ], 8, vl))), 256)) : b("", !0),
706
+ !r.value.length && !e.value.useCustomCells ? (n(), v("rect", {
707
+ key: 1,
708
+ x: 12,
709
+ y: 12,
710
+ height: I.value.height - 24,
711
+ width: I.value.width - 24,
712
+ rx: 3,
713
+ fill: "none",
714
+ stroke: "black"
715
+ }, null, 8, cl)) : r.value.length && !e.value.useCustomCells ? (n(), v($, { key: 2 }, [
716
+ t.$slots.pattern ? (n(), v("g", dl, [
717
+ (n(!0), v($, null, F(ie.value, (l) => (n(), v("defs", null, [
718
+ y(t.$slots, "pattern", He({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${k.value}_${l.absoluteIndex}` }), void 0, !0)
719
+ ]))), 256))
720
+ ])) : b("", !0),
721
+ (n(!0), v($, null, F(R.value, (l, o) => (n(), v("rect", {
722
+ rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
723
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
724
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
725
+ height: T.value <= 0 ? 1e-4 : T.value,
726
+ width: _.value <= 0 ? 1e-4 : _.value,
727
+ fill: "white",
728
+ stroke: e.value.style.chart.layout.rect.stroke,
729
+ "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
730
+ filter: K(r.value[o].serieIndex)
731
+ }, null, 8, hl))), 256)),
732
+ (n(!0), v($, null, F(R.value, (l, o) => (n(), v("rect", {
733
+ rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
734
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
735
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
736
+ height: T.value <= 0 ? 1e-4 : T.value,
737
+ width: _.value <= 0 ? 1e-4 : _.value,
738
+ fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${k.value}_${o})` : r.value[o].color,
739
+ stroke: e.value.style.chart.layout.rect.stroke,
740
+ "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
741
+ filter: K(r.value[o].serieIndex)
742
+ }, null, 8, fl))), 256)),
743
+ t.$slots.pattern ? (n(), v("g", pl, [
744
+ (n(!0), v($, null, F(R.value, (l, o) => (n(), v("rect", {
745
+ rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
746
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
747
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
748
+ height: T.value <= 0 ? 1e-4 : T.value,
749
+ width: _.value <= 0 ? 1e-4 : _.value,
750
+ fill: `url(#pattern_${k.value}_${r.value[o].absoluteIndex})`,
751
+ stroke: "none",
752
+ filter: K(r.value[o].serieIndex)
753
+ }, null, 8, yl))), 256))
754
+ ])) : b("", !0)
755
+ ], 64)) : b("", !0),
756
+ (n(!0), v($, null, F(R.value, (l, o) => (n(), v($, null, [
757
+ wt(o, l) ? (n(), v("text", {
758
+ key: `datalabel_${o}`,
759
+ textContent: q(kt(o, l)),
760
+ x: l.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2 + 6,
761
+ y: l.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2 + ze.value / 2 + e.value.style.chart.layout.labels.captions.fontSize / 3,
762
+ "font-size": e.value.style.chart.layout.labels.captions.fontSize,
763
+ fill: c(Dt)(r.value[o].color),
764
+ filter: K(r.value[o].serieIndex)
765
+ }, null, 8, gl)) : b("", !0)
766
+ ], 64))), 256)),
767
+ (n(!0), v($, null, F(R.value, (l, o) => (n(), v("rect", {
768
+ x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
769
+ y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
770
+ height: ze.value,
771
+ width: it.value,
772
+ fill: "transparent",
773
+ stroke: "none",
774
+ onMouseover: (u) => mt(o),
775
+ onMouseleave: (u) => gt(o),
776
+ onClick: (u) => yt(o)
777
+ }, null, 40, ml))), 256)),
778
+ y(t.$slots, "svg", { svg: B.value }, void 0, !0)
779
+ ], 14, ul)),
780
+ t.$slots.watermark ? (n(), v("div", bl, [
781
+ y(t.$slots, "watermark", W(j({ isPrinting: c(Pe) || c(Le) })), void 0, !0)
782
+ ])) : b("", !0),
783
+ C("div", {
784
+ ref_key: "chartLegend",
785
+ ref: me
786
+ }, [
787
+ e.value.style.chart.legend.show ? (n(), N(Qt, {
788
+ key: `legend_${Ce.value}`,
789
+ legendSet: E.value,
790
+ config: pt.value,
791
+ onClickMarker: a[0] || (a[0] = ({ legend: l }) => De(l.uid))
792
+ }, qe({
793
+ item: g(({ legend: l }) => [
794
+ C("div", {
795
+ onClick: (o) => l.segregate(),
796
+ style: te(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
797
+ }, q(l.name) + q(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + q(e.value.style.chart.legend.showValue ? c(Y)(
798
+ e.value.style.chart.layout.labels.dataLabels.formatter,
799
+ l.value,
800
+ c(P)({
801
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
802
+ v: l.value,
803
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
804
+ r: e.value.style.chart.legend.roundingValue,
805
+ isAnimating: z.value
806
+ }),
807
+ { datapoint: l }
808
+ ) : "") + " " + q(e.value.style.chart.legend.showPercentage ? p.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 / A.value) ? "-" : c(P)({ v: l.value / A.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: z.value })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, wl)
809
+ ]),
810
+ _: 2
811
+ }, [
812
+ t.$slots.pattern ? {
813
+ name: "legend-pattern",
814
+ fn: g(({ legend: l, index: o }) => [
815
+ fe(Zt, {
816
+ shape: l.shape,
817
+ radius: 30,
818
+ stroke: "none",
819
+ plot: { x: 30, y: 30 },
820
+ fill: `url(#pattern_${k.value}_${o})`
821
+ }, null, 8, ["shape", "fill"])
822
+ ]),
823
+ key: "0"
824
+ } : void 0
825
+ ]), 1032, ["legendSet", "config"])) : y(t.$slots, "legend", {
826
+ key: 1,
827
+ legend: E.value
828
+ }, void 0, !0)
829
+ ], 512),
830
+ t.$slots.source ? (n(), v("div", {
831
+ key: 5,
832
+ ref_key: "source",
833
+ ref: be,
834
+ dir: "auto"
835
+ }, [
836
+ y(t.$slots, "source", {}, void 0, !0)
837
+ ], 512)) : b("", !0),
838
+ fe(c(lt), {
839
+ show: x.value.showTooltip && ae.value && p.value.length < m.dataset.length,
840
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
841
+ color: e.value.style.chart.tooltip.color,
842
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
843
+ borderColor: e.value.style.chart.tooltip.borderColor,
844
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
845
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
846
+ position: e.value.style.chart.tooltip.position,
847
+ offsetY: e.value.style.chart.tooltip.offsetY,
848
+ parent: L.value,
849
+ content: oe.value,
850
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
851
+ fontSize: e.value.style.chart.tooltip.fontSize,
852
+ isFullscreen: U.value,
853
+ smooth: e.value.style.chart.tooltip.smooth,
854
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
855
+ }, {
856
+ "tooltip-before": g(() => [
857
+ y(t.$slots, "tooltip-before", W(j({ ...ve.value })), void 0, !0)
858
+ ]),
859
+ "tooltip-after": g(() => [
860
+ y(t.$slots, "tooltip-after", W(j({ ...ve.value })), void 0, !0)
861
+ ]),
862
+ _: 3
863
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "fontSize", "isFullscreen", "smooth", "backdropFilter"]),
864
+ le.value ? (n(), N(c(tt), {
865
+ key: 6,
866
+ hideDetails: "",
867
+ config: {
868
+ open: x.value.showTable,
869
+ maxHeight: 1e4,
870
+ body: {
871
+ backgroundColor: e.value.style.chart.backgroundColor,
872
+ color: e.value.style.chart.color
873
+ },
874
+ head: {
875
+ backgroundColor: e.value.style.chart.backgroundColor,
876
+ color: e.value.style.chart.color
877
+ }
878
+ }
879
+ }, {
880
+ content: g(() => [
881
+ (n(), N(c(Ze), {
882
+ key: `table_${xe.value}`,
883
+ colNames: Q.value.colNames,
884
+ head: Q.value.head,
885
+ body: Q.value.body,
886
+ config: Q.value.config,
887
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
888
+ onClose: a[1] || (a[1] = (l) => x.value.showTable = !1)
889
+ }, {
890
+ th: g(({ th: l }) => [
891
+ C("div", {
892
+ innerHTML: l,
893
+ style: { display: "flex", "align-items": "center" }
894
+ }, null, 8, kl)
895
+ ]),
896
+ td: g(({ td: l }) => [
897
+ Tt(q(l.name || l), 1)
898
+ ]),
899
+ _: 1
900
+ }, 8, ["colNames", "head", "body", "config", "title"]))
901
+ ]),
902
+ _: 1
903
+ }, 8, ["config"])) : b("", !0),
904
+ c($e) ? (n(), N(ll, { key: 7 })) : b("", !0)
905
+ ], 46, ol));
906
+ }
907
+ }, Nl = /* @__PURE__ */ al(xl, [["__scopeId", "data-v-b038175e"]]);
908
+ export {
909
+ Nl as default
910
+ };