vue-data-ui 3.6.0 → 3.7.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 (199) hide show
  1. package/README.md +26 -26
  2. package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DhKIof09.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
  4. package/dist/{BaseIcon-DLFL0M4-.js → BaseIcon-CofSxalQ.js} +1 -1
  5. package/dist/{ColorPicker-CjIJvLdc.js → ColorPicker-e1-OSGlQ.js} +10 -10
  6. package/dist/{DataTable-UCyd_BQI.js → DataTable-CHaOCmsE.js} +2 -2
  7. package/dist/{Legend-D9ZTJKjh.js → Legend-Web3GjlR.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-a2UzZL0y.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
  9. package/dist/{PackageVersion-D_4Hr4S4.js → PackageVersion-Bq_mtsqr.js} +1 -1
  10. package/dist/{PenAndPaper-BJSMejV9.js → PenAndPaper-HCZQTkqi.js} +20 -20
  11. package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
  12. package/dist/{Slicer-CJfhtoVn.js → Slicer-BFBBG6xv.js} +23 -23
  13. package/dist/{SlicerPreview-wXjV4LWO.js → SlicerPreview-D76aSViW.js} +2 -2
  14. package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
  15. package/dist/{Title-Bb1VWCtR.js → Title-DfFUb9hd.js} +1 -1
  16. package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
  17. package/dist/{UserOptions-BqmUW9Kp.js → UserOptions-B3I-s3Lw.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +3 -3
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +3 -3
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +3 -3
  24. package/dist/components/vue-ui-candlestick.js +3 -3
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +3 -3
  27. package/dist/components/vue-ui-chord.js +3 -3
  28. package/dist/components/vue-ui-circle-pack.js +3 -3
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dashboard.js +1 -1
  31. package/dist/components/vue-ui-digits.js +1 -1
  32. package/dist/components/vue-ui-donut-evolution.js +2 -2
  33. package/dist/components/vue-ui-donut.js +3 -3
  34. package/dist/components/vue-ui-dumbbell.js +3 -3
  35. package/dist/components/vue-ui-flow.js +3 -3
  36. package/dist/components/vue-ui-funnel.js +2 -2
  37. package/dist/components/vue-ui-galaxy.js +1 -1
  38. package/dist/components/vue-ui-gauge.js +1 -1
  39. package/dist/components/vue-ui-gizmo.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-history-plot.js +3 -3
  42. package/dist/components/vue-ui-horizontal-bar.js +3 -3
  43. package/dist/components/vue-ui-icon.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +3 -3
  47. package/dist/components/vue-ui-mood-radar.js +3 -3
  48. package/dist/components/vue-ui-nested-donuts.js +2 -2
  49. package/dist/components/vue-ui-onion.js +3 -3
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +3 -3
  52. package/dist/components/vue-ui-quick-chart.js +3 -3
  53. package/dist/components/vue-ui-radar.js +3 -3
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +3 -3
  56. package/dist/components/vue-ui-ridgeline.js +3 -3
  57. package/dist/components/vue-ui-rings.js +3 -3
  58. package/dist/components/vue-ui-scatter.js +3 -3
  59. package/dist/components/vue-ui-skeleton.js +1 -1
  60. package/dist/components/vue-ui-smiley.js +1 -1
  61. package/dist/components/vue-ui-spark-trend.js +1 -1
  62. package/dist/components/vue-ui-sparkbar.js +2 -2
  63. package/dist/components/vue-ui-sparkgauge.js +3 -3
  64. package/dist/components/vue-ui-sparkhistogram.js +3 -3
  65. package/dist/components/vue-ui-sparkline.js +3 -3
  66. package/dist/components/vue-ui-sparkstackbar.js +2 -2
  67. package/dist/components/vue-ui-stackbar.js +3 -3
  68. package/dist/components/vue-ui-stackline.js +1 -1
  69. package/dist/components/vue-ui-strip-plot.js +3 -3
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +2 -2
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +3 -3
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +2 -2
  76. package/dist/components/vue-ui-treemap.js +3 -3
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +2 -2
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +3 -3
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +3 -3
  83. package/dist/components/vue-ui-xy.js +3 -3
  84. package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
  85. package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
  86. package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
  87. package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +1 -0
  90. package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
  91. package/dist/{useNestedProp-CIoDlpHu.js → useNestedProp-CWo6bftQ.js} +1 -1
  92. package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
  93. package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
  94. package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
  95. package/dist/{vue-data-ui-BWuOXu_s.js → vue-data-ui-ByLTJx5V.js} +78 -78
  96. package/dist/vue-data-ui.js +225 -205
  97. package/dist/{vue-ui-3d-bar-BNQAuLqF.js → vue-ui-3d-bar-Dkds4k5N.js} +546 -517
  98. package/dist/{vue-ui-accordion-SSLXLlNz.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
  99. package/dist/vue-ui-age-pyramid-C-fwZRYE.js +960 -0
  100. package/dist/{vue-ui-annotator-34Ld0u5M.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
  101. package/dist/vue-ui-bullet-BKVJRjGh.js +657 -0
  102. package/dist/{vue-ui-candlestick-BcChw-8c.js → vue-ui-candlestick-BKFWHU4O.js} +596 -561
  103. package/dist/{vue-ui-carousel-table-Cp_od0lI.js → vue-ui-carousel-table-VmPH6y2g.js} +48 -48
  104. package/dist/{vue-ui-chestnut-DTaIsP72.js → vue-ui-chestnut-DpMHe-OI.js} +534 -505
  105. package/dist/vue-ui-chord-Djdr0PY_.js +1182 -0
  106. package/dist/vue-ui-circle-pack-CyUqNJQt.js +832 -0
  107. package/dist/{vue-ui-cursor-lW-dVs_k.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
  108. package/dist/{vue-ui-dashboard-DIymn9Cx.js → vue-ui-dashboard-eBXj-KCw.js} +140 -140
  109. package/dist/{vue-ui-digits-YHA3fA0j.js → vue-ui-digits-D382I0-w.js} +2 -2
  110. package/dist/{vue-ui-donut-BaDmbWLh.js → vue-ui-donut-BLb0kj_P.js} +634 -602
  111. package/dist/vue-ui-donut-evolution-BqrldXpI.js +1243 -0
  112. package/dist/vue-ui-dumbbell-BuZT5a-d.js +1258 -0
  113. package/dist/vue-ui-flow-LLp6ntEP.js +1026 -0
  114. package/dist/vue-ui-funnel-pILUR-OG.js +743 -0
  115. package/dist/vue-ui-galaxy-X6yiw8kx.js +837 -0
  116. package/dist/vue-ui-gauge-DBh-vFb9.js +864 -0
  117. package/dist/{vue-ui-gizmo-E33_xZte.js → vue-ui-gizmo-DtyEukIP.js} +3 -3
  118. package/dist/{vue-ui-heatmap-DJXMvFPp.js → vue-ui-heatmap-mkD6QkXo.js} +501 -466
  119. package/dist/vue-ui-history-plot-CyTaBaxA.js +1239 -0
  120. package/dist/{vue-ui-kpi-C-XuLBVQ.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
  121. package/dist/{vue-ui-mini-loader-DawncJvl.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
  122. package/dist/vue-ui-molecule-UzQ3o5HW.js +782 -0
  123. package/dist/vue-ui-mood-radar-C2zkRLGy.js +930 -0
  124. package/dist/vue-ui-nested-donuts-B5OpvmJ9.js +1454 -0
  125. package/dist/vue-ui-onion-DbhIOGtF.js +944 -0
  126. package/dist/vue-ui-parallel-coordinate-plot-Dv_T4mWW.js +1080 -0
  127. package/dist/{vue-ui-quadrant-B2bLWyCm.js → vue-ui-quadrant-CG6_CWsQ.js} +510 -481
  128. package/dist/{vue-ui-quick-chart-J_RmCwI_.js → vue-ui-quick-chart-DOeRhk7r.js} +795 -758
  129. package/dist/vue-ui-radar-DdHa9Hsh.js +1013 -0
  130. package/dist/{vue-ui-rating-CBS8zaQd.js → vue-ui-rating-DtzmtJwF.js} +26 -26
  131. package/dist/vue-ui-relation-circle-B5lL4l9w.js +670 -0
  132. package/dist/vue-ui-ridgeline-3pk4Mlft.js +1302 -0
  133. package/dist/vue-ui-rings-DhyrjrZi.js +884 -0
  134. package/dist/vue-ui-scatter-DKCD70mi.js +1619 -0
  135. package/dist/{vue-ui-skeleton-DsrlMELy.js → vue-ui-skeleton-CzzdmraB.js} +3 -3
  136. package/dist/{vue-ui-smiley-P_8WIBDD.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
  137. package/dist/vue-ui-spark-trend-BMTcxeCT.js +364 -0
  138. package/dist/vue-ui-sparkbar-DVk1JiPL.js +381 -0
  139. package/dist/vue-ui-sparkgauge-Cq9Nw_xu.js +260 -0
  140. package/dist/vue-ui-sparkhistogram-PFHlCE_k.js +411 -0
  141. package/dist/vue-ui-sparkline-BHHwO_cV.js +549 -0
  142. package/dist/vue-ui-sparkstackbar-BosVkkiC.js +470 -0
  143. package/dist/vue-ui-stackbar-Djk5CPUy.js +1867 -0
  144. package/dist/vue-ui-stackline-mU4CSol9.js +1963 -0
  145. package/dist/{vue-ui-strip-plot-CTtivaxm.js → vue-ui-strip-plot-CZQSL0GK.js} +343 -314
  146. package/dist/{vue-ui-table-CHt3AQiq.js → vue-ui-table-DMM090pe.js} +5 -5
  147. package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
  148. package/dist/{vue-ui-table-sparkline-D5MckwMl.js → vue-ui-table-sparkline-CQJc0mJY.js} +292 -263
  149. package/dist/vue-ui-thermometer-D1uxoVeZ.js +613 -0
  150. package/dist/{vue-ui-timer-B-Xa6ALH.js → vue-ui-timer-jTnS3ES5.js} +25 -25
  151. package/dist/vue-ui-tiremarks-Bv-oIFVV.js +477 -0
  152. package/dist/vue-ui-treemap-B9MVtunp.js +1359 -0
  153. package/dist/{vue-ui-vertical-bar-D9XQe_ud.js → vue-ui-vertical-bar-BSbDj5qZ.js} +520 -485
  154. package/dist/{vue-ui-waffle-Bk98w86A.js → vue-ui-waffle-DIALVfvc.js} +376 -347
  155. package/dist/vue-ui-wheel-aUhrFpGk.js +690 -0
  156. package/dist/vue-ui-word-cloud-DZmMWsUu.js +904 -0
  157. package/dist/{vue-ui-world-xOY__pp8.js → vue-ui-world-CVLlgp2f.js} +57 -57
  158. package/dist/vue-ui-xy-Cy7mOurZ.js +3455 -0
  159. package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
  160. package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
  161. package/package.json +5 -5
  162. package/dist/themes-DH-N_ePR.js +0 -54
  163. package/dist/vue-ui-age-pyramid-DsOlpJBh.js +0 -933
  164. package/dist/vue-ui-bullet-Ci4lO4_W.js +0 -630
  165. package/dist/vue-ui-chord-BKC--Nbq.js +0 -1153
  166. package/dist/vue-ui-circle-pack-B3sfU0Vo.js +0 -803
  167. package/dist/vue-ui-donut-evolution-BqUzmyW2.js +0 -1208
  168. package/dist/vue-ui-dumbbell-CWKTrzsm.js +0 -1231
  169. package/dist/vue-ui-flow-SMbuDPdL.js +0 -991
  170. package/dist/vue-ui-funnel-3fRlMBzq.js +0 -716
  171. package/dist/vue-ui-galaxy-CFZ1xYD5.js +0 -808
  172. package/dist/vue-ui-gauge-DJpbjfpL.js +0 -835
  173. package/dist/vue-ui-history-plot-CvPMx5Lg.js +0 -1204
  174. package/dist/vue-ui-molecule-CasngKZI.js +0 -753
  175. package/dist/vue-ui-mood-radar-DGz2TQi4.js +0 -903
  176. package/dist/vue-ui-nested-donuts-Bjjz2sWG.js +0 -1419
  177. package/dist/vue-ui-onion-DwTIY6i1.js +0 -915
  178. package/dist/vue-ui-parallel-coordinate-plot-DedxvtPN.js +0 -1051
  179. package/dist/vue-ui-radar-D1rz2RnH.js +0 -984
  180. package/dist/vue-ui-relation-circle-DUfRwwo1.js +0 -641
  181. package/dist/vue-ui-ridgeline-DKPWMWRc.js +0 -1273
  182. package/dist/vue-ui-rings-BY0EQGLb.js +0 -855
  183. package/dist/vue-ui-scatter-ky9p5Pgh.js +0 -1590
  184. package/dist/vue-ui-spark-trend-DkJn_3FI.js +0 -337
  185. package/dist/vue-ui-sparkbar-qB1fmgej.js +0 -352
  186. package/dist/vue-ui-sparkgauge-BezFN_Rc.js +0 -233
  187. package/dist/vue-ui-sparkhistogram-DGt5b8FR.js +0 -384
  188. package/dist/vue-ui-sparkline-D7Wx1ejg.js +0 -514
  189. package/dist/vue-ui-sparkstackbar-DtO7-yim.js +0 -441
  190. package/dist/vue-ui-stackbar-Dr48I48D.js +0 -1832
  191. package/dist/vue-ui-stackline-Juns5Yh4.js +0 -1928
  192. package/dist/vue-ui-table-heatmap-Cn-56b5F.js +0 -282
  193. package/dist/vue-ui-thermometer-BOidpwAZ.js +0 -584
  194. package/dist/vue-ui-tiremarks-BsTyVS2P.js +0 -450
  195. package/dist/vue-ui-treemap-BWTaY91B.js +0 -1330
  196. package/dist/vue-ui-wheel-nj73b_Dc.js +0 -663
  197. package/dist/vue-ui-word-cloud-Dcaogr-D.js +0 -875
  198. package/dist/vue-ui-xy-BT67faLv.js +0 -3424
  199. package/dist/vue-ui-xy-canvas-BoB7-4QK.js +0 -1564
@@ -1,441 +0,0 @@
1
- import { defineAsyncComponent as K, useSlots as we, onMounted as Q, ref as v, toRefs as Ce, watch as Z, computed as S, createElementBlock as r, openBlock as s, normalizeStyle as f, createCommentVNode as h, createVNode as ee, createBlock as $e, createElementVNode as d, toDisplayString as A, unref as c, Fragment as k, renderList as I, normalizeClass as L, withCtx as te, renderSlot as R, normalizeProps as le, guardReactiveProps as oe } from "vue";
2
- import { c as ae, t as Se, b as Fe, p as i, h as D, e as Ae, o as Ie, f as se, g as De, d as j, X as Te, s as re, i as ne, a as ue, G as Pe } from "./lib-C_mNZmhD.js";
3
- import { u as ze, a as ie } from "./useNestedProp-CIoDlpHu.js";
4
- import { u as Be } from "./useChartAccessibility-9icAAmYg.js";
5
- import { t as Le } from "./themes-DH-N_ePR.js";
6
- import { u as Ne, B as Ve } from "./BaseScanner-BgWxam9d.js";
7
- import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const Ue = ["xmlns", "viewBox"], Me = ["id"], Oe = ["stop-color"], Re = ["stop-color"], je = ["stop-color"], Ge = {
9
- id: "stackPill",
10
- clipPathUnits: "objectBoundingBox"
11
- }, We = ["fill"], Ye = {
12
- key: 0,
13
- "clip-path": "url(#stackPill)"
14
- }, qe = ["x", "width", "height", "fill"], He = ["x", "width", "height", "fill", "stroke"], Xe = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], Je = ["width", "height", "rx"], Ke = ["onClick"], Qe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, Ze = ["height", "width"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], ot = ["fill"], at = {
15
- key: 2,
16
- ref: "source",
17
- dir: "auto"
18
- }, st = {
19
- __name: "vue-ui-sparkstackbar",
20
- props: {
21
- config: {
22
- type: Object,
23
- default() {
24
- return {};
25
- }
26
- },
27
- dataset: {
28
- type: Array,
29
- default() {
30
- return [];
31
- }
32
- }
33
- },
34
- emits: ["selectDatapoint"],
35
- setup(ce, { expose: de, emit: ve }) {
36
- const pe = K(() => import("./PackageVersion-D_4Hr4S4.js")), fe = K(() => import("./Tooltip-oWCO1HKy.js")), { vue_ui_sparkstackbar: ge } = ze(), _ = ce, he = we();
37
- Q(() => {
38
- he["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
39
- });
40
- const G = v(null), T = v(ae()), N = v(!1), V = v(""), e = v(E()), { loading: x, FINAL_DATASET: m } = Ne({
41
- ...Ce(_),
42
- FINAL_CONFIG: e,
43
- prepareConfig: E,
44
- skeletonDataset: [
45
- { name: "_", value: 8, color: "#808080" },
46
- { name: "_", value: 5, color: "#ADADAD" },
47
- { name: "_", value: 3, color: "#DBDBDB" }
48
- ],
49
- skeletonConfig: Se({
50
- defaultConfig: e.value,
51
- userConfig: {
52
- style: {
53
- backgroundColor: "#99999930",
54
- animation: { show: !1 },
55
- bar: { gradient: { inderlayerColor: "#6A6A6A" } },
56
- title: {
57
- backgroundColor: "transparent"
58
- }
59
- }
60
- }
61
- })
62
- }), { svgRef: ye } = Be({ config: e.value.style.title });
63
- function E() {
64
- const t = ie({
65
- userConfig: _.config,
66
- defaultConfig: ge
67
- });
68
- return t.theme ? {
69
- ...ie({
70
- userConfig: Le.vue_ui_sparkstackbar[t.theme] || _.config,
71
- defaultConfig: t
72
- }),
73
- customPalette: Fe[t.theme] || i
74
- } : t;
75
- }
76
- Z(() => _.config, (t) => {
77
- e.value = E(), q();
78
- }, { deep: !0 }), Z(() => m.value, (t) => {
79
- b.value = m.value.map((o, l) => ({
80
- ...o,
81
- color: o.color ? D(o.color) : F.value[l] || i[l] || i[l % i.length]
82
- })), W();
83
- }, { deep: !0 });
84
- const F = S(() => Ae(e.value.customPalette)), b = v(m.value.map((t, o) => ({
85
- ...t,
86
- value: e.value.style.animation.show ? 0 : t.value || 0,
87
- color: t.color ? D(t.color) : F.value[o] || i[o] || i[o % i.length]
88
- }))), w = v(!0);
89
- function W() {
90
- if (!e.value.style.animation.show) return;
91
- const t = e.value.style.animation.animationFrames, o = m.value.map((n) => n.value || 0), l = o.map((n) => n / t), a = o.reduce((n, u) => n + u, 0);
92
- let y = 0;
93
- w.value = !0, b.value = m.value.map((n, u) => ({
94
- ...n,
95
- value: 0,
96
- color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
97
- }));
98
- function B() {
99
- y += a / t, y < a ? (b.value = b.value.map((n, u) => ({
100
- ...n,
101
- value: Math.min(n.value + l[u], o[u]),
102
- color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
103
- })), requestAnimationFrame(B)) : (w.value = !1, b.value = m.value.map((n, u) => ({
104
- ...n,
105
- value: o[u],
106
- color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length],
107
- id: ae()
108
- })));
109
- }
110
- B();
111
- }
112
- Q(() => {
113
- q();
114
- });
115
- const Y = S(() => e.value.debug);
116
- function q() {
117
- Ie(_.dataset) ? se({
118
- componentName: "VueUiSparkStackbar",
119
- type: "dataset",
120
- debug: Y.value
121
- }) : _.dataset.forEach((t, o) => {
122
- De({
123
- datasetObject: t,
124
- requiredAttributes: ["name", "value"]
125
- }).forEach((l) => {
126
- se({
127
- componentName: "VueUiSparkStackbar",
128
- type: "datasetSerieAttribute",
129
- property: l,
130
- index: o,
131
- debug: Y.value
132
- });
133
- });
134
- }), W();
135
- }
136
- const g = v({
137
- width: 500,
138
- height: 16
139
- }), p = v([]), H = S(() => m.value.map((t) => t.value || 0).filter((t, o) => !p.value.includes(o)).reduce((t, o) => t + o, 0)), C = S(() => b.value.map((t, o) => {
140
- const l = t.value || 0, a = l / H.value, y = isNaN(a) ? 0 : a, B = y * g.value.width;
141
- return {
142
- ...t,
143
- value: l,
144
- proportion: y,
145
- width: B,
146
- seriesIndex: o,
147
- proportionLabel: j({
148
- v: y * 100,
149
- s: "%",
150
- r: e.value.style.legend.percentage.rounding
151
- })
152
- };
153
- })), U = S(() => C.value.filter((t, o) => !p.value.includes(o)));
154
- function M(t) {
155
- p.value.includes(t) ? p.value = p.value.filter((o) => o !== t) : p.value.length < b.value.length - 1 && p.value.push(t);
156
- }
157
- function X(t) {
158
- if (!C.value.length)
159
- return e.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null;
160
- const o = C.value.find((l) => l.name === t);
161
- return o || (e.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${t}"`), null);
162
- }
163
- function me(t) {
164
- const o = X(t);
165
- o !== null && p.value.includes(o.id) && M(o.seriesIndex);
166
- }
167
- function be(t) {
168
- const o = X(t);
169
- o !== null && (p.value.includes(o.id) || M(o.seriesIndex));
170
- }
171
- const P = S(() => {
172
- let t = 0;
173
- const o = [];
174
- for (let l = 0; l < U.value.length; l += 1)
175
- o.push({
176
- ...U.value[l],
177
- start: t
178
- }), t += U.value[l].width;
179
- return o;
180
- }), ke = ve;
181
- function J(t, o, l = !1) {
182
- ke("selectDatapoint", { datapoint: t, index: o }), e.value.events.datapointClick && !l && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
183
- }
184
- const O = v(null), z = v(!1), $ = v(null);
185
- function _e({ datapoint: t, seriesIndex: o }) {
186
- N.value = !1, $.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
187
- }
188
- function xe({ datapoint: t, seriesIndex: o }) {
189
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
190
- return;
191
- O.value = { datapoint: t, seriesIndex: o, config: e.value, series: C.value }, N.value = !0, $.value = o;
192
- const l = e.value.style.tooltip.customFormat;
193
- if (Pe(l))
194
- try {
195
- const a = l({
196
- seriesIndex: t.seriesIndex,
197
- datapoint: t,
198
- series: C.value,
199
- config: e.value
200
- });
201
- typeof a == "string" && (V.value = a, z.value = !0);
202
- } catch {
203
- console.warn("Custom format cannot be applied."), z.value = !1;
204
- }
205
- if (!z.value) {
206
- let a = "";
207
- a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, a += `<b>${t.proportionLabel}</b>`, a += `<span>(${ue(
208
- e.value.style.legend.value.formatter,
209
- t.value,
210
- j({
211
- p: e.value.style.legend.value.prefix,
212
- v: t.value,
213
- s: e.value.style.legend.value.suffix,
214
- r: e.value.style.legend.value.rounding
215
- }),
216
- {
217
- datapoint: t,
218
- seriesIndex: o
219
- }
220
- )})</span>`, V.value = `<div>${a}</div>`;
221
- }
222
- }
223
- return de({
224
- hideSeries: be,
225
- showSeries: me
226
- }), (t, o) => (s(), r("div", {
227
- class: "vue-data-ui-component vue-ui-spark-stackbar",
228
- ref_key: "sparkstackbarChart",
229
- ref: G,
230
- style: f(`width:100%; background:${e.value.style.backgroundColor}`)
231
- }, [
232
- e.value.style.title.text ? (s(), r("div", {
233
- key: 0,
234
- style: f(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
235
- }, [
236
- d("div", {
237
- class: "atom-title",
238
- style: f(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
239
- }, A(e.value.style.title.text), 5),
240
- e.value.style.title.subtitle.text ? (s(), r("div", {
241
- key: 0,
242
- class: "atom-subtitle",
243
- style: f(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
244
- }, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
245
- ], 4)) : h("", !0),
246
- (s(), r("svg", {
247
- ref_key: "svgRef",
248
- ref: ye,
249
- xmlns: c(Te),
250
- width: "100%",
251
- viewBox: `0 0 ${g.value.width} ${g.value.height}`
252
- }, [
253
- ee(c(pe)),
254
- d("defs", null, [
255
- (s(!0), r(k, null, I(P.value, (l, a) => (s(), r("linearGradient", {
256
- key: `stack_gradient_${a}`,
257
- gradientTransform: "rotate(90)",
258
- id: `stack_gradient_${a}_${T.value}`
259
- }, [
260
- d("stop", {
261
- offset: "0%",
262
- "stop-color": l.color
263
- }, null, 8, Oe),
264
- d("stop", {
265
- offset: "50%",
266
- "stop-color": c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
267
- }, null, 8, Re),
268
- d("stop", {
269
- offset: "100%",
270
- "stop-color": l.color
271
- }, null, 8, je)
272
- ], 8, Me))), 128)),
273
- d("clipPath", Ge, [
274
- d("rect", {
275
- x: "0.005",
276
- y: "-2",
277
- width: "0.99",
278
- height: "5",
279
- rx: "3",
280
- ry: "3",
281
- fill: e.value.style.backgroundColor
282
- }, null, 8, We)
283
- ])
284
- ]),
285
- H.value > 0 ? (s(), r("g", Ye, [
286
- (s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
287
- key: `stack_underlayer_${a}`,
288
- x: l.start,
289
- y: 0,
290
- width: l.width,
291
- height: g.value.height,
292
- fill: e.value.style.bar.gradient.underlayerColor,
293
- class: L({ animated: !w.value && !c(x) }),
294
- style: f({
295
- opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
296
- })
297
- }, null, 14, qe))), 128)),
298
- (s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
299
- key: `stack_${a}`,
300
- x: l.start,
301
- y: 0,
302
- width: l.width,
303
- height: g.value.height,
304
- fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${a}_${T.value})` : l.color,
305
- stroke: e.value.style.backgroundColor,
306
- "stroke-linecap": "round",
307
- class: L({ animated: !w.value && !c(x) }),
308
- style: f({
309
- opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
310
- })
311
- }, null, 14, He))), 128)),
312
- (s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
313
- key: `stack_trap_${a}`,
314
- x: l.start,
315
- y: 0,
316
- width: l.width,
317
- height: g.value.height,
318
- fill: "transparent",
319
- stroke: "none",
320
- class: L({ animated: !w.value && !c(x) }),
321
- onClick: () => J(l, a),
322
- onMouseenter: () => xe({ datapoint: l, seriesIndex: a }),
323
- onMouseleave: (y) => _e({ datapoint: l, seriesIndex: a })
324
- }, null, 42, Xe))), 128))
325
- ])) : (s(), r("rect", {
326
- key: 1,
327
- x: 2,
328
- y: 1,
329
- width: g.value.width - 4,
330
- height: g.value.height - 2,
331
- stroke: "#CCCCCC",
332
- "stroke-width": "2",
333
- fill: "transparent",
334
- rx: (g.value.height - 4) / 2
335
- }, null, 8, Je))
336
- ], 8, Ue)),
337
- e.value.style.legend.show ? (s(), r("div", {
338
- key: 1,
339
- style: f(`background:transparent;margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
340
- class: "vue-ui-sparkstackbar-legend"
341
- }, [
342
- (s(!0), r(k, null, I(C.value, (l, a) => (s(), r("div", {
343
- style: f(`font-size:${e.value.style.legend.fontSize}px;`),
344
- class: L({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": p.value.includes(a) }),
345
- onClick: (y) => {
346
- M(a), J(l, a, !0);
347
- }
348
- }, [
349
- d("div", Qe, [
350
- (s(), r("svg", {
351
- height: `${e.value.style.legend.fontSize}px`,
352
- width: `${e.value.style.legend.fontSize}px`,
353
- viewBox: "0 0 10 10"
354
- }, [
355
- d("defs", null, [
356
- d("radialGradient", {
357
- id: `legend_grad_${a}-${T.value}`
358
- }, [
359
- d("stop", {
360
- offset: "0%",
361
- "stop-color": c(x) ? "#FFFFFF" : c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
362
- }, null, 8, tt),
363
- d("stop", {
364
- offset: "100%",
365
- "stop-color": l.color
366
- }, null, 8, lt)
367
- ], 8, et)
368
- ]),
369
- d("circle", {
370
- cx: 5,
371
- cy: 5,
372
- r: 5,
373
- fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${a}-${T.value})` : l.color
374
- }, null, 8, ot)
375
- ], 8, Ze)),
376
- c(x) ? h("", !0) : (s(), r(k, { key: 0 }, [
377
- d("span", {
378
- style: f(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
379
- }, A(l.name), 5),
380
- w.value ? h("", !0) : (s(), r(k, { key: 0 }, [
381
- e.value.style.legend.percentage.show ? (s(), r("span", {
382
- key: 0,
383
- style: f(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
384
- }, A(p.value.includes(a) ? " - " : l.proportionLabel), 5)) : h("", !0),
385
- e.value.style.legend.value.show ? (s(), r("span", {
386
- key: 1,
387
- style: f(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
388
- }, " (" + A(c(ue)(
389
- e.value.style.legend.value.formatter,
390
- l.value,
391
- c(j)({
392
- p: e.value.style.legend.value.prefix,
393
- v: l.value,
394
- s: e.value.style.legend.value.suffix,
395
- r: e.value.style.legend.value.rounding
396
- }),
397
- { datapoint: l, seriesIndex: a }
398
- )) + ") ", 5)) : h("", !0)
399
- ], 64))
400
- ], 64))
401
- ])
402
- ], 14, Ke))), 256))
403
- ], 4)) : h("", !0),
404
- ee(c(fe), {
405
- show: N.value && e.value.style.tooltip.show,
406
- parent: G.value,
407
- backgroundColor: e.value.style.tooltip.backgroundColor,
408
- color: e.value.style.tooltip.color,
409
- fontSize: e.value.style.tooltip.fontSize,
410
- borderRadius: e.value.style.tooltip.borderRadius,
411
- borderColor: e.value.style.tooltip.borderColor,
412
- borderWidth: e.value.style.tooltip.borderWidth,
413
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
414
- position: e.value.style.tooltip.position,
415
- content: V.value,
416
- isCustom: z.value,
417
- offsetY: -124 + e.value.style.tooltip.offsetY,
418
- blockShiftY: !0,
419
- smooth: e.value.style.tooltip.smooth,
420
- backdropFilter: e.value.style.tooltip.backdropFilter,
421
- smoothForce: e.value.style.tooltip.smoothForce,
422
- smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
423
- }, {
424
- "tooltip-before": te(() => [
425
- R(t.$slots, "tooltip-before", le(oe({ ...O.value })), void 0, !0)
426
- ]),
427
- "tooltip-after": te(() => [
428
- R(t.$slots, "tooltip-after", le(oe({ ...O.value })), void 0, !0)
429
- ]),
430
- _: 3
431
- }, 8, ["show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
432
- t.$slots.source ? (s(), r("div", at, [
433
- R(t.$slots, "source", {}, void 0, !0)
434
- ], 512)) : h("", !0),
435
- c(x) ? (s(), $e(Ve, { key: 3 })) : h("", !0)
436
- ], 4));
437
- }
438
- }, pt = /* @__PURE__ */ Ee(st, [["__scopeId", "data-v-ffa64d8d"]]);
439
- export {
440
- pt as default
441
- };