vue-data-ui 3.25.8 → 3.25.10

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 (164) hide show
  1. package/dist/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
  2. package/dist/{PackageVersion-ekRvV3aF.js → PackageVersion-CZZayD-D.js} +1 -1
  3. package/dist/{PenAndPaper-KFzKlvbi.js → PenAndPaper-Cd3nItcO.js} +3 -3
  4. package/dist/{SlicerPreview-B6iHOC9L.js → SlicerPreview-Ccss7Vsq.js} +2 -2
  5. package/dist/{SparkTooltip-C-Y-mDrc.js → SparkTooltip-L3SliZbR.js} +1 -1
  6. package/dist/{UserOptions-2x4VklMW.js → UserOptions-qo_Tsqci.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-age-pyramid.js +1 -1
  9. package/dist/components/vue-ui-annotator.js +1 -1
  10. package/dist/components/vue-ui-bullet.js +1 -1
  11. package/dist/components/vue-ui-bump.js +1 -1
  12. package/dist/components/vue-ui-candlestick.js +1 -1
  13. package/dist/components/vue-ui-carousel-table.js +1 -1
  14. package/dist/components/vue-ui-chestnut.js +1 -1
  15. package/dist/components/vue-ui-chord.js +1 -1
  16. package/dist/components/vue-ui-circle-pack.js +1 -1
  17. package/dist/components/vue-ui-cursor.js +1 -1
  18. package/dist/components/vue-ui-dag.js +1 -1
  19. package/dist/components/vue-ui-dashboard.js +1 -1
  20. package/dist/components/vue-ui-digits.js +1 -1
  21. package/dist/components/vue-ui-donut-evolution.js +1 -1
  22. package/dist/components/vue-ui-donut.js +1 -1
  23. package/dist/components/vue-ui-dumbbell.js +1 -1
  24. package/dist/components/vue-ui-flow.js +1 -1
  25. package/dist/components/vue-ui-funnel.js +1 -1
  26. package/dist/components/vue-ui-galaxy.js +1 -1
  27. package/dist/components/vue-ui-gauge.js +1 -1
  28. package/dist/components/vue-ui-geo.js +1 -1
  29. package/dist/components/vue-ui-gizmo.js +1 -1
  30. package/dist/components/vue-ui-heatmap.js +1 -1
  31. package/dist/components/vue-ui-hill.js +1 -1
  32. package/dist/components/vue-ui-history-plot.js +1 -1
  33. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  34. package/dist/components/vue-ui-kpi.js +1 -1
  35. package/dist/components/vue-ui-label.js +1 -1
  36. package/dist/components/vue-ui-molecule.js +1 -1
  37. package/dist/components/vue-ui-mood-radar.js +1 -1
  38. package/dist/components/vue-ui-nested-donuts.js +1 -1
  39. package/dist/components/vue-ui-onion.js +1 -1
  40. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  41. package/dist/components/vue-ui-quadrant.js +1 -1
  42. package/dist/components/vue-ui-quick-chart.js +1 -1
  43. package/dist/components/vue-ui-radar.js +1 -1
  44. package/dist/components/vue-ui-relation-circle.js +1 -1
  45. package/dist/components/vue-ui-ridgeline.js +1 -1
  46. package/dist/components/vue-ui-rings.js +1 -1
  47. package/dist/components/vue-ui-scatter.js +1 -1
  48. package/dist/components/vue-ui-skeleton.js +1 -1
  49. package/dist/components/vue-ui-spark-trend.js +1 -1
  50. package/dist/components/vue-ui-sparkbar.js +1 -1
  51. package/dist/components/vue-ui-sparkgauge.js +1 -1
  52. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  53. package/dist/components/vue-ui-sparkline.js +1 -1
  54. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  55. package/dist/components/vue-ui-stackbar.js +1 -1
  56. package/dist/components/vue-ui-stackline.js +1 -1
  57. package/dist/components/vue-ui-strip-plot.js +1 -1
  58. package/dist/components/vue-ui-table-heatmap.js +1 -1
  59. package/dist/components/vue-ui-table-sparkline.js +1 -1
  60. package/dist/components/vue-ui-table.js +1 -1
  61. package/dist/components/vue-ui-thermometer.js +1 -1
  62. package/dist/components/vue-ui-timer.js +1 -1
  63. package/dist/components/vue-ui-tiremarks.js +1 -1
  64. package/dist/components/vue-ui-treemap.js +1 -1
  65. package/dist/components/vue-ui-vertical-bar.js +1 -1
  66. package/dist/components/vue-ui-waffle.js +1 -1
  67. package/dist/components/vue-ui-wheel.js +1 -1
  68. package/dist/components/vue-ui-word-cloud.js +1 -1
  69. package/dist/components/vue-ui-world.js +1 -1
  70. package/dist/components/vue-ui-xy-canvas.js +1 -1
  71. package/dist/components/vue-ui-xy.js +1 -1
  72. package/dist/composables.js +1 -1
  73. package/dist/{dom-to-png-C6cQJ5Hq.js → dom-to-png-BR4imuKV.js} +1 -1
  74. package/dist/{geoProjections-CEo3dVaL.js → geoProjections-BYthUA8l.js} +2 -2
  75. package/dist/{img-DhGApYG0.js → img-BkMKbWsI.js} +1 -1
  76. package/dist/{package-C4XeEHJx.js → package-CYtJq7s7.js} +1 -1
  77. package/dist/{pdf-Di5yPEw9.js → pdf-BSOs_GZz.js} +1 -1
  78. package/dist/{render-common-CQUp12xB.js → render-common-CpHpPc5s.js} +1 -1
  79. package/dist/ssr/vue-ui-donut.js +1 -1
  80. package/dist/ssr/vue-ui-xy.js +1 -1
  81. package/dist/ssr.js +2 -2
  82. package/dist/style.css +1 -1
  83. package/dist/types/utils.d.ts +5 -5
  84. package/dist/types/vue-data-ui.d.ts +5 -5
  85. package/dist/{usePrinter-DISD7q5m.js → usePrinter-hohanNCX.js} +4 -4
  86. package/dist/{useTooltipPosition-DifeoeQW.js → useTooltipPosition-BCrtQa9H.js} +1 -1
  87. package/dist/{vue-data-ui-BChCkqtW.js → vue-data-ui-ChB3aXCO.js} +65 -65
  88. package/dist/vue-data-ui.js +66 -66
  89. package/dist/{vue-ui-3d-bar-BkVOy4Y_.js → vue-ui-3d-bar-DcXbkO19.js} +5 -5
  90. package/dist/{vue-ui-age-pyramid-1_yQ64LX.js → vue-ui-age-pyramid-Cnaxt9NI.js} +263 -251
  91. package/dist/{vue-ui-annotator-BO5ihHOB.js → vue-ui-annotator-BLYRy--7.js} +12 -12
  92. package/dist/{vue-ui-bullet-BF1FeBst.js → vue-ui-bullet-DOfD2TSb.js} +4 -4
  93. package/dist/{vue-ui-bump-ZtKya76Y.js → vue-ui-bump-DL2lDZbE.js} +3 -3
  94. package/dist/{vue-ui-candlestick-P-clTYIt.js → vue-ui-candlestick-ijujiVJ5.js} +453 -441
  95. package/dist/{vue-ui-carousel-table-BVS-4A3h.js → vue-ui-carousel-table-DFtWb2-C.js} +3 -3
  96. package/dist/{vue-ui-chestnut-DHOIbpib.js → vue-ui-chestnut-BGXr0s08.js} +5 -5
  97. package/dist/{vue-ui-chord-CX_Mc3Fp.js → vue-ui-chord-DgBzLfbv.js} +5 -5
  98. package/dist/{vue-ui-circle-pack-Caqvblsl.js → vue-ui-circle-pack-88qDJbt0.js} +494 -482
  99. package/dist/{vue-ui-cursor-BFF4tWUb.js → vue-ui-cursor-CcEB7Ypx.js} +1 -1
  100. package/dist/{vue-ui-dag-CtG3HUh4.js → vue-ui-dag-BeoFmTDs.js} +6 -6
  101. package/dist/{vue-ui-dashboard-DASHNFPT.js → vue-ui-dashboard-NOVcGMCa.js} +63 -63
  102. package/dist/{vue-ui-digits-BQWHzntO.js → vue-ui-digits-BGmT7H1z.js} +1 -1
  103. package/dist/{vue-ui-donut-DHP_lm0m.js → vue-ui-donut-CP7ilveE.js} +838 -826
  104. package/dist/{vue-ui-donut-vbqlIlij.js → vue-ui-donut-CtXzuWzy.js} +1 -1
  105. package/dist/{vue-ui-donut-evolution-Cio3lNLz.js → vue-ui-donut-evolution-D_-y7BZi.js} +6 -6
  106. package/dist/{vue-ui-dumbbell-C2lQhCfq.js → vue-ui-dumbbell-BR1Cn4wm.js} +4 -4
  107. package/dist/vue-ui-flow-Bm6TgD8I.js +1229 -0
  108. package/dist/{vue-ui-funnel-DDncfHgI.js → vue-ui-funnel-CQ0-9nZT.js} +3 -3
  109. package/dist/vue-ui-galaxy-DUto0BOw.js +1097 -0
  110. package/dist/{vue-ui-gauge-OQbET2bh.js → vue-ui-gauge-B6pyA6Jh.js} +4 -4
  111. package/dist/{vue-ui-geo-Ddw87hVT.js → vue-ui-geo-BlG7s8MH.js} +408 -396
  112. package/dist/{vue-ui-gizmo-DJVWEvWS.js → vue-ui-gizmo-BlyehpxE.js} +2 -2
  113. package/dist/{vue-ui-heatmap-BKG4xt6j.js → vue-ui-heatmap-DqbWkKAE.js} +405 -393
  114. package/dist/{vue-ui-hill-BAruBiw6.js → vue-ui-hill-CGE0NdNk.js} +7 -7
  115. package/dist/vue-ui-history-plot-CaxqIiTb.js +1710 -0
  116. package/dist/{vue-ui-horizontal-bar-CXT7-P_o.js → vue-ui-horizontal-bar-Ykwe4M1n.js} +401 -389
  117. package/dist/{vue-ui-kpi-uOGX20hs.js → vue-ui-kpi-B7Nfet0o.js} +1 -1
  118. package/dist/{vue-ui-label-C1UAzvAu.js → vue-ui-label-Cs4ZlAqr.js} +10 -10
  119. package/dist/{vue-ui-molecule-BcA064dR.js → vue-ui-molecule-DWq98OSc.js} +347 -335
  120. package/dist/{vue-ui-mood-radar-CXtC0IqT.js → vue-ui-mood-radar-DDfimq6c.js} +5 -5
  121. package/dist/{vue-ui-nested-donuts-BFE0oXF_.js → vue-ui-nested-donuts-Bt-r6uXS.js} +360 -348
  122. package/dist/vue-ui-onion-D8gOhQHP.js +1247 -0
  123. package/dist/{vue-ui-parallel-coordinate-plot-5kKVnNmE.js → vue-ui-parallel-coordinate-plot-BbPbJiiu.js} +387 -375
  124. package/dist/{vue-ui-quadrant-BPg8L6Sw.js → vue-ui-quadrant-BJlf3qW1.js} +418 -406
  125. package/dist/{vue-ui-quick-chart-DQ_rhjqc.js → vue-ui-quick-chart-Cb8x00-X.js} +550 -538
  126. package/dist/{vue-ui-radar-C65wD7cW.js → vue-ui-radar-30PF-qqr.js} +330 -318
  127. package/dist/{vue-ui-relation-circle-nZaZcCh1.js → vue-ui-relation-circle-CRiC4PnL.js} +4 -4
  128. package/dist/{vue-ui-ridgeline-Bsi2hN14.js → vue-ui-ridgeline-CSs4Tq_c.js} +4 -4
  129. package/dist/{vue-ui-rings-DkCzxDyQ.js → vue-ui-rings-BqRWK5rY.js} +321 -309
  130. package/dist/{vue-ui-scatter-V01qkcN8.js → vue-ui-scatter-Bsh6jbdW.js} +584 -572
  131. package/dist/{vue-ui-skeleton-BgYtv_I2.js → vue-ui-skeleton-DbPSsEKV.js} +1 -1
  132. package/dist/{vue-ui-spark-trend-Dm1OyGyr.js → vue-ui-spark-trend--8QokOII.js} +2 -2
  133. package/dist/{vue-ui-sparkbar-D3hChHHS.js → vue-ui-sparkbar-DkX9Demg.js} +2 -2
  134. package/dist/{vue-ui-sparkgauge-CAeJapmG.js → vue-ui-sparkgauge-Ci_xD5B7.js} +2 -2
  135. package/dist/{vue-ui-sparkhistogram-ZIo_Vg7F.js → vue-ui-sparkhistogram-Qe3ZCPRd.js} +2 -2
  136. package/dist/{vue-ui-sparkline-BjvSeM83.js → vue-ui-sparkline-BwldgOYW.js} +2 -2
  137. package/dist/vue-ui-sparkstackbar-Divd0hL_.js +750 -0
  138. package/dist/vue-ui-stackbar-BWPSGzN-.js +2369 -0
  139. package/dist/vue-ui-stackline-BQroSnwZ.js +2483 -0
  140. package/dist/vue-ui-strip-plot-BCUPHkCp.js +1752 -0
  141. package/dist/{vue-ui-table-C8cvK-x_.js → vue-ui-table-DJeXLYly.js} +2 -2
  142. package/dist/{vue-ui-table-heatmap-BSUab4fG.js → vue-ui-table-heatmap-D5F5bLx5.js} +2 -2
  143. package/dist/{vue-ui-table-sparkline-Dam9BFsU.js → vue-ui-table-sparkline-DCm8S2uK.js} +2 -2
  144. package/dist/{vue-ui-thermometer-zyBeCINd.js → vue-ui-thermometer-xu4R8d2f.js} +4 -4
  145. package/dist/{vue-ui-timer-CDXczagK.js → vue-ui-timer-i_3bMu3h.js} +1 -1
  146. package/dist/{vue-ui-tiremarks-CG8LNC9c.js → vue-ui-tiremarks-DGuMI0yH.js} +4 -4
  147. package/dist/{vue-ui-treemap-DfDRwoZc.js → vue-ui-treemap-Bvl7elni.js} +311 -299
  148. package/dist/vue-ui-waffle-CVuYg0yU.js +1633 -0
  149. package/dist/{vue-ui-wheel-DDJIPE_z.js → vue-ui-wheel-DqHD09iA.js} +4 -4
  150. package/dist/{vue-ui-word-cloud-DBOXRp-e.js → vue-ui-word-cloud-BDCuTQ8Q.js} +385 -372
  151. package/dist/{vue-ui-world-CiIyp7WH.js → vue-ui-world-B0oVwEDj.js} +474 -462
  152. package/dist/{vue-ui-xy-s_IZ573M.js → vue-ui-xy-BJJi0E4D.js} +1 -1
  153. package/dist/{vue-ui-xy-AGYE0Vsz.js → vue-ui-xy-D1dPd68D.js} +1447 -1432
  154. package/dist/{vue-ui-xy-canvas-MOMyUdJg.js → vue-ui-xy-canvas-R2xbgDOy.js} +523 -511
  155. package/package.json +3 -3
  156. package/dist/vue-ui-flow-Dmnz4LCl.js +0 -1217
  157. package/dist/vue-ui-galaxy-Dw7TyOH0.js +0 -1085
  158. package/dist/vue-ui-history-plot-BKUg8Gz_.js +0 -1698
  159. package/dist/vue-ui-onion-DhedgEnV.js +0 -1235
  160. package/dist/vue-ui-sparkstackbar-DGQcpWK4.js +0 -738
  161. package/dist/vue-ui-stackbar-D0qmFn5Y.js +0 -2355
  162. package/dist/vue-ui-stackline-BBtEVl9V.js +0 -2469
  163. package/dist/vue-ui-strip-plot-CkU-nCt4.js +0 -1740
  164. package/dist/vue-ui-waffle-D6_cGi1-.js +0 -1621
@@ -1,738 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { Ct as t, Lt as n, Pt as r, S as i, Ut as a, Wt as o, X as s, Yt as c, Zt as ee, ht as te, i as ne, nt as re, q as ie, t as ae, w as oe } from "./lib-Dql7cqyA.js";
3
- import { n as se, t as ce } from "./useHints-Dq_w2E8B.js";
4
- import { t as le } from "./useConfig-D32D002m.js";
5
- import { n as ue, t as de } from "./BaseScanner-DZvpgOjM.js";
6
- import { t as l } from "./useNestedProp-Chvyfpl-.js";
7
- import { t as fe } from "./useThemeCheck-C43Tcqmk.js";
8
- import { t as pe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
9
- import { t as me } from "./DefGrad-DVBqDjhO.js";
10
- import { t as he } from "./BaseLegendToggle-CXQrLjd-.js";
11
- import { t as ge } from "./A11yDataTable-DdRsVULz.js";
12
- import { t as _e } from "./useChartAccessibility-DYqac8yF.js";
13
- import { t as ve } from "./usePrefersMotion-BC-CsqR1.js";
14
- import { t as ye } from "./vue_ui_sparkstackbar-BOjuQnZd.js";
15
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as be, defineAsyncComponent as xe, guardReactiveProps as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onMounted as Se, openBlock as b, ref as x, renderList as S, renderSlot as C, toDisplayString as w, toRefs as Ce, unref as T, useSlots as we, watch as Te, withCtx as Ee } from "vue";
16
- //#region src/components/vue-ui-sparkstackbar.vue
17
- var De = /* @__PURE__ */ e({ default: () => qe }), Oe = ["id"], ke = { style: { position: "relative" } }, Ae = [
18
- "xmlns",
19
- "viewBox",
20
- "aria-describedby"
21
- ], je = ["id"], Me = [
22
- "width",
23
- "height",
24
- "rx"
25
- ], Ne = ["clip-path"], Pe = [
26
- "x",
27
- "width",
28
- "height",
29
- "fill"
30
- ], Fe = [
31
- "x",
32
- "width",
33
- "height",
34
- "fill"
35
- ], Ie = [
36
- "x",
37
- "height",
38
- "fill"
39
- ], Le = [
40
- "x",
41
- "width",
42
- "height",
43
- "onClick",
44
- "onMouseenter",
45
- "onMouseleave"
46
- ], Re = [
47
- "width",
48
- "height",
49
- "rx",
50
- "stroke"
51
- ], ze = [
52
- "width",
53
- "height",
54
- "rx"
55
- ], Be = {
56
- key: 0,
57
- style: {
58
- position: "absolute",
59
- top: "100%",
60
- left: "0",
61
- width: "100%"
62
- },
63
- "data-dom-to-png-ignore": "",
64
- "aria-hidden": "true"
65
- }, Ve = [
66
- "aria-pressed",
67
- "aria-label",
68
- "onClick",
69
- "onFocus",
70
- "onKeydown"
71
- ], He = { style: {
72
- display: "flex",
73
- "flex-direction": "row",
74
- "align-items": "center",
75
- gap: "4px",
76
- "justify-content": "center"
77
- } }, Ue = ["height", "width"], We = ["rx", "fill"], Ge = ["rx", "fill"], Ke = {
78
- key: 3,
79
- ref: "source",
80
- dir: "auto"
81
- }, qe = /*#__PURE__*/ pe({
82
- __name: "vue-ui-sparkstackbar",
83
- props: {
84
- config: {
85
- type: Object,
86
- default() {
87
- return {};
88
- }
89
- },
90
- dataset: {
91
- type: Array,
92
- default() {
93
- return [];
94
- }
95
- }
96
- },
97
- emits: ["selectDatapoint", "selectLegend"],
98
- setup(e, { expose: pe, emit: De }) {
99
- let qe = xe(() => import("./PackageVersion-ekRvV3aF.js").then((e) => e.t)), Je = xe(() => import("./Tooltip-hhrkQ3Lk.js")), { vue_ui_sparkstackbar: Ye } = le(), { isThemeValid: Xe, warnInvalidTheme: Ze } = fe(), Qe = ve(), $e = we(), E = e, et = x(null), D = x(ie()), O = x(!1), tt = x(""), k = x(null), A = x(!1), j = x(null), nt = x({
100
- x: 0,
101
- y: 0
102
- }), M = x("pointer"), rt = x(!1), N = x(null), it = x([]), P = x(ct()), F = d(() => P.value.style.bar), I = d(() => P.value.style.legend), L = d(() => P.value.style.tooltip), R = d(() => P.value.style), at = d(() => P.value.debug);
103
- Se(() => {
104
- $e["chart-background"] && at.value && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
105
- }), se({
106
- config: () => P.value,
107
- dataset: () => E.dataset,
108
- component: "VueUiSparkStackbar",
109
- rules: [ce.emptyArray, {
110
- test: (e) => e.length > 6,
111
- message: [
112
- "👀 The number of series is > 6. Consider:",
113
- "",
114
- "▶️ Grouping small values dynamically into a single \"Other\" series.",
115
- "",
116
- "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
117
- ]
118
- }]
119
- });
120
- let ot = d(() => P.value.useCursorPointer), st = d(() => ee({
121
- defaultConfig: { style: {
122
- backgroundColor: "#99999930",
123
- animation: { show: !1 },
124
- bar: { gradient: { inderlayerColor: "#6A6A6A" } },
125
- title: { backgroundColor: "transparent" }
126
- } },
127
- userConfig: P.value.skeletonConfig ?? {}
128
- })), { loading: z, FINAL_DATASET: B } = ue({
129
- ...Ce(E),
130
- FINAL_CONFIG: P,
131
- prepareConfig: ct,
132
- skeletonDataset: E.config?.skeletonDataset ?? [
133
- {
134
- name: "_",
135
- value: 8,
136
- color: "#808080"
137
- },
138
- {
139
- name: "_",
140
- value: 5,
141
- color: "#ADADAD"
142
- },
143
- {
144
- name: "_",
145
- value: 3,
146
- color: "#DBDBDB"
147
- }
148
- ],
149
- skeletonConfig: ee({
150
- defaultConfig: P.value,
151
- userConfig: st.value
152
- })
153
- }), { svgRef: V } = _e({ config: R.value.title });
154
- function ct() {
155
- let e = l({
156
- userConfig: E.config,
157
- defaultConfig: Ye
158
- }), t = e.theme;
159
- if (!t) return e;
160
- if (!Xe.value(e)) return Ze(e), e;
161
- let r = l({
162
- userConfig: ye[t] || E.config,
163
- defaultConfig: e
164
- }), i = l({
165
- userConfig: E.config,
166
- defaultConfig: r
167
- });
168
- return {
169
- ...i,
170
- customPalette: i.customPalette.length ? i.customPalette : c[t] || n
171
- };
172
- }
173
- Te(() => E.config, (e) => {
174
- P.value = ct(), ut();
175
- }, { deep: !0 }), Te(() => B.value, (e) => {
176
- U.value = B.value.map((e, t) => ({
177
- ...e,
178
- color: e.color ? i(e.color) : H.value[t] || n[t] || n[t % n.length]
179
- })), lt();
180
- }, { deep: !0 });
181
- let H = d(() => oe(P.value.customPalette)), U = x(B.value.map((e, t) => ({
182
- ...e,
183
- value: R.value.animation.show ? 0 : e.value || 0,
184
- color: e.color ? i(e.color) : H.value[t] || n[t] || n[t % n.length]
185
- }))), W = x(!0);
186
- function lt() {
187
- if (!R.value.animation.show || Qe.value) {
188
- W.value = !1;
189
- return;
190
- }
191
- let e = R.value.animation.animationFrames, t = B.value.map((e) => e.value || 0), r = t.map((t) => t / e), a = t.reduce((e, t) => e + t, 0), o = 0;
192
- W.value = !0, U.value = B.value.map((e, t) => ({
193
- ...e,
194
- value: 0,
195
- color: e.color ? i(e.color) : H.value[t] || n[t] || n[t % n.length]
196
- }));
197
- function s() {
198
- o += a / e, o < a ? (U.value = U.value.map((e, a) => ({
199
- ...e,
200
- value: Math.min(e.value + r[a], t[a]),
201
- color: e.color ? i(e.color) : H.value[a] || n[a] || n[a % n.length]
202
- })), requestAnimationFrame(s)) : (W.value = !1, U.value = B.value.map((e, r) => ({
203
- ...e,
204
- value: t[r],
205
- color: e.color ? i(e.color) : H.value[r] || n[r] || n[r % n.length],
206
- id: ie()
207
- })));
208
- }
209
- s();
210
- }
211
- Se(() => {
212
- ut();
213
- });
214
- function ut() {
215
- r(E.dataset) ? re({
216
- componentName: "VueUiSparkStackbar",
217
- type: "dataset",
218
- debug: at.value
219
- }) : at.value && E.dataset.forEach((e, t) => {
220
- te({
221
- datasetObject: e,
222
- requiredAttributes: ["name", "value"]
223
- }).forEach((e) => {
224
- re({
225
- componentName: "VueUiSparkStackbar",
226
- type: "datasetSerieAttribute",
227
- property: e,
228
- index: t
229
- });
230
- });
231
- }), lt();
232
- }
233
- let G = x({
234
- width: 500,
235
- height: 16
236
- }), K = x([]), dt = d(() => B.value.map((e) => e.value || 0).filter((e, t) => !K.value.includes(t)).reduce((e, t) => e + t, 0)), q = d(() => U.value.map((e, t) => {
237
- let r = e.value || 0, a = r / dt.value, o = isNaN(a) ? 0 : a, c = o * G.value.width;
238
- return {
239
- ...e,
240
- color: i(B.value[t]?.color ? B.value[t]?.color : H.value[t] || n[t] || n[t % n.length]),
241
- value: r,
242
- proportion: o,
243
- width: c,
244
- seriesIndex: t,
245
- proportionLabel: s({
246
- v: o * 100,
247
- s: "%",
248
- r: I.value.percentage.rounding
249
- })
250
- };
251
- })), J = d(() => q.value.filter((e, t) => !K.value.includes(t)));
252
- function ft() {
253
- O.value = !1, N.value = null, j.value = null, M.value = "pointer";
254
- }
255
- function pt() {
256
- ft(), K.value.length ? K.value = [] : q.value.forEach((e, t) => {
257
- K.value.push(t);
258
- }), vt("selectLegend", J.value);
259
- }
260
- function Y(e) {
261
- ft(), K.value.includes(e) ? K.value = K.value.filter((t) => t !== e) : K.value.length < U.value.length - 1 && K.value.push(e), vt("selectLegend", J.value);
262
- }
263
- function mt(e) {
264
- return q.value.length ? q.value.find((t) => t.name === e) || (P.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${e}"`), null) : (P.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null);
265
- }
266
- function ht(e) {
267
- let t = mt(e);
268
- t !== null && K.value.includes(t.id) && Y(t.seriesIndex);
269
- }
270
- function gt(e) {
271
- let t = mt(e);
272
- t !== null && (K.value.includes(t.id) || Y(t.seriesIndex));
273
- }
274
- let X = d(() => {
275
- let e = 0, t = [];
276
- for (let n = 0; n < J.value.length; n += 1) t.push({
277
- ...J.value[n],
278
- start: e
279
- }), e += J.value[n].width;
280
- return t;
281
- }), _t = d(() => {
282
- let e = X.value.reduce((e, t) => e + t.width, 0);
283
- return Math.min(Math.max(e, 0), G.value.width);
284
- }), vt = De;
285
- function Z(e, t, n = !1) {
286
- vt("selectDatapoint", {
287
- datapoint: e,
288
- index: t
289
- }), P.value.events.datapointClick && !n && P.value.events.datapointClick({
290
- datapoint: e,
291
- seriesIndex: e.seriesIndex
292
- });
293
- }
294
- function yt({ datapoint: e, seriesIndex: t }) {
295
- O.value = !1, N.value = null, j.value = null, M.value = "pointer", P.value.events.datapointLeave && P.value.events.datapointLeave({
296
- datapoint: e,
297
- seriesIndex: e.seriesIndex
298
- });
299
- }
300
- function bt({ datapoint: e, seriesIndex: n, triggerMode: r = "pointer" }) {
301
- if (A.value = !1, P.value.events.datapointEnter && P.value.events.datapointEnter({
302
- datapoint: e,
303
- seriesIndex: e.seriesIndex
304
- }), !L.value.show) return;
305
- M.value = r, k.value = {
306
- datapoint: e,
307
- seriesIndex: n,
308
- config: P.value,
309
- series: q.value
310
- }, O.value = !0, N.value = e.seriesIndex;
311
- let i = L.value.customFormat;
312
- if (t(i)) try {
313
- let t = i({
314
- seriesIndex: e.seriesIndex,
315
- datapoint: e,
316
- series: q.value,
317
- config: P.value
318
- });
319
- typeof t == "string" && (tt.value = t, A.value = !0);
320
- } catch {
321
- console.warn("Custom format cannot be applied."), A.value = !1;
322
- }
323
- if (!A.value) {
324
- let t = "", r = F.value.gradient.show, i = `tooltip_grad_${n}_${D.value}`, c = a(o(e.color, .05), 100 - F.value.gradient.intensity), ee = r ? `<rect x="0" y="0" width="10" height="10" rx="${Q.value}" fill="${F.value.gradient.underlayerColor}"/>` : "", te = r ? `<defs><radialGradient id="${i}"><stop offset="0%" stop-color="${c}"/><stop offset="100%" stop-color="${e.color}"/></radialGradient></defs>` : "";
325
- t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 10 10" height="14" width="14">${te}${ee}<rect x="0" y="0" width="10" height="10" rx="${Q.value}" fill="${r ? `url(#${i})` : e.color}"/></svg>`, t += `<b>${e.proportionLabel}</b>`, t += `<span>(${ne(I.value.value.formatter, e.value, s({
326
- p: I.value.value.prefix,
327
- v: e.value,
328
- s: I.value.value.suffix,
329
- r: I.value.value.rounding
330
- }), {
331
- datapoint: e,
332
- seriesIndex: n
333
- })})</span>`, tt.value = `<div>${t}</div>`;
334
- }
335
- }
336
- let xt = d(() => {
337
- let e = F.value.borderRadius == null ? G.value.height / 2 : F.value.borderRadius;
338
- return Math.min(Math.max(e, 0), G.value.height / 2);
339
- }), Q = d(() => {
340
- let e = G.value.height / 2;
341
- return e === 0 ? 5 : xt.value / e * 5;
342
- });
343
- function $(e) {
344
- let t = it.value[e];
345
- t && typeof t.focus == "function" && t.focus();
346
- }
347
- function St(e) {
348
- if (!Number.isFinite(e) || !V.value) return;
349
- let t = X.value[e];
350
- if (!t) return;
351
- let n = V.value.getBoundingClientRect(), r = t.start + t.width / 2, i = G.value.height / 2;
352
- nt.value = {
353
- x: n.left + r / G.value.width * n.width,
354
- y: n.top + i / G.value.height * n.height
355
- };
356
- }
357
- function Ct() {
358
- j.value = null, rt.value = !0;
359
- }
360
- function wt() {
361
- j.value = null, M.value = "pointer", O.value = !1, N.value = null, rt.value = !1;
362
- }
363
- function Tt(e) {
364
- if (!V.value || document.activeElement !== V.value || !X.value.length) return;
365
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape", a = e.key === "Home", o = e.key === "End";
366
- if (!t && !n && !r && !i && !a && !o) return;
367
- if (e.preventDefault(), e.stopPropagation(), i) {
368
- j.value = null, M.value = "pointer", O.value = !1, N.value = null;
369
- return;
370
- }
371
- if (r) {
372
- if (j.value === null) return;
373
- let e = X.value[j.value];
374
- if (!e) return;
375
- Z(e, e.seriesIndex);
376
- return;
377
- }
378
- let s = j.value;
379
- a ? s = 0 : o ? s = X.value.length - 1 : s === null || s < 0 || s >= X.value.length ? s = n ? 0 : X.value.length - 1 : n ? (s += 1, s >= X.value.length && (s = 0)) : t && (--s, s < 0 && (s = X.value.length - 1));
380
- let c = X.value[s];
381
- c && (j.value = s, St(s), bt({
382
- datapoint: c,
383
- seriesIndex: c.seriesIndex,
384
- triggerMode: "keyboard"
385
- }));
386
- }
387
- function Et(e) {
388
- O.value = !1, j.value = null, M.value = "pointer", N.value = e.seriesIndex;
389
- }
390
- function Dt() {
391
- j.value = null, M.value = "pointer", O.value = !1, N.value = null;
392
- }
393
- function Ot(e, t, n) {
394
- let r = e.key === "Enter" || e.key === " ", i = e.key === "ArrowLeft" || e.key === "ArrowUp", a = e.key === "ArrowRight" || e.key === "ArrowDown", o = e.key === "Home", s = e.key === "End", c = e.key === "Escape";
395
- if (!(!r && !i && !a && !o && !s && !c)) {
396
- if (e.preventDefault(), e.stopPropagation(), c) {
397
- Dt();
398
- return;
399
- }
400
- if (r) {
401
- Y(n), Z(t, n, !0);
402
- return;
403
- }
404
- if (o) {
405
- $(0);
406
- return;
407
- }
408
- if (s) {
409
- $(q.value.length - 1);
410
- return;
411
- }
412
- if (i) {
413
- $(n <= 0 ? q.value.length - 1 : n - 1);
414
- return;
415
- }
416
- a && $(n >= q.value.length - 1 ? 0 : n + 1);
417
- }
418
- }
419
- let kt = d(() => ({
420
- headers: [
421
- P.value.a11y.translations.series,
422
- P.value.a11y.translations.percentage,
423
- P.value.a11y.translations.value
424
- ],
425
- rows: q.value.map((e, t) => [
426
- e.name,
427
- K.value.includes(t) ? " - " : e.proportionLabel,
428
- ne(I.value.value.formatter, e.value, s({
429
- p: I.value.value.prefix,
430
- v: e.value,
431
- s: I.value.value.suffix,
432
- r: I.value.value.rounding
433
- }), {
434
- datapoint: e,
435
- seriesIndex: t
436
- })
437
- ])
438
- }));
439
- return pe({
440
- hideSeries: gt,
441
- showSeries: ht
442
- }), (e, t) => (b(), m("div", {
443
- class: "vue-data-ui-component vue-ui-spark-stackbar",
444
- ref_key: "sparkstackbarChart",
445
- ref: et,
446
- style: y(`width:100%; background:${R.value.backgroundColor}`)
447
- }, [
448
- h("div", {
449
- id: `chart-instructions-${D.value}`,
450
- class: "sr-only"
451
- }, [h("p", null, w(P.value.a11y.translations.keyboardNavigation), 1)], 8, Oe),
452
- kt.value?.rows?.length ? (b(), f(ge, {
453
- key: 0,
454
- uid: D.value,
455
- head: kt.value.headers,
456
- body: kt.value.rows,
457
- notice: P.value.a11y.translations.tableAvailable,
458
- caption: P.value.a11y.translations.tableCaption
459
- }, null, 8, [
460
- "uid",
461
- "head",
462
- "body",
463
- "notice",
464
- "caption"
465
- ])) : p("", !0),
466
- R.value.title.text ? (b(), m("div", {
467
- key: 1,
468
- style: y(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${R.value.title.margin};padding: 0 6px;text-align:${R.value.title.textAlign}`)
469
- }, [h("div", {
470
- class: "atom-title",
471
- style: y(`font-size:${R.value.title.fontSize}px;color:${R.value.title.color};font-weight:${R.value.title.bold ? "bold" : "normal"}`)
472
- }, w(R.value.title.text), 5), R.value.title.subtitle.text ? (b(), m("div", {
473
- key: 0,
474
- class: "atom-subtitle",
475
- style: y(`font-size:${R.value.title.subtitle.fontSize}px;color:${R.value.title.subtitle.color};font-weight:${R.value.title.subtitle.bold ? "bold" : "normal"}`)
476
- }, w(R.value.title.subtitle.text), 5)) : p("", !0)], 4)) : p("", !0),
477
- h("div", ke, [(b(), m("svg", {
478
- ref_key: "svgRef",
479
- ref: V,
480
- xmlns: T(ae),
481
- width: "100%",
482
- viewBox: `0 0 ${G.value.width} ${G.value.height}`,
483
- "aria-describedby": `chart-instructions-${D.value}`,
484
- tabindex: "0",
485
- onFocus: Ct,
486
- onBlur: wt,
487
- onKeydown: Tt
488
- }, [
489
- be(T(qe)),
490
- h("defs", null, [(b(!0), m(u, null, S(X.value, (e, t) => (b(), f(me, {
491
- t: "linear",
492
- id: `stack_gradient_${t}_${D.value}`,
493
- key: `stack_gradient_${t}`,
494
- gradientTransform: "rotate(90)",
495
- stops: [
496
- [
497
- "0%",
498
- e.color,
499
- 1
500
- ],
501
- [
502
- "50%",
503
- T(a)(T(o)(e.color, .05), 100 - F.value.gradient.intensity),
504
- 1
505
- ],
506
- [
507
- "100%",
508
- e.color,
509
- 1
510
- ]
511
- ]
512
- }, null, 8, ["id", "stops"]))), 128)), h("clipPath", { id: `stackPill_${D.value}` }, [h("rect", {
513
- x: "0",
514
- y: "0",
515
- width: _t.value,
516
- height: G.value.height,
517
- rx: xt.value,
518
- class: _({ animated: !W.value && !T(z) })
519
- }, null, 10, Me)], 8, je)]),
520
- dt.value > 0 ? (b(), m(u, { key: 0 }, [h("g", { "clip-path": `url(#stackPill_${D.value})` }, [
521
- (b(!0), m(u, null, S(X.value, (e, t) => (b(), m("rect", {
522
- key: `stack_underlayer_${t}`,
523
- x: e.start,
524
- y: 0,
525
- width: e.width,
526
- height: G.value.height,
527
- fill: F.value.gradient.underlayerColor,
528
- class: _({ animated: !W.value && !T(z) }),
529
- style: y({ opacity: O.value && N.value !== null && L.value.show ? N.value === e.seriesIndex ? 1 : .5 : 1 })
530
- }, null, 14, Pe))), 128)),
531
- (b(!0), m(u, null, S(X.value, (e, t) => (b(), m("rect", {
532
- key: `stack_${t}`,
533
- x: e.start,
534
- y: 0,
535
- width: e.width,
536
- height: G.value.height,
537
- fill: F.value.gradient.show ? `url(#stack_gradient_${t}_${D.value})` : e.color,
538
- class: _({ animated: !W.value && !T(z) }),
539
- style: y({ opacity: O.value && N.value !== null && L.value.show ? N.value === e.seriesIndex ? 1 : .5 : 1 })
540
- }, null, 14, Fe))), 128)),
541
- (b(!0), m(u, null, S(X.value.slice(1), (e, t) => (b(), m("rect", {
542
- key: `stack_separator_${t}`,
543
- x: e.start - .5,
544
- y: "0",
545
- width: "1",
546
- height: G.value.height,
547
- fill: R.value.backgroundColor,
548
- "pointer-events": "none",
549
- class: _({ animated: !W.value && !T(z) })
550
- }, null, 10, Ie))), 128)),
551
- (b(!0), m(u, null, S(X.value, (e, t) => (b(), m("rect", {
552
- key: `stack_trap_${t}`,
553
- x: e.start,
554
- y: 0,
555
- width: e.width,
556
- height: G.value.height,
557
- fill: "transparent",
558
- stroke: "none",
559
- class: _({ animated: !W.value && !T(z) }),
560
- onClick: () => Z(e, t),
561
- onMouseenter: () => bt({
562
- datapoint: e,
563
- seriesIndex: e.seriesIndex
564
- }),
565
- onMouseleave: (t) => yt({
566
- datapoint: e,
567
- seriesIndex: e.seriesIndex
568
- })
569
- }, null, 42, Le))), 128))
570
- ], 8, Ne), h("rect", {
571
- x: "0.5",
572
- y: "0.5",
573
- width: G.value.width - 1,
574
- height: G.value.height - 1,
575
- rx: Math.max(0, xt.value - .5),
576
- fill: "none",
577
- stroke: R.value.backgroundColor,
578
- "stroke-width": "1",
579
- "pointer-events": "none"
580
- }, null, 8, Re)], 64)) : (b(), m("rect", {
581
- key: 1,
582
- x: 2,
583
- y: 1,
584
- width: G.value.width - 4,
585
- height: G.value.height - 2,
586
- stroke: "#CCCCCC",
587
- "stroke-width": "2",
588
- fill: "transparent",
589
- rx: (G.value.height - 4) / 2
590
- }, null, 8, ze))
591
- ], 40, Ae)), e.$slots.hint ? (b(), m("div", Be, [C(e.$slots, "hint", v(g({
592
- hint: P.value.a11y.translations.keyboardNavigation,
593
- isVisible: rt.value
594
- })), void 0, !0)])) : p("", !0)]),
595
- I.value.show ? (b(), m("div", {
596
- key: 2,
597
- style: y(`background:transparent;margin:0 auto;margin:${I.value.margin};justify-content:${I.value.textAlign === "left" ? "flex-start" : I.value.textAlign === "right" ? "flex-end" : "center"}`),
598
- class: "vue-ui-sparkstackbar-legend",
599
- "aria-label": "legend",
600
- role: "toolbar"
601
- }, [I.value.selectAllToggle.show && q.value.length > 2 && !T(z) ? (b(), f(he, {
602
- key: 0,
603
- backgroundColor: I.value.selectAllToggle.backgroundColor,
604
- color: I.value.selectAllToggle.color,
605
- fontSize: I.value.fontSize,
606
- checked: K.value.length > 0,
607
- isCursorPointer: ot.value,
608
- onToggle: pt
609
- }, null, 8, [
610
- "backgroundColor",
611
- "color",
612
- "fontSize",
613
- "checked",
614
- "isCursorPointer"
615
- ])) : p("", !0), (b(!0), m(u, null, S(q.value, (e, t) => (b(), m("div", {
616
- role: "button",
617
- tabindex: "0",
618
- "aria-pressed": K.value.includes(t),
619
- "aria-label": `${e.name}, ${K.value.includes(t) ? "hidden" : "visible"}, ${e.proportionLabel}`,
620
- style: y(`font-size:${I.value.fontSize}px;cursor:${ot.value ? "pointer" : "default"}`),
621
- class: _({
622
- "vue-ui-sparkstackbar-legend-item": !0,
623
- "vue-ui-sparkstackbar-legend-item-unselected": K.value.includes(t)
624
- }),
625
- onClick: (n) => {
626
- Y(t), Z(e, t, !0);
627
- },
628
- onFocus: (t) => Et(e),
629
- onBlur: Dt,
630
- onKeydown: (n) => Ot(n, e, t)
631
- }, [h("div", He, [(b(), m("svg", {
632
- height: `${I.value.fontSize}px`,
633
- width: `${I.value.fontSize}px`,
634
- viewBox: "0 0 10 10"
635
- }, [
636
- h("defs", null, [be(me, {
637
- t: "radial",
638
- id: `legend_grad_${t}-${D.value}`,
639
- stops: [[
640
- "0%",
641
- T(z) ? "#FFFFFF" : T(a)(T(o)(e.color, .05), 100 - F.value.gradient.intensity),
642
- 1
643
- ], [
644
- "100%",
645
- e.color,
646
- 1
647
- ]]
648
- }, null, 8, ["id", "stops"])]),
649
- F.value.gradient.show ? (b(), m("rect", {
650
- key: 0,
651
- x: "0",
652
- y: "0",
653
- width: "10",
654
- height: "10",
655
- rx: Q.value,
656
- fill: F.value.gradient.underlayerColor
657
- }, null, 8, We)) : p("", !0),
658
- h("rect", {
659
- x: "0",
660
- y: "0",
661
- width: "10",
662
- height: "10",
663
- rx: Q.value,
664
- fill: F.value.gradient.show ? `url(#legend_grad_${t}-${D.value})` : e.color
665
- }, null, 8, Ge)
666
- ], 8, Ue)), T(z) ? p("", !0) : (b(), m(u, { key: 0 }, [h("span", { style: y(`color:${I.value.name.color}; font-weight:${I.value.name.bold ? "bold" : "normal"}`) }, w(e.name), 5), W.value ? p("", !0) : (b(), m(u, { key: 0 }, [I.value.percentage.show ? (b(), m("span", {
667
- key: 0,
668
- style: y(`font-weight:${I.value.percentage.bold ? "bold" : "normal"};color:${I.value.percentage.color}`)
669
- }, w(K.value.includes(t) ? " - " : e.proportionLabel), 5)) : p("", !0), I.value.value.show ? (b(), m("span", {
670
- key: 1,
671
- style: y(`font-weight:${I.value.value.bold ? "bold" : "normal"};color:${I.value.value.color}`)
672
- }, " (" + w(T(ne)(I.value.value.formatter, e.value, T(s)({
673
- p: I.value.value.prefix,
674
- v: e.value,
675
- s: I.value.value.suffix,
676
- r: I.value.value.rounding
677
- }), {
678
- datapoint: e,
679
- seriesIndex: t
680
- })) + ") ", 5)) : p("", !0)], 64))], 64))])], 46, Ve))), 256))], 4)) : p("", !0),
681
- be(T(Je), {
682
- teleportTo: L.value.teleportTo,
683
- show: O.value && L.value.show,
684
- parent: et.value,
685
- backgroundColor: L.value.backgroundColor,
686
- color: L.value.color,
687
- fontSize: L.value.fontSize,
688
- borderRadius: L.value.borderRadius,
689
- borderColor: L.value.borderColor,
690
- borderWidth: L.value.borderWidth,
691
- backgroundOpacity: L.value.backgroundOpacity,
692
- position: L.value.position,
693
- content: tt.value,
694
- isCustom: A.value,
695
- offsetX: L.value.offsetX,
696
- offsetY: -124 + L.value.offsetY,
697
- blockShiftY: !0,
698
- smooth: L.value.smooth,
699
- backdropFilter: L.value.backdropFilter,
700
- smoothForce: L.value.smoothForce,
701
- smoothSnapThreshold: L.value.smoothSnapThreshold,
702
- isA11yMode: M.value === "keyboard",
703
- a11yPosition: nt.value
704
- }, {
705
- "tooltip-before": Ee(() => [C(e.$slots, "tooltip-before", v(g({ ...k.value })), void 0, !0)]),
706
- tooltip: Ee(() => [C(e.$slots, "tooltip", v(g({ ...k.value })), void 0, !0)]),
707
- "tooltip-after": Ee(() => [C(e.$slots, "tooltip-after", v(g({ ...k.value })), void 0, !0)]),
708
- _: 3
709
- }, 8, [
710
- "teleportTo",
711
- "show",
712
- "parent",
713
- "backgroundColor",
714
- "color",
715
- "fontSize",
716
- "borderRadius",
717
- "borderColor",
718
- "borderWidth",
719
- "backgroundOpacity",
720
- "position",
721
- "content",
722
- "isCustom",
723
- "offsetX",
724
- "offsetY",
725
- "smooth",
726
- "backdropFilter",
727
- "smoothForce",
728
- "smoothSnapThreshold",
729
- "isA11yMode",
730
- "a11yPosition"
731
- ]),
732
- e.$slots.source ? (b(), m("div", Ke, [C(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
733
- C(e.$slots, "skeleton", {}, () => [T(z) ? (b(), f(de, { key: 0 })) : p("", !0)], !0)
734
- ], 4));
735
- }
736
- }, [["__scopeId", "data-v-ea9d2496"]]);
737
- //#endregion
738
- export { De as n, qe as t };