vue-data-ui 3.25.4 → 3.25.6

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 (213) hide show
  1. package/README.md +13 -13
  2. package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
  3. package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
  4. package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
  5. package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
  6. package/dist/{ColorPicker-ZJrR3Olp.js → ColorPicker-CUy15T72.js} +102 -100
  7. package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
  8. package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
  9. package/dist/{NonSvgPenAndPaper-DS84BAOx.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
  10. package/dist/{PackageVersion-5SWftabm.js → PackageVersion-ur6jKRL5.js} +1 -1
  11. package/dist/{PenAndPaper-B_SdRSKH.js → PenAndPaper-KFzKlvbi.js} +20 -4
  12. package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
  13. package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
  14. package/dist/components/vue-ui-3d-bar.js +1 -1
  15. package/dist/components/vue-ui-accordion.js +1 -1
  16. package/dist/components/vue-ui-age-pyramid.js +1 -1
  17. package/dist/components/vue-ui-annotator.js +1 -1
  18. package/dist/components/vue-ui-bullet.js +1 -1
  19. package/dist/components/vue-ui-bump.js +1 -1
  20. package/dist/components/vue-ui-candlestick.js +1 -1
  21. package/dist/components/vue-ui-carousel-table.js +1 -1
  22. package/dist/components/vue-ui-chestnut.js +1 -1
  23. package/dist/components/vue-ui-chord.js +1 -1
  24. package/dist/components/vue-ui-circle-pack.js +1 -1
  25. package/dist/components/vue-ui-cursor.js +1 -1
  26. package/dist/components/vue-ui-dag.js +1 -1
  27. package/dist/components/vue-ui-dashboard.js +1 -1
  28. package/dist/components/vue-ui-digits.js +1 -1
  29. package/dist/components/vue-ui-donut-evolution.js +1 -1
  30. package/dist/components/vue-ui-donut.js +1 -1
  31. package/dist/components/vue-ui-dumbbell.js +1 -1
  32. package/dist/components/vue-ui-flow.js +1 -1
  33. package/dist/components/vue-ui-funnel.js +1 -1
  34. package/dist/components/vue-ui-galaxy.js +1 -1
  35. package/dist/components/vue-ui-gauge.js +1 -1
  36. package/dist/components/vue-ui-geo.js +1 -1
  37. package/dist/components/vue-ui-gizmo.js +1 -1
  38. package/dist/components/vue-ui-heatmap.js +1 -1
  39. package/dist/components/vue-ui-hill.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-label.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +1 -1
  47. package/dist/components/vue-ui-mood-radar.js +1 -1
  48. package/dist/components/vue-ui-nested-donuts.js +1 -1
  49. package/dist/components/vue-ui-onion.js +1 -1
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +1 -1
  52. package/dist/components/vue-ui-quick-chart.js +1 -1
  53. package/dist/components/vue-ui-radar.js +1 -1
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +1 -1
  56. package/dist/components/vue-ui-ridgeline.js +1 -1
  57. package/dist/components/vue-ui-rings.js +1 -1
  58. package/dist/components/vue-ui-scatter.js +1 -1
  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 +1 -1
  63. package/dist/components/vue-ui-sparkgauge.js +1 -1
  64. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  65. package/dist/components/vue-ui-sparkline.js +1 -1
  66. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  67. package/dist/components/vue-ui-stackbar.js +1 -1
  68. package/dist/components/vue-ui-stackline.js +1 -1
  69. package/dist/components/vue-ui-strip-plot.js +1 -1
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +1 -1
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +1 -1
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +1 -1
  76. package/dist/components/vue-ui-treemap.js +1 -1
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +1 -1
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +1 -1
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +1 -1
  83. package/dist/components/vue-ui-xy.js +1 -1
  84. package/dist/{package-DmsdiyeS.js → package-Dx7M6sYy.js} +1 -1
  85. package/dist/{render-common-zoPh9a78.js → render-common-DETHvNhl.js} +1 -1
  86. package/dist/ssr/vue-ui-donut.js +1 -1
  87. package/dist/ssr/vue-ui-xy.js +1 -1
  88. package/dist/ssr.js +2 -2
  89. package/dist/style.css +1 -1
  90. package/dist/types/vue-data-ui.d.ts +80 -1
  91. package/dist/types/vue-ui-annotator.d.ts +58 -2
  92. package/dist/{useConfig-CyCVHo81.js → useConfig-CIQZ6_r7.js} +1339 -1313
  93. package/dist/{useObjectBindings-ByORl1rV.js → useObjectBindings---mHNfbS.js} +2 -2
  94. package/dist/utils.js +1 -1
  95. package/dist/{vue-data-ui-DTj71yB7.js → vue-data-ui-Dh3_EsHb.js} +70 -70
  96. package/dist/vue-data-ui.js +71 -71
  97. package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
  98. package/dist/{vue-ui-accordion-D4zsdacF.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
  99. package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
  100. package/dist/vue-ui-annotator-CTQHAPho.js +3325 -0
  101. package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
  102. package/dist/{vue-ui-bump-BkOtQNWe.js → vue-ui-bump-DhwySwgn.js} +382 -380
  103. package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
  104. package/dist/{vue-ui-carousel-table-CRgbs7jR.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
  105. package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
  106. package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
  107. package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
  108. package/dist/{vue-ui-cursor-BHyXRadA.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
  109. package/dist/{vue-ui-dag-CyVqaLbF.js → vue-ui-dag-C_inEafb.js} +794 -792
  110. package/dist/{vue-ui-dashboard-7I-7wvCP.js → vue-ui-dashboard-Bs2mBur5.js} +74 -72
  111. package/dist/{vue-ui-digits-BBL8uERO.js → vue-ui-digits-DwE4MoXI.js} +2 -2
  112. package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
  113. package/dist/{vue-ui-donut-DcgUuefk.js → vue-ui-donut-CbOSJmRu.js} +2 -2
  114. package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
  115. package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
  116. package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
  117. package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
  118. package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
  119. package/dist/vue-ui-gauge-DLDULH26.js +934 -0
  120. package/dist/{vue-ui-geo-jR4P4pbt.js → vue-ui-geo-DXIHhp-G.js} +431 -429
  121. package/dist/{vue-ui-gizmo-D6W86s9o.js → vue-ui-gizmo-PuURiePo.js} +2 -2
  122. package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
  123. package/dist/{vue-ui-hill-fFq7pm-g.js → vue-ui-hill-DqsVJkmO.js} +472 -470
  124. package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
  125. package/dist/{vue-ui-horizontal-bar-D3Sft4kp.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +513 -511
  126. package/dist/{vue-ui-kpi-fzLsKlyE.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
  127. package/dist/{vue-ui-label-BSgLalWD.js → vue-ui-label-ClMQ5Gez.js} +1 -1
  128. package/dist/{vue-ui-mini-loader-BL2odRfu.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
  129. package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
  130. package/dist/{vue-ui-mood-radar-bvGx6XgG.js → vue-ui-mood-radar-Dd1qfUiu.js} +378 -376
  131. package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
  132. package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
  133. package/dist/{vue-ui-parallel-coordinate-plot-B_QJ4N9o.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +409 -407
  134. package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
  135. package/dist/{vue-ui-quick-chart-BFscCR59.js → vue-ui-quick-chart-BZq517pL.js} +8 -6
  136. package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
  137. package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
  138. package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
  139. package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
  140. package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
  141. package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
  142. package/dist/{vue-ui-skeleton-zmbcOVEf.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
  143. package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
  144. package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
  145. package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
  146. package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
  147. package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
  148. package/dist/{vue-ui-sparkline-Dv7XrEzO.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
  149. package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
  150. package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
  151. package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
  152. package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
  153. package/dist/{vue-ui-table-heatmap-Dv_ZKKm3.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
  154. package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
  155. package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
  156. package/dist/{vue-ui-thermometer-DytlLJ32.js → vue-ui-thermometer-D0_KsB-y.js} +194 -192
  157. package/dist/{vue-ui-timer-CvHP4HoW.js → vue-ui-timer-1Z2zginj.js} +153 -153
  158. package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
  159. package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
  160. package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
  161. package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
  162. package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
  163. package/dist/{vue-ui-world-D0_2upjg.js → vue-ui-world-BOBHo7-L.js} +526 -524
  164. package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
  165. package/dist/{vue-ui-xy-D_5FfaH-.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
  166. package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
  167. package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
  168. package/package.json +1 -1
  169. package/dist/vue-ui-3d-bar-CH8SpxS2.js +0 -1829
  170. package/dist/vue-ui-age-pyramid-B9MUVi75.js +0 -1241
  171. package/dist/vue-ui-annotator-CmlcWPIm.js +0 -2886
  172. package/dist/vue-ui-bullet-n8KNnDwh.js +0 -700
  173. package/dist/vue-ui-candlestick-Bxlvqk49.js +0 -1857
  174. package/dist/vue-ui-chestnut-ByDKbkG9.js +0 -2014
  175. package/dist/vue-ui-chord-DQRBgVOx.js +0 -1345
  176. package/dist/vue-ui-circle-pack-CBBc0HOe.js +0 -1633
  177. package/dist/vue-ui-donut-DfiocufT.js +0 -2413
  178. package/dist/vue-ui-donut-evolution-BoqO8By2.js +0 -1550
  179. package/dist/vue-ui-dumbbell-7M_oUQdi.js +0 -1529
  180. package/dist/vue-ui-flow-CoylrfnO.js +0 -1215
  181. package/dist/vue-ui-funnel-DaBYHWIC.js +0 -747
  182. package/dist/vue-ui-galaxy-BIebStQ3.js +0 -1083
  183. package/dist/vue-ui-gauge-CwdTmiRP.js +0 -932
  184. package/dist/vue-ui-heatmap-DXYlGwqR.js +0 -1553
  185. package/dist/vue-ui-history-plot-CgIELoD2.js +0 -1696
  186. package/dist/vue-ui-molecule-DeHWkkhy.js +0 -929
  187. package/dist/vue-ui-nested-donuts-CeAV2xPk.js +0 -1501
  188. package/dist/vue-ui-onion-B7oFulsQ.js +0 -1233
  189. package/dist/vue-ui-quadrant-DrKnz37q.js +0 -1965
  190. package/dist/vue-ui-radar-Bzx69q8f.js +0 -1372
  191. package/dist/vue-ui-rating-CimC9FQ9.js +0 -359
  192. package/dist/vue-ui-relation-circle-DIQYyDGb.js +0 -903
  193. package/dist/vue-ui-ridgeline-CPEnM45x.js +0 -1621
  194. package/dist/vue-ui-rings-qPL5Iwji.js +0 -1250
  195. package/dist/vue-ui-scatter-BB0ClTsU.js +0 -2403
  196. package/dist/vue-ui-smiley-DzPkCMN-.js +0 -376
  197. package/dist/vue-ui-spark-trend-Ciq7-k_q.js +0 -457
  198. package/dist/vue-ui-sparkbar-D1M7-naP.js +0 -401
  199. package/dist/vue-ui-sparkgauge-rsqaeR_n.js +0 -268
  200. package/dist/vue-ui-sparkhistogram-C4WXt2Ni.js +0 -589
  201. package/dist/vue-ui-sparkstackbar-DDOXdeV-.js +0 -738
  202. package/dist/vue-ui-stackbar-C_hMnOLb.js +0 -2353
  203. package/dist/vue-ui-stackline-BHGi63lD.js +0 -2467
  204. package/dist/vue-ui-strip-plot-Cygpn-l8.js +0 -1738
  205. package/dist/vue-ui-table-BQna1wL6.js +0 -1352
  206. package/dist/vue-ui-table-sparkline-BCuimtk6.js +0 -738
  207. package/dist/vue-ui-tiremarks-BvjdZwgh.js +0 -538
  208. package/dist/vue-ui-treemap-C5OpqzSc.js +0 -1731
  209. package/dist/vue-ui-waffle-B7T_Zzan.js +0 -1619
  210. package/dist/vue-ui-wheel-D1B0k7IW.js +0 -871
  211. package/dist/vue-ui-word-cloud-C4pX6jop.js +0 -1708
  212. package/dist/vue-ui-xy-Ck41KYqF.js +0 -5281
  213. package/dist/vue-ui-xy-canvas-B_8Mu19r.js +0 -1824
@@ -1,457 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { Ot as t, P as n, Pt as r, Ut as i, X as a, Zt as o, b as s, g as ee, i as c, nt as te, q as ne, t as re } from "./lib-Dql7cqyA.js";
3
- import { n as ie, t as ae } from "./useHints-Dq_w2E8B.js";
4
- import { t as oe } from "./useConfig-CyCVHo81.js";
5
- import { n as se, t as ce } from "./BaseScanner-DZvpgOjM.js";
6
- import { t as l } from "./useNestedProp-Chvyfpl-.js";
7
- import { t as le } from "./useThemeCheck-C43Tcqmk.js";
8
- import { t as u } from "./_plugin-vue_export-helper-B3ysoDQm.js";
9
- import { l as ue, t as de } from "./useResponsive-ZtArZtUf.js";
10
- import { t as fe } from "./DefGrad-DVBqDjhO.js";
11
- import { t as pe } from "./usePrefersMotion-BC-CsqR1.js";
12
- import { t as me } from "./useFitSvgText-CXTzBplU.js";
13
- import { t as he } from "./vue_ui_spark_trend-DxVmpkmC.js";
14
- import { computed as d, createBlock as ge, createCommentVNode as f, createElementBlock as p, createElementVNode as _e, createVNode as m, defineAsyncComponent as ve, nextTick as h, normalizeStyle as ye, onMounted as be, openBlock as g, ref as _, renderSlot as v, toDisplayString as y, toRefs as xe, unref as b, watch as x } from "vue";
15
- //#region src/components/vue-ui-spark-trend.vue
16
- var S = /* @__PURE__ */ e({ default: () => C }), Se = ["id", "aria-describedby"], Ce = ["id"], we = ["xmlns", "viewBox"], Te = ["width", "height"], Ee = { key: 1 }, De = ["d", "fill"], Oe = ["d", "fill"], ke = [
17
- "d",
18
- "stroke",
19
- "stroke-width",
20
- "stroke-linecap",
21
- "stroke-linejoin"
22
- ], Ae = [
23
- "d",
24
- "stroke",
25
- "stroke-width",
26
- "stroke-linecap",
27
- "stroke-linejoin"
28
- ], je = ["d"], Me = ["fill", "d"], Ne = [
29
- "x",
30
- "y",
31
- "width",
32
- "height"
33
- ], Pe = [
34
- "x",
35
- "y",
36
- "fill",
37
- "font-size",
38
- "font-weight"
39
- ], Fe = [
40
- "stroke",
41
- "cx",
42
- "cy",
43
- "fill"
44
- ], Ie = [
45
- "x",
46
- "y",
47
- "font-size",
48
- "fill",
49
- "font-weight"
50
- ], C = /*#__PURE__*/ u({
51
- __name: "vue-ui-spark-trend",
52
- props: {
53
- config: {
54
- type: Object,
55
- default() {
56
- return {};
57
- }
58
- },
59
- dataset: {
60
- type: Array,
61
- default() {
62
- return [];
63
- }
64
- }
65
- },
66
- setup(e) {
67
- let u = ve(() => import("./PackageVersion-5SWftabm.js").then((e) => e.t)), { vue_ui_spark_trend: S } = oe(), { isThemeValid: C, warnInvalidTheme: Le } = le(), w = pe(), T = e, E = _(null), Re = _(null), ze = _(null), D = _(null), O = _(null), k = _(!1), A = _(null), j = _(ne()), M = _(I());
68
- ie({
69
- config: () => M.value,
70
- dataset: () => T.dataset,
71
- component: "VueUiSparkTrend",
72
- rules: [ae.emptyArray, {
73
- test: (e) => e.length > 1095,
74
- message: [
75
- "👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.",
76
- "",
77
- "▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted."
78
- ]
79
- }]
80
- });
81
- let Be = d(() => o({
82
- defaultConfig: { style: {
83
- animation: { show: !1 },
84
- backgroundColor: "#99999930",
85
- line: {
86
- stroke: "#6A6A6A",
87
- useColorTrend: !1
88
- },
89
- dataLabel: {
90
- show: !1,
91
- useColorTrend: !1,
92
- color: "#6A6A6A"
93
- }
94
- } },
95
- userConfig: M.value.skeletonConfig ?? {}
96
- })), { loading: N, FINAL_DATASET: P, manualLoading: F } = se({
97
- ...xe(T),
98
- FINAL_CONFIG: M,
99
- prepareConfig: I,
100
- skeletonDataset: T.config?.skeletonDataset ?? [
101
- 1,
102
- 2,
103
- 3,
104
- 5,
105
- 8,
106
- 13,
107
- 21,
108
- 34,
109
- 55,
110
- 89,
111
- 144,
112
- 233
113
- ],
114
- skeletonConfig: o({
115
- defaultConfig: M.value,
116
- userConfig: Be.value
117
- })
118
- });
119
- function I() {
120
- let e = l({
121
- userConfig: T.config,
122
- defaultConfig: S
123
- }), t = e.theme;
124
- if (!t) return e;
125
- if (!C.value(e)) return Le(e), e;
126
- let n = l({
127
- userConfig: he[t] || T.config,
128
- defaultConfig: e
129
- });
130
- return l({
131
- userConfig: T.config,
132
- defaultConfig: n
133
- });
134
- }
135
- let L = d(() => t({
136
- data: P.value,
137
- threshold: M.value.downsample.threshold
138
- }));
139
- x(() => T.config, (e) => {
140
- M.value = I(), H.value = M.value.style.width, U.value = M.value.style.height, V();
141
- }, { deep: !0 });
142
- function R(e) {
143
- return e.map((e) => s(e));
144
- }
145
- let z = _(t({
146
- data: P.value,
147
- threshold: M.value.downsample.threshold
148
- }).map((e) => M.value.style.animation.show && !w.value || [
149
- void 0,
150
- Infinity,
151
- -Infinity,
152
- null,
153
- NaN
154
- ].includes(e) ? null : e));
155
- x(L, (e) => {
156
- A.value &&= (cancelAnimationFrame(A.value), null), M.value.style.animation.show && !w.value ? z.value = Array(e.length).fill(null) : z.value = e.map((e) => ![
157
- void 0,
158
- Infinity,
159
- -Infinity,
160
- null
161
- ].includes(e) && !Number.isNaN(e) ? e : null), B(), h(() => $(".vue-ui-sparktrend-progress-label", 6));
162
- }, {
163
- deep: !0,
164
- immediate: !0
165
- }), x(() => JSON.stringify(T.dataset), () => {
166
- A.value &&= (cancelAnimationFrame(A.value), null), F.value = r(T.dataset);
167
- let e = L.value;
168
- z.value = M.value.style.animation.show && !w.value ? Array(e.length).fill(null) : e.map((e) => Number.isFinite(e) ? e : null), B(), h(() => $(".vue-ui-sparktrend-progress-label", 6));
169
- }, {
170
- deep: !1,
171
- immediate: !0
172
- });
173
- function B() {
174
- let e = 1e3 / M.value.style.animation.animationFrames, t = performance.now();
175
- if (!N.value && M.value.style.animation.show && !w.value && M.value.style.animation.animationFrames && P.value.length > 1) {
176
- z.value = [];
177
- let n = 0;
178
- function r() {
179
- k.value = !0;
180
- let i = performance.now(), a = i - t;
181
- a > e ? (t = i - a % e, n < L.value.length ? (z.value.push(L.value[n]), n += 1, A.value = requestAnimationFrame(r)) : (cancelAnimationFrame(A.value), z.value = R(L.value), k.value = !1, $(".vue-ui-sparktrend-progress-label", 6))) : A.value = requestAnimationFrame(r);
182
- }
183
- r();
184
- }
185
- }
186
- be(() => {
187
- V();
188
- });
189
- let Ve = d(() => M.value.debug);
190
- function V() {
191
- if (r(T.dataset) && (te({
192
- componentName: "VueUiSparkTrend",
193
- type: "dataset",
194
- debug: Ve.value
195
- }), F.value = !0), r(T.dataset) || (F.value = !1), M.value.responsive) {
196
- let e = ue(() => {
197
- let { width: e, height: t } = de({
198
- chart: E.value,
199
- source: ze.value
200
- });
201
- requestAnimationFrame(() => {
202
- H.value = e, U.value = t;
203
- });
204
- });
205
- D.value && (O.value && D.value.unobserve(O.value), D.value.disconnect()), D.value = new ResizeObserver(e), O.value = E.value.parentNode, D.value.observe(O.value);
206
- }
207
- B(), $(".vue-ui-sparktrend-progress-label", 6);
208
- }
209
- let H = _(M.value.style.width), U = _(M.value.style.height), W = d(() => ({
210
- height: U.value,
211
- width: H.value
212
- })), G = d(() => ({
213
- top: M.value.style.padding.top,
214
- left: M.value.style.padding.left,
215
- right: W.value.width - M.value.style.padding.right,
216
- bottom: W.value.height - M.value.style.padding.bottom,
217
- height: W.value.height - (M.value.style.padding.top + M.value.style.padding.bottom) - (M.value.style.dataLabel.show ? M.value.style.dataLabel.fontSize : 0),
218
- width: W.value.width - (M.value.style.padding.left + M.value.style.padding.right)
219
- })), K = d(() => {
220
- let e = R(L.value).filter(Number.isFinite);
221
- if (!e.length) return {
222
- max: 0,
223
- min: 0
224
- };
225
- let t = e[0], n = e[0];
226
- for (let r = 1; r < e.length; r++) {
227
- let i = e[r];
228
- i > t && (t = i), i < n && (n = i);
229
- }
230
- return {
231
- max: t,
232
- min: n
233
- };
234
- }), He = d(() => {
235
- let e = L.value, t = e.length ? e[e.length - 1] : "x";
236
- return [
237
- j.value,
238
- e.length,
239
- Number.isFinite(t) ? t : "x",
240
- M.value.downsample.threshold,
241
- M.value.style.line.smooth ? "s" : "l"
242
- ].join("-");
243
- }), q = d(() => {
244
- let e = K.value.min >= 0 ? 0 : K.value.min;
245
- return Math.abs(e);
246
- }), Ue = d(() => K.value.max + q.value);
247
- function We(e) {
248
- return e / Ue.value;
249
- }
250
- let Ge = d(() => L.value.length), J = d(() => z.value.map((e, t) => {
251
- let n = isNaN(e) || [
252
- void 0,
253
- null,
254
- "NaN",
255
- NaN,
256
- Infinity,
257
- -Infinity
258
- ].includes(e) ? 0 : e || 0;
259
- return {
260
- value: s(e),
261
- absoluteValue: s(n),
262
- plotValue: s(n + q.value),
263
- toMax: We(n + q.value),
264
- x: G.value.left + s(t * (G.value.width / (Ge.value - 1))) - M.value.style.padding.right,
265
- y: G.value.bottom - s(G.value.height * We(n + q.value))
266
- };
267
- })), Y = d(() => {
268
- let e = R(L.value);
269
- return M.value.style.trendLabel.trendType === "global" ? ee(e) : M.value.style.trendLabel.trendType === "n-1" && e.length > 1 ? (e.at(-1) / e.at(-2) - 1) * 100 : M.value.style.trendLabel.trendType === "lastToFirst" ? (e.at(-1) / e[0] - 1) * 100 : 0;
270
- }), X = d(() => k.value || Y.value === 0 ? "neutral" : Y.value > 0 ? "positive" : "negative"), Z = d(() => M.value.style.arrow.colors[X.value]), Ke = d(() => {
271
- let e = {
272
- x: J.value[0].x,
273
- y: W.value.height - 6
274
- }, t = {
275
- x: J.value[J.value.length - 1].x,
276
- y: W.value.height - 6
277
- }, n = [];
278
- return J.value.forEach((e) => {
279
- n.push(`${e.x},${e.y} `);
280
- }), [
281
- e.x,
282
- e.y,
283
- ...n,
284
- t.x,
285
- t.y
286
- ].toString();
287
- }), qe = d(() => {
288
- let e = [];
289
- return J.value.forEach((t) => {
290
- e.push(`${t.x},${t.y} `);
291
- }), `M ${e.toString()}`;
292
- }), Q = d(() => U.value / 2 - M.value.style.trendLabel.fontSize), Je = d(() => G.value.left * .8), { fitText: $ } = me({
293
- svgRef: Re,
294
- unitWidth: Je,
295
- fontSize: M.value.style.trendLabel.fontSize
296
- }), Ye = d(() => {
297
- if (N.value || k.value) return "Trend chart loading";
298
- let e = J.value?.at(-1), t = e?.value, n = a({
299
- p: Y.value > 0 ? "+" : "",
300
- v: Y.value,
301
- s: "%",
302
- r: M.value.style.trendLabel.rounding
303
- }), r = t == null ? "not available" : c(M.value.style.dataLabel.formatter, t, a({
304
- p: M.value.style.dataLabel.prefix,
305
- v: t,
306
- s: M.value.style.dataLabel.suffix,
307
- r: M.value.style.dataLabel.rounding
308
- }), { datapoint: e });
309
- return `Progression ${X.value === "positive" ? `up ${n}` : X.value === "negative" ? `down ${n}` : `stable at ${n}`}. Last value ${r}.`;
310
- }), Xe = d(() => `sparktrend-a11y-${j.value}`);
311
- return (e, t) => (g(), p("div", {
312
- ref_key: "sparkTrendChart",
313
- ref: E,
314
- class: "vue-data-ui-component vue-ui-spark-trend",
315
- id: j.value,
316
- style: ye(`width:100%;font-family:${M.value.style.fontFamily};background:${M.value.style.backgroundColor}`),
317
- role: "img",
318
- "aria-describedby": Xe.value
319
- }, [
320
- _e("p", {
321
- id: Xe.value,
322
- class: "sr-only",
323
- "aria-live": "polite"
324
- }, y(Ye.value), 9, Ce),
325
- (g(), p("svg", {
326
- key: He.value,
327
- ref_key: "svgRef",
328
- ref: Re,
329
- xmlns: b(re),
330
- viewBox: `0 0 ${W.value.width} ${W.value.height}`,
331
- style: "width:100%;background:transparent;overflow:visible",
332
- "aria-hidden": "true"
333
- }, [
334
- m(b(u)),
335
- e.$slots["chart-background"] ? (g(), p("foreignObject", {
336
- key: 0,
337
- x: 0,
338
- y: 0,
339
- width: W.value.width <= 0 ? 10 : W.value.width,
340
- height: W.value.height <= 0 ? 10 : W.value.height,
341
- style: { pointerEvents: "none" }
342
- }, [v(e.$slots, "chart-background", {}, void 0, !0)], 8, Te)) : f("", !0),
343
- _e("defs", null, [m(fe, {
344
- t: "linear",
345
- x1: "0%",
346
- y1: "0%",
347
- x2: "0%",
348
- y2: "100%",
349
- id: `pill_gradient_${j.value}`,
350
- stops: [[
351
- "0%",
352
- b(i)(M.value.style.line.useColorTrend ? Z.value : M.value.style.line.stroke, M.value.style.area.opacity),
353
- 1
354
- ], [
355
- "100%",
356
- M.value.style.backgroundColor,
357
- 1
358
- ]]
359
- }, null, 8, ["id", "stops"])]),
360
- M.value.style.area.show && J.value[0] ? (g(), p("g", Ee, [M.value.style.line.smooth ? (g(), p("path", {
361
- key: 0,
362
- d: `M ${J.value[0].x},${G.value.bottom} ${b(n)(J.value)} L ${J.value.at(-1).x},${G.value.bottom} Z`,
363
- fill: M.value.style.area.useGradient ? `url(#pill_gradient_${j.value})` : b(i)(M.value.style.line.useColorTrend ? Z.value : M.value.style.line.stroke, M.value.style.area.opacity),
364
- stroke: "none"
365
- }, null, 8, De)) : (g(), p("path", {
366
- key: 1,
367
- d: `M${Ke.value}Z`,
368
- fill: M.value.style.area.useGradient ? `url(#pill_gradient_${j.value})` : b(i)(M.value.style.line.useColorTrend ? Z.value : M.value.style.line.stroke, M.value.style.area.opacity),
369
- stroke: "none"
370
- }, null, 8, Oe))])) : f("", !0),
371
- M.value.style.line.smooth && J.value.length ? (g(), p("path", {
372
- key: 2,
373
- d: `M ${b(n)(J.value)}`,
374
- stroke: M.value.style.line.useColorTrend ? Z.value : M.value.style.line.stroke,
375
- fill: "none",
376
- "stroke-width": M.value.style.line.strokeWidth,
377
- "stroke-linecap": M.value.style.line.strokeLinecap,
378
- "stroke-linejoin": M.value.style.line.strokeLinejoin
379
- }, null, 8, ke)) : f("", !0),
380
- !M.value.style.line.smooth && J.value.length ? (g(), p("path", {
381
- key: 3,
382
- d: qe.value,
383
- stroke: M.value.style.line.useColorTrend ? Z.value : M.value.style.line.stroke,
384
- fill: "none",
385
- "stroke-width": M.value.style.line.strokeWidth,
386
- "stroke-linecap": M.value.style.line.strokeLinecap,
387
- "stroke-linejoin": M.value.style.line.strokeLinejoin
388
- }, null, 8, Ae)) : f("", !0),
389
- b(N) ? (g(), p("path", {
390
- key: 4,
391
- fill: "#6A6A6A",
392
- d: `M ${G.value.left / 2 + 6}, ${Q.value + 7} ${G.value.left / 2 - 7}, ${Q.value} ${G.value.left / 2 - 7}, ${Q.value + 14} Z`
393
- }, null, 8, je)) : (g(), p("path", {
394
- key: 5,
395
- fill: Z.value,
396
- d: X.value === "positive" ? `M ${G.value.left / 2}, ${Q.value} ${G.value.left / 2 - 7}, ${Q.value + 12} ${G.value.left / 2 + 7}, ${Q.value + 12} Z` : X.value === "negative" ? `M ${G.value.left / 2}, ${Q.value + 12} ${G.value.left / 2 - 7}, ${Q.value} ${G.value.left / 2 + 7}, ${Q.value} Z` : `M ${G.value.left / 2 + 6}, ${Q.value + 7} ${G.value.left / 2 - 7}, ${Q.value} ${G.value.left / 2 - 7}, ${Q.value + 14} Z`
397
- }, null, 8, Me)),
398
- b(N) ? (g(), p("rect", {
399
- key: 6,
400
- x: G.value.left / 2 - M.value.style.trendLabel.fontSize - 2,
401
- y: U.value / 2 + M.value.style.trendLabel.fontSize - 2,
402
- width: M.value.style.trendLabel.fontSize * 2,
403
- height: M.value.style.trendLabel.fontSize,
404
- fill: "#6A6A6A80",
405
- rx: "3"
406
- }, null, 8, Ne)) : f("", !0),
407
- !k.value && !b(N) ? (g(), p("text", {
408
- key: 7,
409
- class: "vue-ui-sparktrend-progress-label",
410
- x: G.value.left / 2,
411
- y: U.value / 2 + M.value.style.trendLabel.fontSize * 2,
412
- "text-anchor": "middle",
413
- fill: M.value.style.trendLabel.useColorTrend ? Z.value : M.value.style.trendLabel.color,
414
- "font-size": M.value.style.trendLabel.fontSize,
415
- "font-weight": M.value.style.trendLabel.bold ? "bold" : "normal"
416
- }, y(b(a)({
417
- p: Y.value > 0 ? "+" : "",
418
- v: Y.value,
419
- s: "%",
420
- r: M.value.style.trendLabel.rounding
421
- })), 9, Pe)) : f("", !0),
422
- J.value.length && J.value.at(-1).x !== void 0 ? (g(), p("circle", {
423
- key: 8,
424
- stroke: M.value.style.backgroundColor,
425
- "stroke-width": 2,
426
- cx: J.value.at(-1).x,
427
- cy: J.value.at(-1).y,
428
- r: 4,
429
- fill: b(N) ? "#6A6A6A" : Z.value
430
- }, null, 8, Fe)) : f("", !0),
431
- J.value.length && J.value.at(-1).x !== void 0 && M.value.style.dataLabel.show ? (g(), p("text", {
432
- key: 9,
433
- "text-anchor": "middle",
434
- x: J.value.at(-1).x,
435
- y: J.value.at(-1).y - M.value.style.dataLabel.fontSize / 1.5,
436
- "font-size": M.value.style.dataLabel.fontSize,
437
- fill: M.value.style.dataLabel.useColorTrend ? Z.value : M.value.style.dataLabel.color,
438
- "font-weight": M.value.style.dataLabel.bold ? "bold" : "normal"
439
- }, y(b(c)(M.value.style.dataLabel.formatter, J.value.at(-1).value, b(a)({
440
- p: M.value.style.dataLabel.prefix,
441
- v: J.value.at(-1).value,
442
- s: M.value.style.dataLabel.suffix,
443
- r: M.value.style.dataLabel.rounding
444
- }), { datapoint: J.value.at(-1) })), 9, Ie)) : f("", !0)
445
- ], 8, we)),
446
- e.$slots.source ? (g(), p("div", {
447
- key: 0,
448
- ref_key: "source",
449
- ref: ze,
450
- dir: "auto"
451
- }, [v(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
452
- v(e.$slots, "skeleton", {}, () => [b(N) ? (g(), ge(ce, { key: 0 })) : f("", !0)], !0)
453
- ], 12, Se));
454
- }
455
- }, [["__scopeId", "data-v-5bd4919c"]]);
456
- //#endregion
457
- export { S as n, C as t };