vue-data-ui 2.4.52 → 2.4.53

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 (151) hide show
  1. package/dist/{Arrow-CFlFdPC5.cjs → Arrow-BGjtcB03.cjs} +1 -1
  2. package/dist/{Arrow-BuBoE64l.js → Arrow-XbzVXHDF.js} +1 -1
  3. package/dist/{BaseIcon-zmxwsaLW.js → BaseIcon-CiQzR1fE.js} +1 -1
  4. package/dist/{BaseIcon-CfhoS_qC.cjs → BaseIcon-DGRZS55E.cjs} +1 -1
  5. package/dist/{DataTable-CwAdpLng.cjs → DataTable-DWQiMziO.cjs} +1 -1
  6. package/dist/{DataTable-COkA4Nyz.js → DataTable-jvL0XGWl.js} +2 -2
  7. package/dist/{Legend-CR9ydX8N.cjs → Legend-BstxUr4T.cjs} +1 -1
  8. package/dist/{Legend-bYlSC7I7.js → Legend-DcIfRSNC.js} +1 -1
  9. package/dist/{PackageVersion-C1F3QLoY.cjs → PackageVersion-CeJ2R9gK.cjs} +1 -1
  10. package/dist/{PackageVersion-Dz3KcTL4.js → PackageVersion-Ve0s76sL.js} +1 -1
  11. package/dist/{PenAndPaper-DDheVRNG.cjs → PenAndPaper-DQPbe0G_.cjs} +1 -1
  12. package/dist/{PenAndPaper-BycdTwSP.js → PenAndPaper-IHG7xTmx.js} +3 -3
  13. package/dist/{Shape-BBp5EwJH.cjs → Shape-Bzx4qKcd.cjs} +1 -1
  14. package/dist/{Shape-BDJJ38uM.js → Shape-Rg6yW7m3.js} +1 -1
  15. package/dist/{Slicer-D_DaIThC.js → Slicer-CP2Z31Lc.js} +2 -2
  16. package/dist/{Slicer-7oTpm-cZ.cjs → Slicer-CPp7_WWa.cjs} +1 -1
  17. package/dist/{Title-B7ruS8yl.cjs → Title-CSyDhu3S.cjs} +1 -1
  18. package/dist/{Title-aMb2ETf7.js → Title-DLo3Zo2_.js} +1 -1
  19. package/dist/{Tooltip-BRZ3DT4p.js → Tooltip-CA1QhFeE.js} +1 -1
  20. package/dist/{Tooltip-BqSN71SL.cjs → Tooltip-D88h1zvE.cjs} +1 -1
  21. package/dist/{index-BkXYJDpD.cjs → index-C3wsuQ2C.cjs} +1 -1
  22. package/dist/{index-K5uyh1gA.js → index-DhxnZ6ZS.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-DifqJZAs.js → useNestedProp-BcqToEU0.js} +1 -1
  25. package/dist/{useNestedProp-C6IvqE-r.cjs → useNestedProp-CFwQtnNB.cjs} +1 -1
  26. package/dist/{usePrinter-DHv-BwME.cjs → usePrinter-Dglf1bsw.cjs} +1 -1
  27. package/dist/{usePrinter-p_ZZlGc9.js → usePrinter-mDGfOQZA.js} +1 -1
  28. package/dist/{vue-data-ui-M0E2b8Dw.cjs → vue-data-ui-BM5qFlPf.cjs} +1 -1
  29. package/dist/{vue-data-ui-3PlAeIlX.js → vue-data-ui-C6tJVggL.js} +60 -60
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-PrijRaoI.js → vue-ui-3d-bar-BFzCyxbR.js} +9 -9
  33. package/dist/{vue-ui-3d-bar-VQyMytda.cjs → vue-ui-3d-bar-DiL5x37F.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-CsJT7Az3.js → vue-ui-accordion-DDp8hUlk.js} +3 -3
  35. package/dist/{vue-ui-accordion-kr18wKfc.cjs → vue-ui-accordion-kv5FuXqU.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-DFYykOow.js → vue-ui-age-pyramid-ORFLMq65.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-BV1MgH8J.cjs → vue-ui-age-pyramid-xYMc6DPS.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-Blg3LdqF.js → vue-ui-annotator-CYyuSx8D.js} +1 -1
  39. package/dist/{vue-ui-annotator-DffUZR4a.cjs → vue-ui-annotator-J_Ssv585.cjs} +1 -1
  40. package/dist/{vue-ui-bullet-DSampkai.cjs → vue-ui-bullet-BbOqOHbK.cjs} +1 -1
  41. package/dist/{vue-ui-bullet-Ybz4qPWl.js → vue-ui-bullet-D8w5qQKc.js} +8 -8
  42. package/dist/{vue-ui-candlestick-DsVBdCz_.js → vue-ui-candlestick-B7jJlgII.js} +11 -11
  43. package/dist/{vue-ui-candlestick-BxcwK8UI.cjs → vue-ui-candlestick-BbKj6Lt5.cjs} +1 -1
  44. package/dist/{vue-ui-carousel-table-C2ThrWYt.js → vue-ui-carousel-table-3ntrCePt.js} +4 -4
  45. package/dist/{vue-ui-carousel-table-DkWNe0mJ.cjs → vue-ui-carousel-table-Cazhvs3E.cjs} +1 -1
  46. package/dist/{vue-ui-chestnut-Cw8LKuZG.cjs → vue-ui-chestnut-DyFTfNZi.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-BacH0ZYK.js → vue-ui-chestnut-apUInPn_.js} +8 -8
  48. package/dist/{vue-ui-cursor-CMKSCQ-v.js → vue-ui-cursor-CFTO66GQ.js} +2 -2
  49. package/dist/{vue-ui-cursor-D2kQNFWy.cjs → vue-ui-cursor-CsNO0-Tw.cjs} +1 -1
  50. package/dist/{vue-ui-dashboard-9PYl4mWC.js → vue-ui-dashboard-C-pDSWwi.js} +2 -2
  51. package/dist/{vue-ui-dashboard-BHwlhK33.cjs → vue-ui-dashboard-DddJvm7i.cjs} +1 -1
  52. package/dist/{vue-ui-digits-2yacgzrJ.cjs → vue-ui-digits-DSqN9pA7.cjs} +1 -1
  53. package/dist/{vue-ui-digits-CyTjq_oN.js → vue-ui-digits-DWAbSFx3.js} +2 -2
  54. package/dist/{vue-ui-donut-BxLlCBhU.js → vue-ui-donut-DSeDfu4H.js} +11 -11
  55. package/dist/{vue-ui-donut-BNv1eGiu.cjs → vue-ui-donut-DrAes-Cb.cjs} +1 -1
  56. package/dist/{vue-ui-donut-evolution-DGjHfyq8.cjs → vue-ui-donut-evolution-CYtTDj7r.cjs} +1 -1
  57. package/dist/{vue-ui-donut-evolution-Bw9hfwuO.js → vue-ui-donut-evolution-D7h33-ti.js} +11 -11
  58. package/dist/{vue-ui-dumbbell-CjHcgzti.cjs → vue-ui-dumbbell-DAK7iUrl.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-D0PjpD19.js → vue-ui-dumbbell-LF5uy2pG.js} +10 -10
  60. package/dist/{vue-ui-flow-BuTJcn6b.js → vue-ui-flow-ClPKB4R5.js} +9 -9
  61. package/dist/{vue-ui-flow-Dc-KV4a3.cjs → vue-ui-flow-u3UVnWTH.cjs} +1 -1
  62. package/dist/{vue-ui-funnel-CxO1aav3.js → vue-ui-funnel-BIXUXI8z.js} +8 -8
  63. package/dist/{vue-ui-funnel-QQGqK4OD.cjs → vue-ui-funnel-BY7rqfpW.cjs} +1 -1
  64. package/dist/{vue-ui-galaxy-B2uwYVgz.js → vue-ui-galaxy-CEnGrqn3.js} +11 -11
  65. package/dist/{vue-ui-galaxy-CABgAX76.cjs → vue-ui-galaxy-DBnbXO8c.cjs} +1 -1
  66. package/dist/{vue-ui-gauge-CqhJx__t.js → vue-ui-gauge-C7Qchm0R.js} +7 -7
  67. package/dist/{vue-ui-gauge-CTEPbzWe.cjs → vue-ui-gauge-CJYWRyeq.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo-DlQOItIS.cjs → vue-ui-gizmo-C9_Ciat_.cjs} +1 -1
  69. package/dist/{vue-ui-gizmo-D7G-8Al-.js → vue-ui-gizmo-CKZRt29V.js} +3 -3
  70. package/dist/{vue-ui-heatmap-DLNzJh--.js → vue-ui-heatmap-BlbOJnS0.js} +10 -10
  71. package/dist/{vue-ui-heatmap-BOwY6qNR.cjs → vue-ui-heatmap-olBNo_Ui.cjs} +1 -1
  72. package/dist/{vue-ui-history-plot-CH2mN74k.js → vue-ui-history-plot-CBpL_OyR.js} +11 -11
  73. package/dist/{vue-ui-history-plot-EiYWpITj.cjs → vue-ui-history-plot-Cyd53pxt.cjs} +1 -1
  74. package/dist/{vue-ui-kpi-Cb3fLQlS.js → vue-ui-kpi-C2XDua17.js} +3 -3
  75. package/dist/{vue-ui-kpi-DB00TrXv.cjs → vue-ui-kpi-CkcQ40VT.cjs} +1 -1
  76. package/dist/{vue-ui-mini-loader-DAaZwOTE.cjs → vue-ui-mini-loader-CpeOqmXd.cjs} +1 -1
  77. package/dist/{vue-ui-mini-loader-Czn2u6m3.js → vue-ui-mini-loader-DXF2Zpi6.js} +2 -2
  78. package/dist/{vue-ui-molecule-BAwzIU19.js → vue-ui-molecule-ekgpnwl8.js} +11 -11
  79. package/dist/{vue-ui-molecule-DZ6Z4eru.cjs → vue-ui-molecule-qQjh4AkD.cjs} +1 -1
  80. package/dist/{vue-ui-mood-radar-BXOWHB57.js → vue-ui-mood-radar-CV30YU_f.js} +11 -11
  81. package/dist/{vue-ui-mood-radar-BL3vQzMq.cjs → vue-ui-mood-radar-KoW8hhxL.cjs} +1 -1
  82. package/dist/{vue-ui-nested-donuts-D1EF5IEw.cjs → vue-ui-nested-donuts-AkaYvLCi.cjs} +1 -1
  83. package/dist/{vue-ui-nested-donuts-F1pwFa1Y.js → vue-ui-nested-donuts-DZ_eS-bB.js} +11 -11
  84. package/dist/{vue-ui-onion-nA8sXxh-.cjs → vue-ui-onion-Bl1UUCFU.cjs} +1 -1
  85. package/dist/{vue-ui-onion-C9dEaRbc.js → vue-ui-onion-YfHn7AeD.js} +11 -11
  86. package/dist/{vue-ui-parallel-coordinate-plot-Cgc8JHMy.js → vue-ui-parallel-coordinate-plot-BEqbS5A6.js} +12 -12
  87. package/dist/{vue-ui-parallel-coordinate-plot-DL4DOhyh.cjs → vue-ui-parallel-coordinate-plot-Dv_UD2bi.cjs} +1 -1
  88. package/dist/{vue-ui-quadrant-C_hJHr9T.js → vue-ui-quadrant-BU_pD15l.js} +12 -12
  89. package/dist/{vue-ui-quadrant-DJGxKeBq.cjs → vue-ui-quadrant-DO6afeTp.cjs} +1 -1
  90. package/dist/{vue-ui-quick-chart-C5v_8Kpw.cjs → vue-ui-quick-chart-ByDBV3lo.cjs} +1 -1
  91. package/dist/{vue-ui-quick-chart-D4k-zSan.js → vue-ui-quick-chart-U-1paiOI.js} +9 -9
  92. package/dist/{vue-ui-radar-WKQ-TavD.js → vue-ui-radar-B5FUXS1e.js} +12 -12
  93. package/dist/{vue-ui-radar-BeGVGueh.cjs → vue-ui-radar-DLsIiPBR.cjs} +1 -1
  94. package/dist/{vue-ui-rating-DI3L8UYN.cjs → vue-ui-rating-D4-ebrWA.cjs} +1 -1
  95. package/dist/{vue-ui-rating-BrSnMkzF.js → vue-ui-rating-DcCUrP6L.js} +2 -2
  96. package/dist/{vue-ui-relation-circle-DzZ5H4og.js → vue-ui-relation-circle-2i7B4Yf-.js} +7 -7
  97. package/dist/{vue-ui-relation-circle-BJ_TOhIp.cjs → vue-ui-relation-circle-jPx6gmw1.cjs} +1 -1
  98. package/dist/{vue-ui-rings-1qwg2E0O.cjs → vue-ui-rings-6JF72UH8.cjs} +1 -1
  99. package/dist/{vue-ui-rings-43dY-4_7.js → vue-ui-rings-DG0DQD21.js} +11 -11
  100. package/dist/{vue-ui-scatter-cTK10i0K.cjs → vue-ui-scatter-CfbMuDQy.cjs} +1 -1
  101. package/dist/{vue-ui-scatter-q6Sfqa4W.js → vue-ui-scatter-j6SU-TUb.js} +12 -12
  102. package/dist/{vue-ui-screenshot-CEy169Mc.js → vue-ui-screenshot-B6hhgFz_.js} +1 -1
  103. package/dist/{vue-ui-screenshot-gOGGT_ti.cjs → vue-ui-screenshot-BKfP266_.cjs} +1 -1
  104. package/dist/{vue-ui-skeleton-BTN1PKkz.cjs → vue-ui-skeleton-99lBQ_mF.cjs} +1 -1
  105. package/dist/{vue-ui-skeleton-BhA2lIT6.js → vue-ui-skeleton-pdtGfiV6.js} +3 -3
  106. package/dist/{vue-ui-smiley-BIEXWWWa.cjs → vue-ui-smiley-8UembS7P.cjs} +1 -1
  107. package/dist/{vue-ui-smiley-BAFdctGJ.js → vue-ui-smiley-fOlIEhGS.js} +2 -2
  108. package/dist/{vue-ui-spark-trend-Deg6oJxD.js → vue-ui-spark-trend-BkPSkOrh.js} +5 -5
  109. package/dist/{vue-ui-spark-trend-LqnAP3mZ.cjs → vue-ui-spark-trend-CV5Uq241.cjs} +1 -1
  110. package/dist/{vue-ui-sparkbar-CJR8pSqp.cjs → vue-ui-sparkbar-DUNqm_AP.cjs} +1 -1
  111. package/dist/{vue-ui-sparkbar-Dm393iij.js → vue-ui-sparkbar-qB9reaJo.js} +4 -4
  112. package/dist/{vue-ui-sparkgauge-DpP1XF6C.cjs → vue-ui-sparkgauge-D0hLQuMH.cjs} +1 -1
  113. package/dist/{vue-ui-sparkgauge-WTo7H8eC.js → vue-ui-sparkgauge-Mmm3mt-c.js} +4 -4
  114. package/dist/{vue-ui-sparkhistogram-DNVBeCU9.js → vue-ui-sparkhistogram-9yQ-E0co.js} +5 -5
  115. package/dist/{vue-ui-sparkhistogram-CEvdVaLZ.cjs → vue-ui-sparkhistogram-CuB-M26R.cjs} +1 -1
  116. package/dist/{vue-ui-sparkline-Bcn_JAfC.js → vue-ui-sparkline-D_QkkgS-.js} +4 -4
  117. package/dist/{vue-ui-sparkline-B87AKRMY.cjs → vue-ui-sparkline-Du8Hm28x.cjs} +1 -1
  118. package/dist/{vue-ui-sparkstackbar-DPPTp1Tm.js → vue-ui-sparkstackbar-BDubVDPN.js} +5 -5
  119. package/dist/{vue-ui-sparkstackbar-Cmafq74u.cjs → vue-ui-sparkstackbar-B_I1tmuS.cjs} +1 -1
  120. package/dist/{vue-ui-stackbar-DeFiDh8a.cjs → vue-ui-stackbar-DHnilreT.cjs} +1 -1
  121. package/dist/{vue-ui-stackbar-BeXW23yH.js → vue-ui-stackbar-rNiqr7aF.js} +12 -12
  122. package/dist/{vue-ui-strip-plot-CG-wp65N.js → vue-ui-strip-plot-DPn3qgdB.js} +11 -11
  123. package/dist/{vue-ui-strip-plot-5n6Om5PH.cjs → vue-ui-strip-plot-DlRej1u9.cjs} +1 -1
  124. package/dist/{vue-ui-table-BzuWkWse.js → vue-ui-table-BrZ__Cd2.js} +1 -1
  125. package/dist/{vue-ui-table-Bbfdq7B8.cjs → vue-ui-table-DLcFdjyM.cjs} +1 -1
  126. package/dist/{vue-ui-table-heatmap--Uj5nFcF.cjs → vue-ui-table-heatmap-DIkXPyqe.cjs} +1 -1
  127. package/dist/{vue-ui-table-heatmap-obAYC2HB.js → vue-ui-table-heatmap-DQXI2uPZ.js} +4 -4
  128. package/dist/{vue-ui-table-sparkline-CW0-ubzl.js → vue-ui-table-sparkline-BUNsAEVY.js} +77 -76
  129. package/dist/vue-ui-table-sparkline-BazGMr3R.cjs +1 -0
  130. package/dist/{vue-ui-thermometer-BmgPuIr6.js → vue-ui-thermometer-DMkD9fS8.js} +7 -7
  131. package/dist/{vue-ui-thermometer-DW10BlzG.cjs → vue-ui-thermometer-_gbnwB1j.cjs} +1 -1
  132. package/dist/{vue-ui-timer-CKp_yNVJ.cjs → vue-ui-timer-BTfgxjIc.cjs} +1 -1
  133. package/dist/{vue-ui-timer-6eWSNYld.js → vue-ui-timer-Dv-GSUf1.js} +5 -5
  134. package/dist/{vue-ui-tiremarks-DeEI5TAa.js → vue-ui-tiremarks-CEMrBJPF.js} +7 -7
  135. package/dist/{vue-ui-tiremarks-nb8r7akm.cjs → vue-ui-tiremarks-Ct9y13Sl.cjs} +1 -1
  136. package/dist/{vue-ui-treemap-B54QUZ46.cjs → vue-ui-treemap-D7SBHWJ2.cjs} +1 -1
  137. package/dist/{vue-ui-treemap-tlPZye6M.js → vue-ui-treemap-D8AkLDqM.js} +11 -11
  138. package/dist/{vue-ui-vertical-bar-BIst1a32.js → vue-ui-vertical-bar-BnhysoC9.js} +11 -11
  139. package/dist/{vue-ui-vertical-bar-CCXF79YU.cjs → vue-ui-vertical-bar-_EQI8SXm.cjs} +1 -1
  140. package/dist/{vue-ui-waffle-Dctw-uNI.cjs → vue-ui-waffle-DOhi1BWD.cjs} +1 -1
  141. package/dist/{vue-ui-waffle-iJT4g4Ht.js → vue-ui-waffle-DfRmWfrG.js} +11 -11
  142. package/dist/{vue-ui-wheel-DnCpgZZo.cjs → vue-ui-wheel-BbDtndmW.cjs} +1 -1
  143. package/dist/{vue-ui-wheel-v1_jsNWp.js → vue-ui-wheel-CU6-VBD1.js} +7 -7
  144. package/dist/{vue-ui-word-cloud-BXa6XzUJ.cjs → vue-ui-word-cloud-CRarnngT.cjs} +1 -1
  145. package/dist/{vue-ui-word-cloud-DR8E1ArH.js → vue-ui-word-cloud-CbuHwEkP.js} +10 -10
  146. package/dist/{vue-ui-xy-CvFWhRR-.cjs → vue-ui-xy-BRTegbdr.cjs} +1 -1
  147. package/dist/{vue-ui-xy-canvas-hPcU2SBK.js → vue-ui-xy-canvas-DsTqLLWp.js} +11 -11
  148. package/dist/{vue-ui-xy-canvas-BVw3zOIC.cjs → vue-ui-xy-canvas-hn3ncIFk.cjs} +1 -1
  149. package/dist/{vue-ui-xy-BZ3lbw6i.js → vue-ui-xy-pSvq591u.js} +14 -14
  150. package/package.json +1 -1
  151. package/dist/vue-ui-table-sparkline-Buh41Ovt.cjs +0 -1
@@ -1,12 +1,12 @@
1
- import { useCssVars as Ae, ref as p, computed as k, watch as pe, onMounted as Oe, openBlock as d, createElementBlock as c, normalizeClass as X, unref as i, createElementVNode as f, normalizeStyle as s, toDisplayString as _, createCommentVNode as b, withDirectives as $e, createVNode as $, Fragment as j, renderList as J, createBlock as ze, createSlots as Pe, withCtx as N, renderSlot as z, normalizeProps as De, guardReactiveProps as Ne, nextTick as Fe } from "vue";
2
- import { u as Ve, c as Te, t as We, a as Me, p as F, b as Ee, o as Be, e as fe, g as Ge, $ as Ue, d as Le, i as V, f as T, q as Re, r as He } from "./index-K5uyh1gA.js";
3
- import { u as me } from "./useNestedProp-DifqJZAs.js";
4
- import qe from "./vue-ui-sparkline-Bcn_JAfC.js";
5
- import W from "./BaseIcon-zmxwsaLW.js";
6
- import { u as Xe, U as je, v as Je } from "./usePrinter-p_ZZlGc9.js";
7
- import { u as Ke } from "./useUserOptionState-BIvW1Kz7.js";
8
- import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } }, et = {
1
+ import { useCssVars as Ae, ref as p, computed as _, watch as pe, onMounted as Oe, openBlock as d, createElementBlock as c, normalizeClass as X, unref as i, normalizeStyle as s, createElementVNode as f, toDisplayString as C, createCommentVNode as b, withDirectives as $e, createVNode as $, Fragment as J, renderList as K, createBlock as ze, createSlots as Pe, withCtx as N, renderSlot as z, normalizeProps as De, guardReactiveProps as Ne, nextTick as Fe } from "vue";
2
+ import { u as Ve, c as Te, t as We, a as Me, p as F, b as Ee, o as Be, e as fe, g as Ge, $ as Ue, d as Le, i as V, f as T, q as Re, r as He } from "./index-DhxnZ6ZS.js";
3
+ import { u as me } from "./useNestedProp-BcqToEU0.js";
4
+ import qe from "./vue-ui-sparkline-D_QkkgS-.js";
5
+ import W from "./BaseIcon-CiQzR1fE.js";
6
+ import { u as Xe, U as Je, v as Ke } from "./usePrinter-mDGfOQZA.js";
7
+ import { u as Qe } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const Ze = ["id"], je = { style: { "z-index": "1", "padding-right": "24px" } }, et = {
10
10
  key: 0,
11
11
  style: {
12
12
  display: "flex",
@@ -21,7 +21,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
21
21
  alignItems: "center"
22
22
  }
23
23
  }, at = ["onClick"], lt = ["onClick"], ot = ["data-cell"], nt = ["data-cell", "onPointerenter"], ut = ["data-cell"], st = ["data-cell"], rt = ["data-cell"], it = ["data-cell"], dt = {
24
- key: 0,
24
+ key: 1,
25
25
  ref: "source",
26
26
  dir: "auto"
27
27
  }, vt = {
@@ -41,42 +41,42 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
41
41
  }
42
42
  },
43
43
  setup(ge, { expose: be }) {
44
- const C = ge;
44
+ const x = ge;
45
45
  Ae((t) => ({
46
- "617873c4": t.tdo
46
+ "3c9bf2d3": t.tdo
47
47
  }));
48
- const { vue_ui_table_sparkline: ye } = Ve(), M = p(Te()), K = p(0), E = p(0), B = p(null), e = k({
49
- get: () => Z(),
48
+ const { vue_ui_table_sparkline: ye } = Ve(), M = p(Te()), Q = p(0), E = p(0), B = p(null), e = _({
49
+ get: () => j(),
50
50
  set: (t) => t
51
- }), { userOptionsVisible: G, setUserOptionsVisibility: Q, keepUserOptionState: Y } = Ke({ config: e.value });
52
- function Z() {
51
+ }), { userOptionsVisible: G, setUserOptionsVisibility: Y, keepUserOptionState: Z } = Qe({ config: e.value });
52
+ function j() {
53
53
  const t = me({
54
- userConfig: C.config,
54
+ userConfig: x.config,
55
55
  defaultConfig: ye
56
56
  });
57
57
  return t.theme ? {
58
58
  ...me({
59
- userConfig: We.vue_ui_table_sparkline[t.theme] || C.config,
59
+ userConfig: We.vue_ui_table_sparkline[t.theme] || x.config,
60
60
  defaultConfig: t
61
61
  }),
62
62
  customPalette: Me[t.theme] || F
63
63
  } : t;
64
64
  }
65
- pe(() => C.config, (t) => {
66
- e.value = Z(), G.value = !e.value.showOnChartHover, oe(), E.value += 1;
67
- }, { deep: !0 }), pe(() => C.dataset, (t) => {
65
+ pe(() => x.config, (t) => {
66
+ e.value = j(), G.value = !e.value.showOnChartHover, oe(), E.value += 1;
67
+ }, { deep: !0 }), pe(() => x.dataset, (t) => {
68
68
  m.value = A.value, E.value += 1;
69
69
  }, { deep: !0 });
70
70
  const { isPrinting: ee, isImaging: te, generatePdf: ae, generateImage: le } = Xe({
71
71
  elementId: `table_${M.value}`,
72
72
  fileName: e.value.title.text || "vue-ui-table-sparkline"
73
- }), he = k(() => Ee(e.value.customPalette)), P = p(null), U = p(!1), ke = k(() => e.value.responsiveBreakpoint);
73
+ }), he = _(() => Ee(e.value.customPalette)), P = p(null), U = p(!1), ke = _(() => e.value.responsiveBreakpoint);
74
74
  Oe(() => {
75
75
  oe();
76
76
  });
77
77
  const L = p(e.value.colNames);
78
78
  function oe() {
79
- Be(C.dataset) && fe({
79
+ Be(x.dataset) && fe({
80
80
  componentName: "VueUiTableSparkline",
81
81
  type: "dataset"
82
82
  });
@@ -89,7 +89,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
89
89
  for (let l = 0; l < se.value; l += 1)
90
90
  L.value.push(e.value.colNames[l] || `col ${l}`);
91
91
  }
92
- const ne = k(() => (C.dataset.forEach((t, l) => {
92
+ const ne = _(() => (x.dataset.forEach((t, l) => {
93
93
  Ge({
94
94
  datasetObject: t,
95
95
  requiredAttributes: ["name", "values"]
@@ -101,7 +101,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
101
101
  index: l
102
102
  });
103
103
  });
104
- }), C.dataset.map((t, l) => {
104
+ }), x.dataset.map((t, l) => {
105
105
  const a = (t.values || []).map((v) => isNaN(v) ? 0 : v ?? 0), o = a.reduce((v, r) => v + r, 0), u = o / a.length, n = Ue(a);
106
106
  return {
107
107
  ...t,
@@ -128,7 +128,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
128
128
  orders: a[n]
129
129
  }));
130
130
  }
131
- const A = k(() => _e(ne.value)), m = p(A.value), Ce = k(() => Math.max(...m.value.map((t) => (t.values || []).length))), R = p(void 0), H = p(!1), g = p(void 0), ue = p(1);
131
+ const A = _(() => _e(ne.value)), m = p(A.value), Ce = _(() => Math.max(...m.value.map((t) => (t.values || []).length))), R = p(void 0), H = p(!1), g = p(void 0), ue = p(1);
132
132
  function I() {
133
133
  H.value = !1, g.value = void 0, y.value = void 0, ue.value = 1, O.value.forEach((t) => t.state = 1), w.value = {
134
134
  name: 1,
@@ -153,7 +153,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
153
153
  const v = o.map((r, h) => [h, r]).sort((r, h) => u * (h[1] - r[1])).map((r) => r[0]).map((r) => A.value[r]);
154
154
  m.value = v, E.value += 1;
155
155
  }
156
- const se = k(() => Math.max(...C.dataset.map((t) => (t.values || []).length))), x = k(() => {
156
+ const se = _(() => Math.max(...x.dataset.map((t) => (t.values || []).length))), k = _(() => {
157
157
  let t = L.value.map((a) => ({
158
158
  type: "reg",
159
159
  value: a
@@ -193,11 +193,11 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
193
193
  }
194
194
  const re = p(!1);
195
195
  function Se(t) {
196
- re.value = t, K.value += 1;
196
+ re.value = t, Q.value += 1;
197
197
  }
198
198
  function ie() {
199
199
  Fe(() => {
200
- const t = [e.value.translations.serie].concat(x.value), l = ne.value.map((u, n) => [
200
+ const t = [e.value.translations.serie].concat(k.value), l = ne.value.map((u, n) => [
201
201
  [u.name],
202
202
  u.values,
203
203
  [u.sum],
@@ -222,8 +222,8 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
222
222
  function Ie() {
223
223
  e.value.resetSortOnClickOutside && I();
224
224
  }
225
- const O = k({
226
- get: () => x.value.map((t) => ({ state: 1 })),
225
+ const O = _({
226
+ get: () => k.value.map((t) => ({ state: 1 })),
227
227
  set: (t) => t
228
228
  });
229
229
  return be({
@@ -237,9 +237,32 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
237
237
  class: X({ "vue-ui-responsive": U.value }),
238
238
  style: { overflow: "hidden" },
239
239
  id: `table_${M.value}`,
240
- onMouseenter: l[3] || (l[3] = () => i(Q)(!0)),
241
- onMouseleave: l[4] || (l[4] = () => i(Q)(!1))
240
+ onMouseenter: l[3] || (l[3] = () => i(Y)(!0)),
241
+ onMouseleave: l[4] || (l[4] = () => i(Y)(!1))
242
242
  }, [
243
+ e.value.title.text ? (d(), c("div", {
244
+ key: 0,
245
+ class: "vue-ui-table-sparkline-caption",
246
+ style: s({ backgroundColor: e.value.title.backgroundColor })
247
+ }, [
248
+ f("div", {
249
+ style: s({
250
+ fontSize: `${e.value.title.fontSize}px`,
251
+ fontWeight: e.value.title.bold ? "bold" : "normal",
252
+ color: e.value.title.color,
253
+ textAlign: e.value.title.textAlign
254
+ })
255
+ }, C(e.value.title.text), 5),
256
+ e.value.title.subtitle.text ? (d(), c("div", {
257
+ key: 0,
258
+ style: s({
259
+ fontSize: `${e.value.title.subtitle.fontSize}px`,
260
+ fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
261
+ color: e.value.title.subtitle.color,
262
+ textAlign: e.value.title.textAlign
263
+ })
264
+ }, C(e.value.title.subtitle.text), 5)) : b("", !0)
265
+ ], 4)) : b("", !0),
243
266
  f("div", {
244
267
  style: { overflow: "auto" },
245
268
  onPointerleave: l[2] || (l[2] = (a) => {
@@ -250,29 +273,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
250
273
  class: "vue-ui-data-table",
251
274
  style: s({ fontFamily: e.value.fontFamily, position: "relative" })
252
275
  }, [
253
- e.value.title.text ? (d(), c("caption", {
254
- key: 0,
255
- style: s({ backgroundColor: e.value.title.backgroundColor })
256
- }, [
257
- f("div", {
258
- style: s({
259
- fontSize: `${e.value.title.fontSize}px`,
260
- fontWeight: e.value.title.bold ? "bold" : "normal",
261
- color: e.value.title.color,
262
- textAlign: e.value.title.textAlign
263
- })
264
- }, _(e.value.title.text), 5),
265
- e.value.title.subtitle.text ? (d(), c("div", {
266
- key: 0,
267
- style: s({
268
- fontSize: `${e.value.title.subtitle.fontSize}px`,
269
- fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
270
- color: e.value.title.subtitle.color,
271
- textAlign: e.value.title.textAlign
272
- })
273
- }, _(e.value.title.subtitle.text), 5)) : b("", !0)
274
- ], 4)) : b("", !0),
275
- f("thead", Ze, [
276
+ f("thead", je, [
276
277
  $e((d(), c("tr", {
277
278
  role: "row",
278
279
  class: "vue-ui-data-table__thead-row",
@@ -300,7 +301,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
300
301
  justifyContent: e.value.thead.textAlign
301
302
  })
302
303
  }, [
303
- f("span", null, _(e.value.translations.serie), 1),
304
+ f("span", null, C(e.value.translations.serie), 1),
304
305
  m.value.length > 1 && e.value.sortedSeriesName ? (d(), c("div", et, [
305
306
  f("button", {
306
307
  class: "vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",
@@ -331,17 +332,17 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
331
332
  ])) : b("", !0)
332
333
  ], 4)
333
334
  ], 4),
334
- (d(!0), c(j, null, J(x.value, (a, o) => (d(), c("th", {
335
+ (d(!0), c(J, null, K(k.value, (a, o) => (d(), c("th", {
335
336
  role: "cell",
336
337
  style: s({
337
338
  background: e.value.thead.backgroundColor,
338
339
  border: e.value.thead.outline,
339
340
  textAlign: e.value.thead.textAlign,
340
341
  fontWeight: e.value.thead.bold ? "bold" : "normal",
341
- minWidth: o === x.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
342
- paddingRight: o === x.value.length - 1 && e.value.userOptions.show ? "36px" : ""
342
+ minWidth: o === k.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
343
+ paddingRight: o === k.value.length - 1 && e.value.userOptions.show ? "36px" : ""
343
344
  }),
344
- class: X({ "sticky-col": o === x.value.length - 1 && e.value.showSparklines })
345
+ class: X({ "sticky-col": o === k.value.length - 1 && e.value.showSparklines })
345
346
  }, [
346
347
  f("div", {
347
348
  style: s({
@@ -352,7 +353,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
352
353
  justifyContent: e.value.thead.textAlign
353
354
  })
354
355
  }, [
355
- f("span", null, _(a.value), 1),
356
+ f("span", null, C(a.value), 1),
356
357
  m.value.length > 1 && (de(o) || ve(a)) ? (d(), c("div", tt, [
357
358
  f("button", {
358
359
  class: "vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",
@@ -382,10 +383,10 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
382
383
  ], 8, lt)
383
384
  ])) : b("", !0)
384
385
  ], 4),
385
- e.value.userOptions.show && o === x.value.length - 1 && (i(Y) || i(G)) ? (d(), ze(je, {
386
+ e.value.userOptions.show && o === k.value.length - 1 && (i(Z) || i(G)) ? (d(), ze(Je, {
386
387
  ref_for: !0,
387
388
  ref: "details",
388
- key: `user_option_${K.value}`,
389
+ key: `user_option_${Q.value}`,
389
390
  backgroundColor: e.value.thead.backgroundColor,
390
391
  color: e.value.thead.color,
391
392
  isPrinting: i(ee),
@@ -404,7 +405,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
404
405
  onGenerateImage: i(le),
405
406
  onGenerateCsv: ie,
406
407
  style: s({
407
- visibility: i(Y) ? i(G) ? "visible" : "hidden" : "visible"
408
+ visibility: i(Z) ? i(G) ? "visible" : "hidden" : "visible"
408
409
  })
409
410
  }, Pe({ _: 2 }, [
410
411
  t.$slots.optionPdf ? {
@@ -438,11 +439,11 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
438
439
  ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage", "style"])) : b("", !0)
439
440
  ], 6))), 256))
440
441
  ], 4)), [
441
- [i(Je), Ie]
442
+ [i(Ke), Ie]
442
443
  ])
443
444
  ]),
444
445
  f("tbody", null, [
445
- (d(!0), c(j, null, J(m.value, (a, o) => (d(), c("tr", {
446
+ (d(!0), c(J, null, K(m.value, (a, o) => (d(), c("tr", {
446
447
  role: "row",
447
448
  style: s({
448
449
  backgroundColor: e.value.tbody.backgroundColor,
@@ -476,10 +477,10 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
476
477
  key: 0,
477
478
  style: s({ color: a.color })
478
479
  }, "⬤", 4)) : b("", !0),
479
- f("span", null, _(a.name ?? "-"), 1)
480
+ f("span", null, C(a.name ?? "-"), 1)
480
481
  ], 4)
481
482
  ], 12, ot),
482
- (d(!0), c(j, null, J(Ce.value, (u, n) => (d(), c("td", {
483
+ (d(!0), c(J, null, K(Ce.value, (u, n) => (d(), c("td", {
483
484
  dir: "auto",
484
485
  role: "cell",
485
486
  ref_for: !0,
@@ -492,12 +493,12 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
492
493
  textAlign: e.value.tbody.textAlign,
493
494
  background: S.value !== void 0 && n === S.value ? e.value.tbody.selectedColor.useSerieColor ? `${a.color.length > 7 ? a.color.slice(0, -2) : a.color}33` : e.value.tbody.selectedColor.fallback : ""
494
495
  }),
495
- "data-cell": x.value[n],
496
+ "data-cell": k.value[n] ? k.value[n].value : "",
496
497
  class: "vue-ui-data-table__tbody__td",
497
498
  onPointerenter: (v) => {
498
499
  q.value = o, S.value = n;
499
500
  }
500
- }, _([null, void 0].includes(a.values[n]) ? "-" : i(V)(
501
+ }, C([null, void 0].includes(a.values[n]) ? "-" : i(V)(
501
502
  e.value.formatter,
502
503
  Number(a.values[n]),
503
504
  i(T)({
@@ -520,7 +521,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
520
521
  }),
521
522
  "data-cell": e.value.translations.total,
522
523
  class: "vue-ui-data-table__tbody__td"
523
- }, _(i(V)(
524
+ }, C(i(V)(
524
525
  e.value.formatter,
525
526
  a.sum,
526
527
  i(T)({
@@ -543,7 +544,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
543
544
  }),
544
545
  "data-cell": e.value.translations.average,
545
546
  class: "vue-ui-data-table__tbody__td"
546
- }, _(i(V)(
547
+ }, C(i(V)(
547
548
  e.value.formatter,
548
549
  a.average,
549
550
  i(T)({
@@ -566,7 +567,7 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
566
567
  }),
567
568
  "data-cell": e.value.translations.median,
568
569
  class: "vue-ui-data-table__tbody__td"
569
- }, _(i(V)(
570
+ }, C(i(V)(
570
571
  e.value.formatter,
571
572
  a.median,
572
573
  i(T)({
@@ -638,9 +639,9 @@ const Ye = ["id"], Ze = { style: { "z-index": "1", "padding-right": "24px" } },
638
639
  t.$slots.source ? (d(), c("div", dt, [
639
640
  z(t.$slots, "source", {}, void 0, !0)
640
641
  ], 512)) : b("", !0)
641
- ], 42, Ye));
642
+ ], 42, Ze));
642
643
  }
643
- }, kt = /* @__PURE__ */ Qe(vt, [["__scopeId", "data-v-2264986d"]]);
644
+ }, kt = /* @__PURE__ */ Ye(vt, [["__scopeId", "data-v-507d259d"]]);
644
645
  export {
645
646
  kt as default
646
647
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-C3wsuQ2C.cjs"),Y=require("./useNestedProp-CFwQtnNB.cjs"),de=require("./vue-ui-sparkline-Du8Hm28x.cjs"),x=require("./BaseIcon-DGRZS55E.cjs"),D=require("./usePrinter-Dglf1bsw.cjs"),ce=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],me={style:{"z-index":"1","padding-right":"24px"}},fe={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge=["onClick"],be=["onClick"],ke=["data-cell"],he=["data-cell","onPointerenter"],Se=["data-cell"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we={key:1,ref:"source",dir:"auto"},Ne={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){const y=Z;e.useCssVars(l=>({"3c9bf2d3":l.tdo}));const{vue_ui_table_sparkline:te}=u.useConfig(),w=e.ref(u.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ce.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),le=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),C=e.ref(null),B=e.ref(!1),ae=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const E=e.ref(t.value.colNames);function q(){u.objectIsEmpty(y.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{B.value=a.contentRect.width<ae.value})});C.value&&l.observe(C.value),E.value=[];for(let o=0;o<H.value;o+=1)E.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),s=n/a.length,r=u.calcMedian(a);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||le.value[o]||u.palette[o]||u.palette[o%u.palette.length],sum:n,average:s,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function oe(l){const a=(l[0].values||[]).map((s,r)=>l.map(d=>d.values[r]||[])).map(s=>s.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((s,r)=>({...s,values:s.values||[],orders:a[r]}))}const h=e.computed(()=>oe(G.value)),c=e.ref(h.value),ne=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),I=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),R=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,R.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){re(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),s=a;S.value[o].state=s,R.value=s,o===I.value?I.value=void 0:I.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>s*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const H=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=E.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<H.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function re(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],s=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=s}const b=e.ref(void 0),O=e.ref(void 0);function ue({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!B.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function se(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((s,r)=>[[s.name],s.values,[s.sum],[s.average],[s.median]]),a=[l].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function ie(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",me,[e.withDirectives((e.openBlock(),e.createElementBlock("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,ge),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,be)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),ie]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(s,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,he))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Se)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(de.default,{onHoverIndex:({index:s})=>ue({dataIndex:s,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,xe)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,pe))}},ze=ve._export_sfc(Ne,[["__scopeId","data-v-507d259d"]]);exports.default=ze;
@@ -1,11 +1,11 @@
1
1
  import { useCssVars as me, computed as d, onMounted as ke, ref as g, watch as be, openBlock as l, createElementBlock as n, normalizeClass as P, normalizeStyle as ee, unref as c, createBlock as F, createCommentVNode as i, createSlots as xe, withCtx as I, renderSlot as p, normalizeProps as G, guardReactiveProps as W, createVNode as _e, createElementVNode as v, Fragment as O, renderList as te, toDisplayString as we } from "vue";
2
- import { u as Ce, o as $e, e as se, g as Pe, c as Fe, t as Ie, a as Oe, p as x, b as Ae, v as f, d as A, X as Me, s as Ue, i as Ye, f as Ne } from "./index-K5uyh1gA.js";
3
- import { _ as Se } from "./Title-aMb2ETf7.js";
4
- import { u as Te, U as qe } from "./usePrinter-p_ZZlGc9.js";
5
- import Le from "./vue-ui-skeleton-BhA2lIT6.js";
6
- import { u as oe } from "./useNestedProp-DifqJZAs.js";
7
- import { _ as Ve } from "./PackageVersion-Dz3KcTL4.js";
8
- import { P as Ge } from "./PenAndPaper-BycdTwSP.js";
2
+ import { u as Ce, o as $e, e as se, g as Pe, c as Fe, t as Ie, a as Oe, p as x, b as Ae, v as f, d as A, X as Me, s as Ue, i as Ye, f as Ne } from "./index-DhxnZ6ZS.js";
3
+ import { _ as Se } from "./Title-DLo3Zo2_.js";
4
+ import { u as Te, U as qe } from "./usePrinter-mDGfOQZA.js";
5
+ import Le from "./vue-ui-skeleton-pdtGfiV6.js";
6
+ import { u as oe } from "./useNestedProp-BcqToEU0.js";
7
+ import { _ as Ve } from "./PackageVersion-Ve0s76sL.js";
8
+ import { P as Ge } from "./PenAndPaper-IHG7xTmx.js";
9
9
  import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const ze = ["id"], Be = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkXYJDpD.cjs"),te=require("./Title-B7ruS8yl.cjs"),U=require("./usePrinter-DHv-BwME.cjs"),oe=require("./vue-ui-skeleton-BTN1PKkz.cjs"),Y=require("./useNestedProp-C6IvqE-r.cjs"),le=require("./PackageVersion-C1F3QLoY.cjs"),re=require("./PenAndPaper-DDheVRNG.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},he=["fill"],ve=["id"],me=["stop-color"],pe=["stop-color"],ye=["stop-color"],fe={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],ge=["x","y","height","width","fill"],be=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],Ee=["y","x","fill","font-size","font-weight"],$e={key:5,class:"vue-data-ui-watermark"},Fe={key:6,ref:"source",dir:"auto"},Oe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"47ac6abe":R.value,cafb14e0:D.value,"02502e7d":j.value}));const{vue_ui_thermometer:L}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),E=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:b,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=O(),b.value=!t.value.showOnChartHover,V(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],N=T(l),B=T(n);for(let v=0;v<o;v++){const K=x(N.red,B.red,v,o),Q=x(N.green,B.green,v,o),Z=x(N.blue,B.blue,v,o),ee=`#${C(K)}${C(Q)}${C(Z)}`;u.push(ee)}return u}function T(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function x(l,n,o,u){return Math.round(l+(n-l)*o/u)}function C(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=H.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),n=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${_.value}px`),D=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],c.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],c.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=e.computed(()=>{const l=[];let n=0;const o=a.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:a.value.left,y:a.value.top+u,qYLess:a.value.top+u+o/c.value/4,halfY:a.value.top+u+o/c.value/2,qYMore:a.value.top+u+o/c.value/4*3,color:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,P.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:w}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(F)||e.unref(b))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(b)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",de,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,me),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ye)],8,ve))),256))]),e.createElementVNode("g",fe,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-i.value.top-i.value.bottom,width:a.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,ge),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,be)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,xe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.value.right,x2:a.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Ee),e.renderSlot(l.$slots,"svg",{svg:W.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Se=se._export_sfc(Oe,[["__scopeId","data-v-90584bea"]]);exports.default=Se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C3wsuQ2C.cjs"),te=require("./Title-CSyDhu3S.cjs"),U=require("./usePrinter-Dglf1bsw.cjs"),oe=require("./vue-ui-skeleton-99lBQ_mF.cjs"),Y=require("./useNestedProp-CFwQtnNB.cjs"),le=require("./PackageVersion-CeJ2R9gK.cjs"),re=require("./PenAndPaper-DQPbe0G_.cjs"),ae=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],ue={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ie={key:2,style:"width:100%"},ce=["xmlns","viewBox"],de={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},he=["fill"],ve=["id"],me=["stop-color"],pe=["stop-color"],ye=["stop-color"],fe={"clip-path":"url(#vueUiPill)"},ke=["x","y","height","width"],ge=["x","y","height","width","fill"],be=["x1","x2","y1","y2","stroke-width","stroke"],xe=["x1","x2","y1","y2","stroke-width","stroke"],Ce=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],we=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x","y","height","width"],Ee=["y","x","fill","font-size","font-weight"],$e={key:5,class:"vue-data-ui-watermark"},Fe={key:6,ref:"source",dir:"auto"},Oe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:z}){const s=m;e.useCssVars(l=>({"47ac6abe":R.value,cafb14e0:D.value,"02502e7d":j.value}));const{vue_ui_thermometer:L}=r.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiThermometer",type:"dataset"}):r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{r.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})}const d=e.ref(r.createUid()),g=e.ref(null),P=e.ref(0),E=e.ref(0),t=e.computed({get:()=>O(),set:l=>l}),{userOptionsVisible:b,setUserOptionsVisibility:$,keepUserOptionState:F}=ae.useUserOptionState({config:t.value});function O(){const l=Y.useNestedProp({userConfig:s.config,defaultConfig:L});return l.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_thermometer[l.theme]||s.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>s.config,l=>{t.value=O(),b.value=!t.value.showOnChartHover,V(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:q,generateImage:A}=U.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],N=T(l),B=T(n);for(let v=0;v<o;v++){const K=x(N.red,B.red,v,o),Q=x(N.green,B.green,v,o),Z=x(N.blue,B.blue,v,o),ee=`#${C(K)}${C(Q)}${C(Z)}`;u.push(ee)}return u}function T(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function x(l,n,o,u){return Math.round(l+(n-l)*o/u)}function C(l){return l.toString(16).padStart(2,"0")}const a=e.computed(()=>{const l=H.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>a.value),_=e.computed(()=>{const l=r.checkNaN(s.dataset.from)<0?Math.abs(r.checkNaN(s.dataset.from)):r.checkNaN(s.dataset.from),n=r.checkNaN(s.dataset.to)<0?Math.abs(r.checkNaN(s.dataset.to)):r.checkNaN(s.dataset.to);let o=0;return r.checkNaN(s.dataset.to)>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(r.checkNaN(s.dataset.from))+r.checkNaN(s.dataset.value))/o)*(a.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${_.value}px`),D=e.computed(()=>`${a.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),R=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),X=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||r.palette[0],r.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(r.convertColorToHex(s.dataset.colors.from),p.value[1]||r.palette[1],c.value||10)}else return y(p.value[1]||r.palette[1],p.value[0]||r.palette[0],c.value||10);return y(r.convertColorToHex(s.dataset.colors.from),r.convertColorToHex(s.dataset.colors.to),c.value||10)}),M=e.computed(()=>{const l=[];let n=0;const o=a.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:a.value.left,y:a.value.top+u,qYLess:a.value.top+u+o/c.value/4,halfY:a.value.top+u+o/c.value/2,qYMore:a.value.top+u+o/c.value/4*3,color:X.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function J(l){h.value=l,P.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return z({generatePdf:q,generateImage:A,toggleAnnotator:w}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:g,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",ue,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(F)||e.unref(b))?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(A),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(b)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${a.value.width} ${a.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",de,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,me),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(r.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ye)],8,ve))),256))]),e.createElementVNode("g",fe,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top,height:a.value.height-i.value.top-i.value.bottom,width:a.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ke),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,ge),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,be)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,xe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.value.right,x2:a.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.value.right,x2:a.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:a.value.left,y:a.value.top,height:_.value,width:a.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Pe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:_.value+a.value.top+t.value.style.chart.label.fontSize/3,x:a.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(r.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Ee),e.renderSlot(l.$slots,"svg",{svg:W.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ne))}},Se=se._export_sfc(Oe,[["__scopeId","data-v-90584bea"]]);exports.default=Se;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C6IvqE-r.cjs"),g=require("./index-BkXYJDpD.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-CfhoS_qC.cjs"),j=require("./Title-B7ruS8yl.cjs"),q=require("./PackageVersion-C1F3QLoY.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CFwQtnNB.cjs"),g=require("./index-C3wsuQ2C.cjs"),$=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-DGRZS55E.cjs"),j=require("./Title-CSyDhu3S.cjs"),q=require("./PackageVersion-CeJ2R9gK.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
2
2
  let interval;
3
3
  let elapsed = 0;
4
4
  let paused = false;
@@ -1,10 +1,10 @@
1
1
  import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, createElementVNode as C, mergeProps as V, renderSlot as O, normalizeProps as U, guardReactiveProps as E, toDisplayString as ae } from "vue";
2
- import { u as se } from "./useNestedProp-DifqJZAs.js";
3
- import { u as le, c as oe, X as re, F as W } from "./index-K5uyh1gA.js";
2
+ import { u as se } from "./useNestedProp-BcqToEU0.js";
3
+ import { u as le, c as oe, X as re, F as W } from "./index-DhxnZ6ZS.js";
4
4
  import { t as ue, u as ie } from "./useResponsive-CoxXLe23.js";
5
- import P from "./BaseIcon-zmxwsaLW.js";
6
- import { _ as ne } from "./Title-aMb2ETf7.js";
7
- import { _ as ce } from "./PackageVersion-Dz3KcTL4.js";
5
+ import P from "./BaseIcon-CiQzR1fE.js";
6
+ import { _ as ne } from "./Title-DLo3Zo2_.js";
7
+ import { _ as ce } from "./PackageVersion-Ve0s76sL.js";
8
8
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  class he {
10
10
  constructor(A, k, T, H = !0, x = !0) {
@@ -1,11 +1,11 @@
1
1
  import { computed as h, ref as p, watch as W, onMounted as ce, openBlock as s, createElementBlock as c, normalizeClass as U, normalizeStyle as G, unref as n, createBlock as I, createCommentVNode as y, createSlots as ve, withCtx as F, renderSlot as b, normalizeProps as L, guardReactiveProps as j, createVNode as he, Fragment as Z, renderList as ee, toDisplayString as de } from "vue";
2
- import { u as te } from "./useNestedProp-DifqJZAs.js";
3
- import { u as fe, c as pe, t as ye, v as me, o as ge, e as ke, w as ae, X as be, i as _e, f as Ce } from "./index-K5uyh1gA.js";
4
- import { _ as $e } from "./Title-aMb2ETf7.js";
5
- import { u as we, U as xe } from "./usePrinter-p_ZZlGc9.js";
6
- import Pe from "./vue-ui-skeleton-BhA2lIT6.js";
7
- import { _ as Oe } from "./PackageVersion-Dz3KcTL4.js";
8
- import { P as Ae } from "./PenAndPaper-BycdTwSP.js";
2
+ import { u as te } from "./useNestedProp-BcqToEU0.js";
3
+ import { u as fe, c as pe, t as ye, v as me, o as ge, e as ke, w as ae, X as be, i as _e, f as Ce } from "./index-DhxnZ6ZS.js";
4
+ import { _ as $e } from "./Title-DLo3Zo2_.js";
5
+ import { u as we, U as xe } from "./usePrinter-mDGfOQZA.js";
6
+ import Pe from "./vue-ui-skeleton-pdtGfiV6.js";
7
+ import { _ as Oe } from "./PackageVersion-Ve0s76sL.js";
8
+ import { P as Ae } from "./PenAndPaper-IHG7xTmx.js";
9
9
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const ze = ["id"], Se = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C6IvqE-r.cjs"),c=require("./index-BkXYJDpD.cjs"),K=require("./Title-B7ruS8yl.cjs"),G=require("./usePrinter-DHv-BwME.cjs"),Q=require("./vue-ui-skeleton-BTN1PKkz.cjs"),W=require("./PackageVersion-C1F3QLoY.cjs"),Z=require("./PenAndPaper-DDheVRNG.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},le=["xmlns","viewBox"],re={key:0},ne=["d","stroke-width","stroke"],se={key:1},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(j,{expose:H}){const v=j,{vue_ui_tiremarks:D}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),R=e.ref(null),O=e.ref(0),A=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:x,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value});function I(){const a=L.useNestedProp({userConfig:v.config,defaultConfig:D});return a.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=I(),x.value=!t.value.showOnChartHover,M(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:E,generatePdf:V,generateImage:q}=G.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?T(a.percentage):s.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(a){let n=t.value.style.chart.animation.speed;const o=Math.abs(a-s.value)/(n*120);function r(){s.value<a?s.value=Math.min(s.value+o,a):s.value>a&&(s.value=Math.max(s.value-o,a)),s.value!==a&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((a,n)=>a+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),Y=e.ref(100);e.computed(()=>v.dataset.percentage/Y.value);const i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,n,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,n=u.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,n=l.value.height-u.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,n=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-u.value.right+8,n=l.value.height/2+r,o="start"),{x:a,y:n,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(a){_.value=a,O.value+=1}const w=e.ref(!1);function S(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:S}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(N)||e.unref(x))?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(E),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},he=te._export_sfc(de,[["__scopeId","data-v-abf7fd42"]]);exports.default=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CFwQtnNB.cjs"),c=require("./index-C3wsuQ2C.cjs"),K=require("./Title-CSyDhu3S.cjs"),G=require("./usePrinter-Dglf1bsw.cjs"),Q=require("./vue-ui-skeleton-99lBQ_mF.cjs"),W=require("./PackageVersion-CeJ2R9gK.cjs"),Z=require("./PenAndPaper-DQPbe0G_.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],oe={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},le=["xmlns","viewBox"],re={key:0},ne=["d","stroke-width","stroke"],se={key:1},ue=["x1","y1","x2","y2","stroke-width","stroke"],ie=["x","y","font-size","fill","font-weight","text-anchor"],ce={key:5,class:"vue-data-ui-watermark"},ve={key:6,ref:"source",dir:"auto"},de={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(j,{expose:H}){const v=j,{vue_ui_tiremarks:D}=c.useConfig(),P=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),$=e.ref(c.createUid()),B=e.ref(null),R=e.ref(null),O=e.ref(0),A=e.ref(0),t=e.computed({get:()=>I(),set:a=>a}),{userOptionsVisible:x,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value});function I(){const a=L.useNestedProp({userConfig:v.config,defaultConfig:D});return a.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=I(),x.value=!t.value.showOnChartHover,M(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:E,generatePdf:V,generateImage:q}=G.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?T(a.percentage):s.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(a){let n=t.value.style.chart.animation.speed;const o=Math.abs(a-s.value)/(n*120);function r(){s.value<a?s.value=Math.min(s.value+o,a):s.value>a&&(s.value=Math.max(s.value-o,a)),s.value!==a&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((a,n)=>a+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),Y=e.ref(100);e.computed(()=>v.dataset.percentage/Y.value);const i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const a=[];for(let o=0;o<100;o+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,o/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-o*i.value.mark-o*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+o)/100);a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-o)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+o*i.value.mark+o*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+o)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return a}),g=e.computed(()=>{let a,n,o;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=l.value.width/2,n=u.value.top/2,o="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=l.value.width/2,n=l.value.height-u.value.bottom/2+r,o="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,n=l.value.height/2+r,o="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=l.value.width-u.value.right+8,n=l.value.height/2+r,o="start"),{x:a,y:n,textAnchor:o,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(a){_.value=a,O.value+=1}const w=e.ref(!1);function S(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:S}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:B,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:$.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:R,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(N)||e.unref(x))?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(E),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("path",{d:o.curve,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ne))),256))])):(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2,"stroke-width":i.value.mark,stroke:s.value>=r?o.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ue))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ie)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:l.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(E)})),void 0,!0)])):e.createCommentVNode("",!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",ve,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},he=te._export_sfc(de,[["__scopeId","data-v-abf7fd42"]]);exports.default=he;