vue-data-ui 3.23.9 → 3.23.11

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-CF0VFcBH.js → Arrow-DrF4NNJO.js} +1 -1
  3. package/dist/{BaseDraggableDialog-LoqqwRtV.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
  4. package/dist/{BaseIcon-BfndwIWE.js → BaseIcon-BbElSC8_.js} +1 -1
  5. package/dist/{BaseLegendToggle-DZVucLnv.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
  6. package/dist/{BaseZoomControls-BZvCnZEi.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
  7. package/dist/{ColorPicker--ayG2YHf.js → ColorPicker-ChOgAmCi.js} +2 -2
  8. package/dist/{DataTable-BbKgJ5UI.js → DataTable-CmyEubtT.js} +2 -2
  9. package/dist/{HillActions-BD9j_sOU.js → HillActions-3HneGJhS.js} +1 -1
  10. package/dist/{Legend-CQxUgOd-.js → Legend-BJtY2RA9.js} +2 -2
  11. package/dist/{NonSvgPenAndPaper-4ypecDg1.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
  12. package/dist/{PackageVersion-B629oKuX.js → PackageVersion-C0b7KAMa.js} +1 -1
  13. package/dist/{PenAndPaper-C0UZ74fa.js → PenAndPaper-CIa1F5Jq.js} +3 -3
  14. package/dist/{Shape-C21CMlWS.js → Shape-BAL5bQmA.js} +1 -1
  15. package/dist/{SlicerPreview-wUw1hFwe.js → SlicerPreview-BRRyc1p7.js} +426 -426
  16. package/dist/{SparkTooltip-CjsbIhzi.js → SparkTooltip-Bou05CV_.js} +1 -1
  17. package/dist/{Title-BE3qg9xl.js → Title-CaVA8EIw.js} +1 -1
  18. package/dist/{Tooltip-DhjyfHwz.js → Tooltip-CVxJe3UW.js} +1 -1
  19. package/dist/{UserOptions-Dt98of5H.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-BYIvdTe8.js → dom-to-png-COvyU2SG.js} +1 -1
  91. package/dist/exposedLib-DrUEXSyf.js +28 -0
  92. package/dist/{img-Bnokohej.js → img-Bkzj3lDD.js} +1 -1
  93. package/dist/{labelUtils-BeVpDvTJ.js → labelUtils-iX76cA2-.js} +1 -1
  94. package/dist/{lib-Bttd6u5E.js → lib-Dqr_-I6Y.js} +166 -163
  95. package/dist/{package-C01DAl-Z.js → package-D7_0M69J.js} +1 -1
  96. package/dist/{pdf-CVIDfCrS.js → pdf-Bk_9lTdQ.js} +1 -1
  97. package/dist/{render-common-Dv5BvuwZ.js → render-common-B0f5NTO9.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-vPNvh7rV.js → useNestedProp-CulPqtou.js} +1 -1
  105. package/dist/{usePrinter-DN5bYhTG.js → usePrinter-CEiH1b6R.js} +2 -2
  106. package/dist/utils.js +9 -9
  107. package/dist/{vue-data-ui-DDZLOx_v.js → vue-data-ui-BlZHZHoH.js} +69 -69
  108. package/dist/vue-data-ui.js +73 -73
  109. package/dist/{vue-ui-3d-bar-C9Y9Uklb.js → vue-ui-3d-bar-CtT2BovY.js} +379 -381
  110. package/dist/{vue-ui-accordion-CLU_su1P.js → vue-ui-accordion-C6L7glHU.js} +3 -3
  111. package/dist/{vue-ui-age-pyramid-D98P16h3.js → vue-ui-age-pyramid-BhGNgnLB.js} +27 -27
  112. package/dist/{vue-ui-annotator-QjHngrui.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
  113. package/dist/vue-ui-bullet-BI7KJyJx.js +700 -0
  114. package/dist/{vue-ui-bump-BP7UOMFX.js → vue-ui-bump-BCQ97z1G.js} +325 -325
  115. package/dist/{vue-ui-candlestick-XPQeeduK.js → vue-ui-candlestick-Cs7I5MQS.js} +245 -245
  116. package/dist/{vue-ui-carousel-table-D39rMqRb.js → vue-ui-carousel-table-CDjAjc4b.js} +108 -108
  117. package/dist/{vue-ui-chestnut-B0xezYHS.js → vue-ui-chestnut-d6GxjfcP.js} +86 -86
  118. package/dist/vue-ui-chord-BuConnPN.js +1345 -0
  119. package/dist/vue-ui-circle-pack-CmxANHap.js +1633 -0
  120. package/dist/{vue-ui-cursor-JXCd2JAw.js → vue-ui-cursor-CQcnZYBv.js} +3 -3
  121. package/dist/{vue-ui-dag-D42c5rJN.js → vue-ui-dag-DKUZN-aQ.js} +923 -885
  122. package/dist/{vue-ui-dashboard-9-9eUWEy.js → vue-ui-dashboard-ciI4wMe6.js} +69 -69
  123. package/dist/{vue-ui-digits-CCkSVNpz.js → vue-ui-digits-DWf1vzYE.js} +3 -3
  124. package/dist/{vue-ui-donut-BnVCS9Ll.js → vue-ui-donut-CvCViwSI.js} +64 -64
  125. package/dist/vue-ui-donut-DZTtuFAG.js +2413 -0
  126. package/dist/{vue-ui-donut-evolution-CgjBE6EG.js → vue-ui-donut-evolution-BvZX3Gi8.js} +347 -347
  127. package/dist/{vue-ui-dumbbell-CVX2tGDU.js → vue-ui-dumbbell-BZywCpHd.js} +233 -236
  128. package/dist/vue-ui-flow-D5jcKr_S.js +1214 -0
  129. package/dist/vue-ui-funnel-7zX5QnQx.js +747 -0
  130. package/dist/{vue-ui-galaxy-CThLjvdQ.js → vue-ui-galaxy-BuGd-Ojm.js} +323 -325
  131. package/dist/vue-ui-gauge-BlDQIpBk.js +932 -0
  132. package/dist/{vue-ui-geo-DwNCnH_W.js → vue-ui-geo-PWGZw4Un.js} +34 -34
  133. package/dist/{vue-ui-gizmo-BkQUnPvN.js → vue-ui-gizmo-CTxB3PAl.js} +10 -10
  134. package/dist/{vue-ui-heatmap-COX6rafn.js → vue-ui-heatmap-sFF5IbM8.js} +472 -472
  135. package/dist/{vue-ui-hill-7BisXEYH.js → vue-ui-hill-DO3r2s-i.js} +10 -10
  136. package/dist/vue-ui-history-plot-Cj-Olvhn.js +1695 -0
  137. package/dist/vue-ui-horizontal-bar-B34aYuDZ.js +1708 -0
  138. package/dist/{vue-ui-kpi-R9bl7je_.js → vue-ui-kpi-Co6y1YlE.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-SNMKnmMa.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
  140. package/dist/{vue-ui-molecule-CNtY2_yF.js → vue-ui-molecule-ERAB4YzZ.js} +157 -163
  141. package/dist/{vue-ui-mood-radar-DUxhOQpR.js → vue-ui-mood-radar-BPp7L6OP.js} +302 -304
  142. package/dist/{vue-ui-nested-donuts-Bbub_wCe.js → vue-ui-nested-donuts-CX5ut2yp.js} +110 -113
  143. package/dist/vue-ui-onion-CWYJTUCq.js +1233 -0
  144. package/dist/vue-ui-parallel-coordinate-plot-DJrV-dVt.js +1430 -0
  145. package/dist/{vue-ui-quadrant-CFvonilu.js → vue-ui-quadrant-wj8Up03L.js} +32 -32
  146. package/dist/{vue-ui-quick-chart-iEJt6333.js → vue-ui-quick-chart-CPYdScHL.js} +153 -153
  147. package/dist/{vue-ui-radar-ClZ_OIr5.js → vue-ui-radar-D3gLQcI5.js} +41 -41
  148. package/dist/{vue-ui-rating-BnXrMeGg.js → vue-ui-rating-dBCk6ECe.js} +26 -26
  149. package/dist/vue-ui-relation-circle-DeNBOPjz.js +903 -0
  150. package/dist/vue-ui-ridgeline-DQcZJ_hv.js +1614 -0
  151. package/dist/vue-ui-rings-CF9NfFW2.js +1250 -0
  152. package/dist/vue-ui-scatter-U_xxKOte.js +2403 -0
  153. package/dist/{vue-ui-skeleton-Drk48XZi.js → vue-ui-skeleton-GA4wzjXV.js} +3 -3
  154. package/dist/{vue-ui-smiley-BQuXRW4o.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
  155. package/dist/{vue-ui-spark-trend-CYcS6-FN.js → vue-ui-spark-trend-BXRGMn5-.js} +23 -23
  156. package/dist/{vue-ui-sparkbar-eqLrT50j.js → vue-ui-sparkbar-96D0eR-o.js} +24 -24
  157. package/dist/{vue-ui-sparkgauge-C_b1h4DY.js → vue-ui-sparkgauge-BWBek2u2.js} +61 -61
  158. package/dist/{vue-ui-sparkhistogram-BzJr83-i.js → vue-ui-sparkhistogram-Cqs068RX.js} +15 -15
  159. package/dist/vue-ui-sparkline-B8cyY_P1.js +1584 -0
  160. package/dist/{vue-ui-sparkstackbar-O6Ojc2m8.js → vue-ui-sparkstackbar-C0BkLc2b.js} +207 -207
  161. package/dist/vue-ui-stackbar-DtsOc7B_.js +2332 -0
  162. package/dist/{vue-ui-stackline-D7d_Yqid.js → vue-ui-stackline-MSs0pdhE.js} +751 -747
  163. package/dist/{vue-ui-strip-plot-AljSBqsw.js → vue-ui-strip-plot-Df-TomML.js} +63 -66
  164. package/dist/vue-ui-table-BKSRQGVK.js +1352 -0
  165. package/dist/{vue-ui-table-heatmap-DRABMw2H.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
  166. package/dist/{vue-ui-table-sparkline-OScDr7Z5.js → vue-ui-table-sparkline-B7Dh-fN2.js} +11 -11
  167. package/dist/vue-ui-thermometer-DXuLn8NC.js +756 -0
  168. package/dist/{vue-ui-timer--q-f8RPJ.js → vue-ui-timer-orCjVwS4.js} +12 -12
  169. package/dist/{vue-ui-tiremarks-B2Fji5g0.js → vue-ui-tiremarks-DNoQ6Fl2.js} +12 -12
  170. package/dist/{vue-ui-treemap-CHqCU3Mt.js → vue-ui-treemap-90_Clj0e.js} +51 -54
  171. package/dist/vue-ui-waffle-BSQXyJ1S.js +1610 -0
  172. package/dist/{vue-ui-wheel-Dz2QzZcJ.js → vue-ui-wheel-CfU0Nnn0.js} +28 -28
  173. package/dist/{vue-ui-word-cloud-DBp8kZ4A.js → vue-ui-word-cloud-AgMvmPlI.js} +38 -41
  174. package/dist/{vue-ui-world-DbYSOiC4.js → vue-ui-world-D0Z9B6M2.js} +120 -123
  175. package/dist/{vue-ui-xy-C23skZ-G.js → vue-ui-xy-5Te2TfRK.js} +1645 -1641
  176. package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
  177. package/dist/{vue-ui-xy-CrHCmWhv.js → vue-ui-xy-ua_mFu_a.js} +99 -99
  178. package/package.json +1 -1
  179. package/dist/exposedLib-C0DPCgFj.js +0 -28
  180. package/dist/vue-ui-bullet-GgRg9sbN.js +0 -700
  181. package/dist/vue-ui-chord-eOIKOfDO.js +0 -1345
  182. package/dist/vue-ui-circle-pack-kCN1R-pw.js +0 -1636
  183. package/dist/vue-ui-donut-HrEXYDqO.js +0 -2415
  184. package/dist/vue-ui-flow-R-fW_EeT.js +0 -1217
  185. package/dist/vue-ui-funnel-CT3ixpCM.js +0 -750
  186. package/dist/vue-ui-gauge-DRXsVxYq.js +0 -932
  187. package/dist/vue-ui-history-plot-Bn_M0AFg.js +0 -1698
  188. package/dist/vue-ui-horizontal-bar-CkRRidx3.js +0 -1708
  189. package/dist/vue-ui-onion-Bix9MN3w.js +0 -1233
  190. package/dist/vue-ui-parallel-coordinate-plot-6SI2vJOo.js +0 -1430
  191. package/dist/vue-ui-relation-circle-CZ68uWhc.js +0 -903
  192. package/dist/vue-ui-ridgeline-BSiPLA08.js +0 -1614
  193. package/dist/vue-ui-rings-mGN_bpo1.js +0 -1252
  194. package/dist/vue-ui-scatter-C0PouRMY.js +0 -2403
  195. package/dist/vue-ui-sparkline-CyJKVGYw.js +0 -1584
  196. package/dist/vue-ui-stackbar-J5QzbBaA.js +0 -2328
  197. package/dist/vue-ui-table-CBdCPS2r.js +0 -1352
  198. package/dist/vue-ui-thermometer-DWmM_Hn9.js +0 -756
  199. package/dist/vue-ui-waffle-C1ksX6OD.js +0 -1612
  200. package/dist/vue-ui-xy-canvas-B-KxaFGF.js +0 -1819
@@ -1,1612 +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-Bttd6u5E.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-DN5bYhTG.js";
6
- import { n as he, t as ge } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as _e } from "./useNestedProp-vPNvh7rV.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-Bnokohej.js";
12
- import { n as Se } from "./Title-BE3qg9xl.js";
13
- import { t as Ce } from "./Shape-C21CMlWS.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-DZVucLnv.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-BeVpDvTJ.js";
22
- import { t as Ne } from "./Legend-CQxUgOd-.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: () => Ct }), 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 = ["innerHTML"], Ct = /*#__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 Ct = g(() => import("./Tooltip-DhjyfHwz.js")), wt = g(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), Tt = g(() => import("./DataTable-BbKgJ5UI.js")), Et = g(() => import("./vue-ui-accordion-CLU_su1P.js").then((e) => e.n)), Dt = g(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Ot = g(() => import("./PenAndPaper-C0UZ74fa.js").then((e) => e.t)), kt = g(() => import("./PackageVersion-B629oKuX.js").then((e) => e.t)), At = g(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_waffle: jt } = pe(), { isThemeValid: Mt, warnInvalidTheme: Nt } = ve(), Pt = Pe(), D = e, Ft = Je(), It = d({
135
- get() {
136
- return !!D.dataset && D.dataset.length;
137
- },
138
- set(e) {
139
- return e;
140
- }
141
- }), O = S(ae()), Lt = S(!1), Rt = S(""), k = S(null), zt = S(0), A = S(null), Bt = S(null), Vt = S(null), Ht = S(null), Ut = S(null), Wt = S(0), Gt = S(0), Kt = S(0), qt = S(!1), Jt = S(null), Yt = S(null), j = S(null), Xt = S({
142
- x: 0,
143
- y: 0
144
- }), Zt = S("pointer"), Qt = S(!1), M = S(sn()), { 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), $t = 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: en, FINAL_DATASET: tn, manualLoading: nn } = he({
189
- ...qe(D),
190
- FINAL_CONFIG: M,
191
- prepareConfig: sn,
192
- callback: () => {
193
- Promise.resolve().then(async () => {
194
- H.value = xn();
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: $t.value
217
- })
218
- }), { userOptionsVisible: rn, setUserOptionsVisibility: an, keepUserOptionState: on } = Ae({ config: M.value }), { svgRef: F } = je({ config: M.value.style.chart.title });
219
- function sn() {
220
- let e = _e({
221
- userConfig: D.config,
222
- defaultConfig: jt
223
- }), t = e.theme;
224
- if (!t) return e;
225
- if (!Mt.value(e)) return Nt(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
- en.value || (M.value = sn()), rn.value = !M.value.userOptions.showOnChartHover, un(), Wt.value += 1, Gt.value += 1, Kt.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), cn = Ge(null), ln = d(() => M.value.debug);
242
- function un() {
243
- if (ne(D.dataset) ? (ce({
244
- componentName: "VueUiWaffle",
245
- type: "dataset",
246
- debug: ln.value
247
- }), It.value = !1, nn.value = !0) : ln.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) || (nn.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 ? Bt.value : null,
264
- legend: M.value.style.chart.legend.show ? Vt.value : null,
265
- source: Ht.value,
266
- noTitle: Ut.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 && (cn.value && I.value.unobserve(cn.value), I.value.disconnect()), I.value = new ResizeObserver(e), cn.value = A.value.parentNode, I.value.observe(cn.value);
273
- }
274
- }
275
- Ue(() => {
276
- qt.value = !0, un();
277
- }), He(() => {
278
- I.value && (cn.value && I.value.unobserve(cn.value), I.value.disconnect());
279
- });
280
- let { isPrinting: dn, isImaging: fn, generatePdf: pn, generateImage: mn } = 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
- }), hn = d(() => M.value.userOptions.show && !M.value.style.chart.title.text), gn = 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), _n = d(() => Math.max(1e-4, z.value.width / M.value.style.chart.layout.grid.size)), vn = d(() => Math.max(1e-4, z.value.height / M.value.style.chart.layout.grid.size));
303
- function yn(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 bn = S(!1);
312
- function xn() {
313
- return bn.value = tn.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, tn.value.map((e, t) => ({
314
- ...e,
315
- color: s(e.color) || gn.value[t] || o[t] || o[t % o.length],
316
- uid: `serie_${t}`,
317
- absoluteIndex: t
318
- }));
319
- }
320
- let Sn = d(() => xn()), H = S(Sn.value);
321
- Ye(() => D.dataset, (e) => {
322
- Array.isArray(e) && e.length > 0 && (nn.value = !1);
323
- }, { immediate: !0 }), Ye(() => D.dataset, (e) => {
324
- H.value = xn();
325
- }, { deep: !0 });
326
- let Cn = d(() => yn(H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => bn.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), wn = d(() => yn(H.value.map((e, t) => bn.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), U = d(() => (ln.value && tn.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: Cn.value[t]
341
- })))), Tn = 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: wn.value[t]
349
- })));
350
- function En() {
351
- return Tn.value.map((e) => ({
352
- name: e.name,
353
- color: e.color,
354
- value: e.value,
355
- proportion: e.proportion
356
- }));
357
- }
358
- let Dn = 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(() => Dn.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([]), On = S(!1), kn = S(Object.create(null)), An = 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 jn(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 Mn(e) {
403
- let t = !1;
404
- kn.value[e] && (cancelAnimationFrame(kn.value[e]), delete kn.value[e], t = !0), An.value[e] && (cancelAnimationFrame(An.value[e]), delete An.value[e], t = !0), t && (q.value = Math.max(0, q.value - 1), On.value = q.value > 0);
405
- }
406
- function Nn({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
407
- Mn(e), q.value += 1, On.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 && (On.value = !1), delete kn.value[e], a();
414
- return;
415
- }
416
- i += n * .025, i > n && (i = n), J(e, i), kn.value[e] = requestAnimationFrame(o);
417
- } else {
418
- if (i <= t / 100) {
419
- J(e, 0), --q.value, q.value <= 0 && (On.value = !1), delete An.value[e], a();
420
- return;
421
- }
422
- i /= 1.15, J(e, i), An.value[e] = requestAnimationFrame(o);
423
- }
424
- }
425
- o();
426
- });
427
- }
428
- function Pn() {
429
- H.value = Sn.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
- Fn(e, !0);
437
- }) : Y.value.map((e) => e.uid).forEach((e) => {
438
- Fn(e, !0);
439
- });
440
- }
441
- function Fn(e, t = !1) {
442
- if (bn.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 = jn(e, Sn.value), i = jn(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), Pt.value) {
452
- Mn(e), J(e, r), Jn("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
- Nn({
461
- seriesId: e,
462
- fromValue: i,
463
- toValue: r,
464
- mode: "increase"
465
- }).then(() => {
466
- Jn("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 (Pt.value) {
477
- Mn(e), K.value.includes(e) || K.value.push(e), J(e, 0), Jn("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
- Nn({
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), Jn("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 In(e) {
502
- return Tn.value.length ? Tn.value.find((t) => t.name === e) || (ln.value && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (ln.value && console.warn("VueUiWaffle - There are no series to show."), null);
503
- }
504
- function Ln(e) {
505
- let t = In(e);
506
- t !== null && K.value.includes(t.uid) && Fn(t.uid);
507
- }
508
- function Rn(e) {
509
- let t = In(e);
510
- t !== null && (K.value.includes(t.uid) || Fn(t.uid));
511
- }
512
- function zn({ 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 || gn[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 = zn({
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: () => Fn(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
- })), Bn = 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)), Vn = S(null), Hn = 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 Un(e) {
581
- return Z.value.find((t) => t.serieIndex === e) || null;
582
- }
583
- function Wn(e) {
584
- let t = Un(e);
585
- return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
586
- }
587
- function Gn(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 Kn(e) {
595
- let t = W.value[e];
596
- M.value.events.datapointLeave && M.value.events.datapointLeave({
597
- datapoint: t,
598
- seriesIndex: t.serieIndex
599
- }), Hn.value = null, Lt.value = !1, k.value = null, j.value = null, Zt.value = "pointer";
600
- }
601
- function qn(e, t = "pointer") {
602
- if (K.value.length === D.dataset.length) return;
603
- let n = W.value[e];
604
- if (!n) return;
605
- Zt.value = t, j.value = n.serieIndex, Vn.value = {
606
- datapoint: n,
607
- seriesIndex: n.absoluteIndex,
608
- series: H.value,
609
- config: M.value
610
- }, M.value.events.datapointEnter && Hn.value !== n.serieIndex && M.value.events.datapointEnter({
611
- datapoint: n,
612
- seriesIndex: n.serieIndex
613
- }), Hn.value = n.serieIndex, Lt.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
- }))) Rt.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}" />${Ft.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>${zn({
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: bn.value ? 1 / tn.value.length * 100 : n.value / X.value * 100,
644
- s: "%",
645
- r: M.value.style.chart.tooltip.roundingPercentage
646
- })}</span>`
647
- })}</b></div>`, Rt.value = e;
648
- }
649
- }
650
- let Jn = 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 Yn(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 Xn(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 Zn(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(Xn(l));
748
- }
749
- }), a;
750
- }
751
- function Qn(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 $n(e) {
763
- let t = _n.value, n = vn.value;
764
- return Zn(Qn(e)).map((e) => e.map(({ x: e, y: r }) => ({
765
- x: e * t,
766
- y: z.value.top + r * n
767
- })));
768
- }
769
- function er(e) {
770
- return e.map(({ x: e, y: t }) => `${e},${t}`).join(" ");
771
- }
772
- function tr(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 nr = d(() => !M.value.style.chart.layout.rect.selection?.wrap?.show || [null, void 0].includes(k.value) ? [] : $n(k.value).map(er)), rr = 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: tr($n(e.serieIndex))
793
- })).filter((e) => e.d);
794
- });
795
- function ir(e, t) {
796
- return M.value.style.chart.layout.labels.captions.show ? W.value.length && !On.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 ar(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 : ""} ${zn({
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 or(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 sr = d(() => ({
845
- head: [
846
- " <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>",
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
- })), cr = S(!1);
892
- function lr(e) {
893
- cr.value = e, zt.value += 1;
894
- }
895
- function ur() {
896
- L.value.showTable = !L.value.showTable;
897
- }
898
- function dr() {
899
- L.value.showTooltip = !L.value.showTooltip;
900
- }
901
- let fr = S(!1);
902
- function pr() {
903
- fr.value = !fr.value;
904
- }
905
- async function mr({ 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 hr = d(() => {
923
- let e = M.value.table.useDialog && !M.value.table.show, t = L.value.showTable;
924
- return {
925
- component: e ? At : Et,
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: cr.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 && Jt.value ? Jt.value.open() : "close" in Jt.value && Jt.value.close());
955
- });
956
- function gr() {
957
- L.value.showTable = !1, Yt.value && Yt.value.setTableIconState(!1);
958
- }
959
- let _r = d(() => Y.value.map((e) => ({
960
- ...e,
961
- name: e.display
962
- }))), vr = d(() => M.value.style.chart.backgroundColor), yr = d(() => M.value.style.chart.legend), br = d(() => M.value.style.chart.title), { isCallbackImaging: xr, isCallbackSvg: Sr, generateSvg: Cr, onGenerateImage: wr } = ye({
963
- svg: F,
964
- title: br,
965
- legend: yr,
966
- legendItems: _r,
967
- backgroundColor: vr,
968
- getSvgCallback: () => M.value.userOptions.callbacks.svg,
969
- generateImage: mn
970
- });
971
- async function Tr() {
972
- if (Jn("copyAlt", {
973
- config: M.value,
974
- dataset: Tn.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: Tn.value
982
- }));
983
- }
984
- function Er() {
985
- j.value = null, Qt.value = !0;
986
- }
987
- function Dr() {
988
- j.value = null, Zt.value = "pointer", Lt.value = !1, k.value = null, Hn.value = null, Qt.value = !1;
989
- }
990
- function Or(e) {
991
- if (!F.value || fr.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, Zt.value = "pointer", Lt.value = !1, k.value = null, Hn.value = null;
996
- return;
997
- }
998
- if (r) {
999
- if (j.value === null) return;
1000
- let e = Wn(j.value);
1001
- if (e === null) return;
1002
- Gn(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 = Wn(o.serieIndex);
1008
- s !== null && (kr(o.serieIndex), qn(s, "keyboard"));
1009
- }
1010
- function kr(e) {
1011
- if (!Number.isFinite(e) || !F.value) return;
1012
- let t = Un(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 + _n.value / 2,
1018
- y: t.y + M.value.style.chart.layout.grid.spaceBetween / 2 + vn.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
- Xt.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 Ar = d(() => ({
1029
- headers: sr.value?.colNames ?? [],
1030
- rows: sr.value?.body ?? []
1031
- }));
1032
- return we({
1033
- getData: En,
1034
- getImage: mr,
1035
- generatePdf: pn,
1036
- generateCsv: or,
1037
- generateImage: mn,
1038
- generateSvg: Cr,
1039
- hideSeries: Rn,
1040
- showSeries: Ln,
1041
- toggleTable: ur,
1042
- toggleTooltip: dr,
1043
- toggleAnnotator: pr,
1044
- toggleFullscreen: lr,
1045
- copyAlt: Tr
1046
- }), (e, t) => (x(), m("div", {
1047
- class: v(`vue-data-ui-component vue-ui-waffle ${cr.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(an)(!0),
1053
- onMouseleave: t[3] ||= () => T(an)(!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
- Ar.value?.rows?.length ? (x(), f(ke, {
1060
- key: 0,
1061
- uid: O.value,
1062
- head: Ar.value.headers,
1063
- body: Ar.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(Ot), {
1074
- key: 1,
1075
- svgRef: T(F),
1076
- backgroundColor: M.value.style.chart.backgroundColor,
1077
- color: M.value.style.chart.color,
1078
- active: fr.value,
1079
- isCursorPointer: P.value,
1080
- onClose: pr
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
- hn.value ? (x(), m("div", {
1097
- key: 2,
1098
- ref_key: "noTitle",
1099
- ref: Ut,
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: Bt,
1107
- style: "width:100%;background:transparent;padding-bottom:12px"
1108
- }, [(x(), f(Se, {
1109
- key: `title_${Wt.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 && It.value && (T(on) || T(rn)) ? (x(), f(T(Dt), {
1123
- ref_key: "userOptionsRef",
1124
- ref: Yt,
1125
- key: `user_options_${zt.value}`,
1126
- backgroundColor: M.value.style.chart.backgroundColor,
1127
- color: M.value.style.chart.color,
1128
- isPrinting: T(dn),
1129
- isImaging: T(fn),
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: cr.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: fr.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: lr,
1151
- onGeneratePdf: T(pn),
1152
- onGenerateCsv: or,
1153
- onGenerateImage: T(wr),
1154
- onGenerateSvg: T(Cr),
1155
- onToggleTable: ur,
1156
- onToggleTooltip: dr,
1157
- onToggleAnnotator: pr,
1158
- onCopyAlt: Tr,
1159
- style: b({ visibility: T(on) ? T(rn) ? "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": cr.value,
1238
- "vue-data-ui-fulscreen--off": !cr.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: Er,
1245
- onBlur: Dr,
1246
- onKeydown: Or
1247
- }, [
1248
- ze(T(kt)),
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(Sn.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(rr.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(Yn(e.serieIndex)),
1320
- class: v({ "vue-data-ui-transition": T(N) })
1321
- }, null, 14, ot))), 128)),
1322
- (x(!0), m(u, null, C(rr.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(Yn(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(rr.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(Yn(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(Yn(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(Yn(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(Yn(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(nr.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, [ir(t, e) ? (x(), m("text", {
1404
- key: `datalabel_${t}`,
1405
- textContent: Ke(ar(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 + vn.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(rr.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) => qn(e.rectIndex),
1421
- onMouseleave: (t) => Kn(e.rectIndex),
1422
- onClick: (t) => Gn(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: vn.value,
1428
- width: _n.value,
1429
- fill: "transparent",
1430
- stroke: "none",
1431
- onMouseover: (e) => qn(t),
1432
- onMouseleave: (e) => Kn(t),
1433
- onClick: (e) => Gn(t)
1434
- }, null, 40, _t))), 128)),
1435
- w(e.$slots, "svg", { svg: {
1436
- ...R.value,
1437
- isPrintingImg: T(dn) || T(fn) || T(xr),
1438
- isPrintingSvg: T(Sr)
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: Qt.value
1443
- })), void 0, !0)])) : p("", !0)]),
1444
- e.$slots.watermark ? (x(), m("div", yt, [w(e.$slots, "watermark", y(_({ isPrinting: T(dn) || T(fn) || T(xr) || T(Sr) })), void 0, !0)])) : p("", !0),
1445
- h("div", { id: `legend-bottom-${O.value}` }, null, 8, bt),
1446
- qt.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: Vt
1452
- }, [w(e.$slots, "legend", { legend: Y.value }, () => [M.value.style.chart.legend.show ? (x(), f(Ne, {
1453
- key: `legend_${Kt.value}`,
1454
- legendSet: Y.value,
1455
- config: Bn.value,
1456
- isCursorPointer: P.value,
1457
- onClickMarker: t[0] ||= ({ legend: e }) => Fn(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(en) ? (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: Pn
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: Ht,
1501
- dir: "auto"
1502
- }, [w(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
1503
- ze(T(Ct), {
1504
- teleportTo: M.value.style.chart.tooltip.teleportTo,
1505
- show: L.value.showTooltip && Lt.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: Rt.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: cr.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: Zt.value === "keyboard",
1525
- a11yPosition: Xt.value
1526
- }, {
1527
- "tooltip-before": E(() => [w(e.$slots, "tooltip-before", y(_({ ...Vn.value })), void 0, !0)]),
1528
- tooltip: E(() => [w(e.$slots, "tooltip", y(_({ ...Vn.value })), void 0, !0)]),
1529
- "tooltip-after": E(() => [w(e.$slots, "tooltip-after", y(_({ ...Vn.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
- It.value && M.value.userOptions.buttons.table ? (x(), f(We(hr.value.component), Be({ key: 8 }, hr.value.props, {
1556
- ref_key: "tableUnit",
1557
- ref: Jt,
1558
- onClose: gr
1559
- }), Le({
1560
- content: E(() => [(x(), f(T(Tt), {
1561
- key: `table_${Gt.value}`,
1562
- colNames: sr.value.colNames,
1563
- head: sr.value.head,
1564
- body: sr.value.body,
1565
- config: sr.value.config,
1566
- title: M.value.table.useDialog ? "" : hr.value.title,
1567
- withCloseButton: !M.value.table.useDialog,
1568
- isCursorPointer: P.value,
1569
- onClose: gr
1570
- }, {
1571
- th: E(({ th: e }) => [h("div", {
1572
- innerHTML: e,
1573
- style: {
1574
- display: "flex",
1575
- "align-items": "center"
1576
- }
1577
- }, null, 8, St)]),
1578
- td: E(({ td: e }) => [Re(Ke(e.name || e), 1)]),
1579
- _: 1
1580
- }, 8, [
1581
- "colNames",
1582
- "head",
1583
- "body",
1584
- "config",
1585
- "title",
1586
- "withCloseButton",
1587
- "isCursorPointer"
1588
- ]))]),
1589
- _: 2
1590
- }, [M.value.table.useDialog ? {
1591
- name: "title",
1592
- fn: E(() => [Re(Ke(hr.value.title), 1)]),
1593
- key: "0"
1594
- } : void 0, M.value.table.useDialog ? {
1595
- name: "actions",
1596
- fn: E(() => [h("button", {
1597
- tabindex: "0",
1598
- class: "vue-ui-user-options-button",
1599
- onClick: t[1] ||= (e) => or(M.value.userOptions.callbacks.csv),
1600
- style: b({ cursor: P.value ? "pointer" : "default" })
1601
- }, [ze(T(wt), {
1602
- name: "fileCsv",
1603
- stroke: hr.value.props.color
1604
- }, null, 8, ["stroke"])], 4)]),
1605
- key: "1"
1606
- } : void 0]), 1040)) : p("", !0),
1607
- w(e.$slots, "skeleton", {}, () => [T(en) ? (x(), f(ge, { key: 0 })) : p("", !0)], !0)
1608
- ], 46, Ze));
1609
- }
1610
- }, [["__scopeId", "data-v-fd2c905f"]]);
1611
- //#endregion
1612
- export { Xe as n, Ct as t };