vue-data-ui 3.15.12 → 3.16.1

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 (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -1,475 +0,0 @@
1
- import { defineAsyncComponent as Z, useSlots as Ie, onMounted as ee, ref as g, computed as _, toRefs as Pe, watch as te, openBlock as s, createElementBlock as n, normalizeStyle as p, createElementVNode as v, toDisplayString as F, createCommentVNode as f, unref as c, createVNode as le, Fragment as $, renderList as I, normalizeClass as L, createBlock as oe, withCtx as ae, renderSlot as N, normalizeProps as se, guardReactiveProps as ne } from "vue";
2
- import { j as re, t as ue, m as De, p as r, s as A, n as ze, o as Be, q as ie, r as Le, l as R, X as Ne, u as ce, v as de, k as ve, T as Ve } from "./lib-GwPnJSrY.js";
3
- import { u as Ee } from "./useConfig-CIgyKZ6R.js";
4
- import { u as Ue, B as Me } from "./BaseScanner-BhhkKVoj.js";
5
- import { u as G } from "./useNestedProp-BBT0mbHh.js";
6
- import { u as Oe } from "./useThemeCheck-D1ZYXUwG.js";
7
- import { u as je } from "./useChartAccessibility-9icAAmYg.js";
8
- import Re from "./vue_ui_sparkstackbar-BSexvOuM.js";
9
- import { B as Ge } from "./BaseLegendToggle-Y61xahI4.js";
10
- import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- const Ye = ["xmlns", "viewBox"], qe = ["id"], He = ["stop-color"], Xe = ["stop-color"], Je = ["stop-color"], Ke = {
12
- id: "stackPill",
13
- clipPathUnits: "objectBoundingBox"
14
- }, Qe = ["fill"], Ze = {
15
- key: 0,
16
- "clip-path": "url(#stackPill)"
17
- }, et = ["x", "width", "height", "fill"], tt = ["x", "width", "height", "fill", "stroke"], lt = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], ot = ["width", "height", "rx"], at = ["onClick"], st = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, nt = ["height", "width"], rt = ["id"], ut = ["stop-color"], it = ["stop-color"], ct = ["fill"], dt = {
18
- key: 2,
19
- ref: "source",
20
- dir: "auto"
21
- }, vt = {
22
- __name: "vue-ui-sparkstackbar",
23
- props: {
24
- config: {
25
- type: Object,
26
- default() {
27
- return {};
28
- }
29
- },
30
- dataset: {
31
- type: Array,
32
- default() {
33
- return [];
34
- }
35
- }
36
- },
37
- emits: ["selectDatapoint"],
38
- setup(ge, { expose: pe, emit: fe }) {
39
- const he = Z(() => import("./PackageVersion-DN9d0ME5.js")), ye = Z(() => import("./Tooltip-DL3QgjZf.js")), { vue_ui_sparkstackbar: me } = Ee(), { isThemeValid: ke, warnInvalidTheme: be } = Oe(), m = ge, _e = Ie();
40
- ee(() => {
41
- _e["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
42
- });
43
- const W = g(null), P = g(re()), V = g(!1), E = g(""), e = g(U()), Y = _(() => e.value.useCursorPointer), Ce = _(() => ue({
44
- defaultConfig: {
45
- style: {
46
- backgroundColor: "#99999930",
47
- animation: { show: !1 },
48
- bar: { gradient: { inderlayerColor: "#6A6A6A" } },
49
- title: {
50
- backgroundColor: "transparent"
51
- }
52
- }
53
- },
54
- userConfig: e.value.skeletonConfig ?? {}
55
- })), { loading: C, FINAL_DATASET: h } = Ue({
56
- ...Pe(m),
57
- FINAL_CONFIG: e,
58
- prepareConfig: U,
59
- skeletonDataset: m.config?.skeletonDataset ?? [
60
- { name: "_", value: 8, color: "#808080" },
61
- { name: "_", value: 5, color: "#ADADAD" },
62
- { name: "_", value: 3, color: "#DBDBDB" }
63
- ],
64
- skeletonConfig: ue({
65
- defaultConfig: e.value,
66
- userConfig: Ce.value
67
- })
68
- }), { svgRef: xe } = je({ config: e.value.style.title });
69
- function U() {
70
- const t = G({
71
- userConfig: m.config,
72
- defaultConfig: me
73
- }), l = t.theme;
74
- if (!l) return t;
75
- if (!ke.value(t))
76
- return be(t), t;
77
- const o = G({
78
- userConfig: Re[l] || m.config,
79
- defaultConfig: t
80
- }), a = G({
81
- userConfig: m.config,
82
- defaultConfig: o
83
- });
84
- return {
85
- ...a,
86
- customPalette: a.customPalette.length ? a.customPalette : De[l] || r
87
- };
88
- }
89
- te(() => m.config, (t) => {
90
- e.value = U(), X();
91
- }, { deep: !0 }), te(() => h.value, (t) => {
92
- x.value = h.value.map((l, o) => ({
93
- ...l,
94
- color: l.color ? A(l.color) : S.value[o] || r[o] || r[o % r.length]
95
- })), q();
96
- }, { deep: !0 });
97
- const S = _(() => ze(e.value.customPalette)), x = g(h.value.map((t, l) => ({
98
- ...t,
99
- value: e.value.style.animation.show ? 0 : t.value || 0,
100
- color: t.color ? A(t.color) : S.value[l] || r[l] || r[l % r.length]
101
- }))), w = g(!0);
102
- function q() {
103
- if (!e.value.style.animation.show) {
104
- w.value = !1;
105
- return;
106
- }
107
- const t = e.value.style.animation.animationFrames, l = h.value.map((u) => u.value || 0), o = l.map((u) => u / t), a = l.reduce((u, i) => u + i, 0);
108
- let b = 0;
109
- w.value = !0, x.value = h.value.map((u, i) => ({
110
- ...u,
111
- value: 0,
112
- color: u.color ? A(u.color) : S.value[i] || r[i] || r[i % r.length]
113
- }));
114
- function B() {
115
- b += a / t, b < a ? (x.value = x.value.map((u, i) => ({
116
- ...u,
117
- value: Math.min(u.value + o[i], l[i]),
118
- color: u.color ? A(u.color) : S.value[i] || r[i] || r[i % r.length]
119
- })), requestAnimationFrame(B)) : (w.value = !1, x.value = h.value.map((u, i) => ({
120
- ...u,
121
- value: l[i],
122
- color: u.color ? A(u.color) : S.value[i] || r[i] || r[i % r.length],
123
- id: re()
124
- })));
125
- }
126
- B();
127
- }
128
- ee(() => {
129
- X();
130
- });
131
- const H = _(() => e.value.debug);
132
- function X() {
133
- Be(m.dataset) ? ie({
134
- componentName: "VueUiSparkStackbar",
135
- type: "dataset",
136
- debug: H.value
137
- }) : m.dataset.forEach((t, l) => {
138
- Le({
139
- datasetObject: t,
140
- requiredAttributes: ["name", "value"]
141
- }).forEach((o) => {
142
- ie({
143
- componentName: "VueUiSparkStackbar",
144
- type: "datasetSerieAttribute",
145
- property: o,
146
- index: l,
147
- debug: H.value
148
- });
149
- });
150
- }), q();
151
- }
152
- const y = g({
153
- width: 500,
154
- height: 16
155
- }), d = g([]), J = _(() => h.value.map((t) => t.value || 0).filter((t, l) => !d.value.includes(l)).reduce((t, l) => t + l, 0)), k = _(() => x.value.map((t, l) => {
156
- const o = t.value || 0, a = o / J.value, b = isNaN(a) ? 0 : a, B = b * y.value.width;
157
- return {
158
- ...t,
159
- color: A(h.value[l]?.color ? h.value[l]?.color : S.value[l] || r[l] || r[l % r.length]),
160
- value: o,
161
- proportion: b,
162
- width: B,
163
- seriesIndex: l,
164
- proportionLabel: R({
165
- v: b * 100,
166
- s: "%",
167
- r: e.value.style.legend.percentage.rounding
168
- })
169
- };
170
- })), M = _(() => k.value.filter((t, l) => !d.value.includes(l)));
171
- function we() {
172
- d.value.length ? d.value = [] : k.value.forEach((t, l) => {
173
- d.value.push(l);
174
- });
175
- }
176
- function O(t) {
177
- d.value.includes(t) ? d.value = d.value.filter((l) => l !== t) : d.value.length < x.value.length - 1 && d.value.push(t);
178
- }
179
- function K(t) {
180
- if (!k.value.length)
181
- return e.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null;
182
- const l = k.value.find((o) => o.name === t);
183
- return l || (e.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${t}"`), null);
184
- }
185
- function $e(t) {
186
- const l = K(t);
187
- l !== null && d.value.includes(l.id) && O(l.seriesIndex);
188
- }
189
- function Se(t) {
190
- const l = K(t);
191
- l !== null && (d.value.includes(l.id) || O(l.seriesIndex));
192
- }
193
- const D = _(() => {
194
- let t = 0;
195
- const l = [];
196
- for (let o = 0; o < M.value.length; o += 1)
197
- l.push({
198
- ...M.value[o],
199
- start: t
200
- }), t += M.value[o].width;
201
- return l;
202
- }), Te = fe;
203
- function Q(t, l, o = !1) {
204
- Te("selectDatapoint", { datapoint: t, index: l }), e.value.events.datapointClick && !o && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
205
- }
206
- const j = g(null), z = g(!1), T = g(null);
207
- function Ae({ datapoint: t, seriesIndex: l }) {
208
- V.value = !1, T.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
209
- }
210
- function Fe({ datapoint: t, seriesIndex: l }) {
211
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
212
- return;
213
- j.value = { datapoint: t, seriesIndex: l, config: e.value, series: k.value }, V.value = !0, T.value = l;
214
- const o = e.value.style.tooltip.customFormat;
215
- if (Ve(o))
216
- try {
217
- const a = o({
218
- seriesIndex: t.seriesIndex,
219
- datapoint: t,
220
- series: k.value,
221
- config: e.value
222
- });
223
- typeof a == "string" && (E.value = a, z.value = !0);
224
- } catch {
225
- console.warn("Custom format cannot be applied."), z.value = !1;
226
- }
227
- if (!z.value) {
228
- let a = "";
229
- 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>(${ve(
230
- e.value.style.legend.value.formatter,
231
- t.value,
232
- R({
233
- p: e.value.style.legend.value.prefix,
234
- v: t.value,
235
- s: e.value.style.legend.value.suffix,
236
- r: e.value.style.legend.value.rounding
237
- }),
238
- {
239
- datapoint: t,
240
- seriesIndex: l
241
- }
242
- )})</span>`, E.value = `<div>${a}</div>`;
243
- }
244
- }
245
- return pe({
246
- hideSeries: Se,
247
- showSeries: $e
248
- }), (t, l) => (s(), n("div", {
249
- class: "vue-data-ui-component vue-ui-spark-stackbar",
250
- ref_key: "sparkstackbarChart",
251
- ref: W,
252
- style: p(`width:100%; background:${e.value.style.backgroundColor}`)
253
- }, [
254
- e.value.style.title.text ? (s(), n("div", {
255
- key: 0,
256
- style: p(`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}`)
257
- }, [
258
- v("div", {
259
- class: "atom-title",
260
- style: p(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
261
- }, F(e.value.style.title.text), 5),
262
- e.value.style.title.subtitle.text ? (s(), n("div", {
263
- key: 0,
264
- class: "atom-subtitle",
265
- style: p(`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"}`)
266
- }, F(e.value.style.title.subtitle.text), 5)) : f("", !0)
267
- ], 4)) : f("", !0),
268
- (s(), n("svg", {
269
- ref_key: "svgRef",
270
- ref: xe,
271
- xmlns: c(Ne),
272
- width: "100%",
273
- viewBox: `0 0 ${y.value.width} ${y.value.height}`
274
- }, [
275
- le(c(he)),
276
- v("defs", null, [
277
- (s(!0), n($, null, I(D.value, (o, a) => (s(), n("linearGradient", {
278
- key: `stack_gradient_${a}`,
279
- gradientTransform: "rotate(90)",
280
- id: `stack_gradient_${a}_${P.value}`
281
- }, [
282
- v("stop", {
283
- offset: "0%",
284
- "stop-color": o.color
285
- }, null, 8, He),
286
- v("stop", {
287
- offset: "50%",
288
- "stop-color": c(ce)(c(de)(o.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
289
- }, null, 8, Xe),
290
- v("stop", {
291
- offset: "100%",
292
- "stop-color": o.color
293
- }, null, 8, Je)
294
- ], 8, qe))), 128)),
295
- v("clipPath", Ke, [
296
- v("rect", {
297
- x: "0.005",
298
- y: "-2",
299
- width: "0.99",
300
- height: "5",
301
- rx: "3",
302
- ry: "3",
303
- fill: e.value.style.backgroundColor
304
- }, null, 8, Qe)
305
- ])
306
- ]),
307
- J.value > 0 ? (s(), n("g", Ze, [
308
- (s(!0), n($, null, I(D.value, (o, a) => (s(), n("rect", {
309
- key: `stack_underlayer_${a}`,
310
- x: o.start,
311
- y: 0,
312
- width: o.width,
313
- height: y.value.height,
314
- fill: e.value.style.bar.gradient.underlayerColor,
315
- class: L({ animated: !w.value && !c(C) }),
316
- style: p({
317
- opacity: T.value !== null && e.value.style.tooltip.show ? T.value === a ? 1 : 0.5 : 1
318
- })
319
- }, null, 14, et))), 128)),
320
- (s(!0), n($, null, I(D.value, (o, a) => (s(), n("rect", {
321
- key: `stack_${a}`,
322
- x: o.start,
323
- y: 0,
324
- width: o.width,
325
- height: y.value.height,
326
- fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${a}_${P.value})` : o.color,
327
- stroke: e.value.style.backgroundColor,
328
- "stroke-linecap": "round",
329
- class: L({ animated: !w.value && !c(C) }),
330
- style: p({
331
- opacity: T.value !== null && e.value.style.tooltip.show ? T.value === a ? 1 : 0.5 : 1
332
- })
333
- }, null, 14, tt))), 128)),
334
- (s(!0), n($, null, I(D.value, (o, a) => (s(), n("rect", {
335
- key: `stack_trap_${a}`,
336
- x: o.start,
337
- y: 0,
338
- width: o.width,
339
- height: y.value.height,
340
- fill: "transparent",
341
- stroke: "none",
342
- class: L({ animated: !w.value && !c(C) }),
343
- onClick: () => Q(o, a),
344
- onMouseenter: () => Fe({ datapoint: o, seriesIndex: a }),
345
- onMouseleave: (b) => Ae({ datapoint: o, seriesIndex: a })
346
- }, null, 42, lt))), 128))
347
- ])) : (s(), n("rect", {
348
- key: 1,
349
- x: 2,
350
- y: 1,
351
- width: y.value.width - 4,
352
- height: y.value.height - 2,
353
- stroke: "#CCCCCC",
354
- "stroke-width": "2",
355
- fill: "transparent",
356
- rx: (y.value.height - 4) / 2
357
- }, null, 8, ot))
358
- ], 8, Ye)),
359
- e.value.style.legend.show ? (s(), n("div", {
360
- key: 1,
361
- style: p(`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"}`),
362
- class: "vue-ui-sparkstackbar-legend"
363
- }, [
364
- e.value.style.legend.selectAllToggle.show && k.value.length > 2 && !c(C) ? (s(), oe(Ge, {
365
- key: 0,
366
- backgroundColor: e.value.style.legend.selectAllToggle.backgroundColor,
367
- color: e.value.style.legend.selectAllToggle.color,
368
- fontSize: e.value.style.legend.fontSize,
369
- checked: d.value.length > 0,
370
- isCursorPointer: Y.value,
371
- onToggle: we
372
- }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : f("", !0),
373
- (s(!0), n($, null, I(k.value, (o, a) => (s(), n("div", {
374
- style: p(`font-size:${e.value.style.legend.fontSize}px;cursor:${Y.value ? "pointer" : "default"}`),
375
- class: L({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": d.value.includes(a) }),
376
- onClick: (b) => {
377
- O(a), Q(o, a, !0);
378
- }
379
- }, [
380
- v("div", st, [
381
- (s(), n("svg", {
382
- height: `${e.value.style.legend.fontSize}px`,
383
- width: `${e.value.style.legend.fontSize}px`,
384
- viewBox: "0 0 10 10"
385
- }, [
386
- v("defs", null, [
387
- v("radialGradient", {
388
- id: `legend_grad_${a}-${P.value}`
389
- }, [
390
- v("stop", {
391
- offset: "0%",
392
- "stop-color": c(C) ? "#FFFFFF" : c(ce)(c(de)(o.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
393
- }, null, 8, ut),
394
- v("stop", {
395
- offset: "100%",
396
- "stop-color": o.color
397
- }, null, 8, it)
398
- ], 8, rt)
399
- ]),
400
- v("circle", {
401
- cx: 5,
402
- cy: 5,
403
- r: 5,
404
- fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${a}-${P.value})` : o.color
405
- }, null, 8, ct)
406
- ], 8, nt)),
407
- c(C) ? f("", !0) : (s(), n($, { key: 0 }, [
408
- v("span", {
409
- style: p(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
410
- }, F(o.name), 5),
411
- w.value ? f("", !0) : (s(), n($, { key: 0 }, [
412
- e.value.style.legend.percentage.show ? (s(), n("span", {
413
- key: 0,
414
- style: p(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
415
- }, F(d.value.includes(a) ? " - " : o.proportionLabel), 5)) : f("", !0),
416
- e.value.style.legend.value.show ? (s(), n("span", {
417
- key: 1,
418
- style: p(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
419
- }, " (" + F(c(ve)(
420
- e.value.style.legend.value.formatter,
421
- o.value,
422
- c(R)({
423
- p: e.value.style.legend.value.prefix,
424
- v: o.value,
425
- s: e.value.style.legend.value.suffix,
426
- r: e.value.style.legend.value.rounding
427
- }),
428
- { datapoint: o, seriesIndex: a }
429
- )) + ") ", 5)) : f("", !0)
430
- ], 64))
431
- ], 64))
432
- ])
433
- ], 14, at))), 256))
434
- ], 4)) : f("", !0),
435
- le(c(ye), {
436
- teleportTo: e.value.style.tooltip.teleportTo,
437
- show: V.value && e.value.style.tooltip.show,
438
- parent: W.value,
439
- backgroundColor: e.value.style.tooltip.backgroundColor,
440
- color: e.value.style.tooltip.color,
441
- fontSize: e.value.style.tooltip.fontSize,
442
- borderRadius: e.value.style.tooltip.borderRadius,
443
- borderColor: e.value.style.tooltip.borderColor,
444
- borderWidth: e.value.style.tooltip.borderWidth,
445
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
446
- position: e.value.style.tooltip.position,
447
- content: E.value,
448
- isCustom: z.value,
449
- offsetY: -124 + e.value.style.tooltip.offsetY,
450
- blockShiftY: !0,
451
- smooth: e.value.style.tooltip.smooth,
452
- backdropFilter: e.value.style.tooltip.backdropFilter,
453
- smoothForce: e.value.style.tooltip.smoothForce,
454
- smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
455
- }, {
456
- "tooltip-before": ae(() => [
457
- N(t.$slots, "tooltip-before", se(ne({ ...j.value })), void 0, !0)
458
- ]),
459
- "tooltip-after": ae(() => [
460
- N(t.$slots, "tooltip-after", se(ne({ ...j.value })), void 0, !0)
461
- ]),
462
- _: 3
463
- }, 8, ["teleportTo", "show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
464
- t.$slots.source ? (s(), n("div", dt, [
465
- N(t.$slots, "source", {}, void 0, !0)
466
- ], 512)) : f("", !0),
467
- N(t.$slots, "skeleton", {}, () => [
468
- c(C) ? (s(), oe(Me, { key: 0 })) : f("", !0)
469
- ], !0)
470
- ], 4));
471
- }
472
- }, xt = /* @__PURE__ */ We(vt, [["__scopeId", "data-v-2d316e9c"]]);
473
- export {
474
- xt as default
475
- };