vue-data-ui 3.5.2 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/README.md +36 -27
  2. package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
  3. package/dist/{BaseDraggableDialog-ymf2sfB8.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
  4. package/dist/{BaseIcon-BmMbm4d0.js → BaseIcon-CofSxalQ.js} +6 -5
  5. package/dist/{ColorPicker-ChuwChMo.js → ColorPicker-e1-OSGlQ.js} +10 -10
  6. package/dist/{DataTable-BT7VF2ua.js → DataTable-CHaOCmsE.js} +2 -2
  7. package/dist/{Legend-G6GMcdAc.js → Legend-Web3GjlR.js} +10 -10
  8. package/dist/{NonSvgPenAndPaper-DVgKKLIf.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
  9. package/dist/{PackageVersion-Y7t79Jtq.js → PackageVersion-Bq_mtsqr.js} +1 -1
  10. package/dist/{PenAndPaper-SZQIAgkg.js → PenAndPaper-HCZQTkqi.js} +20 -20
  11. package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
  12. package/dist/{Slicer-D2wm0coO.js → Slicer-BFBBG6xv.js} +23 -23
  13. package/dist/{SlicerPreview-ij72TAs6.js → SlicerPreview-D76aSViW.js} +2 -2
  14. package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
  15. package/dist/{Title-BzH_LEA3.js → Title-DfFUb9hd.js} +1 -1
  16. package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
  17. package/dist/{UserOptions-CGnQt6Fd.js → UserOptions-B3I-s3Lw.js} +2 -2
  18. package/dist/components/arrow.js +1 -1
  19. package/dist/components/vue-ui-3d-bar.js +3 -3
  20. package/dist/components/vue-ui-accordion.js +1 -1
  21. package/dist/components/vue-ui-age-pyramid.js +3 -3
  22. package/dist/components/vue-ui-annotator.js +1 -1
  23. package/dist/components/vue-ui-bullet.js +3 -3
  24. package/dist/components/vue-ui-candlestick.js +3 -3
  25. package/dist/components/vue-ui-carousel-table.js +1 -1
  26. package/dist/components/vue-ui-chestnut.js +3 -3
  27. package/dist/components/vue-ui-chord.js +3 -3
  28. package/dist/components/vue-ui-circle-pack.js +3 -3
  29. package/dist/components/vue-ui-cursor.js +1 -1
  30. package/dist/components/vue-ui-dashboard.js +1 -1
  31. package/dist/components/vue-ui-digits.js +1 -1
  32. package/dist/components/vue-ui-donut-evolution.js +2 -2
  33. package/dist/components/vue-ui-donut.js +3 -3
  34. package/dist/components/vue-ui-dumbbell.js +3 -3
  35. package/dist/components/vue-ui-flow.js +3 -3
  36. package/dist/components/vue-ui-funnel.js +2 -2
  37. package/dist/components/vue-ui-galaxy.js +1 -1
  38. package/dist/components/vue-ui-gauge.js +1 -1
  39. package/dist/components/vue-ui-gizmo.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-history-plot.js +3 -3
  42. package/dist/components/vue-ui-horizontal-bar.js +3 -3
  43. package/dist/components/vue-ui-icon.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-mini-loader.js +1 -1
  46. package/dist/components/vue-ui-molecule.js +3 -3
  47. package/dist/components/vue-ui-mood-radar.js +3 -3
  48. package/dist/components/vue-ui-nested-donuts.js +2 -2
  49. package/dist/components/vue-ui-onion.js +3 -3
  50. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  51. package/dist/components/vue-ui-quadrant.js +3 -3
  52. package/dist/components/vue-ui-quick-chart.js +3 -3
  53. package/dist/components/vue-ui-radar.js +3 -3
  54. package/dist/components/vue-ui-rating.js +1 -1
  55. package/dist/components/vue-ui-relation-circle.js +3 -3
  56. package/dist/components/vue-ui-ridgeline.js +3 -3
  57. package/dist/components/vue-ui-rings.js +3 -3
  58. package/dist/components/vue-ui-scatter.js +3 -3
  59. package/dist/components/vue-ui-skeleton.js +1 -1
  60. package/dist/components/vue-ui-smiley.js +1 -1
  61. package/dist/components/vue-ui-spark-trend.js +1 -1
  62. package/dist/components/vue-ui-sparkbar.js +2 -2
  63. package/dist/components/vue-ui-sparkgauge.js +3 -3
  64. package/dist/components/vue-ui-sparkhistogram.js +3 -3
  65. package/dist/components/vue-ui-sparkline.js +3 -3
  66. package/dist/components/vue-ui-sparkstackbar.js +2 -2
  67. package/dist/components/vue-ui-stackbar.js +3 -3
  68. package/dist/components/vue-ui-stackline.js +5 -0
  69. package/dist/components/vue-ui-strip-plot.js +3 -3
  70. package/dist/components/vue-ui-table-heatmap.js +1 -1
  71. package/dist/components/vue-ui-table-sparkline.js +2 -2
  72. package/dist/components/vue-ui-table.js +1 -1
  73. package/dist/components/vue-ui-thermometer.js +3 -3
  74. package/dist/components/vue-ui-timer.js +1 -1
  75. package/dist/components/vue-ui-tiremarks.js +2 -2
  76. package/dist/components/vue-ui-treemap.js +3 -3
  77. package/dist/components/vue-ui-vertical-bar.js +1 -1
  78. package/dist/components/vue-ui-waffle.js +2 -2
  79. package/dist/components/vue-ui-wheel.js +1 -1
  80. package/dist/components/vue-ui-word-cloud.js +3 -3
  81. package/dist/components/vue-ui-world.js +1 -1
  82. package/dist/components/vue-ui-xy-canvas.js +3 -3
  83. package/dist/components/vue-ui-xy.js +3 -3
  84. package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
  85. package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
  86. package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
  87. package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/types/vue-data-ui.d.ts +303 -9
  90. package/dist/types/vue-ui-stackline.d.ts +18 -0
  91. package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
  92. package/dist/{useNestedProp-CReNavA0.js → useNestedProp-CWo6bftQ.js} +535 -329
  93. package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
  94. package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
  95. package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
  96. package/dist/{vue-data-ui-BRaq4hRp.js → vue-data-ui-ByLTJx5V.js} +79 -77
  97. package/dist/vue-data-ui.js +226 -204
  98. package/dist/{vue-ui-3d-bar-BB4ii8Nt.js → vue-ui-3d-bar-Dkds4k5N.js} +546 -517
  99. package/dist/{vue-ui-accordion-BmFTVF1a.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
  100. package/dist/vue-ui-age-pyramid-C-fwZRYE.js +960 -0
  101. package/dist/{vue-ui-annotator-CcpaXBNK.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
  102. package/dist/vue-ui-bullet-BKVJRjGh.js +657 -0
  103. package/dist/{vue-ui-candlestick-CMP7UL6z.js → vue-ui-candlestick-BKFWHU4O.js} +596 -561
  104. package/dist/{vue-ui-carousel-table-CzOcKsDj.js → vue-ui-carousel-table-VmPH6y2g.js} +48 -48
  105. package/dist/{vue-ui-chestnut-S787oASt.js → vue-ui-chestnut-DpMHe-OI.js} +534 -505
  106. package/dist/vue-ui-chord-Djdr0PY_.js +1182 -0
  107. package/dist/vue-ui-circle-pack-CyUqNJQt.js +832 -0
  108. package/dist/{vue-ui-cursor-C3yD_TUr.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
  109. package/dist/{vue-ui-dashboard-BfEcVRxQ.js → vue-ui-dashboard-eBXj-KCw.js} +140 -140
  110. package/dist/{vue-ui-digits-pRh179Gg.js → vue-ui-digits-D382I0-w.js} +2 -2
  111. package/dist/{vue-ui-donut-B_tEm4dT.js → vue-ui-donut-BLb0kj_P.js} +634 -602
  112. package/dist/vue-ui-donut-evolution-BqrldXpI.js +1243 -0
  113. package/dist/vue-ui-dumbbell-BuZT5a-d.js +1258 -0
  114. package/dist/vue-ui-flow-LLp6ntEP.js +1026 -0
  115. package/dist/vue-ui-funnel-pILUR-OG.js +743 -0
  116. package/dist/vue-ui-galaxy-X6yiw8kx.js +837 -0
  117. package/dist/vue-ui-gauge-DBh-vFb9.js +864 -0
  118. package/dist/{vue-ui-gizmo-BQzQlUJ8.js → vue-ui-gizmo-DtyEukIP.js} +3 -3
  119. package/dist/{vue-ui-heatmap-C9MhHWpp.js → vue-ui-heatmap-mkD6QkXo.js} +501 -466
  120. package/dist/vue-ui-history-plot-CyTaBaxA.js +1239 -0
  121. package/dist/{vue-ui-kpi-jcrPjW4C.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
  122. package/dist/{vue-ui-mini-loader-DTM98mRN.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
  123. package/dist/vue-ui-molecule-UzQ3o5HW.js +782 -0
  124. package/dist/vue-ui-mood-radar-C2zkRLGy.js +930 -0
  125. package/dist/vue-ui-nested-donuts-B5OpvmJ9.js +1454 -0
  126. package/dist/vue-ui-onion-DbhIOGtF.js +944 -0
  127. package/dist/vue-ui-parallel-coordinate-plot-Dv_T4mWW.js +1080 -0
  128. package/dist/{vue-ui-quadrant-CeM23s0z.js → vue-ui-quadrant-CG6_CWsQ.js} +510 -481
  129. package/dist/{vue-ui-quick-chart-C0RMQzjC.js → vue-ui-quick-chart-DOeRhk7r.js} +795 -758
  130. package/dist/vue-ui-radar-DdHa9Hsh.js +1013 -0
  131. package/dist/{vue-ui-rating-tj97undO.js → vue-ui-rating-DtzmtJwF.js} +26 -26
  132. package/dist/vue-ui-relation-circle-B5lL4l9w.js +670 -0
  133. package/dist/vue-ui-ridgeline-3pk4Mlft.js +1302 -0
  134. package/dist/vue-ui-rings-DhyrjrZi.js +884 -0
  135. package/dist/vue-ui-scatter-DKCD70mi.js +1619 -0
  136. package/dist/{vue-ui-skeleton-87TORm6s.js → vue-ui-skeleton-CzzdmraB.js} +3 -3
  137. package/dist/{vue-ui-smiley-B74geHT3.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
  138. package/dist/vue-ui-spark-trend-BMTcxeCT.js +364 -0
  139. package/dist/vue-ui-sparkbar-DVk1JiPL.js +381 -0
  140. package/dist/vue-ui-sparkgauge-Cq9Nw_xu.js +260 -0
  141. package/dist/vue-ui-sparkhistogram-PFHlCE_k.js +411 -0
  142. package/dist/vue-ui-sparkline-BHHwO_cV.js +549 -0
  143. package/dist/vue-ui-sparkstackbar-BosVkkiC.js +470 -0
  144. package/dist/vue-ui-stackbar-Djk5CPUy.js +1867 -0
  145. package/dist/vue-ui-stackline-mU4CSol9.js +1963 -0
  146. package/dist/{vue-ui-strip-plot-C1N2n39d.js → vue-ui-strip-plot-CZQSL0GK.js} +343 -314
  147. package/dist/{vue-ui-table-CcuoPHgI.js → vue-ui-table-DMM090pe.js} +5 -5
  148. package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
  149. package/dist/{vue-ui-table-sparkline-BAxmZRff.js → vue-ui-table-sparkline-CQJc0mJY.js} +292 -263
  150. package/dist/vue-ui-thermometer-D1uxoVeZ.js +613 -0
  151. package/dist/{vue-ui-timer-BVsUQJz_.js → vue-ui-timer-jTnS3ES5.js} +25 -25
  152. package/dist/vue-ui-tiremarks-Bv-oIFVV.js +477 -0
  153. package/dist/vue-ui-treemap-B9MVtunp.js +1359 -0
  154. package/dist/{vue-ui-vertical-bar-B3gfBqD_.js → vue-ui-vertical-bar-BSbDj5qZ.js} +520 -485
  155. package/dist/{vue-ui-waffle-Bhlqo4xM.js → vue-ui-waffle-DIALVfvc.js} +376 -347
  156. package/dist/vue-ui-wheel-aUhrFpGk.js +690 -0
  157. package/dist/vue-ui-word-cloud-DZmMWsUu.js +904 -0
  158. package/dist/{vue-ui-world-C8KVyDim.js → vue-ui-world-CVLlgp2f.js} +57 -57
  159. package/dist/vue-ui-xy-Cy7mOurZ.js +3455 -0
  160. package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
  161. package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
  162. package/package.json +5 -5
  163. package/dist/themes-AUNCOb2G.js +0 -53
  164. package/dist/vue-ui-age-pyramid-8bUepd28.js +0 -933
  165. package/dist/vue-ui-bullet-BvT4scFv.js +0 -630
  166. package/dist/vue-ui-chord-Dl9Y4mcz.js +0 -1153
  167. package/dist/vue-ui-circle-pack-CU09BzOV.js +0 -803
  168. package/dist/vue-ui-donut-evolution-DiGhMwMO.js +0 -1208
  169. package/dist/vue-ui-dumbbell-BlF3CLbN.js +0 -1231
  170. package/dist/vue-ui-flow-BQi5L8mJ.js +0 -991
  171. package/dist/vue-ui-funnel-CM_6Sare.js +0 -716
  172. package/dist/vue-ui-galaxy-BnZA62Li.js +0 -808
  173. package/dist/vue-ui-gauge-DAk72bez.js +0 -835
  174. package/dist/vue-ui-history-plot-BYQh3E8U.js +0 -1204
  175. package/dist/vue-ui-molecule-Bd1OXvl3.js +0 -753
  176. package/dist/vue-ui-mood-radar-DuoiTsYn.js +0 -903
  177. package/dist/vue-ui-nested-donuts-BTswQFjz.js +0 -1419
  178. package/dist/vue-ui-onion-D-1U2Qgl.js +0 -915
  179. package/dist/vue-ui-parallel-coordinate-plot-D-7VFHas.js +0 -1051
  180. package/dist/vue-ui-radar-BSfxyur3.js +0 -984
  181. package/dist/vue-ui-relation-circle-C7uV2mIj.js +0 -641
  182. package/dist/vue-ui-ridgeline-CYMfTlwI.js +0 -1273
  183. package/dist/vue-ui-rings-C96aj57d.js +0 -855
  184. package/dist/vue-ui-scatter-CtvOXUnx.js +0 -1590
  185. package/dist/vue-ui-spark-trend-6_Ibziyv.js +0 -337
  186. package/dist/vue-ui-sparkbar-BDCocMLI.js +0 -352
  187. package/dist/vue-ui-sparkgauge-CQ4Zk9-f.js +0 -233
  188. package/dist/vue-ui-sparkhistogram-BlTV9wfn.js +0 -384
  189. package/dist/vue-ui-sparkline-DWESyiqL.js +0 -514
  190. package/dist/vue-ui-sparkstackbar-DK_7X8mL.js +0 -441
  191. package/dist/vue-ui-stackbar-BWuw8ff4.js +0 -1827
  192. package/dist/vue-ui-table-heatmap-C9EMEM3Z.js +0 -282
  193. package/dist/vue-ui-thermometer-CDrM-WFq.js +0 -584
  194. package/dist/vue-ui-tiremarks-BQH2pNkG.js +0 -450
  195. package/dist/vue-ui-treemap-6WLoCHsH.js +0 -1330
  196. package/dist/vue-ui-wheel-CqHw1WuW.js +0 -663
  197. package/dist/vue-ui-word-cloud-CKuWZGLv.js +0 -875
  198. package/dist/vue-ui-xy-Cz2qIEfi.js +0 -3424
  199. package/dist/vue-ui-xy-canvas-y4h7gEFp.js +0 -1564
@@ -1,584 +0,0 @@
1
- import { useCssVars as Ye, computed as h, defineAsyncComponent as j, ref as d, onMounted as Ee, toRefs as He, watch as Re, createElementBlock as n, openBlock as l, unref as u, normalizeStyle as de, normalizeClass as L, createBlock as N, createCommentVNode as i, withCtx as f, renderSlot as v, normalizeProps as g, guardReactiveProps as p, createSlots as Ve, createVNode as qe, createElementVNode as m, Fragment as Y, renderList as fe, toDisplayString as Ge } from "vue";
2
- import { c as Be, t as De, o as je, f as me, g as Xe, b as Je, p as F, e as Ke, x as k, h as E, X as Qe, s as Ze, a as et, d as tt } from "./lib-C_mNZmhD.js";
3
- import { t as ot, u as st } from "./useResponsive-DfdjqQps.js";
4
- import { u as at, a as ye } from "./useNestedProp-CReNavA0.js";
5
- import { u as lt, B as rt } from "./BaseScanner-BgWxam9d.js";
6
- import { u as nt } from "./usePrinter-DTzqpYKF.js";
7
- import { u as ut } from "./useSvgExport-DrjCWun4.js";
8
- import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
9
- import { u as ct } from "./useChartAccessibility-9icAAmYg.js";
10
- import { u as ht } from "./useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js";
11
- import { t as vt } from "./themes-AUNCOb2G.js";
12
- import dt from "./Title-BzH_LEA3.js";
13
- import ft from "./img-BecE5qXd.js";
14
- import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- const yt = ["id"], gt = {
16
- key: 1,
17
- ref: "noTitle",
18
- class: "vue-data-ui-no-title-space",
19
- style: "height:36px; width: 100%;background:transparent"
20
- }, pt = ["xmlns", "viewBox"], kt = ["width", "height"], bt = ["id"], wt = ["x", "y", "width", "height", "rx", "ry"], xt = ["id"], _t = ["stop-color"], $t = ["stop-color"], Ct = ["stop-color"], At = ["clip-path"], Ot = ["x", "y", "height", "width"], St = ["x", "y", "height", "width", "fill"], Ft = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], It = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Pt = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Tt = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Mt = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], zt = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Ut = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Wt = ["x1", "x2", "y1", "y2", "stroke-width", "stroke"], Lt = ["x", "y", "height", "width"], Nt = { key: 1 }, Yt = ["x", "y", "height"], Et = ["y", "x", "fill", "font-size", "font-weight"], Ht = {
21
- key: 4,
22
- class: "vue-data-ui-watermark"
23
- }, Rt = {
24
- __name: "vue-ui-thermometer",
25
- props: {
26
- dataset: {
27
- type: Object,
28
- default() {
29
- return {};
30
- }
31
- },
32
- config: {
33
- type: Object,
34
- default() {
35
- return {};
36
- }
37
- }
38
- },
39
- setup(I, { expose: ge }) {
40
- Ye((o) => ({
41
- d4c8a8ea: Se.value,
42
- v0a7b4e63: Oe.value,
43
- v9b81bfe0: Ae.value
44
- }));
45
- const pe = j(() => import("./PackageVersion-Y7t79Jtq.js")), ke = j(() => import("./PenAndPaper-SZQIAgkg.js")), be = j(() => import("./UserOptions-CGnQt6Fd.js")), { vue_ui_thermometer: we } = at(), b = I, w = d(Be()), x = d(null), X = d(0), J = d(0), K = d(null), Q = d(null), $ = d(null), P = d(null), xe = h(() => !!b.dataset && Object.keys(b.dataset).length);
46
- Ee(() => {
47
- te();
48
- });
49
- const e = d(q()), _e = d(e.value.style.chart.thermometer.width), H = d(e.value.style.chart.height), R = d(e.value.style.chart.width), { loading: Z, FINAL_DATASET: c } = lt({
50
- ...He(b),
51
- FINAL_CONFIG: e,
52
- prepareConfig: q,
53
- skeletonDataset: { value: 0, from: -100, to: 100, steps: 20, colors: { from: "#A1A1A1", to: "#CACACA" } },
54
- skeletonConfig: De({
55
- defaultConfig: e.value,
56
- userConfig: {
57
- userOptions: { show: !1 },
58
- style: {
59
- chart: {
60
- animation: { use: !1 },
61
- backgroundColor: "#99999930",
62
- graduations: {
63
- stroke: "#6A6A6A"
64
- }
65
- }
66
- }
67
- }
68
- })
69
- }), ee = h(() => !!e.value.debug);
70
- function te() {
71
- if (je(b.dataset) ? me({
72
- componentName: "VueUiThermometer",
73
- type: "dataset",
74
- debug: ee.value
75
- }) : Xe({
76
- datasetObject: b.dataset,
77
- requiredAttributes: ["value", "from", "to"]
78
- }).forEach((o) => {
79
- me({
80
- componentName: "VueUiThermometer",
81
- type: "datasetAttribute",
82
- property: o,
83
- debug: ee.value
84
- });
85
- }), e.value.responsive) {
86
- const o = ot(() => {
87
- const { width: a, height: t } = st({
88
- chart: x.value,
89
- title: e.value.style.title.text ? K.value : null,
90
- source: Q.value
91
- });
92
- requestAnimationFrame(() => {
93
- H.value = Math.max(0.1, t - 12), R.value = a, he();
94
- });
95
- });
96
- $.value && (P.value && $.value.unobserve(P.value), $.value.disconnect()), $.value = new ResizeObserver(o), P.value = x.value, $.value.observe(P.value);
97
- }
98
- he();
99
- }
100
- const { userOptionsVisible: V, setUserOptionsVisibility: oe, keepUserOptionState: se } = it({ config: e.value }), { svgRef: T } = ct({ config: e.value.style.title });
101
- function q() {
102
- const o = ye({
103
- userConfig: b.config,
104
- defaultConfig: we
105
- });
106
- return o.theme ? {
107
- ...ye({
108
- userConfig: vt.vue_ui_thermometer[o.theme] || b.config,
109
- defaultConfig: o
110
- }),
111
- customPalette: Je[o.theme] || F
112
- } : o;
113
- }
114
- Re(() => b.config, (o) => {
115
- e.value = q(), V.value = !e.value.userOptions.showOnChartHover, _e.value = e.value.style.chart.thermometer.width, H.value = e.value.style.chart.height, R.value = e.value.style.chart.width, te(), J.value += 1;
116
- }, { deep: !0 });
117
- const { isPrinting: ae, isImaging: le, generatePdf: re, generateImage: ne } = nt({
118
- elementId: `thermometer__${w.value}`,
119
- fileName: e.value.style.title.text || "vue-ui-thermometer",
120
- options: e.value.userOptions.print
121
- }), $e = h(() => e.value.userOptions.show && !e.value.style.title.text), M = h(() => Ke(e.value.customPalette)), y = h(() => c.value.steps || 10);
122
- function z(o, a, t) {
123
- const r = [], _ = ue(o), O = ue(a);
124
- for (let S = 0; S < t; S++) {
125
- const Ue = G(_.red, O.red, S, t), We = G(_.green, O.green, S, t), Le = G(_.blue, O.blue, S, t), Ne = `#${B(Ue)}${B(We)}${B(Le)}`;
126
- r.push(Ne);
127
- }
128
- return r;
129
- }
130
- function ue(o) {
131
- const a = o.slice(1);
132
- return {
133
- red: parseInt(a.slice(0, 2), 16),
134
- green: parseInt(a.slice(2, 4), 16),
135
- blue: parseInt(a.slice(4, 6), 16)
136
- };
137
- }
138
- function G(o, a, t, r) {
139
- return Math.round(o + (a - o) * t / r);
140
- }
141
- function B(o) {
142
- return o.toString(16).padStart(2, "0");
143
- }
144
- const s = h(() => {
145
- const o = Math.max(0.1, R.value), a = Math.max(0.1, H.value), t = e.value.style.chart.padding;
146
- return {
147
- width: o,
148
- left: o / 2 - e.value.style.chart.thermometer.width / 2,
149
- right: o / 2 + e.value.style.chart.thermometer.width / 2,
150
- top: t.top,
151
- bottom: a - t.bottom - t.top,
152
- height: a,
153
- thermoHeight: a - t.top - t.bottom,
154
- thermoWidth: e.value.style.chart.thermometer.width
155
- };
156
- }), Ce = h(() => s.value), U = h(() => {
157
- const o = k(c.value.from) < 0 ? Math.abs(k(c.value.from)) : k(c.value.from), a = k(c.value.to) < 0 ? Math.abs(k(c.value.to)) : k(c.value.to);
158
- let t = 0;
159
- return k(c.value.to) > 0 ? t = o + a : o > a ? t = o - a : t = a - o, (1 - (Math.abs(k(c.value.from)) + k(c.value.value)) / t) * s.value.thermoHeight;
160
- }), Ae = h(() => `${U.value}px`), Oe = h(() => `${s.value.thermoHeight}px`), Se = h(() => `${e.value.style.chart.animation.speedMs}ms`), Fe = h(() => {
161
- if (c.value.colors) {
162
- if (!c.value.colors.from)
163
- return z(M.value[0] || F[0], E(c.value.colors.to), y.value || 10);
164
- if (!c.value.colors.to)
165
- return z(E(c.value.colors.from), M.value[1] || F[1], y.value || 10);
166
- } else
167
- return z(M.value[1] || F[1], M.value[0] || F[0], y.value || 10);
168
- return z(E(c.value.colors.from), E(c.value.colors.to), y.value || 10);
169
- }), ie = h(() => {
170
- const o = [];
171
- let a = 0;
172
- const t = s.value.thermoHeight;
173
- for (let r = 0; r < t - 1; r += t / y.value)
174
- o.push({
175
- x: s.value.left,
176
- y: s.value.top + r,
177
- qYLess: s.value.top + r + t / y.value / 4,
178
- halfY: s.value.top + r + t / y.value / 2,
179
- qYMore: s.value.top + r + t / y.value / 4 * 3,
180
- color: Fe.value[a],
181
- height: Math.max(0.1, t / y.value)
182
- }), a += 1;
183
- return o;
184
- }), C = d(!1);
185
- function ce(o) {
186
- C.value = o, X.value += 1;
187
- }
188
- const W = d(!1);
189
- function D() {
190
- W.value = !W.value;
191
- }
192
- async function Ie({ scale: o = 2 } = {}) {
193
- if (!x.value) return;
194
- const { width: a, height: t } = x.value.getBoundingClientRect(), r = a / t, { imageUri: _, base64: O } = await ft({ domElement: x.value, base64: !0, img: !0, scale: o });
195
- return {
196
- imageUri: _,
197
- base64: O,
198
- title: e.value.style.title.text,
199
- width: a,
200
- height: t,
201
- aspectRatio: r
202
- };
203
- }
204
- const A = h({
205
- get: () => e.value.style.chart.label.fontSize,
206
- set: (o) => o
207
- }), { autoSizeLabels: he } = ht({
208
- svgRef: T,
209
- fontSize: e.value.style.chart.label.fontSize,
210
- minFontSize: e.value.style.chart.label.minFontSize,
211
- sizeRef: A,
212
- labelClass: ".vue-ui-thermometer-label"
213
- }), Pe = h(() => e.value.style.chart.backgroundColor), Te = h(() => e.value.style.title), { exportSvg: Me, getSvg: ze } = ut({
214
- svg: T,
215
- title: Te,
216
- backgroundColor: Pe
217
- });
218
- async function ve({ isCb: o }) {
219
- if (o) {
220
- const { blob: a, url: t, text: r, dataUrl: _ } = await ze();
221
- e.value.userOptions.callbacks.svg({ blob: a, url: t, text: r, dataUrl: _ });
222
- } else
223
- Me();
224
- }
225
- return ge({
226
- getImage: Ie,
227
- generatePdf: re,
228
- generateImage: ne,
229
- generateSvg: ve,
230
- toggleAnnotator: D,
231
- toggleFullscreen: ce
232
- }), (o, a) => (l(), n("div", {
233
- ref_key: "thermoChart",
234
- ref: x,
235
- class: L(`vue-data-ui-component vue-ui-thermometer ${C.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
236
- style: de(`width:100%;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}`),
237
- id: `thermometer__${w.value}`,
238
- onMouseenter: a[0] || (a[0] = () => u(oe)(!0)),
239
- onMouseleave: a[1] || (a[1] = () => u(oe)(!1))
240
- }, [
241
- e.value.userOptions.buttons.annotator ? (l(), N(u(ke), {
242
- key: 0,
243
- svgRef: u(T),
244
- backgroundColor: e.value.style.chart.backgroundColor,
245
- color: e.value.style.chart.color,
246
- active: W.value,
247
- onClose: D
248
- }, {
249
- "annotator-action-close": f(() => [
250
- v(o.$slots, "annotator-action-close", {}, void 0, !0)
251
- ]),
252
- "annotator-action-color": f(({ color: t }) => [
253
- v(o.$slots, "annotator-action-color", g(p({ color: t })), void 0, !0)
254
- ]),
255
- "annotator-action-draw": f(({ mode: t }) => [
256
- v(o.$slots, "annotator-action-draw", g(p({ mode: t })), void 0, !0)
257
- ]),
258
- "annotator-action-undo": f(({ disabled: t }) => [
259
- v(o.$slots, "annotator-action-undo", g(p({ disabled: t })), void 0, !0)
260
- ]),
261
- "annotator-action-redo": f(({ disabled: t }) => [
262
- v(o.$slots, "annotator-action-redo", g(p({ disabled: t })), void 0, !0)
263
- ]),
264
- "annotator-action-delete": f(({ disabled: t }) => [
265
- v(o.$slots, "annotator-action-delete", g(p({ disabled: t })), void 0, !0)
266
- ]),
267
- _: 3
268
- }, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0),
269
- $e.value ? (l(), n("div", gt, null, 512)) : i("", !0),
270
- e.value.style.title.text ? (l(), n("div", {
271
- key: 2,
272
- ref_key: "chartTitle",
273
- ref: K,
274
- style: "width:100%"
275
- }, [
276
- (l(), N(dt, {
277
- key: `title_${J.value}`,
278
- config: {
279
- title: {
280
- cy: "thermometer-div-title",
281
- ...e.value.style.title
282
- },
283
- subtitle: {
284
- cy: "thermometer-div-subtitle",
285
- ...e.value.style.title.subtitle
286
- }
287
- }
288
- }, null, 8, ["config"]))
289
- ], 512)) : i("", !0),
290
- e.value.userOptions.show && xe.value && (u(se) || u(V)) ? (l(), N(u(be), {
291
- ref: "details",
292
- key: `user_options_${X.value}`,
293
- backgroundColor: e.value.style.chart.backgroundColor,
294
- color: e.value.style.chart.color,
295
- isImaging: u(le),
296
- isPrinting: u(ae),
297
- uid: w.value,
298
- hasPdf: e.value.userOptions.buttons.pdf,
299
- hasImg: e.value.userOptions.buttons.img,
300
- hasSvg: e.value.userOptions.buttons.svg,
301
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
302
- hasXls: !1,
303
- isFullscreen: C.value,
304
- titles: { ...e.value.userOptions.buttonTitles },
305
- chartElement: x.value,
306
- position: e.value.userOptions.position,
307
- hasAnnotator: e.value.userOptions.buttons.annotator,
308
- isAnnotation: W.value,
309
- callbacks: e.value.userOptions.callbacks,
310
- printScale: e.value.userOptions.print.scale,
311
- onToggleFullscreen: ce,
312
- onGeneratePdf: u(re),
313
- onGenerateImage: u(ne),
314
- onGenerateSvg: ve,
315
- onToggleAnnotator: D,
316
- style: de({
317
- visibility: u(se) ? u(V) ? "visible" : "hidden" : "visible"
318
- })
319
- }, Ve({ _: 2 }, [
320
- o.$slots.menuIcon ? {
321
- name: "menuIcon",
322
- fn: f(({ isOpen: t, color: r }) => [
323
- v(o.$slots, "menuIcon", g(p({ isOpen: t, color: r })), void 0, !0)
324
- ]),
325
- key: "0"
326
- } : void 0,
327
- o.$slots.optionPdf ? {
328
- name: "optionPdf",
329
- fn: f(() => [
330
- v(o.$slots, "optionPdf", {}, void 0, !0)
331
- ]),
332
- key: "1"
333
- } : void 0,
334
- o.$slots.optionImg ? {
335
- name: "optionImg",
336
- fn: f(() => [
337
- v(o.$slots, "optionImg", {}, void 0, !0)
338
- ]),
339
- key: "2"
340
- } : void 0,
341
- o.$slots.optionSvg ? {
342
- name: "optionSvg",
343
- fn: f(() => [
344
- v(o.$slots, "optionSvg", {}, void 0, !0)
345
- ]),
346
- key: "3"
347
- } : void 0,
348
- o.$slots.optionFullscreen ? {
349
- name: "optionFullscreen",
350
- fn: f(({ toggleFullscreen: t, isFullscreen: r }) => [
351
- v(o.$slots, "optionFullscreen", g(p({ toggleFullscreen: t, isFullscreen: r })), void 0, !0)
352
- ]),
353
- key: "4"
354
- } : void 0,
355
- o.$slots.optionAnnotator ? {
356
- name: "optionAnnotator",
357
- fn: f(({ toggleAnnotator: t, isAnnotator: r }) => [
358
- v(o.$slots, "optionAnnotator", g(p({ toggleAnnotator: t, isAnnotator: r })), void 0, !0)
359
- ]),
360
- key: "5"
361
- } : void 0
362
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
363
- (l(), n("svg", {
364
- ref_key: "svgRef",
365
- ref: T,
366
- xmlns: u(Qe),
367
- class: L({ "vue-data-ui-fullscreen--on": C.value, "vue-data-ui-fulscreen--off": !C.value }),
368
- width: "100%",
369
- viewBox: `0 0 ${s.value.width} ${s.value.height}`,
370
- style: "background:transparent"
371
- }, [
372
- qe(u(pe)),
373
- o.$slots["chart-background"] ? (l(), n("foreignObject", {
374
- key: 0,
375
- x: 0,
376
- y: 0,
377
- width: s.value.width,
378
- height: s.value.height,
379
- style: {
380
- pointerEvents: "none"
381
- }
382
- }, [
383
- v(o.$slots, "chart-background", {}, void 0, !0)
384
- ], 8, kt)) : i("", !0),
385
- m("defs", null, [
386
- m("clipPath", {
387
- id: `vueUiPill-${w.value}`,
388
- clipPathUnits: "userSpaceOnUse"
389
- }, [
390
- m("rect", {
391
- x: s.value.left,
392
- y: s.value.top,
393
- width: s.value.thermoWidth,
394
- height: s.value.thermoHeight,
395
- rx: s.value.thermoWidth / 2,
396
- ry: s.value.thermoWidth / 2
397
- }, null, 8, wt)
398
- ], 8, bt),
399
- (l(!0), n(Y, null, fe(ie.value, (t, r) => (l(), n("linearGradient", {
400
- id: `vueUiThermometerGradient_${r}_${w.value}`,
401
- x1: "0%",
402
- y1: "0%",
403
- x2: "100%",
404
- y2: "0%"
405
- }, [
406
- m("stop", {
407
- offset: "0%",
408
- "stop-color": t.color
409
- }, null, 8, _t),
410
- m("stop", {
411
- offset: "50%",
412
- "stop-color": u(Ze)(t.color, 100 - e.value.style.chart.graduations.gradient.intensity)
413
- }, null, 8, $t),
414
- m("stop", {
415
- offset: "100%",
416
- "stop-color": t.color
417
- }, null, 8, Ct)
418
- ], 8, xt))), 256))
419
- ]),
420
- m("g", {
421
- "clip-path": `url(#vueUiPill-${w.value})`
422
- }, [
423
- m("rect", {
424
- x: s.value.left,
425
- y: s.value.top,
426
- height: s.value.thermoHeight,
427
- width: s.value.thermoWidth,
428
- fill: "#FFFFFF"
429
- }, null, 8, Ot),
430
- (l(!0), n(Y, null, fe(ie.value, (t, r) => (l(), n("g", {
431
- key: `graduation_${r}`
432
- }, [
433
- m("rect", {
434
- x: t.x,
435
- y: t.y,
436
- height: t.height,
437
- width: s.value.thermoWidth,
438
- fill: e.value.style.chart.graduations.gradient.show ? `url(#vueUiThermometerGradient_${r}_${w.value})` : t.color,
439
- "shape-rendering": "crispEdges"
440
- }, null, 8, St),
441
- e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
442
- key: 0,
443
- x1: t.x,
444
- x2: t.x + 10,
445
- y1: t.y,
446
- y2: t.y,
447
- "stroke-width": e.value.style.chart.graduations.strokeWidth,
448
- stroke: e.value.style.chart.graduations.stroke,
449
- "stroke-linecap": "round"
450
- }, null, 8, Ft)) : i("", !0),
451
- e.value.style.chart.graduations.showIntermediate ? (l(), n(Y, { key: 1 }, [
452
- e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
453
- key: 0,
454
- x1: t.x,
455
- x2: t.x + 5,
456
- y1: t.halfY,
457
- y2: t.halfY,
458
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
459
- stroke: e.value.style.chart.graduations.stroke,
460
- "stroke-linecap": "round"
461
- }, null, 8, It)) : i("", !0),
462
- e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
463
- key: 1,
464
- x1: t.x,
465
- x2: t.x + 2.5,
466
- y1: t.qYLess,
467
- y2: t.qYLess,
468
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
469
- stroke: e.value.style.chart.graduations.stroke,
470
- "stroke-linecap": "round"
471
- }, null, 8, Pt)) : i("", !0),
472
- e.value.style.chart.graduations.show && ["both", "left"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
473
- key: 2,
474
- x1: t.x,
475
- x2: t.x + 2.5,
476
- y1: t.qYMore,
477
- y2: t.qYMore,
478
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
479
- stroke: e.value.style.chart.graduations.stroke,
480
- "stroke-linecap": "round"
481
- }, null, 8, Tt)) : i("", !0)
482
- ], 64)) : i("", !0),
483
- e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
484
- key: 2,
485
- x1: s.value.right,
486
- x2: s.value.right - 10,
487
- y1: t.y,
488
- y2: t.y,
489
- "stroke-width": e.value.style.chart.graduations.strokeWidth,
490
- stroke: e.value.style.chart.graduations.stroke,
491
- "stroke-linecap": "round"
492
- }, null, 8, Mt)) : i("", !0),
493
- e.value.style.chart.graduations.showIntermediate ? (l(), n(Y, { key: 3 }, [
494
- e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
495
- key: 0,
496
- x1: s.value.right,
497
- x2: s.value.right - 5,
498
- y1: t.halfY,
499
- y2: t.halfY,
500
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
501
- stroke: e.value.style.chart.graduations.stroke,
502
- "stroke-linecap": "round"
503
- }, null, 8, zt)) : i("", !0),
504
- e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
505
- key: 1,
506
- x1: s.value.right,
507
- x2: s.value.right - 2.5,
508
- y1: t.qYLess,
509
- y2: t.qYLess,
510
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
511
- stroke: e.value.style.chart.graduations.stroke,
512
- "stroke-linecap": "round"
513
- }, null, 8, Ut)) : i("", !0),
514
- e.value.style.chart.graduations.show && ["both", "right"].includes(e.value.style.chart.graduations.sides) ? (l(), n("line", {
515
- key: 2,
516
- x1: s.value.right,
517
- x2: s.value.right - 2.5,
518
- y1: t.qYMore,
519
- y2: t.qYMore,
520
- "stroke-width": e.value.style.chart.graduations.strokeWidth / 2,
521
- stroke: e.value.style.chart.graduations.stroke,
522
- "stroke-linecap": "round"
523
- }, null, 8, Wt)) : i("", !0)
524
- ], 64)) : i("", !0)
525
- ]))), 128)),
526
- m("rect", {
527
- class: L({ "vue-ui-thermometer-temperature": e.value.style.chart.animation.use }),
528
- x: s.value.left,
529
- y: s.value.top,
530
- height: U.value,
531
- width: s.value.thermoWidth,
532
- fill: "#FFFFFF66"
533
- }, null, 10, Lt)
534
- ], 8, At),
535
- e.value.style.chart.label.show ? (l(), n("g", Nt, [
536
- u(Z) ? (l(), n("rect", {
537
- key: 0,
538
- x: s.value.left - 60,
539
- y: U.value + s.value.top - A.value / 2,
540
- width: 50,
541
- height: A.value,
542
- fill: "#6A6A6A40",
543
- rx: "3"
544
- }, null, 8, Yt)) : (l(), n("text", {
545
- key: 1,
546
- class: L({ "vue-ui-thermometer-temperature-value": e.value.style.chart.animation.use, "vue-ui-thermometer-label": !0 }),
547
- y: U.value + s.value.top + A.value / 3,
548
- x: s.value.left - 10,
549
- "text-anchor": "end",
550
- fill: e.value.style.chart.label.color,
551
- "font-size": A.value,
552
- "font-weight": e.value.style.chart.label.bold ? "bold" : "normal"
553
- }, Ge(u(et)(
554
- e.value.style.chart.label.formatter,
555
- I.dataset.value,
556
- u(tt)({
557
- p: e.value.style.chart.label.prefix,
558
- v: I.dataset.value,
559
- s: e.value.style.chart.label.suffix,
560
- r: e.value.style.chart.label.rounding
561
- }),
562
- { datapoint: I.dataset }
563
- )), 11, Et))
564
- ])) : i("", !0),
565
- v(o.$slots, "svg", { svg: Ce.value }, void 0, !0)
566
- ], 10, pt)),
567
- o.$slots.watermark ? (l(), n("div", Ht, [
568
- v(o.$slots, "watermark", g(p({ isPrinting: u(ae) || u(le) })), void 0, !0)
569
- ])) : i("", !0),
570
- o.$slots.source ? (l(), n("div", {
571
- key: 5,
572
- ref_key: "source",
573
- ref: Q,
574
- dir: "auto"
575
- }, [
576
- v(o.$slots, "source", {}, void 0, !0)
577
- ], 512)) : i("", !0),
578
- u(Z) ? (l(), N(rt, { key: 6 })) : i("", !0)
579
- ], 46, yt));
580
- }
581
- }, so = /* @__PURE__ */ mt(Rt, [["__scopeId", "data-v-48fbf700"]]);
582
- export {
583
- so as default
584
- };