vue-data-ui 3.22.13 → 3.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -1,1367 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { At as t, Bt as n, C as r, E as i, Gt as a, K as o, Nt as s, Q as ee, Y as c, bt as te, et as ne, ft as re, i as ie, n as ae, qt as oe, r as se, st as ce, t as le, x as ue, zt as de } from "./lib-CFm_J26b.js";
3
- import { t as fe } from "./useConfig-C0V0eG7L.js";
4
- import { t as pe } from "./usePrinter-BH-xle1O.js";
5
- import { n as me, t as he } from "./BaseScanner-DZvpgOjM.js";
6
- import { t as ge } from "./useSvgExport-Ba9qBr9M.js";
7
- import { t as _e } from "./useNestedProp-BY6DNN3i.js";
8
- import { t as ve } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as ye } from "./img-Bikk1dGb.js";
10
- import { n as be } from "./Title-BuPs74IB.js";
11
- import { t as xe } from "./Shape-BfnXr1nJ.js";
12
- import { t as Se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { l as Ce, t as we } from "./useResponsive-ZtArZtUf.js";
14
- import { t as Te } from "./DefGrad-DVBqDjhO.js";
15
- import { t as Ee } from "./BaseLegendToggle-DsWphmIb.js";
16
- import { t as De } from "./A11yDataTable-DdRsVULz.js";
17
- import { t as Oe } from "./useUserOptionState-DK-_1ddE.js";
18
- import { t as ke } from "./useChartAccessibility-DYqac8yF.js";
19
- import { t as Ae } from "./labelUtils-BUhssos9.js";
20
- import { t as je } from "./Legend-C0xAnJdO.js";
21
- import { t as Me } from "./vue_ui_waffle-DIARFc7g.js";
22
- import { Fragment as l, Teleport as Ne, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as Pe, createTextVNode as Fe, createVNode as Ie, defineAsyncComponent as h, guardReactiveProps as g, mergeProps as Le, nextTick as Re, normalizeClass as ze, normalizeProps as _, normalizeStyle as Be, onBeforeUnmount as Ve, onMounted as He, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as Ue, shallowRef as We, toDisplayString as S, toRefs as Ge, unref as C, useSlots as Ke, watch as w, withCtx as T } from "vue";
23
- //#region src/components/vue-ui-waffle.vue
24
- var qe = /* @__PURE__ */ e({ default: () => mt }), Je = ["id"], Ye = ["id"], Xe = ["id"], Ze = { style: { position: "relative" } }, Qe = [
25
- "xmlns",
26
- "aria-describedby",
27
- "viewBox"
28
- ], $e = ["id"], et = [
29
- "x",
30
- "y",
31
- "height",
32
- "width"
33
- ], tt = ["height", "width"], nt = { key: 0 }, rt = [
34
- "rx",
35
- "x",
36
- "y",
37
- "height",
38
- "width",
39
- "stroke",
40
- "stroke-width",
41
- "filter"
42
- ], it = [
43
- "rx",
44
- "x",
45
- "y",
46
- "height",
47
- "width",
48
- "fill",
49
- "stroke",
50
- "stroke-width",
51
- "filter"
52
- ], at = { key: 1 }, ot = [
53
- "rx",
54
- "x",
55
- "y",
56
- "height",
57
- "width",
58
- "fill",
59
- "filter"
60
- ], st = [
61
- "textContent",
62
- "x",
63
- "y",
64
- "font-size",
65
- "fill",
66
- "filter"
67
- ], ct = [
68
- "x",
69
- "y",
70
- "height",
71
- "width",
72
- "onMouseover",
73
- "onMouseleave",
74
- "onClick"
75
- ], lt = {
76
- key: 0,
77
- style: {
78
- position: "absolute",
79
- top: "100%",
80
- left: "0",
81
- width: "100%"
82
- },
83
- "data-dom-to-png-ignore": "",
84
- "aria-hidden": "true"
85
- }, ut = {
86
- key: 5,
87
- class: "vue-data-ui-watermark"
88
- }, dt = ["id"], ft = ["onClick"], pt = ["innerHTML"], mt = /*#__PURE__*/ Se({
89
- __name: "vue-ui-waffle",
90
- props: {
91
- config: {
92
- type: Object,
93
- default() {
94
- return {};
95
- }
96
- },
97
- dataset: {
98
- type: Array,
99
- default() {
100
- return [];
101
- }
102
- }
103
- },
104
- emits: ["selectLegend", "copyAlt"],
105
- setup(e, { expose: Se, emit: qe }) {
106
- let mt = h(() => import("./Tooltip-CA1rtSyl.js")), ht = h(() => import("./BaseIcon-CP5RWnqt.js").then((e) => e.n)), gt = h(() => import("./DataTable-DzPEVvSo.js")), _t = h(() => import("./vue-ui-accordion-UA88lv4d.js").then((e) => e.n)), vt = h(() => import("./UserOptions-DzAFK9cY.js").then((e) => e.n)), yt = h(() => import("./PenAndPaper-CSMVXpg2.js").then((e) => e.t)), bt = h(() => import("./PackageVersion-B6Hokxw9.js").then((e) => e.t)), xt = h(() => import("./BaseDraggableDialog-3n8udWmh.js").then((e) => e.n)), { vue_ui_waffle: St } = fe(), { isThemeValid: Ct, warnInvalidTheme: wt } = ve(), E = e, Tt = Ke(), Et = u({
107
- get() {
108
- return !!E.dataset && E.dataset.length;
109
- },
110
- set(e) {
111
- return e;
112
- }
113
- }), D = y(o()), Dt = y(!1), Ot = y(""), O = y(null), kt = y(0), k = y(null), At = y(null), jt = y(null), Mt = y(null), Nt = y(null), Pt = y(0), Ft = y(0), It = y(0), Lt = y(!1), Rt = y(null), zt = y(null), Bt = y(!1), Vt = y(!1), A = y(null), Ht = y({
114
- x: 0,
115
- y: 0
116
- }), j = y("pointer"), Ut = y(!1), M = y(Zt()), N = u(() => M.value.userOptions.useCursorPointer), Wt = u(() => oe({
117
- defaultConfig: {
118
- useCustomCells: !1,
119
- userOptions: { show: !1 },
120
- table: { show: !1 },
121
- style: { chart: {
122
- backgroundColor: "#99999930",
123
- layout: {
124
- labels: { captions: { show: !1 } },
125
- rect: { stroke: "#999999" }
126
- },
127
- legend: {
128
- backgroundColor: "transparent",
129
- showValue: !1,
130
- showPercentage: !1
131
- }
132
- } }
133
- },
134
- userConfig: M.value.skeletonConfig ?? {}
135
- })), { loading: Gt, FINAL_DATASET: Kt, manualLoading: qt } = me({
136
- ...Ge(E),
137
- FINAL_CONFIG: M,
138
- prepareConfig: Zt,
139
- callback: () => {
140
- Promise.resolve().then(async () => {
141
- H.value = dn();
142
- });
143
- },
144
- skeletonDataset: E.config?.skeletonDataset ?? [
145
- {
146
- name: "",
147
- values: [1],
148
- color: "#AAAAAA"
149
- },
150
- {
151
- name: "",
152
- values: [1],
153
- color: "#BABABA"
154
- },
155
- {
156
- name: "",
157
- values: [1],
158
- color: "#CACACA"
159
- }
160
- ],
161
- skeletonConfig: oe({
162
- defaultConfig: M.value,
163
- userConfig: Wt.value
164
- })
165
- }), { userOptionsVisible: Jt, setUserOptionsVisibility: Yt, keepUserOptionState: Xt } = Oe({ config: M.value }), { svgRef: P } = ke({ config: M.value.style.chart.title });
166
- function Zt() {
167
- let e = _e({
168
- userConfig: E.config,
169
- defaultConfig: St
170
- }), t = e.theme;
171
- if (!t) return e;
172
- if (!Ct.value(e)) return wt(e), e;
173
- let n = _e({
174
- userConfig: Me[t] || E.config,
175
- defaultConfig: e
176
- }), r = _e({
177
- userConfig: E.config,
178
- defaultConfig: n
179
- });
180
- return {
181
- ...r,
182
- customPalette: r.customPalette.length ? r.customPalette : a[t] || s
183
- };
184
- }
185
- w(() => E.config, (e) => {
186
- Gt.value || (M.value = Zt()), Jt.value = !M.value.userOptions.showOnChartHover, $t(), Pt.value += 1, Ft.value += 1, It.value += 1, L.value.showTable = M.value.table.show, L.value.showTooltip = M.value.style.chart.tooltip.show;
187
- }, { deep: !0 });
188
- let F = We(null), I = We(null), Qt = u(() => !!M.value.debug);
189
- function $t() {
190
- if (t(E.dataset) ? (ne({
191
- componentName: "VueUiWaffle",
192
- type: "dataset",
193
- debug: Qt.value
194
- }), Et.value = !1, qt.value = !0) : E.dataset.forEach((e, t) => {
195
- re({
196
- datasetObject: e,
197
- requiredAttributes: ["name", "values"]
198
- }).forEach((e) => {
199
- ne({
200
- componentName: "VueUiWaffle",
201
- type: "datasetSerieAttribute",
202
- property: e,
203
- index: t,
204
- debug: Qt.value
205
- });
206
- });
207
- }), t(E.dataset) || (qt.value = M.value.loading), M.value.responsive) {
208
- let e = Ce(() => {
209
- let { width: e, height: t } = we({
210
- chart: k.value,
211
- title: M.value.style.chart.title.text ? At.value : null,
212
- legend: M.value.style.chart.legend.show ? jt.value : null,
213
- source: Mt.value,
214
- noTitle: Nt.value
215
- });
216
- requestAnimationFrame(() => {
217
- R.value.width = e, R.value.height = t, z.value.width = e, z.value.height = t;
218
- });
219
- });
220
- F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect()), F.value = new ResizeObserver(e), I.value = k.value.parentNode, F.value.observe(I.value);
221
- }
222
- }
223
- He(() => {
224
- Lt.value = !0, $t();
225
- }), Ve(() => {
226
- F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect());
227
- });
228
- let { isPrinting: en, isImaging: tn, generatePdf: nn, generateImage: rn } = pe({
229
- elementId: `vue-ui-waffle_${D.value}`,
230
- fileName: M.value.style.chart.title.text || "vue-ui-waffle",
231
- options: M.value.userOptions.print
232
- }), an = u(() => M.value.userOptions.show && !M.value.style.chart.title.text), on = u(() => r(M.value.customPalette)), L = y({
233
- showTable: M.value.table.show,
234
- showTooltip: M.value.style.chart.tooltip.show
235
- });
236
- w(M, () => {
237
- L.value = {
238
- showTable: M.value.table.show,
239
- showTooltip: M.value.style.chart.tooltip.show
240
- };
241
- }, { immediate: !0 });
242
- let R = y({
243
- height: 512,
244
- width: 512
245
- }), z = y({
246
- top: 0,
247
- left: 0,
248
- height: 512,
249
- width: 512
250
- }), B = u(() => (z.value.width - M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.spaceBetween) / M.value.style.chart.layout.grid.size), V = u(() => (z.value.height - M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.spaceBetween) / M.value.style.chart.layout.grid.size), sn = u(() => Math.max(1e-4, z.value.width / M.value.style.chart.layout.grid.size)), cn = u(() => Math.max(1e-4, z.value.height / M.value.style.chart.layout.grid.size));
251
- function ln(e) {
252
- let t = M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.size, n = e.reduce((e, t) => e + t, 0), r = e.map((e) => e / n * t), i = r.map(Math.floor), a = r.map((e) => e % 1), o = t - i.reduce((e, t) => e + t, 0);
253
- for (; o > 0;) {
254
- let e = a.indexOf(Math.max(...a));
255
- i[e] += 1, a[e] = 0, --o;
256
- }
257
- return i;
258
- }
259
- let un = y(!1);
260
- function dn() {
261
- return un.value = Kt.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, Kt.value.map((e, t) => ({
262
- ...e,
263
- color: ue(e.color) || on.value[t] || s[t] || s[t % s.length],
264
- uid: `serie_${t}`,
265
- absoluteIndex: t
266
- }));
267
- }
268
- let fn = u(() => dn()), H = y(fn.value);
269
- w(() => E.dataset, (e) => {
270
- Array.isArray(e) && e.length > 0 && (qt.value = !1);
271
- }, { immediate: !0 }), w(() => E.dataset, (e) => {
272
- H.value = dn();
273
- }, { deep: !0 });
274
- let pn = u(() => ln(H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => un.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), mn = u(() => ln(H.value.map((e, t) => un.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), U = u(() => (Kt.value.forEach((e, t) => {
275
- [null, void 0].includes(e.values) && ne({
276
- componentName: "VueUiWaffle",
277
- type: "datasetSerieAttribute",
278
- property: "values (number[])",
279
- index: t
280
- });
281
- }), H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => ({
282
- absoluteIndex: e.absoluteIndex,
283
- uid: e.uid,
284
- name: e.name,
285
- color: e.color,
286
- value: (e.values || []).reduce((e, t) => e + t, 0),
287
- absoluteValues: e.values || [],
288
- proportion: pn.value[t]
289
- })))), hn = u(() => H.value.map((e, t) => ({
290
- absoluteIndex: e.absoluteIndex,
291
- uid: e.uid,
292
- name: e.name,
293
- color: e.color,
294
- value: (e.values || []).reduce((e, t) => e + t, 0),
295
- absoluteValues: e.values || [],
296
- proportion: mn.value[t]
297
- })));
298
- function gn() {
299
- return hn.value.map((e) => ({
300
- name: e.name,
301
- color: e.color,
302
- value: e.value,
303
- proportion: e.proportion
304
- }));
305
- }
306
- let _n = u(() => {
307
- let e = 0;
308
- return U.value.map((t, n) => {
309
- let r = e, i = r + t.proportion, a = [];
310
- for (let e = Math.floor(r); e < Math.floor(i); e += 1) a.push(e);
311
- return e = i, {
312
- ...t,
313
- start: r,
314
- rects: a
315
- };
316
- });
317
- }), W = u(() => _n.value.flatMap((e, t) => e.rects.map((n, r) => ({
318
- isFirst: r === 0,
319
- isLongEnough: n.length > 2,
320
- name: e.name,
321
- color: e.color,
322
- value: e.value,
323
- serieIndex: t,
324
- absoluteStartIndex: r < 3,
325
- serieId: e.uid,
326
- ...e
327
- }))).map((e, t) => ({
328
- ...e,
329
- isAbsoluteFirst: t % M.value.style.chart.layout.grid.size === 0
330
- }))), G = u(() => {
331
- let e = [];
332
- for (let t = 0; t < M.value.style.chart.layout.grid.size; t += 1) for (let n = 0; n < M.value.style.chart.layout.grid.size; n += 1) e.push({
333
- isStartOfLine: n === 0,
334
- position: M.value.style.chart.layout.grid.vertical ? t : n,
335
- x: (M.value.style.chart.layout.grid.vertical ? t : n) * (B.value + M.value.style.chart.layout.grid.spaceBetween),
336
- y: (M.value.style.chart.layout.grid.vertical ? n : t) * (V.value + M.value.style.chart.layout.grid.spaceBetween) + z.value.top
337
- });
338
- return e;
339
- }), K = y([]), vn = y(!1), yn = y(Object.create(null)), bn = y(Object.create(null)), xn = y(0);
340
- function Sn(e, t) {
341
- H.value = H.value.map((n) => n.uid === e ? {
342
- ...n,
343
- values: [t]
344
- } : n);
345
- }
346
- function Cn(e, t) {
347
- let n = t.find((t) => t.uid === e);
348
- return n ? (n.values || []).reduce((e, t) => e + t, 0) : 0;
349
- }
350
- function wn(e) {
351
- yn.value[e] && (cancelAnimationFrame(yn.value[e]), delete yn.value[e]), bn.value[e] && (cancelAnimationFrame(bn.value[e]), delete bn.value[e]);
352
- }
353
- function Tn({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
354
- wn(e), xn.value += 1, vn.value = !0;
355
- let i = t;
356
- return new Promise((a) => {
357
- function o() {
358
- if (r === "increase") {
359
- if (i >= n) {
360
- Sn(e, n), --xn.value, xn.value <= 0 && (vn.value = !1), delete yn.value[e], a();
361
- return;
362
- }
363
- i += n * .025, i > n && (i = n), Sn(e, i), yn.value[e] = requestAnimationFrame(o);
364
- } else {
365
- if (i <= t / 100) {
366
- Sn(e, 0), --xn.value, xn.value <= 0 && (vn.value = !1), delete bn.value[e], a();
367
- return;
368
- }
369
- i /= 1.15, Sn(e, i), bn.value[e] = requestAnimationFrame(o);
370
- }
371
- }
372
- o();
373
- });
374
- }
375
- function En() {
376
- H.value = fn.value;
377
- let e = K.value.length > 0;
378
- if (!M.value.useAnimation) {
379
- e ? K.value = [] : K.value = J.value.map((e) => e.uid);
380
- return;
381
- }
382
- e ? [...K.value].forEach((e) => {
383
- q(e, !0);
384
- }) : J.value.map((e) => e.uid).forEach((e) => {
385
- q(e, !0);
386
- });
387
- }
388
- function q(e, t = !1) {
389
- if (un.value && !t) return;
390
- let n = t || K.value.length < J.value.length - 1 && J.value.length > 1;
391
- if (!M.value.useAnimation) {
392
- K.value.includes(e) ? K.value = K.value.filter((t) => t !== e) : n && K.value.push(e);
393
- return;
394
- }
395
- let r = Cn(e, fn.value), i = Cn(e, H.value);
396
- if (!(i === 0 && r === 0)) {
397
- if (K.value.includes(e)) {
398
- K.value = K.value.filter((t) => t !== e), Tn({
399
- seriesId: e,
400
- fromValue: i,
401
- toValue: r,
402
- mode: "increase"
403
- }).then(() => {
404
- zn("selectLegend", U.value.map((e) => ({
405
- name: e.name,
406
- color: e.color,
407
- value: e.value,
408
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
409
- })));
410
- });
411
- return;
412
- }
413
- n && Tn({
414
- seriesId: e,
415
- fromValue: i,
416
- toValue: 0,
417
- mode: "decrease"
418
- }).then(() => {
419
- K.value.includes(e) || K.value.push(e), Sn(e, 0), zn("selectLegend", U.value.map((e) => ({
420
- name: e.name,
421
- color: e.color,
422
- value: e.value,
423
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
424
- })));
425
- });
426
- }
427
- }
428
- function Dn(e) {
429
- return hn.value.length ? hn.value.find((t) => t.name === e) || (M.value.debug && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (M.value.debug && console.warn("VueUiWaffle - There are no series to show."), null);
430
- }
431
- function On(e) {
432
- let t = Dn(e);
433
- t !== null && K.value.includes(t.uid) && q(t.uid);
434
- }
435
- function kn(e) {
436
- let t = Dn(e);
437
- t !== null && (K.value.includes(t.uid) || q(t.uid));
438
- }
439
- function An({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
440
- return Ae({
441
- config: i,
442
- val: e,
443
- percentage: t,
444
- showVal: n,
445
- showPercentage: r
446
- });
447
- }
448
- let J = u(() => H.value.map((e, t) => {
449
- let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / H.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
450
- return {
451
- name: e.name,
452
- color: e.color || on[t] || s[t] || s[t % s.length],
453
- value: n,
454
- proportion: r,
455
- uid: e.uid,
456
- shape: "square"
457
- };
458
- }).map((e, t) => {
459
- let n = An({
460
- val: ie(M.value.style.chart.layout.labels.dataLabels.formatter, e.value, c({
461
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
462
- v: e.value,
463
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
464
- r: M.value.style.chart.legend.roundingValue
465
- }), {
466
- datapoint: e,
467
- index: t
468
- }),
469
- percentage: isNaN(e.value / Y.value) ? "-" : c({
470
- v: e.value / Y.value * 100,
471
- s: "%",
472
- r: M.value.style.chart.legend.roundingPercentage
473
- }),
474
- showVal: M.value.style.chart.legend.showValue,
475
- showPercentage: M.value.style.chart.legend.showPercentage,
476
- config: M.value.style.chart.legend
477
- });
478
- return {
479
- ...e,
480
- opacity: K.value.includes(e.uid) ? .5 : 1,
481
- segregate: () => q(e.uid),
482
- isSegregated: K.value.includes(e.uid),
483
- display: `${e.name}${M.value.style.chart.legend.showPercentage || M.value.style.chart.legend.showValue ? ": " : ""}${n}`
484
- };
485
- })), jn = u(() => ({
486
- cy: "waffle-div-legend",
487
- backgroundColor: M.value.style.chart.legend.backgroundColor,
488
- color: M.value.style.chart.legend.color,
489
- fontSize: M.value.style.chart.legend.fontSize,
490
- paddingBottom: 12,
491
- fontWeight: M.value.style.chart.legend.bold ? "bold" : ""
492
- })), Y = u(() => U.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Mn = y(null), Nn = y(null), X = u(() => {
493
- let e = /* @__PURE__ */ new Map();
494
- return W.value.forEach((t, n) => {
495
- e.has(t.serieIndex) ? e.get(t.serieIndex).rectIndexes.push(n) : e.set(t.serieIndex, {
496
- serieIndex: t.serieIndex,
497
- absoluteIndex: t.absoluteIndex,
498
- serieId: t.serieId,
499
- name: t.name,
500
- color: t.color,
501
- value: t.value,
502
- proportion: t.proportion,
503
- rectIndexes: [n]
504
- });
505
- }), Array.from(e.values()).sort((e, t) => e.serieIndex - t.serieIndex);
506
- });
507
- function Pn(e) {
508
- return X.value.find((t) => t.serieIndex === e) || null;
509
- }
510
- function Fn(e) {
511
- let t = Pn(e);
512
- return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
513
- }
514
- function In(e) {
515
- let t = W.value[e];
516
- M.value.events.datapointClick && M.value.events.datapointClick({
517
- datapoint: t,
518
- seriesIndex: t.serieIndex
519
- });
520
- }
521
- function Ln(e) {
522
- let t = W.value[e];
523
- M.value.events.datapointLeave && M.value.events.datapointLeave({
524
- datapoint: t,
525
- seriesIndex: t.serieIndex
526
- }), Nn.value = null, Dt.value = !1, O.value = null, A.value = null, j.value = "pointer";
527
- }
528
- function Rn(e, t = "pointer") {
529
- if (K.value.length === E.dataset.length) return;
530
- let n = W.value[e];
531
- if (!n) return;
532
- j.value = t, A.value = n.serieIndex, Mn.value = {
533
- datapoint: n,
534
- seriesIndex: n.absoluteIndex,
535
- series: H.value,
536
- config: M.value
537
- }, M.value.events.datapointEnter && Nn.value !== n.serieIndex && M.value.events.datapointEnter({
538
- datapoint: n,
539
- seriesIndex: n.serieIndex
540
- }), Nn.value = n.serieIndex, Dt.value = !0, O.value = n.serieIndex;
541
- let r = M.value.style.chart.tooltip.customFormat;
542
- if (te(r) && ce(() => r({
543
- seriesIndex: n.absoluteIndex,
544
- datapoint: n,
545
- series: H.value,
546
- config: M.value
547
- }))) Ot.value = r({
548
- seriesIndex: n.absoluteIndex,
549
- datapoint: n,
550
- series: H.value,
551
- config: M.value
552
- });
553
- else {
554
- let e = "";
555
- e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${M.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${n.name}</div>`, e += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${n.color}" />${Tt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${D.value}_${n.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${An({
556
- config: M.value.style.chart.tooltip,
557
- showVal: M.value.style.chart.tooltip.showValue,
558
- showPercentage: M.value.style.chart.tooltip.showPercentage,
559
- val: `<span>${ie(M.value.style.chart.layout.labels.dataLabels.formatter, n.value, c({
560
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
561
- v: n.value,
562
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
563
- r: M.value.style.chart.tooltip.roundingValue
564
- }), {
565
- datapoint: n,
566
- seriesIndex: n.absoluteIndex,
567
- series: H.value
568
- })}</span>`,
569
- percentage: `<span>${c({
570
- v: un.value ? 1 / Kt.value.length * 100 : n.value / Y.value * 100,
571
- s: "%",
572
- r: M.value.style.chart.tooltip.roundingPercentage
573
- })}</span>`
574
- })}</b></div>`, Ot.value = e;
575
- }
576
- }
577
- let zn = qe, Z = u(() => ({
578
- head: U.value.map((e) => ({
579
- name: e.name,
580
- color: e.color
581
- })),
582
- body: U.value.map((e) => e.value)
583
- }));
584
- function Bn(e) {
585
- return M.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== e ? `url(#blur_${D.value})` : "";
586
- }
587
- function Vn(e, t) {
588
- return M.value.style.chart.layout.labels.captions.show ? W.value.length && !vn.value && !M.value.style.chart.layout.grid.vertical && (W.value[e].isFirst && t.position < M.value.style.chart.layout.grid.size - 2 || W.value[e].isAbsoluteFirst && e % M.value.style.chart.layout.grid.size === 0 && W.value[e].absoluteStartIndex) : !1;
589
- }
590
- function Hn(e, t = null) {
591
- let n = ie(M.value.style.chart.layout.labels.dataLabels.formatter, W.value[e].value, c({
592
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
593
- v: W.value[e].value,
594
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
595
- r: M.value.style.chart.layout.labels.captions.roundingValue
596
- }), {
597
- datapoint: W.value[e],
598
- position: t
599
- }), r = c({
600
- v: W.value[e].proportion,
601
- s: "%",
602
- r: M.value.style.chart.layout.labels.captions.roundingPercentage
603
- }), i = (M.value.style.chart.layout.labels.captions.serieNameAbbreviation ? ae({
604
- source: W.value[e].name,
605
- length: M.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize
606
- }) : W.value[e].name) + (M.value.style.chart.layout.labels.captions.showPercentage || M.value.style.chart.layout.labels.captions.showValue ? ":" : "");
607
- return `${M.value.style.chart.layout.labels.captions.showSerieName ? i : ""} ${An({
608
- val: n,
609
- percentage: r,
610
- showVal: M.value.style.chart.layout.labels.captions.showValue,
611
- showPercentage: M.value.style.chart.layout.labels.captions.showPercentage,
612
- config: M.value.style.chart.layout.labels.dataLabels
613
- })}`;
614
- }
615
- function Un(e = null) {
616
- Re(() => {
617
- let t = Z.value.head.map((e, t) => [
618
- [e.name],
619
- [Z.value.body[t]],
620
- [isNaN(Z.value.body[t] / Y.value) ? "-" : Z.value.body[t] / Y.value * 100]
621
- ]), n = i([
622
- [M.value.style.chart.title.text],
623
- [M.value.style.chart.title.subtitle.text],
624
- [
625
- [""],
626
- ["val"],
627
- ["%"]
628
- ]
629
- ].concat(t));
630
- e ? e(n) : ee({
631
- csvContent: n,
632
- title: M.value.style.chart.title.text || "vue-ui-waffle"
633
- });
634
- });
635
- }
636
- let Q = u(() => ({
637
- head: [
638
- " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2\" /></svg>",
639
- ie(M.value.style.chart.layout.labels.dataLabels.formatter, Y.value, c({
640
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
641
- v: Y.value,
642
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
643
- r: M.value.table.td.roundingValue
644
- })),
645
- "100%"
646
- ],
647
- body: Z.value.head.map((e, t) => [
648
- {
649
- color: e.color,
650
- name: e.name
651
- },
652
- ie(M.value.style.chart.layout.labels.dataLabels.formatter, Z.value.body[t], c({
653
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
654
- v: Z.value.body[t],
655
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
656
- r: M.value.table.td.roundingValue
657
- })),
658
- isNaN(Z.value.body[t] / Y.value) ? "-" : c({
659
- v: Z.value.body[t] / Y.value * 100,
660
- s: "%",
661
- r: M.value.table.td.roundingPercentage
662
- })
663
- ]),
664
- config: {
665
- th: {
666
- backgroundColor: M.value.table.th.backgroundColor,
667
- color: M.value.table.th.color,
668
- outline: M.value.table.th.outline
669
- },
670
- td: {
671
- backgroundColor: M.value.table.td.backgroundColor,
672
- color: M.value.table.td.color,
673
- outline: M.value.table.td.outline
674
- },
675
- shape: "square",
676
- breakpoint: M.value.table.responsiveBreakpoint
677
- },
678
- colNames: [
679
- M.value.table.columnNames.series,
680
- M.value.table.columnNames.value,
681
- M.value.table.columnNames.percentage
682
- ]
683
- })), $ = y(!1);
684
- function Wn(e) {
685
- $.value = e, kt.value += 1;
686
- }
687
- function Gn() {
688
- L.value.showTable = !L.value.showTable;
689
- }
690
- function Kn() {
691
- L.value.showTooltip = !L.value.showTooltip;
692
- }
693
- let qn = y(!1);
694
- function Jn() {
695
- qn.value = !qn.value;
696
- }
697
- async function Yn({ scale: e = 2 } = {}) {
698
- if (!k.value) return;
699
- let { width: t, height: n } = k.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ye({
700
- domElement: k.value,
701
- base64: !0,
702
- img: !0,
703
- scale: e
704
- });
705
- return {
706
- imageUri: i,
707
- base64: a,
708
- title: M.value.style.chart.title.text,
709
- width: t,
710
- height: n,
711
- aspectRatio: r
712
- };
713
- }
714
- let Xn = u(() => {
715
- let e = M.value.table.useDialog && !M.value.table.show, t = L.value.showTable;
716
- return {
717
- component: e ? xt : _t,
718
- title: `${M.value.style.chart.title.text}${M.value.style.chart.title.subtitle.text ? `: ${M.value.style.chart.title.subtitle.text}` : ""}`,
719
- props: e ? {
720
- backgroundColor: M.value.table.th.backgroundColor,
721
- color: M.value.table.th.color,
722
- headerColor: M.value.table.th.color,
723
- headerBg: M.value.table.th.backgroundColor,
724
- isFullscreen: $.value,
725
- fullscreenParent: k.value,
726
- forcedWidth: Math.min(500, window.innerWidth * .8),
727
- isCursorPointer: N.value
728
- } : {
729
- hideDetails: !0,
730
- config: {
731
- open: t,
732
- maxHeight: 1e4,
733
- body: {
734
- backgroundColor: M.value.style.chart.backgroundColor,
735
- color: M.value.style.chart.color
736
- },
737
- head: {
738
- backgroundColor: M.value.style.chart.backgroundColor,
739
- color: M.value.style.chart.color
740
- }
741
- }
742
- }
743
- };
744
- });
745
- w(() => L.value.showTable, (e) => {
746
- M.value.table.show || (e && M.value.table.useDialog && Rt.value ? Rt.value.open() : "close" in Rt.value && Rt.value.close());
747
- });
748
- function Zn() {
749
- L.value.showTable = !1, zt.value && zt.value.setTableIconState(!1);
750
- }
751
- let Qn = u(() => J.value.map((e) => ({
752
- ...e,
753
- name: e.display
754
- }))), $n = u(() => M.value.style.chart.backgroundColor), er = u(() => M.value.style.chart.legend), { exportSvg: tr, getSvg: nr } = ge({
755
- svg: P,
756
- title: u(() => M.value.style.chart.title),
757
- legend: er,
758
- legendItems: Qn,
759
- backgroundColor: $n
760
- });
761
- async function rr({ isCb: e }) {
762
- Vt.value = !0, await Re();
763
- try {
764
- if (e) {
765
- let { blob: e, url: t, text: n, dataUrl: r } = await nr();
766
- await Promise.resolve(M.value.userOptions.callbacks.svg({
767
- blob: e,
768
- url: t,
769
- text: n,
770
- dataUrl: r
771
- }));
772
- } else await Promise.resolve(tr());
773
- } finally {
774
- Vt.value = !1;
775
- }
776
- }
777
- function ir(e) {
778
- if (e?.stage === "start") {
779
- Bt.value = !0;
780
- return;
781
- }
782
- if (e?.stage === "end") {
783
- Bt.value = !1;
784
- return;
785
- }
786
- rn();
787
- }
788
- async function ar() {
789
- if (zn("copyAlt", {
790
- config: M.value,
791
- dataset: hn.value
792
- }), !M.value.userOptions.callbacks.altCopy) {
793
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
794
- return;
795
- }
796
- await Promise.resolve(M.value.userOptions.callbacks.altCopy({
797
- config: M.value,
798
- dataset: hn.value
799
- }));
800
- }
801
- function or() {
802
- A.value = null, Ut.value = !0;
803
- }
804
- function sr() {
805
- A.value = null, j.value = "pointer", Dt.value = !1, O.value = null, Nn.value = null, Ut.value = !1;
806
- }
807
- function cr(e) {
808
- if (!P.value || qn.value || document.activeElement !== P.value || !X.value.length || K.value.length === E.dataset.length) return;
809
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
810
- if (!t && !n && !r && !i) return;
811
- if (e.preventDefault(), e.stopPropagation(), i) {
812
- A.value = null, j.value = "pointer", Dt.value = !1, O.value = null, Nn.value = null;
813
- return;
814
- }
815
- if (r) {
816
- if (A.value === null) return;
817
- let e = Fn(A.value);
818
- if (e === null) return;
819
- In(e);
820
- return;
821
- }
822
- let a = X.value.findIndex((e) => e.serieIndex === A.value), o = null;
823
- if (o = a === -1 ? n ? X.value[0] : X.value[X.value.length - 1] : n ? X.value[(a + 1) % X.value.length] : X.value[(a - 1 + X.value.length) % X.value.length], !o) return;
824
- let s = Fn(o.serieIndex);
825
- s !== null && (lr(o.serieIndex), Rn(s, "keyboard"));
826
- }
827
- function lr(e) {
828
- if (!Number.isFinite(e) || !P.value) return;
829
- let t = Pn(e);
830
- if (!t || !t.rectIndexes.length) return;
831
- let n = t.rectIndexes.map((e) => {
832
- let t = G.value[e];
833
- return t ? {
834
- x: t.x + M.value.style.chart.layout.grid.spaceBetween / 2 + sn.value / 2,
835
- y: t.y + M.value.style.chart.layout.grid.spaceBetween / 2 + cn.value / 2
836
- } : null;
837
- }).filter(Boolean);
838
- if (!n.length) return;
839
- let r = Math.min(...n.map((e) => e.x)), i = Math.max(...n.map((e) => e.x)), a = Math.min(...n.map((e) => e.y)), o = Math.max(...n.map((e) => e.y)), s = (r + i) / 2, ee = (a + o) / 2, c = P.value.getBoundingClientRect();
840
- Ht.value = {
841
- x: c.left + s / R.value.width * c.width,
842
- y: c.top + ee / R.value.height * c.height
843
- };
844
- }
845
- let ur = u(() => ({
846
- headers: Q.value?.colNames ?? [],
847
- rows: Q.value?.body ?? []
848
- }));
849
- return Se({
850
- getData: gn,
851
- getImage: Yn,
852
- generatePdf: nn,
853
- generateCsv: Un,
854
- generateImage: rn,
855
- generateSvg: rr,
856
- hideSeries: kn,
857
- showSeries: On,
858
- toggleTable: Gn,
859
- toggleTooltip: Kn,
860
- toggleAnnotator: Jn,
861
- toggleFullscreen: Wn,
862
- copyAlt: ar
863
- }), (e, t) => (v(), p("div", {
864
- class: ze(`vue-data-ui-component vue-ui-waffle ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
865
- ref_key: "waffleChart",
866
- ref: k,
867
- id: `vue-ui-waffle_${D.value}`,
868
- style: Be(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${M.value.style.chart.backgroundColor};${M.value.responsive ? "height: 100%" : ""}`),
869
- onMouseenter: t[2] ||= () => C(Yt)(!0),
870
- onMouseleave: t[3] ||= () => C(Yt)(!1)
871
- }, [
872
- m("div", {
873
- id: `chart-instructions-${D.value}`,
874
- class: "sr-only"
875
- }, [m("p", null, S(M.value.a11y.translations.keyboardNavigation), 1)], 8, Ye),
876
- ur.value?.rows?.length ? (v(), d(De, {
877
- key: 0,
878
- uid: D.value,
879
- head: ur.value.headers,
880
- body: ur.value.rows,
881
- notice: M.value.a11y.translations.tableAvailable,
882
- caption: M.value.a11y.translations.tableCaption
883
- }, null, 8, [
884
- "uid",
885
- "head",
886
- "body",
887
- "notice",
888
- "caption"
889
- ])) : f("", !0),
890
- M.value.userOptions.buttons.annotator ? (v(), d(C(yt), {
891
- key: 1,
892
- svgRef: C(P),
893
- backgroundColor: M.value.style.chart.backgroundColor,
894
- color: M.value.style.chart.color,
895
- active: qn.value,
896
- isCursorPointer: N.value,
897
- onClose: Jn
898
- }, {
899
- "annotator-action-close": T(() => [x(e.$slots, "annotator-action-close", {}, void 0, !0)]),
900
- "annotator-action-color": T(({ color: t }) => [x(e.$slots, "annotator-action-color", _(g({ color: t })), void 0, !0)]),
901
- "annotator-action-draw": T(({ mode: t }) => [x(e.$slots, "annotator-action-draw", _(g({ mode: t })), void 0, !0)]),
902
- "annotator-action-undo": T(({ disabled: t }) => [x(e.$slots, "annotator-action-undo", _(g({ disabled: t })), void 0, !0)]),
903
- "annotator-action-redo": T(({ disabled: t }) => [x(e.$slots, "annotator-action-redo", _(g({ disabled: t })), void 0, !0)]),
904
- "annotator-action-delete": T(({ disabled: t }) => [x(e.$slots, "annotator-action-delete", _(g({ disabled: t })), void 0, !0)]),
905
- _: 3
906
- }, 8, [
907
- "svgRef",
908
- "backgroundColor",
909
- "color",
910
- "active",
911
- "isCursorPointer"
912
- ])) : f("", !0),
913
- an.value ? (v(), p("div", {
914
- key: 2,
915
- ref_key: "noTitle",
916
- ref: Nt,
917
- class: "vue-data-ui-no-title-space",
918
- style: "height:36px; width: 100%;background:transparent"
919
- }, null, 512)) : f("", !0),
920
- M.value.style.chart.title.text ? (v(), p("div", {
921
- key: 3,
922
- ref_key: "chartTitle",
923
- ref: At,
924
- style: "width:100%;background:transparent;padding-bottom:12px"
925
- }, [(v(), d(be, {
926
- key: `title_${Pt.value}`,
927
- config: {
928
- title: {
929
- cy: "waffle-title",
930
- ...M.value.style.chart.title
931
- },
932
- subtitle: {
933
- cy: "waffle-subtitle",
934
- ...M.value.style.chart.title.subtitle
935
- }
936
- }
937
- }, null, 8, ["config"]))], 512)) : f("", !0),
938
- m("div", { id: `legend-top-${D.value}` }, null, 8, Xe),
939
- M.value.userOptions.show && Et.value && (C(Xt) || C(Jt)) ? (v(), d(C(vt), {
940
- ref_key: "userOptionsRef",
941
- ref: zt,
942
- key: `user_options_${kt.value}`,
943
- backgroundColor: M.value.style.chart.backgroundColor,
944
- color: M.value.style.chart.color,
945
- isPrinting: C(en),
946
- isImaging: C(tn),
947
- uid: D.value,
948
- hasTooltip: M.value.userOptions.buttons.tooltip && M.value.style.chart.tooltip.show,
949
- hasPdf: M.value.userOptions.buttons.pdf,
950
- hasImg: M.value.userOptions.buttons.img,
951
- hasSvg: M.value.userOptions.buttons.svg,
952
- hasXls: M.value.userOptions.buttons.csv,
953
- hasTable: M.value.userOptions.buttons.table,
954
- hasFullscreen: M.value.userOptions.buttons.fullscreen,
955
- hasAltCopy: M.value.userOptions.buttons.altCopy,
956
- isFullscreen: $.value,
957
- isTooltip: L.value.showTooltip,
958
- titles: { ...M.value.userOptions.buttonTitles },
959
- chartElement: k.value,
960
- position: M.value.userOptions.position,
961
- hasAnnotator: M.value.userOptions.buttons.annotator,
962
- isAnnotation: qn.value,
963
- callbacks: M.value.userOptions.callbacks,
964
- printScale: M.value.userOptions.print.scale,
965
- tableDialog: M.value.table.useDialog,
966
- isCursorPointer: N.value,
967
- onToggleFullscreen: Wn,
968
- onGeneratePdf: C(nn),
969
- onGenerateCsv: Un,
970
- onGenerateImage: ir,
971
- onGenerateSvg: rr,
972
- onToggleTable: Gn,
973
- onToggleTooltip: Kn,
974
- onToggleAnnotator: Jn,
975
- onCopyAlt: ar,
976
- style: Be({ visibility: C(Xt) ? C(Jt) ? "visible" : "hidden" : "visible" })
977
- }, Pe({ _: 2 }, [
978
- e.$slots.menuIcon ? {
979
- name: "menuIcon",
980
- fn: T(({ isOpen: t, color: n }) => [x(e.$slots, "menuIcon", _(g({
981
- isOpen: t,
982
- color: n
983
- })), void 0, !0)]),
984
- key: "0"
985
- } : void 0,
986
- e.$slots.optionTooltip ? {
987
- name: "optionTooltip",
988
- fn: T(() => [x(e.$slots, "optionTooltip", {}, void 0, !0)]),
989
- key: "1"
990
- } : void 0,
991
- e.$slots.optionPdf ? {
992
- name: "optionPdf",
993
- fn: T(() => [x(e.$slots, "optionPdf", {}, void 0, !0)]),
994
- key: "2"
995
- } : void 0,
996
- e.$slots.optionCsv ? {
997
- name: "optionCsv",
998
- fn: T(() => [x(e.$slots, "optionCsv", {}, void 0, !0)]),
999
- key: "3"
1000
- } : void 0,
1001
- e.$slots.optionImg ? {
1002
- name: "optionImg",
1003
- fn: T(() => [x(e.$slots, "optionImg", {}, void 0, !0)]),
1004
- key: "4"
1005
- } : void 0,
1006
- e.$slots.optionSvg ? {
1007
- name: "optionSvg",
1008
- fn: T(() => [x(e.$slots, "optionSvg", {}, void 0, !0)]),
1009
- key: "5"
1010
- } : void 0,
1011
- e.$slots.optionTable ? {
1012
- name: "optionTable",
1013
- fn: T(() => [x(e.$slots, "optionTable", {}, void 0, !0)]),
1014
- key: "6"
1015
- } : void 0,
1016
- e.$slots.optionFullscreen ? {
1017
- name: "optionFullscreen",
1018
- fn: T(({ toggleFullscreen: t, isFullscreen: n }) => [x(e.$slots, "optionFullscreen", _(g({
1019
- toggleFullscreen: t,
1020
- isFullscreen: n
1021
- })), void 0, !0)]),
1022
- key: "7"
1023
- } : void 0,
1024
- e.$slots.optionAnnotator ? {
1025
- name: "optionAnnotator",
1026
- fn: T(({ toggleAnnotator: t, isAnnotator: n }) => [x(e.$slots, "optionAnnotator", _(g({
1027
- toggleAnnotator: t,
1028
- isAnnotator: n
1029
- })), void 0, !0)]),
1030
- key: "8"
1031
- } : void 0,
1032
- e.$slots.optionAltCopy ? {
1033
- name: "optionAltCopy",
1034
- fn: T(({ altCopy: t }) => [x(e.$slots, "optionAltCopy", _(g({ altCopy: t })), void 0, !0)]),
1035
- key: "9"
1036
- } : void 0,
1037
- e.$slots["custom-menu-before"] ? {
1038
- name: "custom-menu-before",
1039
- fn: T(() => [x(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1040
- key: "10"
1041
- } : void 0,
1042
- e.$slots["custom-menu-after"] ? {
1043
- name: "custom-menu-after",
1044
- fn: T(() => [x(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1045
- key: "11"
1046
- } : void 0
1047
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : f("", !0),
1048
- m("div", Ze, [(v(), p("svg", {
1049
- ref_key: "svgRef",
1050
- ref: P,
1051
- xmlns: C(le),
1052
- "aria-describedby": `chart-instructions-${D.value}`,
1053
- class: ze({
1054
- "vue-data-ui-fullscreen--on": $.value,
1055
- "vue-data-ui-fulscreen--off": !$.value
1056
- }),
1057
- tabindex: "0",
1058
- viewBox: `0 0 ${R.value.width <= 0 ? 10 : R.value.width} ${R.value.height <= 0 ? 10 : R.value.height}`,
1059
- style: Be(`max-width:100%;overflow:visible;background:transparent;color:${M.value.style.chart.color}`),
1060
- onFocus: or,
1061
- onBlur: sr,
1062
- onKeydown: cr
1063
- }, [
1064
- Ie(C(bt)),
1065
- m("defs", null, [(v(!0), p(l, null, b(W.value, (e, t) => (v(), d(Te, {
1066
- t: "radial",
1067
- cx: "50%",
1068
- cy: "50%",
1069
- r: "50%",
1070
- fx: "50%",
1071
- fy: "50%",
1072
- id: `gradient_${D.value}_${t}`,
1073
- key: `gradient_${D.value}_${t}`,
1074
- stops: [[
1075
- "0%",
1076
- C(de)(C(n)(e.color, .05), 100 - M.value.style.chart.layout.rect.gradientIntensity),
1077
- 1
1078
- ], [
1079
- "100%",
1080
- e.color,
1081
- 1
1082
- ]]
1083
- }, null, 8, ["id", "stops"]))), 128))]),
1084
- m("defs", null, [m("filter", {
1085
- id: `blur_${D.value}`,
1086
- x: "-50%",
1087
- y: "-50%",
1088
- width: "200%",
1089
- height: "200%"
1090
- }, [...t[4] ||= [m("feGaussianBlur", {
1091
- in: "SourceGraphic",
1092
- stdDeviation: 2
1093
- }, null, -1), m("feColorMatrix", {
1094
- type: "saturate",
1095
- values: "0"
1096
- }, null, -1)]], 8, $e)]),
1097
- M.value.useCustomCells && W.value.length && e.$slots.cell ? (v(!0), p(l, { key: 0 }, b(G.value, (t, n) => (v(), p("foreignObject", {
1098
- x: t.x,
1099
- y: t.y,
1100
- height: V.value <= 0 ? 1e-4 : V.value,
1101
- width: B.value <= 0 ? 1e-4 : B.value,
1102
- class: "vue-ui-waffle-custom-cell-foreignObject"
1103
- }, [x(e.$slots, "cell", Le({ ref_for: !0 }, {
1104
- cell: {
1105
- ...t,
1106
- color: W.value[n].color,
1107
- height: Math.max(0, V.value),
1108
- width: Math.max(0, B.value),
1109
- ...W.value[n]
1110
- },
1111
- isSelected: [null, void 0].includes(O.value) ? !0 : W.value[n].serieIndex === O.value
1112
- }), void 0, !0)], 8, et))), 256)) : f("", !0),
1113
- !W.value.length && !M.value.useCustomCells ? (v(), p("rect", {
1114
- key: 1,
1115
- x: 12,
1116
- y: 12,
1117
- height: z.value.height - 24,
1118
- width: z.value.width - 24,
1119
- rx: 3,
1120
- fill: "none",
1121
- stroke: "black"
1122
- }, null, 8, tt)) : W.value.length && !M.value.useCustomCells ? (v(), p(l, { key: 2 }, [
1123
- e.$slots.pattern ? (v(), p("g", nt, [(v(!0), p(l, null, b(fn.value, (t) => (v(), p("defs", null, [x(e.$slots, "pattern", Le({ ref_for: !0 }, {
1124
- seriesIndex: t.absoluteIndex,
1125
- patternId: `pattern_${D.value}_${t.absoluteIndex}`
1126
- }), void 0, !0)]))), 256))])) : f("", !0),
1127
- (v(!0), p(l, null, b(G.value, (e, t) => (v(), p("rect", {
1128
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1129
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1130
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1131
- height: V.value <= 0 ? 1e-4 : V.value,
1132
- width: B.value <= 0 ? 1e-4 : B.value,
1133
- fill: "white",
1134
- stroke: M.value.style.chart.layout.rect.stroke,
1135
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1136
- filter: Bn(W.value[t].serieIndex)
1137
- }, null, 8, rt))), 256)),
1138
- (v(!0), p(l, null, b(G.value, (e, t) => (v(), p("rect", {
1139
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1140
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1141
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1142
- height: V.value <= 0 ? 1e-4 : V.value,
1143
- width: B.value <= 0 ? 1e-4 : B.value,
1144
- fill: M.value.style.chart.layout.rect.useGradient && M.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${D.value}_${t})` : W.value[t].color,
1145
- stroke: M.value.style.chart.layout.rect.stroke,
1146
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1147
- filter: Bn(W.value[t].serieIndex)
1148
- }, null, 8, it))), 256)),
1149
- e.$slots.pattern ? (v(), p("g", at, [(v(!0), p(l, null, b(G.value, (e, t) => (v(), p("rect", {
1150
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1151
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1152
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1153
- height: V.value <= 0 ? 1e-4 : V.value,
1154
- width: B.value <= 0 ? 1e-4 : B.value,
1155
- fill: `url(#pattern_${D.value}_${W.value[t].absoluteIndex})`,
1156
- stroke: "none",
1157
- filter: Bn(W.value[t].serieIndex)
1158
- }, null, 8, ot))), 256))])) : f("", !0)
1159
- ], 64)) : f("", !0),
1160
- e.$slots.cellSvg ? (v(!0), p(l, { key: 3 }, b(G.value, (t, n) => (v(), p("g", null, [x(e.$slots, "cellSvg", Le({ ref_for: !0 }, {
1161
- cell: {
1162
- ...t,
1163
- color: W.value[n].color,
1164
- height: Math.max(0, V.value),
1165
- width: Math.max(0, B.value),
1166
- ...W.value[n]
1167
- },
1168
- isSelected: [null, void 0].includes(O.value) ? !0 : W.value[n].serieIndex === O.value
1169
- }), void 0, !0)]))), 256)) : f("", !0),
1170
- (v(!0), p(l, null, b(G.value, (e, t) => (v(), p(l, null, [Vn(t, e) ? (v(), p("text", {
1171
- key: `datalabel_${t}`,
1172
- textContent: S(Hn(t, e)),
1173
- x: e.x + M.value.style.chart.layout.labels.captions.offsetX + M.value.style.chart.layout.grid.spaceBetween / 2 + 6,
1174
- y: e.y + M.value.style.chart.layout.labels.captions.offsetY + M.value.style.chart.layout.grid.spaceBetween / 2 + cn.value / 2 + M.value.style.chart.layout.labels.captions.fontSize / 3,
1175
- "font-size": M.value.style.chart.layout.labels.captions.fontSize,
1176
- fill: C(se)(W.value[t].color),
1177
- filter: Bn(W.value[t].serieIndex)
1178
- }, null, 8, st)) : f("", !0)], 64))), 256)),
1179
- (v(!0), p(l, null, b(G.value, (e, t) => (v(), p("rect", {
1180
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1181
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1182
- height: cn.value,
1183
- width: sn.value,
1184
- fill: "transparent",
1185
- stroke: "none",
1186
- onMouseover: (e) => Rn(t),
1187
- onMouseleave: (e) => Ln(t),
1188
- onClick: (e) => In(t)
1189
- }, null, 40, ct))), 256)),
1190
- x(e.$slots, "svg", { svg: {
1191
- ...R.value,
1192
- isPrintingImg: C(en) || C(tn) || Bt.value,
1193
- isPrintingSvg: Vt.value
1194
- } }, void 0, !0)
1195
- ], 46, Qe)), e.$slots.hint ? (v(), p("div", lt, [x(e.$slots, "hint", _(g({
1196
- hint: M.value.a11y.translations.keyboardNavigation,
1197
- isVisible: Ut.value
1198
- })), void 0, !0)])) : f("", !0)]),
1199
- e.$slots.watermark ? (v(), p("div", ut, [x(e.$slots, "watermark", _(g({ isPrinting: C(en) || C(tn) || Bt.value || Vt.value })), void 0, !0)])) : f("", !0),
1200
- m("div", { id: `legend-bottom-${D.value}` }, null, 8, dt),
1201
- Lt.value && (M.value.style.chart.legend.show || e.$slots.legend) ? (v(), d(Ne, {
1202
- key: 6,
1203
- to: M.value.style.chart.legend.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
1204
- }, [m("div", {
1205
- ref_key: "chartLegend",
1206
- ref: jt
1207
- }, [x(e.$slots, "legend", { legend: J.value }, () => [M.value.style.chart.legend.show ? (v(), d(je, {
1208
- key: `legend_${It.value}`,
1209
- legendSet: J.value,
1210
- config: jn.value,
1211
- isCursorPointer: N.value,
1212
- onClickMarker: t[0] ||= ({ legend: e }) => q(e.uid)
1213
- }, Pe({
1214
- item: T(({ legend: e }) => [m("div", {
1215
- onClick: (t) => e.segregate(),
1216
- style: Be(`opacity:${K.value.includes(e.uid) ? .5 : 1}`)
1217
- }, S(e.display), 13, ft)]),
1218
- legendToggle: T(() => [J.value.length > 2 && M.value.style.chart.legend.selectAllToggle.show && !C(Gt) ? (v(), d(Ee, {
1219
- key: 0,
1220
- backgroundColor: M.value.style.chart.legend.selectAllToggle.backgroundColor,
1221
- color: M.value.style.chart.legend.selectAllToggle.color,
1222
- fontSize: M.value.style.chart.legend.fontSize,
1223
- checked: K.value.length > 0,
1224
- isCursorPointer: N.value,
1225
- onToggle: En
1226
- }, null, 8, [
1227
- "backgroundColor",
1228
- "color",
1229
- "fontSize",
1230
- "checked",
1231
- "isCursorPointer"
1232
- ])) : f("", !0)]),
1233
- _: 2
1234
- }, [e.$slots.pattern ? {
1235
- name: "legend-pattern",
1236
- fn: T(({ legend: e, index: t }) => [Ie(xe, {
1237
- shape: e.shape,
1238
- radius: 30,
1239
- stroke: "none",
1240
- plot: {
1241
- x: 30,
1242
- y: 30
1243
- },
1244
- fill: `url(#pattern_${D.value}_${t})`
1245
- }, null, 8, ["shape", "fill"])]),
1246
- key: "0"
1247
- } : void 0]), 1032, [
1248
- "legendSet",
1249
- "config",
1250
- "isCursorPointer"
1251
- ])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
1252
- e.$slots.source ? (v(), p("div", {
1253
- key: 7,
1254
- ref_key: "source",
1255
- ref: Mt,
1256
- dir: "auto"
1257
- }, [x(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
1258
- Ie(C(mt), {
1259
- teleportTo: M.value.style.chart.tooltip.teleportTo,
1260
- show: L.value.showTooltip && Dt.value && K.value.length < E.dataset.length,
1261
- backgroundColor: M.value.style.chart.tooltip.backgroundColor,
1262
- color: M.value.style.chart.tooltip.color,
1263
- borderRadius: M.value.style.chart.tooltip.borderRadius,
1264
- borderColor: M.value.style.chart.tooltip.borderColor,
1265
- borderWidth: M.value.style.chart.tooltip.borderWidth,
1266
- backgroundOpacity: M.value.style.chart.tooltip.backgroundOpacity,
1267
- position: M.value.style.chart.tooltip.position,
1268
- offsetX: M.value.style.chart.tooltip.offsetX,
1269
- offsetY: M.value.style.chart.tooltip.offsetY,
1270
- parent: k.value,
1271
- content: Ot.value,
1272
- isCustom: M.value.style.chart.tooltip.customFormat && typeof M.value.style.chart.tooltip.customFormat == "function",
1273
- fontSize: M.value.style.chart.tooltip.fontSize,
1274
- isFullscreen: $.value,
1275
- smooth: M.value.style.chart.tooltip.smooth,
1276
- backdropFilter: M.value.style.chart.tooltip.backdropFilter,
1277
- smoothForce: M.value.style.chart.tooltip.smoothForce,
1278
- smoothSnapThreshold: M.value.style.chart.tooltip.smoothSnapThreshold,
1279
- isA11yMode: j.value === "keyboard",
1280
- a11yPosition: Ht.value
1281
- }, {
1282
- "tooltip-before": T(() => [x(e.$slots, "tooltip-before", _(g({ ...Mn.value })), void 0, !0)]),
1283
- tooltip: T(() => [x(e.$slots, "tooltip", _(g({ ...Mn.value })), void 0, !0)]),
1284
- "tooltip-after": T(() => [x(e.$slots, "tooltip-after", _(g({ ...Mn.value })), void 0, !0)]),
1285
- _: 3
1286
- }, 8, [
1287
- "teleportTo",
1288
- "show",
1289
- "backgroundColor",
1290
- "color",
1291
- "borderRadius",
1292
- "borderColor",
1293
- "borderWidth",
1294
- "backgroundOpacity",
1295
- "position",
1296
- "offsetX",
1297
- "offsetY",
1298
- "parent",
1299
- "content",
1300
- "isCustom",
1301
- "fontSize",
1302
- "isFullscreen",
1303
- "smooth",
1304
- "backdropFilter",
1305
- "smoothForce",
1306
- "smoothSnapThreshold",
1307
- "isA11yMode",
1308
- "a11yPosition"
1309
- ]),
1310
- Et.value && M.value.userOptions.buttons.table ? (v(), d(Ue(Xn.value.component), Le({ key: 8 }, Xn.value.props, {
1311
- ref_key: "tableUnit",
1312
- ref: Rt,
1313
- onClose: Zn
1314
- }), Pe({
1315
- content: T(() => [(v(), d(C(gt), {
1316
- key: `table_${Ft.value}`,
1317
- colNames: Q.value.colNames,
1318
- head: Q.value.head,
1319
- body: Q.value.body,
1320
- config: Q.value.config,
1321
- title: M.value.table.useDialog ? "" : Xn.value.title,
1322
- withCloseButton: !M.value.table.useDialog,
1323
- isCursorPointer: N.value,
1324
- onClose: Zn
1325
- }, {
1326
- th: T(({ th: e }) => [m("div", {
1327
- innerHTML: e,
1328
- style: {
1329
- display: "flex",
1330
- "align-items": "center"
1331
- }
1332
- }, null, 8, pt)]),
1333
- td: T(({ td: e }) => [Fe(S(e.name || e), 1)]),
1334
- _: 1
1335
- }, 8, [
1336
- "colNames",
1337
- "head",
1338
- "body",
1339
- "config",
1340
- "title",
1341
- "withCloseButton",
1342
- "isCursorPointer"
1343
- ]))]),
1344
- _: 2
1345
- }, [M.value.table.useDialog ? {
1346
- name: "title",
1347
- fn: T(() => [Fe(S(Xn.value.title), 1)]),
1348
- key: "0"
1349
- } : void 0, M.value.table.useDialog ? {
1350
- name: "actions",
1351
- fn: T(() => [m("button", {
1352
- tabindex: "0",
1353
- class: "vue-ui-user-options-button",
1354
- onClick: t[1] ||= (e) => Un(M.value.userOptions.callbacks.csv),
1355
- style: Be({ cursor: N.value ? "pointer" : "default" })
1356
- }, [Ie(C(ht), {
1357
- name: "fileCsv",
1358
- stroke: Xn.value.props.color
1359
- }, null, 8, ["stroke"])], 4)]),
1360
- key: "1"
1361
- } : void 0]), 1040)) : f("", !0),
1362
- x(e.$slots, "skeleton", {}, () => [C(Gt) ? (v(), d(he, { key: 0 })) : f("", !0)], !0)
1363
- ], 46, Je));
1364
- }
1365
- }, [["__scopeId", "data-v-8de28266"]]);
1366
- //#endregion
1367
- export { qe as n, mt as t };