vue-data-ui 3.23.10 → 3.23.12

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 (200) hide show
  1. package/README.md +40 -40
  2. package/dist/{Arrow-bwmME0jw.js → Arrow-DrF4NNJO.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DBVHlhQZ.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
  4. package/dist/{BaseIcon-B4n7br_R.js → BaseIcon-BbElSC8_.js} +1 -1
  5. package/dist/{BaseLegendToggle-wRhcG_-q.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
  6. package/dist/{BaseZoomControls-BZjzzyQo.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
  7. package/dist/{ColorPicker-B9kUMLSz.js → ColorPicker-ChOgAmCi.js} +2 -2
  8. package/dist/{DataTable-DMsScfkx.js → DataTable-CmyEubtT.js} +2 -2
  9. package/dist/{HillActions-IWPfuceW.js → HillActions-3HneGJhS.js} +1 -1
  10. package/dist/{Legend-DWEFXq9E.js → Legend-BJtY2RA9.js} +2 -2
  11. package/dist/{NonSvgPenAndPaper-Crs4-xWz.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
  12. package/dist/{PackageVersion-DNTJUKh1.js → PackageVersion-CT8FfP7h.js} +1 -1
  13. package/dist/{PenAndPaper-DJ607Hx6.js → PenAndPaper-CIa1F5Jq.js} +3 -3
  14. package/dist/{Shape-BAhF1ToV.js → Shape-BAL5bQmA.js} +1 -1
  15. package/dist/{SlicerPreview-sXtk2ZZ2.js → SlicerPreview-BRRyc1p7.js} +426 -426
  16. package/dist/{SparkTooltip-BE50SZQH.js → SparkTooltip-Bou05CV_.js} +1 -1
  17. package/dist/{Title-BGLPsoA9.js → Title-CaVA8EIw.js} +1 -1
  18. package/dist/{Tooltip-DO4-MVhc.js → Tooltip-CVxJe3UW.js} +1 -1
  19. package/dist/{UserOptions-HQyukyl2.js → UserOptions-WH7-49V0.js} +2 -2
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-Cg_3vpOo.js → dom-to-png-COvyU2SG.js} +1 -1
  91. package/dist/exposedLib-DrUEXSyf.js +28 -0
  92. package/dist/{img-tU9mMt9W.js → img-Bkzj3lDD.js} +1 -1
  93. package/dist/{labelUtils-C_lMnQRs.js → labelUtils-iX76cA2-.js} +1 -1
  94. package/dist/{lib-AT2PUyyh.js → lib-Dqr_-I6Y.js} +165 -162
  95. package/dist/{package-enC-Nivt.js → package-CXgp_UWC.js} +1 -1
  96. package/dist/{pdf-ColHHJFH.js → pdf-Bk_9lTdQ.js} +1 -1
  97. package/dist/{render-common-CqcoYfCA.js → render-common-D9TESN6N.js} +12 -12
  98. package/dist/ssr/vue-ui-donut.js +1 -1
  99. package/dist/ssr/vue-ui-xy.js +1 -1
  100. package/dist/ssr.js +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/types/vue-data-ui.d.ts +13 -2
  103. package/dist/types/vue-ui-dag.d.ts +2 -0
  104. package/dist/{useNestedProp-CW0vJS1B.js → useNestedProp-CulPqtou.js} +1 -1
  105. package/dist/{usePrinter-BFS7d6eb.js → usePrinter-CEiH1b6R.js} +2 -2
  106. package/dist/utils.js +9 -9
  107. package/dist/{vue-data-ui-DD7J3yor.js → vue-data-ui-BTHfxD0A.js} +69 -69
  108. package/dist/vue-data-ui.js +73 -73
  109. package/dist/vue-ui-3d-bar-qYgLQzCk.js +1829 -0
  110. package/dist/{vue-ui-accordion-DJNjilyy.js → vue-ui-accordion-C6L7glHU.js} +3 -3
  111. package/dist/{vue-ui-age-pyramid-DI8b5E2H.js → vue-ui-age-pyramid-DlDqWHMv.js} +27 -27
  112. package/dist/{vue-ui-annotator-7ZVfFskI.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
  113. package/dist/vue-ui-bullet-KPROgHpN.js +700 -0
  114. package/dist/{vue-ui-bump-DzB3WQnq.js → vue-ui-bump-_ccDjRda.js} +237 -237
  115. package/dist/{vue-ui-candlestick--YWEtek_.js → vue-ui-candlestick-C_21KIXE.js} +245 -245
  116. package/dist/{vue-ui-carousel-table-Dn3RZU0p.js → vue-ui-carousel-table--JukD8gC.js} +108 -108
  117. package/dist/{vue-ui-chestnut-BIsXeXiU.js → vue-ui-chestnut-BWvgfxnY.js} +86 -86
  118. package/dist/vue-ui-chord-CGkWt2XK.js +1345 -0
  119. package/dist/vue-ui-circle-pack-BWaN2mEB.js +1633 -0
  120. package/dist/{vue-ui-cursor-C-P2D5i6.js → vue-ui-cursor-YbxnsOd1.js} +3 -3
  121. package/dist/{vue-ui-dag-CThnMMWA.js → vue-ui-dag-B-X2eE3W.js} +923 -885
  122. package/dist/{vue-ui-dashboard-D0NNTRO3.js → vue-ui-dashboard-DgayqETw.js} +69 -69
  123. package/dist/{vue-ui-digits-9tGjGzZh.js → vue-ui-digits-1ULOKtDh.js} +3 -3
  124. package/dist/{vue-ui-donut-EZu8p7HF.js → vue-ui-donut-Bz2ZI_vO.js} +85 -85
  125. package/dist/{vue-ui-donut-DLN9uPOi.js → vue-ui-donut-Ci2MsJLu.js} +64 -64
  126. package/dist/{vue-ui-donut-evolution-mu-iGTIn.js → vue-ui-donut-evolution-Bo54mlFQ.js} +347 -347
  127. package/dist/{vue-ui-dumbbell-Dvldi3Oo.js → vue-ui-dumbbell-D2bJ_P7K.js} +229 -229
  128. package/dist/vue-ui-flow-D9m-k3tM.js +1214 -0
  129. package/dist/vue-ui-funnel-DyETq2KE.js +747 -0
  130. package/dist/{vue-ui-galaxy-D6eYN8Ut.js → vue-ui-galaxy-pjGKZLrq.js} +64 -64
  131. package/dist/vue-ui-gauge-BO5lLCyJ.js +932 -0
  132. package/dist/{vue-ui-geo-CQqNemR6.js → vue-ui-geo-DpyLvk_B.js} +34 -34
  133. package/dist/{vue-ui-gizmo-ClunTUxX.js → vue-ui-gizmo-CUl8dgmV.js} +10 -10
  134. package/dist/{vue-ui-heatmap-B_pSQNzO.js → vue-ui-heatmap-CiV3kCrx.js} +472 -472
  135. package/dist/{vue-ui-hill-Byp0Tnny.js → vue-ui-hill-CkMtYGo2.js} +10 -10
  136. package/dist/vue-ui-history-plot-X2gQI4TY.js +1695 -0
  137. package/dist/vue-ui-horizontal-bar-DVT1wthh.js +1708 -0
  138. package/dist/{vue-ui-kpi-BKw5t-rX.js → vue-ui-kpi-CWPmkLKR.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-BNm0MQDw.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
  140. package/dist/{vue-ui-molecule-DRwQV5hN.js → vue-ui-molecule-DnW5HYZP.js} +176 -176
  141. package/dist/{vue-ui-mood-radar-Bj3KTWYj.js → vue-ui-mood-radar-FovwTDLw.js} +20 -20
  142. package/dist/{vue-ui-nested-donuts-83Wh2w6z.js → vue-ui-nested-donuts-DHCOlxTO.js} +104 -104
  143. package/dist/vue-ui-onion-CzAEqZ0B.js +1233 -0
  144. package/dist/vue-ui-parallel-coordinate-plot-BZN75P6u.js +1430 -0
  145. package/dist/{vue-ui-quadrant-_J-Qr7-K.js → vue-ui-quadrant-CNeP5WEC.js} +32 -32
  146. package/dist/{vue-ui-quick-chart-DcOUq4ym.js → vue-ui-quick-chart-Bnj8oh82.js} +153 -153
  147. package/dist/{vue-ui-radar-FlRlsoAd.js → vue-ui-radar-DMyMAtx7.js} +41 -41
  148. package/dist/{vue-ui-rating-eCxEZD8C.js → vue-ui-rating-dBCk6ECe.js} +26 -26
  149. package/dist/vue-ui-relation-circle-DFj5V39I.js +903 -0
  150. package/dist/vue-ui-ridgeline-BaplQZZK.js +1614 -0
  151. package/dist/vue-ui-rings-B9QJ1Rnb.js +1250 -0
  152. package/dist/vue-ui-scatter-UH0wqUO5.js +2403 -0
  153. package/dist/{vue-ui-skeleton-CNOam3kC.js → vue-ui-skeleton-DkoEclfa.js} +3 -3
  154. package/dist/{vue-ui-smiley-YdyidjBH.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
  155. package/dist/{vue-ui-spark-trend-CS5GLtYL.js → vue-ui-spark-trend-BW8WYOva.js} +23 -23
  156. package/dist/{vue-ui-sparkbar-DDHwgP4k.js → vue-ui-sparkbar-ADRsH-GZ.js} +24 -24
  157. package/dist/{vue-ui-sparkgauge-BcQu9V3h.js → vue-ui-sparkgauge-BYs1L6I7.js} +61 -61
  158. package/dist/{vue-ui-sparkhistogram-CPsA5P6c.js → vue-ui-sparkhistogram-D1Paq9X0.js} +15 -15
  159. package/dist/vue-ui-sparkline-D2Hf_NP-.js +1584 -0
  160. package/dist/{vue-ui-sparkstackbar-4tsTxMe2.js → vue-ui-sparkstackbar-Uy6Q0X15.js} +207 -207
  161. package/dist/vue-ui-stackbar-Vt9AjazE.js +2332 -0
  162. package/dist/{vue-ui-stackline-BNCWO_jG.js → vue-ui-stackline-CBIGhWpn.js} +605 -605
  163. package/dist/{vue-ui-strip-plot-2Y1c02Ek.js → vue-ui-strip-plot-DhZV1Sl6.js} +57 -57
  164. package/dist/vue-ui-table-DqMxdgj4.js +1352 -0
  165. package/dist/{vue-ui-table-heatmap-BacaEjQy.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
  166. package/dist/{vue-ui-table-sparkline-B8oAU5yr.js → vue-ui-table-sparkline-2KZ2UoEA.js} +11 -11
  167. package/dist/vue-ui-thermometer-mVP2GqO7.js +756 -0
  168. package/dist/{vue-ui-timer-CWZgSpP8.js → vue-ui-timer-CGrqG8H3.js} +12 -12
  169. package/dist/{vue-ui-tiremarks-LLVCPyg9.js → vue-ui-tiremarks-DyFUPB5s.js} +12 -12
  170. package/dist/{vue-ui-treemap-ehBl9JMC.js → vue-ui-treemap-BVFHSTfq.js} +44 -44
  171. package/dist/vue-ui-waffle-DNZsc5x0.js +1619 -0
  172. package/dist/{vue-ui-wheel-C4OHPrtC.js → vue-ui-wheel-Cg4oNFmH.js} +28 -28
  173. package/dist/{vue-ui-word-cloud-CDHn3Kwa.js → vue-ui-word-cloud-CUf1h_L1.js} +32 -32
  174. package/dist/{vue-ui-world-ao1xf04I.js → vue-ui-world-CIcrI3zP.js} +116 -116
  175. package/dist/{vue-ui-xy-DmJDCl3c.js → vue-ui-xy-8V-CU7No.js} +99 -99
  176. package/dist/{vue-ui-xy-_U3wmtCf.js → vue-ui-xy-CJ5ZixIL.js} +304 -304
  177. package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
  178. package/package.json +1 -1
  179. package/dist/exposedLib-vfRiIvq_.js +0 -28
  180. package/dist/vue-ui-3d-bar-DgrcdAgz.js +0 -1829
  181. package/dist/vue-ui-bullet-Dyd5F1Wa.js +0 -700
  182. package/dist/vue-ui-chord-BimXqVsF.js +0 -1345
  183. package/dist/vue-ui-circle-pack-DKQEhL-L.js +0 -1633
  184. package/dist/vue-ui-flow-DYZBT5Cb.js +0 -1214
  185. package/dist/vue-ui-funnel--NaxO0cZ.js +0 -747
  186. package/dist/vue-ui-gauge-DTIEl2Xb.js +0 -932
  187. package/dist/vue-ui-history-plot-CMu8ST1E.js +0 -1695
  188. package/dist/vue-ui-horizontal-bar-BQn7WxQ-.js +0 -1708
  189. package/dist/vue-ui-onion-C27GpneA.js +0 -1233
  190. package/dist/vue-ui-parallel-coordinate-plot-BklOszr1.js +0 -1430
  191. package/dist/vue-ui-relation-circle-DnsxHv7t.js +0 -903
  192. package/dist/vue-ui-ridgeline-TopTLyaE.js +0 -1614
  193. package/dist/vue-ui-rings-obVfb09j.js +0 -1250
  194. package/dist/vue-ui-scatter-BHSuA506.js +0 -2403
  195. package/dist/vue-ui-sparkline-CnbO-GkM.js +0 -1584
  196. package/dist/vue-ui-stackbar-2_SrMFNT.js +0 -2332
  197. package/dist/vue-ui-table-DJZxHo5N.js +0 -1352
  198. package/dist/vue-ui-thermometer-BGtxNU9T.js +0 -756
  199. package/dist/vue-ui-waffle-DpBAXbhh.js +0 -1610
  200. package/dist/vue-ui-xy-canvas-Bx-9y53V.js +0 -1823
@@ -1,1610 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Bt as n, D as r, Jt as i, Kt as a, Pt as o, S as s, Vt as c, X as l, ct as ee, i as te, jt as ne, n as re, pt as ie, q as ae, r as oe, t as se, tt as ce, w as le, xt as ue } from "./lib-AT2PUyyh.js";
3
- import { n as de, t as fe } from "./useHints-Dq_w2E8B.js";
4
- import { t as pe } from "./useConfig-DwdGsXTx.js";
5
- import { t as me } from "./usePrinter-BFS7d6eb.js";
6
- import { n as he, t as ge } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as _e } from "./useNestedProp-CW0vJS1B.js";
8
- import { t as ve } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as ye } from "./useChartExport-DNiwdPmb.js";
10
- import { t as be } from "./useTransitions-g_zBREk2.js";
11
- import { t as xe } from "./img-tU9mMt9W.js";
12
- import { n as Se } from "./Title-BGLPsoA9.js";
13
- import { t as Ce } from "./Shape-BAhF1ToV.js";
14
- import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
15
- import { l as Te, t as Ee } from "./useResponsive-ZtArZtUf.js";
16
- import { t as De } from "./DefGrad-DVBqDjhO.js";
17
- import { t as Oe } from "./BaseLegendToggle-wRhcG_-q.js";
18
- import { t as ke } from "./A11yDataTable-DdRsVULz.js";
19
- import { t as Ae } from "./useUserOptionState-DK-_1ddE.js";
20
- import { t as je } from "./useChartAccessibility-DYqac8yF.js";
21
- import { t as Me } from "./labelUtils-C_lMnQRs.js";
22
- import { t as Ne } from "./Legend-DWEFXq9E.js";
23
- import { t as Pe } from "./usePrefersMotion-BC-CsqR1.js";
24
- import { t as Fe } from "./vue_ui_waffle-DE_DiSVP.js";
25
- import { Fragment as u, Teleport as Ie, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as Le, createTextVNode as Re, createVNode as ze, defineAsyncComponent as g, guardReactiveProps as _, mergeProps as Be, nextTick as Ve, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as He, onMounted as Ue, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as We, shallowRef as Ge, toDisplayString as Ke, toRefs as qe, unref as T, useSlots as Je, watch as Ye, withCtx as E } from "vue";
26
- //#region src/components/vue-ui-waffle.vue
27
- var Xe = /* @__PURE__ */ e({ default: () => wt }), Ze = ["id"], Qe = ["id"], $e = ["id"], et = { style: { position: "relative" } }, tt = [
28
- "xmlns",
29
- "aria-describedby",
30
- "viewBox"
31
- ], nt = ["id"], rt = [
32
- "x",
33
- "y",
34
- "height",
35
- "width"
36
- ], it = ["height", "width"], at = { key: 0 }, ot = [
37
- "d",
38
- "stroke",
39
- "stroke-width",
40
- "filter"
41
- ], st = [
42
- "d",
43
- "fill",
44
- "stroke",
45
- "stroke-width",
46
- "filter"
47
- ], ct = { key: 0 }, lt = [
48
- "d",
49
- "fill",
50
- "filter"
51
- ], ut = [
52
- "rx",
53
- "x",
54
- "y",
55
- "height",
56
- "width",
57
- "stroke",
58
- "stroke-width",
59
- "filter"
60
- ], dt = [
61
- "rx",
62
- "x",
63
- "y",
64
- "height",
65
- "width",
66
- "fill",
67
- "stroke",
68
- "stroke-width",
69
- "filter"
70
- ], ft = { key: 0 }, pt = [
71
- "rx",
72
- "x",
73
- "y",
74
- "height",
75
- "width",
76
- "fill",
77
- "filter"
78
- ], mt = [
79
- "points",
80
- "stroke",
81
- "stroke-width",
82
- "stroke-linejoin"
83
- ], ht = [
84
- "textContent",
85
- "x",
86
- "y",
87
- "font-size",
88
- "fill",
89
- "filter"
90
- ], gt = [
91
- "d",
92
- "onMouseover",
93
- "onMouseleave",
94
- "onClick"
95
- ], _t = [
96
- "x",
97
- "y",
98
- "height",
99
- "width",
100
- "onMouseover",
101
- "onMouseleave",
102
- "onClick"
103
- ], vt = {
104
- key: 0,
105
- style: {
106
- position: "absolute",
107
- top: "100%",
108
- left: "0",
109
- width: "100%"
110
- },
111
- "data-dom-to-png-ignore": "",
112
- "aria-hidden": "true"
113
- }, yt = {
114
- key: 5,
115
- class: "vue-data-ui-watermark"
116
- }, bt = ["id"], xt = ["onClick"], St = { key: 0 }, Ct = { key: 1 }, wt = /*#__PURE__*/ we({
117
- __name: "vue-ui-waffle",
118
- props: {
119
- config: {
120
- type: Object,
121
- default() {
122
- return {};
123
- }
124
- },
125
- dataset: {
126
- type: Array,
127
- default() {
128
- return [];
129
- }
130
- }
131
- },
132
- emits: ["selectLegend", "copyAlt"],
133
- setup(e, { expose: we, emit: Xe }) {
134
- let wt = g(() => import("./Tooltip-DO4-MVhc.js")), Tt = g(() => import("./BaseIcon-B4n7br_R.js").then((e) => e.n)), Et = g(() => import("./DataTable-DMsScfkx.js")), Dt = g(() => import("./vue-ui-accordion-DJNjilyy.js").then((e) => e.n)), Ot = g(() => import("./UserOptions-HQyukyl2.js").then((e) => e.n)), kt = g(() => import("./PenAndPaper-DJ607Hx6.js").then((e) => e.t)), At = g(() => import("./PackageVersion-DNTJUKh1.js").then((e) => e.t)), jt = g(() => import("./BaseDraggableDialog-DBVHlhQZ.js").then((e) => e.n)), { vue_ui_waffle: Mt } = pe(), { isThemeValid: Nt, warnInvalidTheme: Pt } = ve(), Ft = Pe(), D = e, It = Je(), Lt = d({
135
- get() {
136
- return !!D.dataset && D.dataset.length;
137
- },
138
- set(e) {
139
- return e;
140
- }
141
- }), O = S(ae()), Rt = S(!1), zt = S(""), k = S(null), Bt = S(0), A = S(null), Vt = S(null), Ht = S(null), Ut = S(null), Wt = S(null), Gt = S(0), Kt = S(0), qt = S(0), Jt = S(!1), Yt = S(null), Xt = S(null), j = S(null), Zt = S({
142
- x: 0,
143
- y: 0
144
- }), Qt = S("pointer"), $t = S(!1), M = S(cn()), { transitionEnabled: N } = be({
145
- config: () => M.value.transitions,
146
- dataset: () => D.dataset
147
- });
148
- de({
149
- config: () => M.value,
150
- dataset: () => D.dataset,
151
- component: "VueUiWaffle",
152
- rules: [
153
- fe.singleSeries,
154
- fe.emptyArray,
155
- {
156
- test: (e) => e.length > 6,
157
- message: [
158
- "👀 The number of series is > 6. Consider:",
159
- "",
160
- "▶️ Grouping small values dynamically into a single \"Other\" series.",
161
- "",
162
- "▶️ Using filters to let users choose a maximum number of series to display.",
163
- "",
164
- "▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
165
- ]
166
- }
167
- ]
168
- });
169
- let P = d(() => M.value.userOptions.useCursorPointer), en = d(() => i({
170
- defaultConfig: {
171
- useCustomCells: !1,
172
- userOptions: { show: !1 },
173
- table: { show: !1 },
174
- style: { chart: {
175
- backgroundColor: "#99999930",
176
- layout: {
177
- labels: { captions: { show: !1 } },
178
- rect: { stroke: "#999999" }
179
- },
180
- legend: {
181
- backgroundColor: "transparent",
182
- showValue: !1,
183
- showPercentage: !1
184
- }
185
- } }
186
- },
187
- userConfig: M.value.skeletonConfig ?? {}
188
- })), { loading: tn, FINAL_DATASET: nn, manualLoading: rn } = he({
189
- ...qe(D),
190
- FINAL_CONFIG: M,
191
- prepareConfig: cn,
192
- callback: () => {
193
- Promise.resolve().then(async () => {
194
- H.value = Sn();
195
- });
196
- },
197
- skeletonDataset: D.config?.skeletonDataset ?? [
198
- {
199
- name: "",
200
- values: [1],
201
- color: "#AAAAAA"
202
- },
203
- {
204
- name: "",
205
- values: [1],
206
- color: "#BABABA"
207
- },
208
- {
209
- name: "",
210
- values: [1],
211
- color: "#CACACA"
212
- }
213
- ],
214
- skeletonConfig: i({
215
- defaultConfig: M.value,
216
- userConfig: en.value
217
- })
218
- }), { userOptionsVisible: an, setUserOptionsVisibility: on, keepUserOptionState: sn } = Ae({ config: M.value }), { svgRef: F } = je({ config: M.value.style.chart.title });
219
- function cn() {
220
- let e = _e({
221
- userConfig: D.config,
222
- defaultConfig: Mt
223
- }), t = e.theme;
224
- if (!t) return e;
225
- if (!Nt.value(e)) return Pt(e), e;
226
- let n = _e({
227
- userConfig: Fe[t] || D.config,
228
- defaultConfig: e
229
- }), r = _e({
230
- userConfig: D.config,
231
- defaultConfig: n
232
- });
233
- return {
234
- ...r,
235
- customPalette: r.customPalette.length ? r.customPalette : a[t] || o
236
- };
237
- }
238
- Ye(() => D.config, (e) => {
239
- tn.value || (M.value = cn()), an.value = !M.value.userOptions.showOnChartHover, dn(), Gt.value += 1, Kt.value += 1, qt.value += 1, L.value.showTable = M.value.table.show, L.value.showTooltip = M.value.style.chart.tooltip.show;
240
- }, { deep: !0 });
241
- let I = Ge(null), ln = Ge(null), un = d(() => M.value.debug);
242
- function dn() {
243
- if (ne(D.dataset) ? (ce({
244
- componentName: "VueUiWaffle",
245
- type: "dataset",
246
- debug: un.value
247
- }), Lt.value = !1, rn.value = !0) : un.value && D.dataset.forEach((e, t) => {
248
- ie({
249
- datasetObject: e,
250
- requiredAttributes: ["name", "values"]
251
- }).forEach((e) => {
252
- ce({
253
- componentName: "VueUiWaffle",
254
- type: "datasetSerieAttribute",
255
- property: e,
256
- index: t
257
- });
258
- });
259
- }), ne(D.dataset) || (rn.value = M.value.loading), M.value.responsive) {
260
- let e = Te(() => {
261
- let { width: e, height: t } = Ee({
262
- chart: A.value,
263
- title: M.value.style.chart.title.text ? Vt.value : null,
264
- legend: M.value.style.chart.legend.show ? Ht.value : null,
265
- source: Ut.value,
266
- noTitle: Wt.value
267
- });
268
- requestAnimationFrame(() => {
269
- R.value.width = e, R.value.height = t, z.value.width = e, z.value.height = t;
270
- });
271
- });
272
- I.value && (ln.value && I.value.unobserve(ln.value), I.value.disconnect()), I.value = new ResizeObserver(e), ln.value = A.value.parentNode, I.value.observe(ln.value);
273
- }
274
- }
275
- Ue(() => {
276
- Jt.value = !0, dn();
277
- }), He(() => {
278
- I.value && (ln.value && I.value.unobserve(ln.value), I.value.disconnect());
279
- });
280
- let { isPrinting: fn, isImaging: pn, generatePdf: mn, generateImage: hn } = me({
281
- elementId: `vue-ui-waffle_${O.value}`,
282
- fileName: M.value.style.chart.title.text || "vue-ui-waffle",
283
- options: M.value.userOptions.print
284
- }), gn = d(() => M.value.userOptions.show && !M.value.style.chart.title.text), _n = d(() => le(M.value.customPalette)), L = S({
285
- showTable: M.value.table.show,
286
- showTooltip: M.value.style.chart.tooltip.show
287
- });
288
- Ye(M, () => {
289
- L.value = {
290
- showTable: M.value.table.show,
291
- showTooltip: M.value.style.chart.tooltip.show
292
- };
293
- }, { immediate: !0 });
294
- let R = S({
295
- height: 512,
296
- width: 512
297
- }), z = S({
298
- top: 0,
299
- left: 0,
300
- height: 512,
301
- width: 512
302
- }), B = d(() => (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 = d(() => (z.value.height - M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.spaceBetween) / M.value.style.chart.layout.grid.size), vn = d(() => Math.max(1e-4, z.value.width / M.value.style.chart.layout.grid.size)), yn = d(() => Math.max(1e-4, z.value.height / M.value.style.chart.layout.grid.size));
303
- function bn(e) {
304
- 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);
305
- for (; o > 0;) {
306
- let e = a.indexOf(Math.max(...a));
307
- i[e] += 1, a[e] = 0, --o;
308
- }
309
- return i;
310
- }
311
- let xn = S(!1);
312
- function Sn() {
313
- return xn.value = nn.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, nn.value.map((e, t) => ({
314
- ...e,
315
- color: s(e.color) || _n.value[t] || o[t] || o[t % o.length],
316
- uid: `serie_${t}`,
317
- absoluteIndex: t
318
- }));
319
- }
320
- let Cn = d(() => Sn()), H = S(Cn.value);
321
- Ye(() => D.dataset, (e) => {
322
- Array.isArray(e) && e.length > 0 && (rn.value = !1);
323
- }, { immediate: !0 }), Ye(() => D.dataset, (e) => {
324
- H.value = Sn();
325
- }, { deep: !0 });
326
- let wn = d(() => bn(H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => xn.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), Tn = d(() => bn(H.value.map((e, t) => xn.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), U = d(() => (un.value && nn.value.forEach((e, t) => {
327
- [null, void 0].includes(e.values) && ce({
328
- componentName: "VueUiWaffle",
329
- type: "datasetSerieAttribute",
330
- property: "values (number[])",
331
- index: t
332
- });
333
- }), H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => ({
334
- absoluteIndex: e.absoluteIndex,
335
- uid: e.uid,
336
- name: e.name,
337
- color: e.color,
338
- value: (e.values || []).reduce((e, t) => e + t, 0),
339
- absoluteValues: e.values || [],
340
- proportion: wn.value[t]
341
- })))), En = d(() => H.value.map((e, t) => ({
342
- absoluteIndex: e.absoluteIndex,
343
- uid: e.uid,
344
- name: e.name,
345
- color: e.color,
346
- value: (e.values || []).reduce((e, t) => e + t, 0),
347
- absoluteValues: e.values || [],
348
- proportion: Tn.value[t]
349
- })));
350
- function Dn() {
351
- return En.value.map((e) => ({
352
- name: e.name,
353
- color: e.color,
354
- value: e.value,
355
- proportion: e.proportion
356
- }));
357
- }
358
- let On = d(() => {
359
- let e = 0;
360
- return U.value.map((t, n) => {
361
- let r = e, i = r + t.proportion, a = [];
362
- for (let e = Math.floor(r); e < Math.floor(i); e += 1) a.push(e);
363
- return e = i, {
364
- ...t,
365
- start: r,
366
- rects: a
367
- };
368
- });
369
- }), W = d(() => On.value.flatMap((e, t) => e.rects.map((n, r) => ({
370
- isFirst: r === 0,
371
- isLongEnough: n.length > 2,
372
- name: e.name,
373
- color: e.color,
374
- value: e.value,
375
- serieIndex: t,
376
- absoluteStartIndex: r < 3,
377
- serieId: e.uid,
378
- ...e
379
- }))).map((e, t) => ({
380
- ...e,
381
- isAbsoluteFirst: t % M.value.style.chart.layout.grid.size === 0
382
- }))), G = d(() => {
383
- let e = [];
384
- 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({
385
- isStartOfLine: n === 0,
386
- position: M.value.style.chart.layout.grid.vertical ? t : n,
387
- x: (M.value.style.chart.layout.grid.vertical ? t : n) * (B.value + M.value.style.chart.layout.grid.spaceBetween),
388
- y: (M.value.style.chart.layout.grid.vertical ? n : t) * (V.value + M.value.style.chart.layout.grid.spaceBetween) + z.value.top
389
- });
390
- return e;
391
- }), K = S([]), kn = S(!1), An = S(Object.create(null)), jn = S(Object.create(null)), q = S(0);
392
- function J(e, t) {
393
- H.value = H.value.map((n) => n.uid === e ? {
394
- ...n,
395
- values: [t]
396
- } : n);
397
- }
398
- function Mn(e, t) {
399
- let n = t.find((t) => t.uid === e);
400
- return n ? (n.values || []).reduce((e, t) => e + t, 0) : 0;
401
- }
402
- function Nn(e) {
403
- let t = !1;
404
- An.value[e] && (cancelAnimationFrame(An.value[e]), delete An.value[e], t = !0), jn.value[e] && (cancelAnimationFrame(jn.value[e]), delete jn.value[e], t = !0), t && (q.value = Math.max(0, q.value - 1), kn.value = q.value > 0);
405
- }
406
- function Pn({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
407
- Nn(e), q.value += 1, kn.value = !0;
408
- let i = t;
409
- return new Promise((a) => {
410
- function o() {
411
- if (r === "increase") {
412
- if (i >= n) {
413
- J(e, n), --q.value, q.value <= 0 && (kn.value = !1), delete An.value[e], a();
414
- return;
415
- }
416
- i += n * .025, i > n && (i = n), J(e, i), An.value[e] = requestAnimationFrame(o);
417
- } else {
418
- if (i <= t / 100) {
419
- J(e, 0), --q.value, q.value <= 0 && (kn.value = !1), delete jn.value[e], a();
420
- return;
421
- }
422
- i /= 1.15, J(e, i), jn.value[e] = requestAnimationFrame(o);
423
- }
424
- }
425
- o();
426
- });
427
- }
428
- function Fn() {
429
- H.value = Cn.value;
430
- let e = K.value.length > 0;
431
- if (!M.value.useAnimation) {
432
- e ? K.value = [] : K.value = Y.value.map((e) => e.uid);
433
- return;
434
- }
435
- e ? [...K.value].forEach((e) => {
436
- In(e, !0);
437
- }) : Y.value.map((e) => e.uid).forEach((e) => {
438
- In(e, !0);
439
- });
440
- }
441
- function In(e, t = !1) {
442
- if (xn.value && !t) return;
443
- let n = t || K.value.length < Y.value.length - 1 && Y.value.length > 1;
444
- if (!M.value.useAnimation) {
445
- K.value.includes(e) ? K.value = K.value.filter((t) => t !== e) : n && K.value.push(e);
446
- return;
447
- }
448
- let r = Mn(e, Cn.value), i = Mn(e, H.value);
449
- if (i !== 0 || r !== 0) {
450
- if (K.value.includes(e)) {
451
- if (K.value = K.value.filter((t) => t !== e), Ft.value) {
452
- Nn(e), J(e, r), Yn("selectLegend", U.value.map((e) => ({
453
- name: e.name,
454
- color: e.color,
455
- value: e.value,
456
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
457
- })));
458
- return;
459
- }
460
- Pn({
461
- seriesId: e,
462
- fromValue: i,
463
- toValue: r,
464
- mode: "increase"
465
- }).then(() => {
466
- Yn("selectLegend", U.value.map((e) => ({
467
- name: e.name,
468
- color: e.color,
469
- value: e.value,
470
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
471
- })));
472
- });
473
- return;
474
- }
475
- if (n) {
476
- if (Ft.value) {
477
- Nn(e), K.value.includes(e) || K.value.push(e), J(e, 0), Yn("selectLegend", U.value.map((e) => ({
478
- name: e.name,
479
- color: e.color,
480
- value: e.value,
481
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
482
- })));
483
- return;
484
- }
485
- Pn({
486
- seriesId: e,
487
- fromValue: i,
488
- toValue: 0,
489
- mode: "decrease"
490
- }).then(() => {
491
- K.value.includes(e) || K.value.push(e), J(e, 0), Yn("selectLegend", U.value.map((e) => ({
492
- name: e.name,
493
- color: e.color,
494
- value: e.value,
495
- proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
496
- })));
497
- });
498
- }
499
- }
500
- }
501
- function Ln(e) {
502
- return En.value.length ? En.value.find((t) => t.name === e) || (un.value && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (un.value && console.warn("VueUiWaffle - There are no series to show."), null);
503
- }
504
- function Rn(e) {
505
- let t = Ln(e);
506
- t !== null && K.value.includes(t.uid) && In(t.uid);
507
- }
508
- function zn(e) {
509
- let t = Ln(e);
510
- t !== null && (K.value.includes(t.uid) || In(t.uid));
511
- }
512
- function Bn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
513
- return Me({
514
- config: i,
515
- val: e,
516
- percentage: t,
517
- showVal: n,
518
- showPercentage: r
519
- });
520
- }
521
- let Y = d(() => H.value.map((e, t) => {
522
- 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);
523
- return {
524
- name: e.name,
525
- color: e.color || _n[t] || o[t] || o[t % o.length],
526
- value: n,
527
- proportion: r,
528
- uid: e.uid,
529
- shape: "square"
530
- };
531
- }).map((e, t) => {
532
- let n = Bn({
533
- val: te(M.value.style.chart.layout.labels.dataLabels.formatter, e.value, l({
534
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
535
- v: e.value,
536
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
537
- r: M.value.style.chart.legend.roundingValue
538
- }), {
539
- datapoint: e,
540
- index: t
541
- }),
542
- percentage: isNaN(e.value / X.value) ? "-" : l({
543
- v: e.value / X.value * 100,
544
- s: "%",
545
- r: M.value.style.chart.legend.roundingPercentage
546
- }),
547
- showVal: M.value.style.chart.legend.showValue,
548
- showPercentage: M.value.style.chart.legend.showPercentage,
549
- config: M.value.style.chart.legend
550
- });
551
- return {
552
- ...e,
553
- opacity: K.value.includes(e.uid) ? .5 : 1,
554
- segregate: () => In(e.uid),
555
- isSegregated: K.value.includes(e.uid),
556
- display: `${e.name}${M.value.style.chart.legend.showPercentage || M.value.style.chart.legend.showValue ? ": " : ""}${n}`
557
- };
558
- })), Vn = d(() => ({
559
- cy: "waffle-div-legend",
560
- backgroundColor: M.value.style.chart.legend.backgroundColor,
561
- color: M.value.style.chart.legend.color,
562
- fontSize: M.value.style.chart.legend.fontSize,
563
- paddingBottom: 12,
564
- fontWeight: M.value.style.chart.legend.bold ? "bold" : ""
565
- })), X = d(() => U.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Hn = S(null), Un = S(null), Z = d(() => {
566
- let e = /* @__PURE__ */ new Map();
567
- return W.value.forEach((t, n) => {
568
- e.has(t.serieIndex) ? e.get(t.serieIndex).rectIndexes.push(n) : e.set(t.serieIndex, {
569
- serieIndex: t.serieIndex,
570
- absoluteIndex: t.absoluteIndex,
571
- serieId: t.serieId,
572
- name: t.name,
573
- color: t.color,
574
- value: t.value,
575
- proportion: t.proportion,
576
- rectIndexes: [n]
577
- });
578
- }), Array.from(e.values()).sort((e, t) => e.serieIndex - t.serieIndex);
579
- });
580
- function Wn(e) {
581
- return Z.value.find((t) => t.serieIndex === e) || null;
582
- }
583
- function Gn(e) {
584
- let t = Wn(e);
585
- return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
586
- }
587
- function Kn(e) {
588
- let t = W.value[e];
589
- M.value.events.datapointClick && M.value.events.datapointClick({
590
- datapoint: t,
591
- seriesIndex: t.serieIndex
592
- });
593
- }
594
- function qn(e) {
595
- let t = W.value[e];
596
- M.value.events.datapointLeave && M.value.events.datapointLeave({
597
- datapoint: t,
598
- seriesIndex: t.serieIndex
599
- }), Un.value = null, Rt.value = !1, k.value = null, j.value = null, Qt.value = "pointer";
600
- }
601
- function Jn(e, t = "pointer") {
602
- if (K.value.length === D.dataset.length) return;
603
- let n = W.value[e];
604
- if (!n) return;
605
- Qt.value = t, j.value = n.serieIndex, Hn.value = {
606
- datapoint: n,
607
- seriesIndex: n.absoluteIndex,
608
- series: H.value,
609
- config: M.value
610
- }, M.value.events.datapointEnter && Un.value !== n.serieIndex && M.value.events.datapointEnter({
611
- datapoint: n,
612
- seriesIndex: n.serieIndex
613
- }), Un.value = n.serieIndex, Rt.value = !0, k.value = n.serieIndex;
614
- let r = M.value.style.chart.tooltip.customFormat;
615
- if (ue(r) && ee(() => r({
616
- seriesIndex: n.absoluteIndex,
617
- datapoint: n,
618
- series: H.value,
619
- config: M.value
620
- }))) zt.value = r({
621
- seriesIndex: n.absoluteIndex,
622
- datapoint: n,
623
- series: H.value,
624
- config: M.value
625
- });
626
- else {
627
- let e = "";
628
- 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}" />${It.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${O.value}_${n.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${Bn({
629
- config: M.value.style.chart.tooltip,
630
- showVal: M.value.style.chart.tooltip.showValue,
631
- showPercentage: M.value.style.chart.tooltip.showPercentage,
632
- val: `<span>${te(M.value.style.chart.layout.labels.dataLabels.formatter, n.value, l({
633
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
634
- v: n.value,
635
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
636
- r: M.value.style.chart.tooltip.roundingValue
637
- }), {
638
- datapoint: n,
639
- seriesIndex: n.absoluteIndex,
640
- series: H.value
641
- })}</span>`,
642
- percentage: `<span>${l({
643
- v: xn.value ? 1 / nn.value.length * 100 : n.value / X.value * 100,
644
- s: "%",
645
- r: M.value.style.chart.tooltip.roundingPercentage
646
- })}</span>`
647
- })}</b></div>`, zt.value = e;
648
- }
649
- }
650
- let Yn = Xe, Q = d(() => ({
651
- head: U.value.map((e) => ({
652
- name: e.name,
653
- color: e.color
654
- })),
655
- body: U.value.map((e) => e.value)
656
- }));
657
- function $(e) {
658
- return M.value.useBlurOnHover && ![null, void 0].includes(k.value) && k.value !== e ? `url(#blur_${O.value})` : "";
659
- }
660
- function Xn(e) {
661
- return [null, void 0].includes(k.value) || k.value === e ? { opacity: 1 } : { opacity: M.value.style.chart.layout.rect.selection.unselectedOpacity };
662
- }
663
- function Zn(e) {
664
- return e.length <= 3 ? e : e.filter((t, n) => {
665
- let r = e[(n - 1 + e.length) % e.length], i = e[(n + 1) % e.length], a = r.x === t.x && t.x === i.x, o = r.y === t.y && t.y === i.y;
666
- return !a && !o;
667
- });
668
- }
669
- function Qn(e) {
670
- if (!e.length) return [];
671
- let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [], r = /* @__PURE__ */ new Set(), i = [
672
- [-1, 0],
673
- [0, 1],
674
- [1, 0],
675
- [0, -1]
676
- ];
677
- e.forEach((e) => {
678
- let a = `${e.row}:${e.col}`;
679
- if (r.has(a)) return;
680
- let o = [], s = [e];
681
- for (r.add(a); s.length;) {
682
- let e = s.shift();
683
- o.push(e), i.forEach(([n, i]) => {
684
- let a = e.row + n, o = e.col + i, c = `${a}:${o}`;
685
- !t.has(c) || r.has(c) || (r.add(c), s.push({
686
- row: a,
687
- col: o
688
- }));
689
- });
690
- }
691
- n.push(o);
692
- });
693
- let a = [];
694
- return n.forEach((e) => {
695
- let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [];
696
- e.forEach(({ row: e, col: r }) => {
697
- t.has(`${e - 1}:${r}`) || n.push({
698
- start: {
699
- x: r,
700
- y: e
701
- },
702
- end: {
703
- x: r + 1,
704
- y: e
705
- }
706
- }), t.has(`${e}:${r + 1}`) || n.push({
707
- start: {
708
- x: r + 1,
709
- y: e
710
- },
711
- end: {
712
- x: r + 1,
713
- y: e + 1
714
- }
715
- }), t.has(`${e + 1}:${r}`) || n.push({
716
- start: {
717
- x: r + 1,
718
- y: e + 1
719
- },
720
- end: {
721
- x: r,
722
- y: e + 1
723
- }
724
- }), t.has(`${e}:${r - 1}`) || n.push({
725
- start: {
726
- x: r,
727
- y: e + 1
728
- },
729
- end: {
730
- x: r,
731
- y: e
732
- }
733
- });
734
- });
735
- let r = /* @__PURE__ */ new Map(), i = (e) => `${e.start.x}:${e.start.y}>${e.end.x}:${e.end.y}`, o = (e) => `${e.x}:${e.y}`, s = new Set(n.map(i));
736
- for (n.forEach((e) => {
737
- let t = o(e.start);
738
- r.has(t) || r.set(t, []), r.get(t).push(e);
739
- }); s.size;) {
740
- let e = s.values().next().value, t = n.find((t) => i(t) === e), c = t.start, l = [c], ee = t;
741
- for (; ee;) {
742
- s.delete(i(ee));
743
- let e = ee.end;
744
- if (o(e) === o(c)) break;
745
- l.push(e), ee = (r.get(o(e)) || []).find((e) => s.has(i(e)));
746
- }
747
- l.length >= 4 && a.push(Zn(l));
748
- }
749
- }), a;
750
- }
751
- function $n(e) {
752
- let t = M.value.style.chart.layout.grid.size, n = M.value.style.chart.layout.grid.vertical, r = [];
753
- return W.value.forEach((i, a) => {
754
- if (i.serieIndex !== e) return;
755
- let o = Math.floor(a / t), s = a % t;
756
- r.push({
757
- row: n ? s : o,
758
- col: n ? o : s
759
- });
760
- }), r;
761
- }
762
- function er(e) {
763
- let t = vn.value, n = yn.value;
764
- return Qn($n(e)).map((e) => e.map(({ x: e, y: r }) => ({
765
- x: e * t,
766
- y: z.value.top + r * n
767
- })));
768
- }
769
- function tr(e) {
770
- return e.map(({ x: e, y: t }) => `${e},${t}`).join(" ");
771
- }
772
- function nr(e) {
773
- return e.map((e) => {
774
- if (!e.length) return "";
775
- let [t, ...n] = e, r = n.map(({ x: e, y: t }) => `L ${e} ${t}`).join(" ");
776
- return `M ${t.x} ${t.y} ${r} Z`;
777
- }).filter(Boolean).join(" ");
778
- }
779
- let rr = d(() => !M.value.style.chart.layout.rect.selection?.wrap?.show || [null, void 0].includes(k.value) ? [] : er(k.value).map(tr)), ir = d(() => {
780
- if (!M.value.style.chart.layout.rect.merged) return [];
781
- let e = /* @__PURE__ */ new Map();
782
- return W.value.forEach((t, n) => {
783
- e.has(t.serieIndex) || e.set(t.serieIndex, {
784
- serieIndex: t.serieIndex,
785
- absoluteIndex: t.absoluteIndex,
786
- color: t.color,
787
- gradientIndex: n,
788
- rectIndex: n
789
- });
790
- }), Array.from(e.values()).map((e) => ({
791
- ...e,
792
- d: nr(er(e.serieIndex))
793
- })).filter((e) => e.d);
794
- });
795
- function ar(e, t) {
796
- return M.value.style.chart.layout.labels.captions.show ? W.value.length && !kn.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;
797
- }
798
- function or(e, t = null) {
799
- let n = te(M.value.style.chart.layout.labels.dataLabels.formatter, W.value[e].value, l({
800
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
801
- v: W.value[e].value,
802
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
803
- r: M.value.style.chart.layout.labels.captions.roundingValue
804
- }), {
805
- datapoint: W.value[e],
806
- position: t
807
- }), r = l({
808
- v: W.value[e].proportion,
809
- s: "%",
810
- r: M.value.style.chart.layout.labels.captions.roundingPercentage
811
- }), i = (M.value.style.chart.layout.labels.captions.serieNameAbbreviation ? re({
812
- source: W.value[e].name,
813
- length: M.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize
814
- }) : W.value[e].name) + (M.value.style.chart.layout.labels.captions.showPercentage || M.value.style.chart.layout.labels.captions.showValue ? ":" : "");
815
- return `${M.value.style.chart.layout.labels.captions.showSerieName ? i : ""} ${Bn({
816
- val: n,
817
- percentage: r,
818
- showVal: M.value.style.chart.layout.labels.captions.showValue,
819
- showPercentage: M.value.style.chart.layout.labels.captions.showPercentage,
820
- config: M.value.style.chart.layout.labels.dataLabels
821
- })}`;
822
- }
823
- function sr(e = null) {
824
- Ve(() => {
825
- let n = Q.value.head.map((e, t) => [
826
- [e.name],
827
- [Q.value.body[t]],
828
- [isNaN(Q.value.body[t] / X.value) ? "-" : Q.value.body[t] / X.value * 100]
829
- ]), i = [
830
- [M.value.style.chart.title.text],
831
- [M.value.style.chart.title.subtitle.text],
832
- [
833
- [""],
834
- ["val"],
835
- ["%"]
836
- ]
837
- ].concat(n), a = r(i);
838
- e ? e(a) : t({
839
- csvContent: a,
840
- title: M.value.style.chart.title.text || "vue-ui-waffle"
841
- });
842
- });
843
- }
844
- let cr = d(() => ({
845
- head: [
846
- "__SUM__",
847
- te(M.value.style.chart.layout.labels.dataLabels.formatter, X.value, l({
848
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
849
- v: X.value,
850
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
851
- r: M.value.table.td.roundingValue
852
- })),
853
- "100%"
854
- ],
855
- body: Q.value.head.map((e, t) => [
856
- {
857
- color: e.color,
858
- name: e.name
859
- },
860
- te(M.value.style.chart.layout.labels.dataLabels.formatter, Q.value.body[t], l({
861
- p: M.value.style.chart.layout.labels.dataLabels.prefix,
862
- v: Q.value.body[t],
863
- s: M.value.style.chart.layout.labels.dataLabels.suffix,
864
- r: M.value.table.td.roundingValue
865
- })),
866
- isNaN(Q.value.body[t] / X.value) ? "-" : l({
867
- v: Q.value.body[t] / X.value * 100,
868
- s: "%",
869
- r: M.value.table.td.roundingPercentage
870
- })
871
- ]),
872
- config: {
873
- th: {
874
- backgroundColor: M.value.table.th.backgroundColor,
875
- color: M.value.table.th.color,
876
- outline: M.value.table.th.outline
877
- },
878
- td: {
879
- backgroundColor: M.value.table.td.backgroundColor,
880
- color: M.value.table.td.color,
881
- outline: M.value.table.td.outline
882
- },
883
- shape: "square",
884
- breakpoint: M.value.table.responsiveBreakpoint
885
- },
886
- colNames: [
887
- M.value.table.columnNames.series,
888
- M.value.table.columnNames.value,
889
- M.value.table.columnNames.percentage
890
- ]
891
- })), lr = S(!1);
892
- function ur(e) {
893
- lr.value = e, Bt.value += 1;
894
- }
895
- function dr() {
896
- L.value.showTable = !L.value.showTable;
897
- }
898
- function fr() {
899
- L.value.showTooltip = !L.value.showTooltip;
900
- }
901
- let pr = S(!1);
902
- function mr() {
903
- pr.value = !pr.value;
904
- }
905
- async function hr({ scale: e = 2 } = {}) {
906
- if (!A.value) return;
907
- let { width: t, height: n } = A.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await xe({
908
- domElement: A.value,
909
- base64: !0,
910
- img: !0,
911
- scale: e
912
- });
913
- return {
914
- imageUri: i,
915
- base64: a,
916
- title: M.value.style.chart.title.text,
917
- width: t,
918
- height: n,
919
- aspectRatio: r
920
- };
921
- }
922
- let gr = d(() => {
923
- let e = M.value.table.useDialog && !M.value.table.show, t = L.value.showTable;
924
- return {
925
- component: e ? jt : Dt,
926
- title: `${M.value.style.chart.title.text}${M.value.style.chart.title.subtitle.text ? `: ${M.value.style.chart.title.subtitle.text}` : ""}`,
927
- props: e ? {
928
- backgroundColor: M.value.table.th.backgroundColor,
929
- color: M.value.table.th.color,
930
- headerColor: M.value.table.th.color,
931
- headerBg: M.value.table.th.backgroundColor,
932
- isFullscreen: lr.value,
933
- fullscreenParent: A.value,
934
- forcedWidth: Math.min(500, window.innerWidth * .8),
935
- isCursorPointer: P.value
936
- } : {
937
- hideDetails: !0,
938
- config: {
939
- open: t,
940
- maxHeight: 1e4,
941
- body: {
942
- backgroundColor: M.value.style.chart.backgroundColor,
943
- color: M.value.style.chart.color
944
- },
945
- head: {
946
- backgroundColor: M.value.style.chart.backgroundColor,
947
- color: M.value.style.chart.color
948
- }
949
- }
950
- }
951
- };
952
- });
953
- Ye(() => L.value.showTable, (e) => {
954
- M.value.table.show || (e && M.value.table.useDialog && Yt.value ? Yt.value.open() : "close" in Yt.value && Yt.value.close());
955
- });
956
- function _r() {
957
- L.value.showTable = !1, Xt.value && Xt.value.setTableIconState(!1);
958
- }
959
- let vr = d(() => Y.value.map((e) => ({
960
- ...e,
961
- name: e.display
962
- }))), yr = d(() => M.value.style.chart.backgroundColor), br = d(() => M.value.style.chart.legend), xr = d(() => M.value.style.chart.title), { isCallbackImaging: Sr, isCallbackSvg: Cr, generateSvg: wr, onGenerateImage: Tr } = ye({
963
- svg: F,
964
- title: xr,
965
- legend: br,
966
- legendItems: vr,
967
- backgroundColor: yr,
968
- getSvgCallback: () => M.value.userOptions.callbacks.svg,
969
- generateImage: hn
970
- });
971
- async function Er() {
972
- if (Yn("copyAlt", {
973
- config: M.value,
974
- dataset: En.value
975
- }), !M.value.userOptions.callbacks.altCopy) {
976
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
977
- return;
978
- }
979
- await Promise.resolve(M.value.userOptions.callbacks.altCopy({
980
- config: M.value,
981
- dataset: En.value
982
- }));
983
- }
984
- function Dr() {
985
- j.value = null, $t.value = !0;
986
- }
987
- function Or() {
988
- j.value = null, Qt.value = "pointer", Rt.value = !1, k.value = null, Un.value = null, $t.value = !1;
989
- }
990
- function kr(e) {
991
- if (!F.value || pr.value || document.activeElement !== F.value || !Z.value.length || K.value.length === D.dataset.length) return;
992
- let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
993
- if (!t && !n && !r && !i) return;
994
- if (e.preventDefault(), e.stopPropagation(), i) {
995
- j.value = null, Qt.value = "pointer", Rt.value = !1, k.value = null, Un.value = null;
996
- return;
997
- }
998
- if (r) {
999
- if (j.value === null) return;
1000
- let e = Gn(j.value);
1001
- if (e === null) return;
1002
- Kn(e);
1003
- return;
1004
- }
1005
- let a = Z.value.findIndex((e) => e.serieIndex === j.value), o = null;
1006
- if (o = a === -1 ? n ? Z.value[0] : Z.value[Z.value.length - 1] : n ? Z.value[(a + 1) % Z.value.length] : Z.value[(a - 1 + Z.value.length) % Z.value.length], !o) return;
1007
- let s = Gn(o.serieIndex);
1008
- s !== null && (Ar(o.serieIndex), Jn(s, "keyboard"));
1009
- }
1010
- function Ar(e) {
1011
- if (!Number.isFinite(e) || !F.value) return;
1012
- let t = Wn(e);
1013
- if (!t || !t.rectIndexes.length) return;
1014
- let n = t.rectIndexes.map((e) => {
1015
- let t = G.value[e];
1016
- return t ? {
1017
- x: t.x + M.value.style.chart.layout.grid.spaceBetween / 2 + vn.value / 2,
1018
- y: t.y + M.value.style.chart.layout.grid.spaceBetween / 2 + yn.value / 2
1019
- } : null;
1020
- }).filter(Boolean);
1021
- if (!n.length) return;
1022
- 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, c = (a + o) / 2, l = F.value.getBoundingClientRect();
1023
- Zt.value = {
1024
- x: l.left + s / R.value.width * l.width,
1025
- y: l.top + c / R.value.height * l.height
1026
- };
1027
- }
1028
- let jr = d(() => ({
1029
- headers: cr.value?.colNames ?? [],
1030
- rows: cr.value?.body ?? []
1031
- }));
1032
- return we({
1033
- getData: Dn,
1034
- getImage: hr,
1035
- generatePdf: mn,
1036
- generateCsv: sr,
1037
- generateImage: hn,
1038
- generateSvg: wr,
1039
- hideSeries: zn,
1040
- showSeries: Rn,
1041
- toggleTable: dr,
1042
- toggleTooltip: fr,
1043
- toggleAnnotator: mr,
1044
- toggleFullscreen: ur,
1045
- copyAlt: Er
1046
- }), (e, t) => (x(), m("div", {
1047
- class: v(`vue-data-ui-component vue-ui-waffle ${lr.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
1048
- ref_key: "waffleChart",
1049
- ref: A,
1050
- id: `vue-ui-waffle_${O.value}`,
1051
- style: b(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${M.value.style.chart.backgroundColor};${M.value.responsive ? "height: 100%" : ""}`),
1052
- onMouseenter: t[2] ||= () => T(on)(!0),
1053
- onMouseleave: t[3] ||= () => T(on)(!1)
1054
- }, [
1055
- h("div", {
1056
- id: `chart-instructions-${O.value}`,
1057
- class: "sr-only"
1058
- }, [h("p", null, Ke(M.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
1059
- jr.value?.rows?.length ? (x(), f(ke, {
1060
- key: 0,
1061
- uid: O.value,
1062
- head: jr.value.headers,
1063
- body: jr.value.rows,
1064
- notice: M.value.a11y.translations.tableAvailable,
1065
- caption: M.value.a11y.translations.tableCaption
1066
- }, null, 8, [
1067
- "uid",
1068
- "head",
1069
- "body",
1070
- "notice",
1071
- "caption"
1072
- ])) : p("", !0),
1073
- M.value.userOptions.buttons.annotator ? (x(), f(T(kt), {
1074
- key: 1,
1075
- svgRef: T(F),
1076
- backgroundColor: M.value.style.chart.backgroundColor,
1077
- color: M.value.style.chart.color,
1078
- active: pr.value,
1079
- isCursorPointer: P.value,
1080
- onClose: mr
1081
- }, {
1082
- "annotator-action-close": E(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1083
- "annotator-action-color": E(({ color: t }) => [w(e.$slots, "annotator-action-color", y(_({ color: t })), void 0, !0)]),
1084
- "annotator-action-draw": E(({ mode: t }) => [w(e.$slots, "annotator-action-draw", y(_({ mode: t })), void 0, !0)]),
1085
- "annotator-action-undo": E(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", y(_({ disabled: t })), void 0, !0)]),
1086
- "annotator-action-redo": E(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", y(_({ disabled: t })), void 0, !0)]),
1087
- "annotator-action-delete": E(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", y(_({ disabled: t })), void 0, !0)]),
1088
- _: 3
1089
- }, 8, [
1090
- "svgRef",
1091
- "backgroundColor",
1092
- "color",
1093
- "active",
1094
- "isCursorPointer"
1095
- ])) : p("", !0),
1096
- gn.value ? (x(), m("div", {
1097
- key: 2,
1098
- ref_key: "noTitle",
1099
- ref: Wt,
1100
- class: "vue-data-ui-no-title-space",
1101
- style: "height:36px; width: 100%;background:transparent"
1102
- }, null, 512)) : p("", !0),
1103
- M.value.style.chart.title.text ? (x(), m("div", {
1104
- key: 3,
1105
- ref_key: "chartTitle",
1106
- ref: Vt,
1107
- style: "width:100%;background:transparent;padding-bottom:12px"
1108
- }, [(x(), f(Se, {
1109
- key: `title_${Gt.value}`,
1110
- config: {
1111
- title: {
1112
- cy: "waffle-title",
1113
- ...M.value.style.chart.title
1114
- },
1115
- subtitle: {
1116
- cy: "waffle-subtitle",
1117
- ...M.value.style.chart.title.subtitle
1118
- }
1119
- }
1120
- }, null, 8, ["config"]))], 512)) : p("", !0),
1121
- h("div", { id: `legend-top-${O.value}` }, null, 8, $e),
1122
- M.value.userOptions.show && Lt.value && (T(sn) || T(an)) ? (x(), f(T(Ot), {
1123
- ref_key: "userOptionsRef",
1124
- ref: Xt,
1125
- key: `user_options_${Bt.value}`,
1126
- backgroundColor: M.value.style.chart.backgroundColor,
1127
- color: M.value.style.chart.color,
1128
- isPrinting: T(fn),
1129
- isImaging: T(pn),
1130
- uid: O.value,
1131
- hasTooltip: M.value.userOptions.buttons.tooltip && M.value.style.chart.tooltip.show,
1132
- hasPdf: M.value.userOptions.buttons.pdf,
1133
- hasImg: M.value.userOptions.buttons.img,
1134
- hasSvg: M.value.userOptions.buttons.svg,
1135
- hasXls: M.value.userOptions.buttons.csv,
1136
- hasTable: M.value.userOptions.buttons.table,
1137
- hasFullscreen: M.value.userOptions.buttons.fullscreen,
1138
- hasAltCopy: M.value.userOptions.buttons.altCopy,
1139
- isFullscreen: lr.value,
1140
- isTooltip: L.value.showTooltip,
1141
- titles: { ...M.value.userOptions.buttonTitles },
1142
- chartElement: A.value,
1143
- position: M.value.userOptions.position,
1144
- hasAnnotator: M.value.userOptions.buttons.annotator,
1145
- isAnnotation: pr.value,
1146
- callbacks: M.value.userOptions.callbacks,
1147
- printScale: M.value.userOptions.print.scale,
1148
- tableDialog: M.value.table.useDialog,
1149
- isCursorPointer: P.value,
1150
- onToggleFullscreen: ur,
1151
- onGeneratePdf: T(mn),
1152
- onGenerateCsv: sr,
1153
- onGenerateImage: T(Tr),
1154
- onGenerateSvg: T(wr),
1155
- onToggleTable: dr,
1156
- onToggleTooltip: fr,
1157
- onToggleAnnotator: mr,
1158
- onCopyAlt: Er,
1159
- style: b({ visibility: T(sn) ? T(an) ? "visible" : "hidden" : "visible" })
1160
- }, Le({ _: 2 }, [
1161
- e.$slots.menuIcon ? {
1162
- name: "menuIcon",
1163
- fn: E(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", y(_({
1164
- isOpen: t,
1165
- color: n
1166
- })), void 0, !0)]),
1167
- key: "0"
1168
- } : void 0,
1169
- e.$slots.optionTooltip ? {
1170
- name: "optionTooltip",
1171
- fn: E(() => [w(e.$slots, "optionTooltip", {}, void 0, !0)]),
1172
- key: "1"
1173
- } : void 0,
1174
- e.$slots.optionPdf ? {
1175
- name: "optionPdf",
1176
- fn: E(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
1177
- key: "2"
1178
- } : void 0,
1179
- e.$slots.optionCsv ? {
1180
- name: "optionCsv",
1181
- fn: E(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
1182
- key: "3"
1183
- } : void 0,
1184
- e.$slots.optionImg ? {
1185
- name: "optionImg",
1186
- fn: E(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
1187
- key: "4"
1188
- } : void 0,
1189
- e.$slots.optionSvg ? {
1190
- name: "optionSvg",
1191
- fn: E(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
1192
- key: "5"
1193
- } : void 0,
1194
- e.$slots.optionTable ? {
1195
- name: "optionTable",
1196
- fn: E(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
1197
- key: "6"
1198
- } : void 0,
1199
- e.$slots.optionFullscreen ? {
1200
- name: "optionFullscreen",
1201
- fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", y(_({
1202
- toggleFullscreen: t,
1203
- isFullscreen: n
1204
- })), void 0, !0)]),
1205
- key: "7"
1206
- } : void 0,
1207
- e.$slots.optionAnnotator ? {
1208
- name: "optionAnnotator",
1209
- fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", y(_({
1210
- toggleAnnotator: t,
1211
- isAnnotator: n
1212
- })), void 0, !0)]),
1213
- key: "8"
1214
- } : void 0,
1215
- e.$slots.optionAltCopy ? {
1216
- name: "optionAltCopy",
1217
- fn: E(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", y(_({ altCopy: t })), void 0, !0)]),
1218
- key: "9"
1219
- } : void 0,
1220
- e.$slots["custom-menu-before"] ? {
1221
- name: "custom-menu-before",
1222
- fn: E(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1223
- key: "10"
1224
- } : void 0,
1225
- e.$slots["custom-menu-after"] ? {
1226
- name: "custom-menu-after",
1227
- fn: E(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1228
- key: "11"
1229
- } : void 0
1230
- ]), 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.onGenerateImage.onGenerateSvg.style".split("."))) : p("", !0),
1231
- h("div", et, [(x(), m("svg", {
1232
- ref_key: "svgRef",
1233
- ref: F,
1234
- xmlns: T(se),
1235
- "aria-describedby": `chart-instructions-${O.value}`,
1236
- class: v({
1237
- "vue-data-ui-fullscreen--on": lr.value,
1238
- "vue-data-ui-fulscreen--off": !lr.value,
1239
- "vue-data-ui-no-transition": !T(N)
1240
- }),
1241
- tabindex: "0",
1242
- viewBox: `0 0 ${R.value.width <= 0 ? 10 : R.value.width} ${R.value.height <= 0 ? 10 : R.value.height}`,
1243
- style: b(`max-width:100%;overflow:visible;background:transparent;color:${M.value.style.chart.color}`),
1244
- onFocus: Dr,
1245
- onBlur: Or,
1246
- onKeydown: kr
1247
- }, [
1248
- ze(T(At)),
1249
- h("defs", null, [(x(!0), m(u, null, C(W.value, (e, t) => (x(), f(De, {
1250
- t: "radial",
1251
- cx: "50%",
1252
- cy: "50%",
1253
- r: "50%",
1254
- fx: "50%",
1255
- fy: "50%",
1256
- id: `gradient_${O.value}_${t}`,
1257
- key: `gradient_${O.value}_${t}`,
1258
- stops: [[
1259
- "0%",
1260
- T(n)(T(c)(e.color, .05), 100 - M.value.style.chart.layout.rect.gradientIntensity),
1261
- 1
1262
- ], [
1263
- "100%",
1264
- e.color,
1265
- 1
1266
- ]]
1267
- }, null, 8, ["id", "stops"]))), 128))]),
1268
- h("defs", null, [h("filter", {
1269
- id: `blur_${O.value}`,
1270
- x: "-50%",
1271
- y: "-50%",
1272
- width: "200%",
1273
- height: "200%"
1274
- }, [...t[4] ||= [h("feGaussianBlur", {
1275
- in: "SourceGraphic",
1276
- stdDeviation: 2
1277
- }, null, -1), h("feColorMatrix", {
1278
- type: "saturate",
1279
- values: "0"
1280
- }, null, -1)]], 8, nt)]),
1281
- M.value.useCustomCells && W.value.length && e.$slots.cell ? (x(!0), m(u, { key: 0 }, C(G.value, (t, n) => (x(), m("foreignObject", {
1282
- x: t.x,
1283
- y: t.y,
1284
- height: V.value <= 0 ? 1e-4 : V.value,
1285
- width: B.value <= 0 ? 1e-4 : B.value,
1286
- class: "vue-ui-waffle-custom-cell-foreignObject"
1287
- }, [w(e.$slots, "cell", Be({ ref_for: !0 }, {
1288
- cell: {
1289
- ...t,
1290
- color: W.value[n].color,
1291
- height: Math.max(0, V.value),
1292
- width: Math.max(0, B.value),
1293
- ...W.value[n]
1294
- },
1295
- isSelected: [null, void 0].includes(k.value) ? !0 : W.value[n].serieIndex === k.value
1296
- }), void 0, !0)], 8, rt))), 256)) : p("", !0),
1297
- !W.value.length && !M.value.useCustomCells ? (x(), m("rect", {
1298
- key: 1,
1299
- x: 12,
1300
- y: 12,
1301
- height: z.value.height - 24,
1302
- width: z.value.width - 24,
1303
- rx: 3,
1304
- fill: "none",
1305
- stroke: "black"
1306
- }, null, 8, it)) : W.value.length && !M.value.useCustomCells ? (x(), m(u, { key: 2 }, [e.$slots.pattern ? (x(), m("g", at, [(x(!0), m(u, null, C(Cn.value, (t) => (x(), m("defs", null, [w(e.$slots, "pattern", Be({ ref_for: !0 }, {
1307
- seriesIndex: t.absoluteIndex,
1308
- patternId: `pattern_${O.value}_${t.absoluteIndex}`
1309
- }), void 0, !0)]))), 256))])) : p("", !0), M.value.style.chart.layout.rect.merged ? (x(), m(u, { key: 1 }, [
1310
- (x(!0), m(u, null, C(ir.value, (e) => (x(), m("path", {
1311
- key: `merged-underlayer-${e.serieIndex}`,
1312
- d: e.d,
1313
- fill: "white",
1314
- "fill-rule": "evenodd",
1315
- stroke: M.value.style.chart.layout.rect.stroke,
1316
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1317
- "stroke-linejoin": "round",
1318
- filter: $(e.serieIndex),
1319
- style: b(Xn(e.serieIndex)),
1320
- class: v({ "vue-data-ui-transition": T(N) })
1321
- }, null, 14, ot))), 128)),
1322
- (x(!0), m(u, null, C(ir.value, (e) => (x(), m("path", {
1323
- key: `merged-serie-${e.serieIndex}`,
1324
- d: e.d,
1325
- fill: M.value.style.chart.layout.rect.useGradient && M.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${O.value}_${e.gradientIndex})` : e.color,
1326
- "fill-rule": "evenodd",
1327
- stroke: M.value.style.chart.layout.rect.stroke,
1328
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1329
- "stroke-linejoin": "round",
1330
- filter: $(e.serieIndex),
1331
- style: b(Xn(e.serieIndex)),
1332
- class: v({ "vue-data-ui-transition": T(N) })
1333
- }, null, 14, st))), 128)),
1334
- e.$slots.pattern ? (x(), m("g", ct, [(x(!0), m(u, null, C(ir.value, (e) => (x(), m("path", {
1335
- key: `merged-pattern-${e.serieIndex}`,
1336
- d: e.d,
1337
- fill: `url(#pattern_${O.value}_${e.absoluteIndex})`,
1338
- "fill-rule": "evenodd",
1339
- stroke: "none",
1340
- filter: $(e.serieIndex),
1341
- style: b(Xn(e.serieIndex)),
1342
- class: v({ "vue-data-ui-transition": T(N) })
1343
- }, null, 14, lt))), 128))])) : p("", !0)
1344
- ], 64)) : (x(), m(u, { key: 2 }, [
1345
- (x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
1346
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1347
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1348
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1349
- height: V.value <= 0 ? 1e-4 : V.value,
1350
- width: B.value <= 0 ? 1e-4 : B.value,
1351
- fill: "white",
1352
- stroke: M.value.style.chart.layout.rect.stroke,
1353
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1354
- filter: $(W.value[t].serieIndex),
1355
- style: b(Xn(W.value[t].serieIndex)),
1356
- class: v({ "vue-data-ui-transition": T(N) })
1357
- }, null, 14, ut))), 256)),
1358
- (x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
1359
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1360
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1361
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1362
- height: V.value <= 0 ? 1e-4 : V.value,
1363
- width: B.value <= 0 ? 1e-4 : B.value,
1364
- fill: M.value.style.chart.layout.rect.useGradient && M.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${O.value}_${t})` : W.value[t].color,
1365
- stroke: M.value.style.chart.layout.rect.stroke,
1366
- "stroke-width": M.value.style.chart.layout.rect.strokeWidth,
1367
- filter: $(W.value[t].serieIndex),
1368
- style: b(Xn(W.value[t].serieIndex)),
1369
- class: v({ "vue-data-ui-transition": T(N) })
1370
- }, null, 14, dt))), 256)),
1371
- e.$slots.pattern ? (x(), m("g", ft, [(x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
1372
- rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
1373
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1374
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1375
- height: V.value <= 0 ? 1e-4 : V.value,
1376
- width: B.value <= 0 ? 1e-4 : B.value,
1377
- fill: `url(#pattern_${O.value}_${W.value[t].absoluteIndex})`,
1378
- stroke: "none",
1379
- filter: $(W.value[t].serieIndex),
1380
- style: b(Xn(W.value[t].serieIndex)),
1381
- class: v({ "vue-data-ui-transition": T(N) })
1382
- }, null, 14, pt))), 256))])) : p("", !0)
1383
- ], 64))], 64)) : p("", !0),
1384
- e.$slots.cellSvg ? (x(!0), m(u, { key: 3 }, C(G.value, (t, n) => (x(), m("g", null, [w(e.$slots, "cellSvg", Be({ ref_for: !0 }, {
1385
- cell: {
1386
- ...t,
1387
- color: W.value[n].color,
1388
- height: Math.max(0, V.value),
1389
- width: Math.max(0, B.value),
1390
- ...W.value[n]
1391
- },
1392
- isSelected: [null, void 0].includes(k.value) ? !0 : W.value[n].serieIndex === k.value
1393
- }), void 0, !0)]))), 256)) : p("", !0),
1394
- (x(!0), m(u, null, C(rr.value, (e, t) => (x(), m("polygon", {
1395
- key: `selected-series-wrap-${t}`,
1396
- points: e,
1397
- fill: "none",
1398
- stroke: M.value.style.chart.layout.rect.selection.wrap.stroke,
1399
- "stroke-width": M.value.style.chart.layout.rect.selection.wrap.strokeWidth,
1400
- "stroke-linejoin": M.value.style.chart.layout.rect.selection.wrap.strokeLinejoin,
1401
- "pointer-events": "none"
1402
- }, null, 8, mt))), 128)),
1403
- (x(!0), m(u, null, C(G.value, (e, t) => (x(), m(u, null, [ar(t, e) ? (x(), m("text", {
1404
- key: `datalabel_${t}`,
1405
- textContent: Ke(or(t, e)),
1406
- x: e.x + M.value.style.chart.layout.labels.captions.offsetX + M.value.style.chart.layout.grid.spaceBetween / 2 + 6,
1407
- y: e.y + M.value.style.chart.layout.labels.captions.offsetY + M.value.style.chart.layout.grid.spaceBetween / 2 + yn.value / 2 + M.value.style.chart.layout.labels.captions.fontSize / 3,
1408
- "font-size": M.value.style.chart.layout.labels.captions.fontSize,
1409
- fill: T(oe)(W.value[t].color),
1410
- filter: $(W.value[t].serieIndex),
1411
- class: v({ "vue-data-ui-transition": T(N) })
1412
- }, null, 10, ht)) : p("", !0)], 64))), 256)),
1413
- M.value.style.chart.layout.rect.merged && !M.value.useCustomCells ? (x(!0), m(u, { key: 4 }, C(ir.value, (e) => (x(), m("path", {
1414
- key: `tooltip-trap-${e.serieIndex}`,
1415
- d: e.d,
1416
- fill: "transparent",
1417
- "fill-rule": "evenodd",
1418
- stroke: "none",
1419
- "pointer-events": "fill",
1420
- onMouseover: (t) => Jn(e.rectIndex),
1421
- onMouseleave: (t) => qn(e.rectIndex),
1422
- onClick: (t) => Kn(e.rectIndex)
1423
- }, null, 40, gt))), 128)) : (x(!0), m(u, { key: 5 }, C(G.value, (e, t) => (x(), m("rect", {
1424
- key: `tooltip-trap-${t}`,
1425
- x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
1426
- y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
1427
- height: yn.value,
1428
- width: vn.value,
1429
- fill: "transparent",
1430
- stroke: "none",
1431
- onMouseover: (e) => Jn(t),
1432
- onMouseleave: (e) => qn(t),
1433
- onClick: (e) => Kn(t)
1434
- }, null, 40, _t))), 128)),
1435
- w(e.$slots, "svg", { svg: {
1436
- ...R.value,
1437
- isPrintingImg: T(fn) || T(pn) || T(Sr),
1438
- isPrintingSvg: T(Cr)
1439
- } }, void 0, !0)
1440
- ], 46, tt)), e.$slots.hint ? (x(), m("div", vt, [w(e.$slots, "hint", y(_({
1441
- hint: M.value.a11y.translations.keyboardNavigation,
1442
- isVisible: $t.value
1443
- })), void 0, !0)])) : p("", !0)]),
1444
- e.$slots.watermark ? (x(), m("div", yt, [w(e.$slots, "watermark", y(_({ isPrinting: T(fn) || T(pn) || T(Sr) || T(Cr) })), void 0, !0)])) : p("", !0),
1445
- h("div", { id: `legend-bottom-${O.value}` }, null, 8, bt),
1446
- Jt.value && (M.value.style.chart.legend.show || e.$slots.legend) ? (x(), f(Ie, {
1447
- key: 6,
1448
- to: M.value.style.chart.legend.position === "top" ? `#legend-top-${O.value}` : `#legend-bottom-${O.value}`
1449
- }, [h("div", {
1450
- ref_key: "chartLegend",
1451
- ref: Ht
1452
- }, [w(e.$slots, "legend", { legend: Y.value }, () => [M.value.style.chart.legend.show ? (x(), f(Ne, {
1453
- key: `legend_${qt.value}`,
1454
- legendSet: Y.value,
1455
- config: Vn.value,
1456
- isCursorPointer: P.value,
1457
- onClickMarker: t[0] ||= ({ legend: e }) => In(e.uid)
1458
- }, Le({
1459
- item: E(({ legend: e }) => [h("div", {
1460
- onClick: (t) => e.segregate(),
1461
- style: b(`opacity:${K.value.includes(e.uid) ? .5 : 1}`)
1462
- }, Ke(e.display), 13, xt)]),
1463
- legendToggle: E(() => [Y.value.length > 2 && M.value.style.chart.legend.selectAllToggle.show && !T(tn) ? (x(), f(Oe, {
1464
- key: 0,
1465
- backgroundColor: M.value.style.chart.legend.selectAllToggle.backgroundColor,
1466
- color: M.value.style.chart.legend.selectAllToggle.color,
1467
- fontSize: M.value.style.chart.legend.fontSize,
1468
- checked: K.value.length > 0,
1469
- isCursorPointer: P.value,
1470
- onToggle: Fn
1471
- }, null, 8, [
1472
- "backgroundColor",
1473
- "color",
1474
- "fontSize",
1475
- "checked",
1476
- "isCursorPointer"
1477
- ])) : p("", !0)]),
1478
- _: 2
1479
- }, [e.$slots.pattern ? {
1480
- name: "legend-pattern",
1481
- fn: E(({ legend: e, index: t }) => [ze(Ce, {
1482
- shape: e.shape,
1483
- radius: 30,
1484
- stroke: "none",
1485
- plot: {
1486
- x: 30,
1487
- y: 30
1488
- },
1489
- fill: `url(#pattern_${O.value}_${t})`
1490
- }, null, 8, ["shape", "fill"])]),
1491
- key: "0"
1492
- } : void 0]), 1032, [
1493
- "legendSet",
1494
- "config",
1495
- "isCursorPointer"
1496
- ])) : p("", !0)], !0)], 512)], 8, ["to"])) : p("", !0),
1497
- e.$slots.source ? (x(), m("div", {
1498
- key: 7,
1499
- ref_key: "source",
1500
- ref: Ut,
1501
- dir: "auto"
1502
- }, [w(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
1503
- ze(T(wt), {
1504
- teleportTo: M.value.style.chart.tooltip.teleportTo,
1505
- show: L.value.showTooltip && Rt.value && K.value.length < D.dataset.length,
1506
- backgroundColor: M.value.style.chart.tooltip.backgroundColor,
1507
- color: M.value.style.chart.tooltip.color,
1508
- borderRadius: M.value.style.chart.tooltip.borderRadius,
1509
- borderColor: M.value.style.chart.tooltip.borderColor,
1510
- borderWidth: M.value.style.chart.tooltip.borderWidth,
1511
- backgroundOpacity: M.value.style.chart.tooltip.backgroundOpacity,
1512
- position: M.value.style.chart.tooltip.position,
1513
- offsetX: M.value.style.chart.tooltip.offsetX,
1514
- offsetY: M.value.style.chart.tooltip.offsetY,
1515
- parent: A.value,
1516
- content: zt.value,
1517
- isCustom: M.value.style.chart.tooltip.customFormat && typeof M.value.style.chart.tooltip.customFormat == "function",
1518
- fontSize: M.value.style.chart.tooltip.fontSize,
1519
- isFullscreen: lr.value,
1520
- smooth: M.value.style.chart.tooltip.smooth,
1521
- backdropFilter: M.value.style.chart.tooltip.backdropFilter,
1522
- smoothForce: M.value.style.chart.tooltip.smoothForce,
1523
- smoothSnapThreshold: M.value.style.chart.tooltip.smoothSnapThreshold,
1524
- isA11yMode: Qt.value === "keyboard",
1525
- a11yPosition: Zt.value
1526
- }, {
1527
- "tooltip-before": E(() => [w(e.$slots, "tooltip-before", y(_({ ...Hn.value })), void 0, !0)]),
1528
- tooltip: E(() => [w(e.$slots, "tooltip", y(_({ ...Hn.value })), void 0, !0)]),
1529
- "tooltip-after": E(() => [w(e.$slots, "tooltip-after", y(_({ ...Hn.value })), void 0, !0)]),
1530
- _: 3
1531
- }, 8, [
1532
- "teleportTo",
1533
- "show",
1534
- "backgroundColor",
1535
- "color",
1536
- "borderRadius",
1537
- "borderColor",
1538
- "borderWidth",
1539
- "backgroundOpacity",
1540
- "position",
1541
- "offsetX",
1542
- "offsetY",
1543
- "parent",
1544
- "content",
1545
- "isCustom",
1546
- "fontSize",
1547
- "isFullscreen",
1548
- "smooth",
1549
- "backdropFilter",
1550
- "smoothForce",
1551
- "smoothSnapThreshold",
1552
- "isA11yMode",
1553
- "a11yPosition"
1554
- ]),
1555
- Lt.value && M.value.userOptions.buttons.table ? (x(), f(We(gr.value.component), Be({ key: 8 }, gr.value.props, {
1556
- ref_key: "tableUnit",
1557
- ref: Yt,
1558
- onClose: _r
1559
- }), Le({
1560
- content: E(() => [(x(), f(T(Et), {
1561
- key: `table_${Kt.value}`,
1562
- colNames: cr.value.colNames,
1563
- head: cr.value.head,
1564
- body: cr.value.body,
1565
- config: cr.value.config,
1566
- title: M.value.table.useDialog ? "" : gr.value.title,
1567
- withCloseButton: !M.value.table.useDialog,
1568
- isCursorPointer: P.value,
1569
- onClose: _r
1570
- }, {
1571
- th: E(({ th: e }) => [e === "__SUM__" ? (x(), m("div", St, [ze(T(Tt), {
1572
- name: "sigma",
1573
- stroke: cr.value.config.th.color,
1574
- size: 16
1575
- }, null, 8, ["stroke"])])) : (x(), m("div", Ct, Ke(e), 1))]),
1576
- td: E(({ td: e }) => [Re(Ke(e.name || e), 1)]),
1577
- _: 1
1578
- }, 8, [
1579
- "colNames",
1580
- "head",
1581
- "body",
1582
- "config",
1583
- "title",
1584
- "withCloseButton",
1585
- "isCursorPointer"
1586
- ]))]),
1587
- _: 2
1588
- }, [M.value.table.useDialog ? {
1589
- name: "title",
1590
- fn: E(() => [Re(Ke(gr.value.title), 1)]),
1591
- key: "0"
1592
- } : void 0, M.value.table.useDialog ? {
1593
- name: "actions",
1594
- fn: E(() => [h("button", {
1595
- tabindex: "0",
1596
- class: "vue-ui-user-options-button",
1597
- onClick: t[1] ||= (e) => sr(M.value.userOptions.callbacks.csv),
1598
- style: b({ cursor: P.value ? "pointer" : "default" })
1599
- }, [ze(T(Tt), {
1600
- name: "fileCsv",
1601
- stroke: gr.value.props.color
1602
- }, null, 8, ["stroke"])], 4)]),
1603
- key: "1"
1604
- } : void 0]), 1040)) : p("", !0),
1605
- w(e.$slots, "skeleton", {}, () => [T(tn) ? (x(), f(ge, { key: 0 })) : p("", !0)], !0)
1606
- ], 46, Ze));
1607
- }
1608
- }, [["__scopeId", "data-v-ac304f67"]]);
1609
- //#endregion
1610
- export { Xe as n, wt as t };