vue-data-ui 3.25.2 → 3.25.4

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