vue-data-ui 3.25.8 → 3.25.10

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 (164) hide show
  1. package/dist/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
  2. package/dist/{PackageVersion-ekRvV3aF.js → PackageVersion-CZZayD-D.js} +1 -1
  3. package/dist/{PenAndPaper-KFzKlvbi.js → PenAndPaper-Cd3nItcO.js} +3 -3
  4. package/dist/{SlicerPreview-B6iHOC9L.js → SlicerPreview-Ccss7Vsq.js} +2 -2
  5. package/dist/{SparkTooltip-C-Y-mDrc.js → SparkTooltip-L3SliZbR.js} +1 -1
  6. package/dist/{UserOptions-2x4VklMW.js → UserOptions-qo_Tsqci.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-age-pyramid.js +1 -1
  9. package/dist/components/vue-ui-annotator.js +1 -1
  10. package/dist/components/vue-ui-bullet.js +1 -1
  11. package/dist/components/vue-ui-bump.js +1 -1
  12. package/dist/components/vue-ui-candlestick.js +1 -1
  13. package/dist/components/vue-ui-carousel-table.js +1 -1
  14. package/dist/components/vue-ui-chestnut.js +1 -1
  15. package/dist/components/vue-ui-chord.js +1 -1
  16. package/dist/components/vue-ui-circle-pack.js +1 -1
  17. package/dist/components/vue-ui-cursor.js +1 -1
  18. package/dist/components/vue-ui-dag.js +1 -1
  19. package/dist/components/vue-ui-dashboard.js +1 -1
  20. package/dist/components/vue-ui-digits.js +1 -1
  21. package/dist/components/vue-ui-donut-evolution.js +1 -1
  22. package/dist/components/vue-ui-donut.js +1 -1
  23. package/dist/components/vue-ui-dumbbell.js +1 -1
  24. package/dist/components/vue-ui-flow.js +1 -1
  25. package/dist/components/vue-ui-funnel.js +1 -1
  26. package/dist/components/vue-ui-galaxy.js +1 -1
  27. package/dist/components/vue-ui-gauge.js +1 -1
  28. package/dist/components/vue-ui-geo.js +1 -1
  29. package/dist/components/vue-ui-gizmo.js +1 -1
  30. package/dist/components/vue-ui-heatmap.js +1 -1
  31. package/dist/components/vue-ui-hill.js +1 -1
  32. package/dist/components/vue-ui-history-plot.js +1 -1
  33. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  34. package/dist/components/vue-ui-kpi.js +1 -1
  35. package/dist/components/vue-ui-label.js +1 -1
  36. package/dist/components/vue-ui-molecule.js +1 -1
  37. package/dist/components/vue-ui-mood-radar.js +1 -1
  38. package/dist/components/vue-ui-nested-donuts.js +1 -1
  39. package/dist/components/vue-ui-onion.js +1 -1
  40. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  41. package/dist/components/vue-ui-quadrant.js +1 -1
  42. package/dist/components/vue-ui-quick-chart.js +1 -1
  43. package/dist/components/vue-ui-radar.js +1 -1
  44. package/dist/components/vue-ui-relation-circle.js +1 -1
  45. package/dist/components/vue-ui-ridgeline.js +1 -1
  46. package/dist/components/vue-ui-rings.js +1 -1
  47. package/dist/components/vue-ui-scatter.js +1 -1
  48. package/dist/components/vue-ui-skeleton.js +1 -1
  49. package/dist/components/vue-ui-spark-trend.js +1 -1
  50. package/dist/components/vue-ui-sparkbar.js +1 -1
  51. package/dist/components/vue-ui-sparkgauge.js +1 -1
  52. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  53. package/dist/components/vue-ui-sparkline.js +1 -1
  54. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  55. package/dist/components/vue-ui-stackbar.js +1 -1
  56. package/dist/components/vue-ui-stackline.js +1 -1
  57. package/dist/components/vue-ui-strip-plot.js +1 -1
  58. package/dist/components/vue-ui-table-heatmap.js +1 -1
  59. package/dist/components/vue-ui-table-sparkline.js +1 -1
  60. package/dist/components/vue-ui-table.js +1 -1
  61. package/dist/components/vue-ui-thermometer.js +1 -1
  62. package/dist/components/vue-ui-timer.js +1 -1
  63. package/dist/components/vue-ui-tiremarks.js +1 -1
  64. package/dist/components/vue-ui-treemap.js +1 -1
  65. package/dist/components/vue-ui-vertical-bar.js +1 -1
  66. package/dist/components/vue-ui-waffle.js +1 -1
  67. package/dist/components/vue-ui-wheel.js +1 -1
  68. package/dist/components/vue-ui-word-cloud.js +1 -1
  69. package/dist/components/vue-ui-world.js +1 -1
  70. package/dist/components/vue-ui-xy-canvas.js +1 -1
  71. package/dist/components/vue-ui-xy.js +1 -1
  72. package/dist/composables.js +1 -1
  73. package/dist/{dom-to-png-C6cQJ5Hq.js → dom-to-png-BR4imuKV.js} +1 -1
  74. package/dist/{geoProjections-CEo3dVaL.js → geoProjections-BYthUA8l.js} +2 -2
  75. package/dist/{img-DhGApYG0.js → img-BkMKbWsI.js} +1 -1
  76. package/dist/{package-C4XeEHJx.js → package-CYtJq7s7.js} +1 -1
  77. package/dist/{pdf-Di5yPEw9.js → pdf-BSOs_GZz.js} +1 -1
  78. package/dist/{render-common-CQUp12xB.js → render-common-CpHpPc5s.js} +1 -1
  79. package/dist/ssr/vue-ui-donut.js +1 -1
  80. package/dist/ssr/vue-ui-xy.js +1 -1
  81. package/dist/ssr.js +2 -2
  82. package/dist/style.css +1 -1
  83. package/dist/types/utils.d.ts +5 -5
  84. package/dist/types/vue-data-ui.d.ts +5 -5
  85. package/dist/{usePrinter-DISD7q5m.js → usePrinter-hohanNCX.js} +4 -4
  86. package/dist/{useTooltipPosition-DifeoeQW.js → useTooltipPosition-BCrtQa9H.js} +1 -1
  87. package/dist/{vue-data-ui-BChCkqtW.js → vue-data-ui-ChB3aXCO.js} +65 -65
  88. package/dist/vue-data-ui.js +66 -66
  89. package/dist/{vue-ui-3d-bar-BkVOy4Y_.js → vue-ui-3d-bar-DcXbkO19.js} +5 -5
  90. package/dist/{vue-ui-age-pyramid-1_yQ64LX.js → vue-ui-age-pyramid-Cnaxt9NI.js} +263 -251
  91. package/dist/{vue-ui-annotator-BO5ihHOB.js → vue-ui-annotator-BLYRy--7.js} +12 -12
  92. package/dist/{vue-ui-bullet-BF1FeBst.js → vue-ui-bullet-DOfD2TSb.js} +4 -4
  93. package/dist/{vue-ui-bump-ZtKya76Y.js → vue-ui-bump-DL2lDZbE.js} +3 -3
  94. package/dist/{vue-ui-candlestick-P-clTYIt.js → vue-ui-candlestick-ijujiVJ5.js} +453 -441
  95. package/dist/{vue-ui-carousel-table-BVS-4A3h.js → vue-ui-carousel-table-DFtWb2-C.js} +3 -3
  96. package/dist/{vue-ui-chestnut-DHOIbpib.js → vue-ui-chestnut-BGXr0s08.js} +5 -5
  97. package/dist/{vue-ui-chord-CX_Mc3Fp.js → vue-ui-chord-DgBzLfbv.js} +5 -5
  98. package/dist/{vue-ui-circle-pack-Caqvblsl.js → vue-ui-circle-pack-88qDJbt0.js} +494 -482
  99. package/dist/{vue-ui-cursor-BFF4tWUb.js → vue-ui-cursor-CcEB7Ypx.js} +1 -1
  100. package/dist/{vue-ui-dag-CtG3HUh4.js → vue-ui-dag-BeoFmTDs.js} +6 -6
  101. package/dist/{vue-ui-dashboard-DASHNFPT.js → vue-ui-dashboard-NOVcGMCa.js} +63 -63
  102. package/dist/{vue-ui-digits-BQWHzntO.js → vue-ui-digits-BGmT7H1z.js} +1 -1
  103. package/dist/{vue-ui-donut-DHP_lm0m.js → vue-ui-donut-CP7ilveE.js} +838 -826
  104. package/dist/{vue-ui-donut-vbqlIlij.js → vue-ui-donut-CtXzuWzy.js} +1 -1
  105. package/dist/{vue-ui-donut-evolution-Cio3lNLz.js → vue-ui-donut-evolution-D_-y7BZi.js} +6 -6
  106. package/dist/{vue-ui-dumbbell-C2lQhCfq.js → vue-ui-dumbbell-BR1Cn4wm.js} +4 -4
  107. package/dist/vue-ui-flow-Bm6TgD8I.js +1229 -0
  108. package/dist/{vue-ui-funnel-DDncfHgI.js → vue-ui-funnel-CQ0-9nZT.js} +3 -3
  109. package/dist/vue-ui-galaxy-DUto0BOw.js +1097 -0
  110. package/dist/{vue-ui-gauge-OQbET2bh.js → vue-ui-gauge-B6pyA6Jh.js} +4 -4
  111. package/dist/{vue-ui-geo-Ddw87hVT.js → vue-ui-geo-BlG7s8MH.js} +408 -396
  112. package/dist/{vue-ui-gizmo-DJVWEvWS.js → vue-ui-gizmo-BlyehpxE.js} +2 -2
  113. package/dist/{vue-ui-heatmap-BKG4xt6j.js → vue-ui-heatmap-DqbWkKAE.js} +405 -393
  114. package/dist/{vue-ui-hill-BAruBiw6.js → vue-ui-hill-CGE0NdNk.js} +7 -7
  115. package/dist/vue-ui-history-plot-CaxqIiTb.js +1710 -0
  116. package/dist/{vue-ui-horizontal-bar-CXT7-P_o.js → vue-ui-horizontal-bar-Ykwe4M1n.js} +401 -389
  117. package/dist/{vue-ui-kpi-uOGX20hs.js → vue-ui-kpi-B7Nfet0o.js} +1 -1
  118. package/dist/{vue-ui-label-C1UAzvAu.js → vue-ui-label-Cs4ZlAqr.js} +10 -10
  119. package/dist/{vue-ui-molecule-BcA064dR.js → vue-ui-molecule-DWq98OSc.js} +347 -335
  120. package/dist/{vue-ui-mood-radar-CXtC0IqT.js → vue-ui-mood-radar-DDfimq6c.js} +5 -5
  121. package/dist/{vue-ui-nested-donuts-BFE0oXF_.js → vue-ui-nested-donuts-Bt-r6uXS.js} +360 -348
  122. package/dist/vue-ui-onion-D8gOhQHP.js +1247 -0
  123. package/dist/{vue-ui-parallel-coordinate-plot-5kKVnNmE.js → vue-ui-parallel-coordinate-plot-BbPbJiiu.js} +387 -375
  124. package/dist/{vue-ui-quadrant-BPg8L6Sw.js → vue-ui-quadrant-BJlf3qW1.js} +418 -406
  125. package/dist/{vue-ui-quick-chart-DQ_rhjqc.js → vue-ui-quick-chart-Cb8x00-X.js} +550 -538
  126. package/dist/{vue-ui-radar-C65wD7cW.js → vue-ui-radar-30PF-qqr.js} +330 -318
  127. package/dist/{vue-ui-relation-circle-nZaZcCh1.js → vue-ui-relation-circle-CRiC4PnL.js} +4 -4
  128. package/dist/{vue-ui-ridgeline-Bsi2hN14.js → vue-ui-ridgeline-CSs4Tq_c.js} +4 -4
  129. package/dist/{vue-ui-rings-DkCzxDyQ.js → vue-ui-rings-BqRWK5rY.js} +321 -309
  130. package/dist/{vue-ui-scatter-V01qkcN8.js → vue-ui-scatter-Bsh6jbdW.js} +584 -572
  131. package/dist/{vue-ui-skeleton-BgYtv_I2.js → vue-ui-skeleton-DbPSsEKV.js} +1 -1
  132. package/dist/{vue-ui-spark-trend-Dm1OyGyr.js → vue-ui-spark-trend--8QokOII.js} +2 -2
  133. package/dist/{vue-ui-sparkbar-D3hChHHS.js → vue-ui-sparkbar-DkX9Demg.js} +2 -2
  134. package/dist/{vue-ui-sparkgauge-CAeJapmG.js → vue-ui-sparkgauge-Ci_xD5B7.js} +2 -2
  135. package/dist/{vue-ui-sparkhistogram-ZIo_Vg7F.js → vue-ui-sparkhistogram-Qe3ZCPRd.js} +2 -2
  136. package/dist/{vue-ui-sparkline-BjvSeM83.js → vue-ui-sparkline-BwldgOYW.js} +2 -2
  137. package/dist/vue-ui-sparkstackbar-Divd0hL_.js +750 -0
  138. package/dist/vue-ui-stackbar-BWPSGzN-.js +2369 -0
  139. package/dist/vue-ui-stackline-BQroSnwZ.js +2483 -0
  140. package/dist/vue-ui-strip-plot-BCUPHkCp.js +1752 -0
  141. package/dist/{vue-ui-table-C8cvK-x_.js → vue-ui-table-DJeXLYly.js} +2 -2
  142. package/dist/{vue-ui-table-heatmap-BSUab4fG.js → vue-ui-table-heatmap-D5F5bLx5.js} +2 -2
  143. package/dist/{vue-ui-table-sparkline-Dam9BFsU.js → vue-ui-table-sparkline-DCm8S2uK.js} +2 -2
  144. package/dist/{vue-ui-thermometer-zyBeCINd.js → vue-ui-thermometer-xu4R8d2f.js} +4 -4
  145. package/dist/{vue-ui-timer-CDXczagK.js → vue-ui-timer-i_3bMu3h.js} +1 -1
  146. package/dist/{vue-ui-tiremarks-CG8LNC9c.js → vue-ui-tiremarks-DGuMI0yH.js} +4 -4
  147. package/dist/{vue-ui-treemap-DfDRwoZc.js → vue-ui-treemap-Bvl7elni.js} +311 -299
  148. package/dist/vue-ui-waffle-CVuYg0yU.js +1633 -0
  149. package/dist/{vue-ui-wheel-DDJIPE_z.js → vue-ui-wheel-DqHD09iA.js} +4 -4
  150. package/dist/{vue-ui-word-cloud-DBOXRp-e.js → vue-ui-word-cloud-BDCuTQ8Q.js} +385 -372
  151. package/dist/{vue-ui-world-CiIyp7WH.js → vue-ui-world-B0oVwEDj.js} +474 -462
  152. package/dist/{vue-ui-xy-s_IZ573M.js → vue-ui-xy-BJJi0E4D.js} +1 -1
  153. package/dist/{vue-ui-xy-AGYE0Vsz.js → vue-ui-xy-D1dPd68D.js} +1447 -1432
  154. package/dist/{vue-ui-xy-canvas-MOMyUdJg.js → vue-ui-xy-canvas-R2xbgDOy.js} +523 -511
  155. package/package.json +3 -3
  156. package/dist/vue-ui-flow-Dmnz4LCl.js +0 -1217
  157. package/dist/vue-ui-galaxy-Dw7TyOH0.js +0 -1085
  158. package/dist/vue-ui-history-plot-BKUg8Gz_.js +0 -1698
  159. package/dist/vue-ui-onion-DhedgEnV.js +0 -1235
  160. package/dist/vue-ui-sparkstackbar-DGQcpWK4.js +0 -738
  161. package/dist/vue-ui-stackbar-D0qmFn5Y.js +0 -2355
  162. package/dist/vue-ui-stackline-BBtEVl9V.js +0 -2469
  163. package/dist/vue-ui-strip-plot-CkU-nCt4.js +0 -1740
  164. package/dist/vue-ui-waffle-D6_cGi1-.js +0 -1621
@@ -1,1217 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, Ct as n, D as r, Lt as i, Pt as a, S as o, X as s, Yt as c, Zt as l, b as u, i as d, n as f, nt as p, q as ee, r as m, t as h, w as g } from "./lib-Dql7cqyA.js";
3
- import { n as te, t as _ } from "./useHints-Dq_w2E8B.js";
4
- import { t as v } from "./useConfig-D32D002m.js";
5
- import { t as ne } from "./usePrinter-DISD7q5m.js";
6
- import { n as y, t as b } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as x } from "./useNestedProp-Chvyfpl-.js";
8
- import { t as re } from "./useThemeCheck-C43Tcqmk.js";
9
- import { t as ie } from "./useChartExport-iwOqiIWX.js";
10
- import { t as ae } from "./img-DhGApYG0.js";
11
- import { n as oe } from "./Title-CPHi-evi.js";
12
- import { t as se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { l as ce, t as le } from "./useResponsive-ZtArZtUf.js";
14
- import { t as ue } from "./A11yDataTable-DdRsVULz.js";
15
- import { t as de } from "./useUserOptionState-DK-_1ddE.js";
16
- import { t as fe } from "./useChartAccessibility-DYqac8yF.js";
17
- import { t as pe } from "./Legend-X4kF4PvW.js";
18
- import { t as me } from "./vue_ui_flow-BewZjjKG.js";
19
- import { Fragment as he, Teleport as ge, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as _e, createTextVNode as ve, createVNode as ye, defineAsyncComponent as D, guardReactiveProps as O, mergeProps as be, nextTick as xe, normalizeClass as Se, normalizeProps as k, normalizeStyle as A, onMounted as Ce, openBlock as j, ref as M, renderList as we, renderSlot as N, resolveDynamicComponent as Te, toDisplayString as P, toRefs as Ee, unref as F, watch as De, withCtx as I } from "vue";
20
- //#region src/components/vue-ui-flow.vue
21
- var Oe = /* @__PURE__ */ e({ default: () => Ye }), ke = ["id"], Ae = ["id"], je = {
22
- key: 2,
23
- ref: "noTitle",
24
- class: "vue-data-ui-no-title-space",
25
- style: "height:36px; width: 100%;background:transparent"
26
- }, Me = ["id"], Ne = { style: { position: "relative" } }, Pe = [
27
- "xmlns",
28
- "aria-describedby",
29
- "viewBox"
30
- ], Fe = ["width", "height"], Ie = ["id"], Le = ["stop-color"], Re = ["stop-color"], ze = [
31
- "d",
32
- "fill",
33
- "stroke",
34
- "stroke-width"
35
- ], Be = [
36
- "data-a11y-node-id",
37
- "x",
38
- "y",
39
- "height",
40
- "width",
41
- "fill",
42
- "stroke",
43
- "stroke-width",
44
- "rx",
45
- "aria-label",
46
- "onMouseenter",
47
- "onMouseleave",
48
- "onClick"
49
- ], Ve = { key: 1 }, He = [
50
- "x",
51
- "y",
52
- "font-size",
53
- "fill"
54
- ], Ue = [
55
- "x",
56
- "y",
57
- "font-size",
58
- "fill"
59
- ], We = {
60
- key: 0,
61
- style: {
62
- position: "absolute",
63
- top: "100%",
64
- left: "0",
65
- width: "100%"
66
- },
67
- "data-dom-to-png-ignore": "",
68
- "aria-hidden": "true"
69
- }, Ge = {
70
- key: 5,
71
- class: "vue-data-ui-watermark"
72
- }, Ke = ["id"], qe = ["onClick"], Je = { style: {
73
- display: "flex",
74
- "align-items": "center"
75
- } }, Ye = /*#__PURE__*/ se({
76
- __name: "vue-ui-flow",
77
- props: {
78
- config: {
79
- type: Object,
80
- default() {
81
- return {};
82
- }
83
- },
84
- dataset: {
85
- type: Array,
86
- default() {
87
- return [];
88
- }
89
- }
90
- },
91
- emits: ["copyAlt"],
92
- setup(e, { expose: se, emit: Oe }) {
93
- let Ye = D(() => import("./Tooltip-hhrkQ3Lk.js")), Xe = D(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), Ze = D(() => import("./vue-ui-accordion-DmkL8A59.js").then((e) => e.n)), Qe = D(() => import("./DataTable-oiM9uWrQ.js")), $e = D(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), et = D(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), tt = D(() => import("./PackageVersion-ekRvV3aF.js").then((e) => e.t)), nt = D(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_flow: rt } = v(), { isThemeValid: it, warnInvalidTheme: at } = re(), L = e, ot = Oe, R = M(ee()), z = M(null), st = M(0), ct = M(0), lt = M(!1), ut = M(""), dt = M(null), ft = M(null), pt = M(null), mt = M(null), ht = M(null), gt = M(!1), _t = M(null), vt = M(null), yt = M(null), bt = M(null), B = M(null), xt = M({
94
- x: 0,
95
- y: 0
96
- }), St = M("pointer"), Ct = M(!1), wt = S(() => !!L.dataset && L.dataset.length);
97
- Ce(() => {
98
- gt.value = !0, Nt();
99
- });
100
- let V = M(!1);
101
- function Tt(e) {
102
- V.value = e, st.value += 1;
103
- }
104
- let H = M(Lt()), U = S(() => H.value.style.chart.nodes.labels), W = S(() => H.value.style.chart.nodes), Et = S(() => H.value.style.chart.links), G = S(() => H.value.style.chart);
105
- te({
106
- config: () => H.value,
107
- dataset: () => L.dataset,
108
- component: "VueUiFlow",
109
- rules: [_.emptyArray, _.noHint]
110
- });
111
- let Dt = S(() => H.value.userOptions.useCursorPointer), Ot = S(() => l({
112
- defaultConfig: {
113
- userOptions: { show: !1 },
114
- nodeCategories: {
115
- B: "A",
116
- C: "B"
117
- },
118
- nodeCategoryColors: {
119
- A: "#CACACA",
120
- B: "#AAAAAA"
121
- },
122
- table: { show: !1 },
123
- style: { chart: {
124
- backgroundColor: "#99999930",
125
- legend: { backgroundColor: "transparent" },
126
- nodes: {
127
- labels: { show: !1 },
128
- stroke: "#666666"
129
- },
130
- links: { stroke: "#666666" }
131
- } }
132
- },
133
- userConfig: H.value.skeletonConfig ?? {}
134
- })), { loading: kt, FINAL_DATASET: At, manualLoading: jt } = y({
135
- ...Ee(L),
136
- FINAL_CONFIG: H,
137
- prepareConfig: Lt,
138
- skeletonDataset: L.config?.skeletonDataset ?? [
139
- [
140
- "A",
141
- "B",
142
- 2,
143
- "#CACACA"
144
- ],
145
- [
146
- "B",
147
- "C",
148
- 1,
149
- "#CACACA"
150
- ],
151
- [
152
- "C",
153
- "D",
154
- .5,
155
- "#CACACA"
156
- ],
157
- [
158
- "E",
159
- "F",
160
- 1,
161
- "#AAAAAA"
162
- ],
163
- [
164
- "F",
165
- "G",
166
- .5,
167
- "#AAAAAA"
168
- ],
169
- [
170
- "G",
171
- "H",
172
- .25,
173
- "#AAAAAA"
174
- ]
175
- ],
176
- skeletonConfig: l({
177
- defaultConfig: H.value,
178
- userConfig: Ot.value
179
- })
180
- }), Mt = S(() => H.value.debug);
181
- function Nt() {
182
- if (a(L.dataset) && (p({
183
- componentName: "VueUiFlow",
184
- type: "dataset",
185
- debug: Mt.value
186
- }), jt.value = !0), a(L.dataset) || (jt.value = H.value.loading), H.value.responsive) {
187
- let e = ce(() => {
188
- let { width: e, height: t } = le({
189
- chart: z.value,
190
- title: G.value.title.text ? ft.value : null,
191
- legend: G.value.legend.show ? dt.value : null,
192
- source: pt.value
193
- });
194
- requestAnimationFrame(() => {
195
- Rt.value = e, zt.value = t;
196
- });
197
- });
198
- mt.value && (ht.value && mt.value.unobserve(ht.value), mt.value.disconnect()), mt.value = new ResizeObserver(e), ht.value = z.value.parentNode, mt.value.observe(ht.value);
199
- }
200
- }
201
- let { userOptionsVisible: Pt, setUserOptionsVisibility: Ft, keepUserOptionState: It } = de({ config: H.value }), { svgRef: K } = fe({ config: G.value.title });
202
- function Lt() {
203
- let e = x({
204
- userConfig: L.config,
205
- defaultConfig: rt
206
- }), t = e, n = e.theme;
207
- if (n) {
208
- if (!it.value(e)) at(e), t = e;
209
- else {
210
- let r = x({
211
- userConfig: me[n] || L.config,
212
- defaultConfig: e
213
- });
214
- t = {
215
- ...x({
216
- userConfig: L.config,
217
- defaultConfig: r
218
- }),
219
- customPalette: e.customPalette.length ? e.customPalette : c[n] || i
220
- };
221
- }
222
- } else t = e;
223
- return t.nodeCategories = L.config.nodeCategories || {}, t.nodeCategoryColors = L.config.nodeCategoryColors || {}, t;
224
- }
225
- let Rt = M(G.value.width), zt = M(G.value.height);
226
- De(() => L.config, (e) => {
227
- kt.value || (H.value = Lt()), Pt.value = !H.value.userOptions.showOnChartHover, Nt(), ct.value += 1, q.value.showTable = H.value.table.show;
228
- }, { deep: !0 }), De(() => L.dataset, (e) => {
229
- Array.isArray(e) && e.length > 0 && (jt.value = !1);
230
- }, { deep: !0 });
231
- let { isPrinting: Bt, isImaging: Vt, generatePdf: Ht, generateImage: Ut } = ne({
232
- elementId: `flow_${R.value}`,
233
- fileName: G.value.title.text || "vue-ui-flow",
234
- options: H.value.userOptions.print
235
- }), Wt = S(() => H.value.userOptions.show && !G.value.title.text), Gt = S(() => g(H.value.customPalette)), Kt = S(() => W.value.width), q = M({
236
- showTable: H.value.table.show,
237
- showTooltip: G.value.tooltip.show
238
- });
239
- De(H, () => {
240
- q.value = {
241
- showTable: H.value.table.show,
242
- showTooltip: G.value.tooltip.show
243
- };
244
- }, { immediate: !0 });
245
- let qt = S(() => !At.value || !At.value.length ? [] : At.value.map((e, t) => [
246
- e[0],
247
- e[1],
248
- u(e[2]),
249
- e[3] ? o(e[3]) : Gt.value[t] || Gt.value[t % Gt.value.length] || i[t] || i[t % i.length]
250
- ]));
251
- function Jt(e) {
252
- let t = {}, n = {};
253
- function r(e, r) {
254
- t[e] || (t[e] = {
255
- level: null,
256
- inflow: 0,
257
- outflow: 0,
258
- children: [],
259
- color: null,
260
- uid: ee()
261
- }), t[e].level === null && (t[e].level = r), n[r] || (n[r] = []), n[r].includes(e) || n[r].push(e);
262
- }
263
- e.forEach(([e, n, i]) => {
264
- let a = t[e]?.level ?? 0, o = a + 1;
265
- r(e, a), r(n, o), t[e].children.push({
266
- target: n,
267
- value: i
268
- }), t[e].outflow += i, t[n].inflow += i;
269
- });
270
- let a = new Set(e.map(([e]) => e)), o = new Set(e.map(([, e]) => e)), s = Array.from(a).filter((e) => !o.has(e)), c = {};
271
- s.forEach((e, t) => {
272
- c[e] = Gt.value[t] || i[t % i.length];
273
- });
274
- let l = {};
275
- e.forEach(([e, t, n, r]) => {
276
- r && (l[e] = r, l[t] = r);
277
- }), Object.keys(t).forEach((e, n) => {
278
- let r = H.value.nodeCategories?.[e], a = r ? H.value.nodeCategoryColors?.[r] : null;
279
- t[e].color = l[e] || a || (s.includes(e) ? c[e] : null) || i[n % i.length];
280
- }), Object.keys(t).forEach((e) => {
281
- t[e].value = Math.max(t[e].inflow, t[e].outflow);
282
- });
283
- let d = Zt.value, f = Qt.value.width, p = Qt.value.height, m = Object.keys(n).map(Number).sort((e, t) => e - t), h = m.length || 1, g = h > 1 ? f / (h - 1) : 0, te = Number(Kt.value), _ = Number(W.value.gapPx ?? W.value.gap ?? 8), v = Number(W.value.minHeight || 0);
284
- function ne(e) {
285
- let r = n[e], i = r.length;
286
- if (!i) return Infinity;
287
- let a = Math.max(0, (i - 1) * _), o = Math.max(0, p - a), s = Math.min(v, i ? o / i : 0), c = 0, l = r.map((e) => t[e].value || 0), u = l.reduce((e, t) => e + t, 0);
288
- for (let e = 0; e < 12; e += 1) {
289
- let e = u > 0 ? (o - c) / u : 0, t = [];
290
- for (let n = 0; n < l.length; n += 1) {
291
- let r = l[n];
292
- r < 0 || r * e < s && t.push(n);
293
- }
294
- if (!t.length) return Math.max(0, e);
295
- for (let e of t) c += s, u -= l[e], l[e] = -1;
296
- if (u <= 0) return 0;
297
- }
298
- return u > 0 ? Math.max(0, (o - c) / u) : 0;
299
- }
300
- let y = m.map(ne), b = y.length ? Math.min(...y) : 0, x = {};
301
- m.forEach((e) => {
302
- let r = n[e], i = r.length, a = Math.max(0, (i - 1) * _), o = Math.max(0, p - a), s = Math.min(v, i ? o / i : 0), c = r.map((e) => Math.max(s, (t[e].value || 0) * b)), l = c.reduce((e, t) => e + t, 0) + a, u = Math.max(0, (p - l) / 2);
303
- r.forEach((n, r) => {
304
- let a = c[r], o = d.left + e * g, s = u;
305
- x[n] = {
306
- x: o,
307
- y: s,
308
- absoluteY: s,
309
- height: a,
310
- i: r,
311
- color: t[n].color,
312
- value: t[n].value,
313
- id: ee()
314
- }, u += a, r < i - 1 && (u += _);
315
- });
316
- });
317
- let re = [], ie = d.top, ae = {}, oe = {};
318
- Object.keys(t).forEach((e) => {
319
- ae[e] = x[e]?.y ?? 0, oe[e] = 0;
320
- });
321
- let se = !!Et.value.smooth, ce = .5;
322
- return m.forEach((e) => {
323
- n[e].forEach((e) => {
324
- let n = t[e], r = x[e];
325
- if (!n.children || !n.children.length) return;
326
- let i = r.y;
327
- n.children.forEach(({ target: a, value: o }) => {
328
- let s = x[a], c = t[a], l = n.outflow > 0 ? o / n.outflow : 0, d = c.inflow > 0 ? o / c.inflow : 0, f = u(i + ie), p = u(i + l * r.height + ie), m = ae[a], h = m + d * s.height;
329
- oe[a] += o;
330
- let g = c.inflow > 0 && oe[a] >= c.inflow - 1e-6, _ = s.y + s.height;
331
- (g || h > _ - .25) && (h = _);
332
- let v = u(m + ie), ne = u(h + ie), y = u(r.x + te), b = u(s.x), le;
333
- if (!se || b <= y) le = `M ${y} ${f} L ${y} ${p} L ${b} ${ne} L ${b} ${v} Z`;
334
- else {
335
- let e = b - y, t = u(y + e * ce), n = u(b - e * ce), r = f, i = v, a = p, o = ne;
336
- le = `M ${y} ${r} C ${t} ${r}, ${n} ${i}, ${b} ${i} L ${b} ${o} C ${n} ${o}, ${t} ${a}, ${y} ${a} Z`;
337
- }
338
- re.push({
339
- id: ee(),
340
- source: e,
341
- target: a,
342
- path: le,
343
- value: o,
344
- sourceColor: n.color,
345
- targetColor: t[a].color
346
- }), i = p - ie, ae[a] = h;
347
- });
348
- });
349
- }), {
350
- nodeCoordinates: x,
351
- links: re
352
- };
353
- }
354
- let J = S(() => {
355
- let e = Jt(At.value);
356
- return {
357
- nodes: Object.keys(e.nodeCoordinates).map((t, n) => ({
358
- ...e.nodeCoordinates[t],
359
- name: t
360
- })),
361
- links: e.links
362
- };
363
- }), Yt = S(() => Rt.value), Xt = S(() => zt.value), Zt = S(() => G.value.padding), Qt = S(() => ({
364
- width: Math.max(0, Yt.value - 40 - Zt.value.right - Zt.value.left),
365
- height: Math.max(0, Xt.value - Zt.value.top - Zt.value.bottom)
366
- })), $t = S(() => ({
367
- width: Yt.value,
368
- height: Xt.value
369
- }));
370
- function en(e) {
371
- let t = {}, n = {}, r = /* @__PURE__ */ new Set();
372
- return qt.value.forEach(([e, r, i]) => {
373
- t[e] || (t[e] = []), n[r] || (n[r] = []), t[e].push(r), n[r].push(e);
374
- }), t[e] && t[e].forEach((e) => r.add(e)), n[e] && n[e].forEach((e) => r.add(e)), Array.from(r).concat(e);
375
- }
376
- let Y = M(null), X = M(null), Z = M(null), tn = M(!1), nn = M(null);
377
- function rn() {
378
- nn.value = null, Y.value = null, X.value = null, lt.value = !1, bt.value = null, B.value = null;
379
- }
380
- function an(e) {
381
- if (!K.value || !e) return;
382
- let t = K.value.querySelector(`[data-a11y-node-id="${e}"]`);
383
- if (!t) return;
384
- let n = t.getBoundingClientRect();
385
- xt.value = {
386
- x: n.left + n.width / 2,
387
- y: n.top + n.height / 2
388
- };
389
- }
390
- function on(e, t, r = "pointer", i = null) {
391
- $.value = [], Y.value = en(e.name), X.value = e.name, nn.value = e.id, St.value = r, bt.value = i, B.value = e.id;
392
- let a = e.name, o = qt.value, c = 0, l = 0, u = [], f = [], p = new Set(o.map(([e]) => e)), ee = new Set(o.map(([, e]) => e)), m = Array.from(p).filter((e) => !ee.has(e)), h = o.filter(([e]) => m.includes(e)).reduce((e, [t, n, r]) => e + r, 0), g = {};
393
- J.value.nodes.forEach((e) => {
394
- g[e.name] = e.color;
395
- }), o.forEach(([e, t, n]) => {
396
- t === a && (c += n, u.push({
397
- source: e,
398
- value: n,
399
- color: g[e]
400
- })), e === a && (l += n, f.push({
401
- target: t,
402
- value: n,
403
- color: g[t]
404
- }));
405
- });
406
- let te = h > 0 ? Math.max(c, l) / h * 100 : 0, _ = {
407
- name: a,
408
- inflow: c,
409
- outflow: l,
410
- from: u,
411
- to: f,
412
- percentOfTotal: te,
413
- color: g[a] || "#000000"
414
- };
415
- H.value.events.datapointEnter && H.value.events.datapointEnter({
416
- datapoint: _,
417
- seriesIndex: t
418
- }), Z.value = {
419
- datapoint: _,
420
- config: H.value,
421
- seriesIndex: t,
422
- series: J.value
423
- }, lt.value = !0;
424
- let v = "", ne = G.value.tooltip.customFormat;
425
- if (tn.value = !1, n(ne)) try {
426
- let e = ne({
427
- datapoint: _,
428
- series: J.value,
429
- config: H.value
430
- });
431
- typeof e == "string" && (ut.value = e, tn.value = !0);
432
- } catch {
433
- console.warn("Custom format cannot be applied.");
434
- }
435
- if (!tn.value) {
436
- let e = G.value.tooltip.showPercentage ? `<div>${s({
437
- p: G.value.tooltip.translations.percentOfTotal,
438
- v: _.percentOfTotal,
439
- s: "%",
440
- r: G.value.tooltip.roundingPercentage
441
- })}</div>` : "";
442
- v += `<div style="width:100%;text-align:center;border-bottom:1px solid ${G.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${_.color}">⏹</span>${_.name}${e}</div>`, _.from.length && (v += `<div>${G.value.tooltip.translations.from}</div>`, _.from.forEach((e) => {
443
- v += `<div><span style="color:${e.color}">⏹←</span> ${e.source}: ${d(U.value.formatter, e.value, s({
444
- p: U.value.prefix,
445
- v: e.value,
446
- s: U.value.suffix,
447
- r: U.value.rounding
448
- }))}</div>`;
449
- })), _.to.length && (v += `<div style="margin-top:6px;">${G.value.tooltip.translations.to}</div>`, _.to.forEach((e) => {
450
- v += `<div><span style="color:${e.color}">⏹→</span> ${e.target}: ${d(U.value.formatter, e.value, s({
451
- p: U.value.prefix,
452
- v: e.value,
453
- s: U.value.suffix,
454
- r: U.value.rounding
455
- }))}</div>`;
456
- })), ut.value = v;
457
- }
458
- r === "keyboard" && xe(() => {
459
- an(e.id);
460
- });
461
- }
462
- function sn(e) {
463
- let t = Z.value;
464
- H.value.events.datapointLeave && H.value.events.datapointLeave({
465
- datapoint: t,
466
- seriesIndex: e
467
- }), !(St.value === "keyboard" && B.value) && (nn.value = null, Y.value = null, X.value = null, lt.value = !1);
468
- }
469
- function cn(e) {
470
- let t = Z.value;
471
- H.value.events.datapointClick && H.value.events.datapointClick({
472
- datapoint: t,
473
- seriesIndex: e
474
- });
475
- }
476
- let ln = S(() => J.value.links.map(({ source: e, target: t, sourceColor: n, targetColor: r, value: i }) => ({
477
- source: e,
478
- target: t,
479
- sourceColor: n,
480
- targetColor: r,
481
- value: i
482
- })));
483
- function un(e = null) {
484
- xe(() => {
485
- let n = ln.value.map((e, t) => [
486
- [e.source],
487
- [e.target],
488
- [e.value]
489
- ]), i = [
490
- [G.value.title.text],
491
- [G.value.title.subtitle.text],
492
- [
493
- [H.value.table.columnNames.source],
494
- [H.value.table.columnNames.target],
495
- [H.value.table.columnNames.value]
496
- ]
497
- ].concat(n), a = r(i);
498
- e ? e(a) : t({
499
- csvContent: a,
500
- title: G.value.title.text || "vue-ui-flow"
501
- });
502
- });
503
- }
504
- let dn = S(() => {
505
- let e = [
506
- H.value.table.columnNames.source,
507
- H.value.table.columnNames.target,
508
- H.value.table.columnNames.value
509
- ], t = ln.value.map((e, t) => [
510
- {
511
- color: e.sourceColor,
512
- name: e.source,
513
- shape: "square"
514
- },
515
- {
516
- color: e.targetColor,
517
- name: e.target,
518
- shape: "square"
519
- },
520
- s({
521
- p: U.value.prefix,
522
- v: e.value,
523
- s: U.value.suffix,
524
- r: U.value.rounding
525
- })
526
- ]), n = {
527
- th: {
528
- backgroundColor: H.value.table.th.backgroundColor,
529
- color: H.value.table.th.color,
530
- outline: H.value.table.th.outline
531
- },
532
- td: {
533
- backgroundColor: H.value.table.td.backgroundColor,
534
- color: H.value.table.td.color,
535
- outline: H.value.table.td.outline
536
- },
537
- breakpoint: H.value.table.responsiveBreakpoint
538
- };
539
- return {
540
- colNames: [
541
- H.value.table.columnNames.source,
542
- H.value.table.columnNames.target,
543
- H.value.table.columnNames.value
544
- ],
545
- head: e,
546
- body: t,
547
- config: n
548
- };
549
- }), fn = S(() => ({
550
- headers: dn.value?.colNames ?? [],
551
- rows: dn.value?.body ?? []
552
- })), pn = S(() => [...J.value.nodes].map((e, t) => ({
553
- ...e,
554
- index: t,
555
- centerX: e.x + Kt.value / 2,
556
- centerY: u(e.absoluteY) + G.value.padding.top + e.height / 2
557
- })).sort((e, t) => e.x === t.x ? e.absoluteY - t.absoluteY : e.x - t.x)), Q = S(() => {
558
- let e = [];
559
- return pn.value.forEach((t) => {
560
- let n = e.find((e) => Math.abs(e.x - t.x) <= 1);
561
- n ? n.nodes.push(t) : e.push({
562
- x: t.x,
563
- nodes: [t]
564
- });
565
- }), e.forEach((e) => {
566
- e.nodes.sort((e, t) => e.absoluteY - t.absoluteY);
567
- }), e.sort((e, t) => e.x - t.x);
568
- }), mn = S(() => {
569
- let e = /* @__PURE__ */ new Map();
570
- return pn.value.forEach((t, n) => {
571
- e.set(t.id, n);
572
- }), e;
573
- });
574
- function hn() {
575
- return J.value;
576
- }
577
- function gn() {
578
- q.value.showTable = !q.value.showTable;
579
- }
580
- let _n = M(!1);
581
- function vn() {
582
- _n.value = !_n.value;
583
- }
584
- function yn() {
585
- q.value.showTooltip = !q.value.showTooltip;
586
- }
587
- let bn = S(() => {
588
- let e = new Set(J.value.nodes.map((e) => H.value.nodeCategories[e.name] || "__uncategorized__"));
589
- return Array.from(e).map((e) => ({
590
- name: e,
591
- color: H.value.nodeCategoryColors[e] || i[0],
592
- shape: "square",
593
- count: J.value.nodes.filter((t) => (H.value.nodeCategories[t.name] || "__uncategorized__") === e).length
594
- })).map((e, t) => {
595
- let n = $.value.includes(t);
596
- return {
597
- ...e,
598
- segregate: () => Sn({
599
- legend: e,
600
- i: t
601
- }),
602
- isSegregated: n,
603
- opacity: $.value.length ? n ? 1 : .5 : 1,
604
- display: `${e.name} (${e.count})`
605
- };
606
- });
607
- }), xn = S(() => bn.value.filter((e) => e.name !== "__uncategorized__")), $ = M([]);
608
- function Sn({ legend: e, i: t }) {
609
- let n = e.name;
610
- if (Y.value?.every((e) => H.value.nodeCategories[e] === n)) {
611
- Y.value = null, X.value = null, $.value = [];
612
- return;
613
- }
614
- $.value = [t], Y.value = J.value.nodes.filter((e) => H.value.nodeCategories[e.name] === n).map((e) => e.name), X.value = null;
615
- }
616
- let Cn = S(() => ({
617
- cy: "flow-legend",
618
- backgroundColor: G.value.legend.backgroundColor,
619
- color: G.value.legend.color,
620
- fontSize: G.value.legend.fontSize,
621
- paddingBottom: G.value.legend.paddingBottom,
622
- fontWeight: G.value.legend.bold ? "bold" : "normal"
623
- }));
624
- async function wn({ scale: e = 2 } = {}) {
625
- if (!z.value) return;
626
- let { width: t, height: n } = z.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ae({
627
- domElement: z.value,
628
- base64: !0,
629
- img: !0,
630
- scale: e
631
- });
632
- return {
633
- imageUri: i,
634
- base64: a,
635
- title: G.value.title.text,
636
- width: t,
637
- height: n,
638
- aspectRatio: r
639
- };
640
- }
641
- let Tn = S(() => {
642
- let e = H.value.table.useDialog && !H.value.table.show, t = q.value.showTable;
643
- return {
644
- component: e ? nt : Ze,
645
- title: `${G.value.title.text}${G.value.title.subtitle.text ? `: ${G.value.title.subtitle.text}` : ""}`,
646
- props: e ? {
647
- backgroundColor: H.value.table.th.backgroundColor,
648
- color: H.value.table.th.color,
649
- headerColor: H.value.table.th.color,
650
- headerBg: H.value.table.th.backgroundColor,
651
- isFullscreen: V.value,
652
- fullscreenParent: z.value,
653
- forcedWidth: Math.min(800, window.innerWidth * .8),
654
- isCursorPointer: Dt.value
655
- } : {
656
- hideDetails: !0,
657
- config: {
658
- open: t,
659
- maxHeight: 1e4,
660
- body: {
661
- backgroundColor: G.value.backgroundColor,
662
- color: G.value.color
663
- },
664
- head: {
665
- backgroundColor: G.value.backgroundColor,
666
- color: G.value.color
667
- }
668
- }
669
- }
670
- };
671
- });
672
- De(() => q.value.showTable, (e) => {
673
- H.value.table.show || (e && H.value.table.useDialog && _t.value ? _t.value.open() : "close" in _t.value && _t.value.close());
674
- });
675
- function En() {
676
- q.value.showTable = !1, vt.value && vt.value.setTableIconState(!1);
677
- }
678
- let Dn = S(() => xn.value.map((e) => ({
679
- ...e,
680
- name: e.display
681
- }))), On = S(() => G.value.backgroundColor), kn = S(() => G.value.legend), An = S(() => G.value.title), { isCallbackImaging: jn, isCallbackSvg: Mn, generateSvg: Nn, onGenerateImage: Pn } = ie({
682
- svg: K,
683
- title: An,
684
- legend: kn,
685
- legendItems: Dn,
686
- backgroundColor: On,
687
- getSvgCallback: () => H.value.userOptions.callbacks.svg,
688
- generateImage: Ut
689
- });
690
- async function Fn() {
691
- if (ot("copyAlt", {
692
- config: H.value,
693
- dataset: J.value
694
- }), !H.value.userOptions.callbacks.altCopy) {
695
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
696
- return;
697
- }
698
- await Promise.resolve(H.value.userOptions.callbacks.altCopy({
699
- config: H.value,
700
- dataset: J.value
701
- }));
702
- }
703
- function In(e) {
704
- return Q.value.findIndex((t) => t.nodes.some((t) => t.id === e));
705
- }
706
- function Ln(e, t) {
707
- let n = Q.value[e];
708
- return n ? n.nodes.findIndex((e) => e.id === t) : -1;
709
- }
710
- function Rn(e, t) {
711
- let n = Q.value[e];
712
- if (!n || !n.nodes.length) return null;
713
- let r = n.nodes[0], i = Math.abs(r.centerY - t);
714
- for (let e = 1; e < n.nodes.length; e += 1) {
715
- let a = n.nodes[e], o = Math.abs(a.centerY - t);
716
- o < i && (r = a, i = o);
717
- }
718
- return r;
719
- }
720
- function zn() {
721
- bt.value = null, B.value = null, Ct.value = !0;
722
- }
723
- function Bn() {
724
- rn(), Ct.value = !1;
725
- }
726
- function Vn(e) {
727
- if (!K.value || _n.value || document.activeElement !== K.value || !pn.value.length) return;
728
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
729
- if (!t && !n && !r && !i && !a && !o) return;
730
- if (e.preventDefault(), e.stopPropagation(), o) {
731
- rn();
732
- return;
733
- }
734
- if (a) {
735
- if (bt.value === null) return;
736
- cn(bt.value);
737
- return;
738
- }
739
- if (B.value === null) {
740
- let e = Q.value[0]?.nodes?.[0];
741
- if (!e) return;
742
- let t = mn.value.get(e.id) ?? 0;
743
- on(e, t, "keyboard", t);
744
- return;
745
- }
746
- let s = mn.value.get(B.value);
747
- if (s === void 0) return;
748
- let c = pn.value[s];
749
- if (!c) return;
750
- let l = In(c.id);
751
- if (l < 0) return;
752
- let u = null;
753
- if (r || i) {
754
- let e = Ln(l, c.id);
755
- if (e < 0) return;
756
- let t = Q.value[l];
757
- if (!t?.nodes?.length) return;
758
- let n = e + (i ? 1 : -1);
759
- n < 0 && (n = t.nodes.length - 1), n >= t.nodes.length && (n = 0), u = t.nodes[n];
760
- }
761
- if (t || n) {
762
- let e = l + (n ? 1 : -1);
763
- e < 0 && (e = Q.value.length - 1), e >= Q.value.length && (e = 0), u = Rn(e, c.centerY);
764
- }
765
- if (!u) return;
766
- let d = mn.value.get(u.id);
767
- d !== void 0 && on(u, d, "keyboard", d);
768
- }
769
- return se({
770
- getData: hn,
771
- getImage: wn,
772
- generateCsv: un,
773
- generateImage: Ut,
774
- generateSvg: Nn,
775
- generatePdf: Ht,
776
- toggleTable: gn,
777
- toggleAnnotator: vn,
778
- toggleTooltip: yn,
779
- drillCategory: Sn,
780
- unselectNode: sn,
781
- toggleFullscreen: Tt,
782
- copyAlt: Fn
783
- }), (e, t) => (j(), T("div", {
784
- ref_key: "flowChart",
785
- ref: z,
786
- class: Se(`vue-data-ui-component vue-ui-flow ${V.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
787
- style: A(`font-family:${H.value.style.fontFamily};width:100%; text-align:center;background:${G.value.backgroundColor}`),
788
- id: `flow_${R.value}`,
789
- onMouseenter: t[2] ||= () => F(Ft)(!0),
790
- onMouseleave: t[3] ||= () => {
791
- F(Ft)(!1), Ct.value || rn();
792
- }
793
- }, [
794
- E("div", {
795
- id: `chart-instructions-${R.value}`,
796
- class: "sr-only"
797
- }, [E("p", null, P(H.value.a11y.translations.keyboardNavigation), 1)], 8, Ae),
798
- fn.value?.rows?.length ? (j(), C(ue, {
799
- key: 0,
800
- uid: R.value,
801
- head: fn.value.headers,
802
- body: fn.value.rows,
803
- notice: H.value.a11y.translations.tableAvailable,
804
- caption: H.value.a11y.translations.tableCaption
805
- }, null, 8, [
806
- "uid",
807
- "head",
808
- "body",
809
- "notice",
810
- "caption"
811
- ])) : w("", !0),
812
- H.value.userOptions.buttons.annotator ? (j(), C(F($e), {
813
- key: 1,
814
- svgRef: F(K),
815
- backgroundColor: G.value.backgroundColor,
816
- color: G.value.color,
817
- active: _n.value,
818
- palette: H.value.userOptions.annotatorPalette,
819
- isCursorPointer: Dt.value,
820
- onClose: vn
821
- }, {
822
- "annotator-action-close": I(() => [N(e.$slots, "annotator-action-close", {}, void 0, !0)]),
823
- "annotator-action-color": I(({ color: t }) => [N(e.$slots, "annotator-action-color", k(O({ color: t })), void 0, !0)]),
824
- "annotator-action-draw": I(({ mode: t }) => [N(e.$slots, "annotator-action-draw", k(O({ mode: t })), void 0, !0)]),
825
- "annotator-action-undo": I(({ disabled: t }) => [N(e.$slots, "annotator-action-undo", k(O({ disabled: t })), void 0, !0)]),
826
- "annotator-action-redo": I(({ disabled: t }) => [N(e.$slots, "annotator-action-redo", k(O({ disabled: t })), void 0, !0)]),
827
- "annotator-action-delete": I(({ disabled: t }) => [N(e.$slots, "annotator-action-delete", k(O({ disabled: t })), void 0, !0)]),
828
- _: 3
829
- }, 8, [
830
- "svgRef",
831
- "backgroundColor",
832
- "color",
833
- "active",
834
- "palette",
835
- "isCursorPointer"
836
- ])) : w("", !0),
837
- Wt.value ? (j(), T("div", je, null, 512)) : w("", !0),
838
- G.value.title.text ? (j(), T("div", {
839
- key: 3,
840
- ref_key: "chartTitle",
841
- ref: ft,
842
- style: "width:100%;background:transparent;padding-bottom:24px"
843
- }, [(j(), C(oe, {
844
- key: `title_${ct.value}`,
845
- config: {
846
- title: {
847
- cy: "flow-title",
848
- ...G.value.title
849
- },
850
- subtitle: {
851
- cy: "flow-subtitle",
852
- ...G.value.title.subtitle
853
- }
854
- }
855
- }, null, 8, ["config"]))], 512)) : w("", !0),
856
- E("div", { id: `legend-top-${R.value}` }, null, 8, Me),
857
- H.value.userOptions.show && wt.value && (F(It) || F(Pt)) ? (j(), C(F(et), {
858
- ref_key: "userOptionsRef",
859
- ref: vt,
860
- key: `user_option_${st.value}`,
861
- backgroundColor: G.value.backgroundColor,
862
- color: G.value.color,
863
- isPrinting: F(Bt),
864
- isImaging: F(Vt),
865
- uid: R.value,
866
- hasPdf: H.value.userOptions.buttons.pdf,
867
- hasXls: H.value.userOptions.buttons.csv,
868
- hasImg: H.value.userOptions.buttons.img,
869
- hasSvg: H.value.userOptions.buttons.svg,
870
- hasTable: H.value.userOptions.buttons.table,
871
- callbacks: H.value.userOptions.callbacks,
872
- hasFullscreen: H.value.userOptions.buttons.fullscreen,
873
- hasAltCopy: H.value.userOptions.buttons.altCopy,
874
- isFullscreen: V.value,
875
- titles: { ...H.value.userOptions.buttonTitles },
876
- chartElement: z.value,
877
- position: H.value.userOptions.position,
878
- hasAnnotator: H.value.userOptions.buttons.annotator,
879
- printScale: H.value.userOptions.print.scale,
880
- isAnnotation: _n.value,
881
- hasTooltip: G.value.tooltip.show && H.value.userOptions.buttons.tooltip,
882
- isTooltip: q.value.showTooltip,
883
- tableDialog: H.value.table.useDialog,
884
- isCursorPointer: Dt.value,
885
- onToggleTooltip: yn,
886
- onToggleFullscreen: Tt,
887
- onGeneratePdf: F(Ht),
888
- onGenerateCsv: un,
889
- onGenerateImage: F(Pn),
890
- onGenerateSvg: F(Nn),
891
- onToggleTable: gn,
892
- onToggleAnnotator: vn,
893
- onCopyAlt: Fn,
894
- style: A({ visibility: F(It) ? F(Pt) ? "visible" : "hidden" : "visible" })
895
- }, _e({ _: 2 }, [
896
- e.$slots.menuIcon ? {
897
- name: "menuIcon",
898
- fn: I(({ isOpen: t, color: n }) => [N(e.$slots, "menuIcon", k(O({
899
- isOpen: t,
900
- color: n
901
- })), void 0, !0)]),
902
- key: "0"
903
- } : void 0,
904
- e.$slots.optionTooltip ? {
905
- name: "optionTooltip",
906
- fn: I(() => [N(e.$slots, "optionTooltip", {}, void 0, !0)]),
907
- key: "1"
908
- } : void 0,
909
- e.$slots.optionPdf ? {
910
- name: "optionPdf",
911
- fn: I(() => [N(e.$slots, "optionPdf", {}, void 0, !0)]),
912
- key: "2"
913
- } : void 0,
914
- e.$slots.optionCsv ? {
915
- name: "optionCsv",
916
- fn: I(() => [N(e.$slots, "optionCsv", {}, void 0, !0)]),
917
- key: "3"
918
- } : void 0,
919
- e.$slots.optionImg ? {
920
- name: "optionImg",
921
- fn: I(() => [N(e.$slots, "optionImg", {}, void 0, !0)]),
922
- key: "4"
923
- } : void 0,
924
- e.$slots.optionSvg ? {
925
- name: "optionSvg",
926
- fn: I(() => [N(e.$slots, "optionSvg", {}, void 0, !0)]),
927
- key: "5"
928
- } : void 0,
929
- e.$slots.optionTable ? {
930
- name: "optionTable",
931
- fn: I(() => [N(e.$slots, "optionTable", {}, void 0, !0)]),
932
- key: "6"
933
- } : void 0,
934
- e.$slots.optionFullscreen ? {
935
- name: "optionFullscreen",
936
- fn: I(({ toggleFullscreen: t, isFullscreen: n }) => [N(e.$slots, "optionFullscreen", k(O({
937
- toggleFullscreen: t,
938
- isFullscreen: n
939
- })), void 0, !0)]),
940
- key: "7"
941
- } : void 0,
942
- e.$slots.optionAnnotator ? {
943
- name: "optionAnnotator",
944
- fn: I(({ toggleAnnotator: t, isAnnotator: n }) => [N(e.$slots, "optionAnnotator", k(O({
945
- toggleAnnotator: t,
946
- isAnnotator: n
947
- })), void 0, !0)]),
948
- key: "8"
949
- } : void 0,
950
- e.$slots.optionAltCopy ? {
951
- name: "optionAltCopy",
952
- fn: I(({ altCopy: t }) => [N(e.$slots, "optionAltCopy", k(O({ altCopy: t })), void 0, !0)]),
953
- key: "9"
954
- } : void 0,
955
- e.$slots["custom-menu-before"] ? {
956
- name: "custom-menu-before",
957
- fn: I(() => [N(e.$slots, "custom-menu-before", {}, void 0, !0)]),
958
- key: "10"
959
- } : void 0,
960
- e.$slots["custom-menu-after"] ? {
961
- name: "custom-menu-after",
962
- fn: I(() => [N(e.$slots, "custom-menu-after", {}, void 0, !0)]),
963
- key: "11"
964
- } : void 0
965
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.callbacks.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.printScale.isAnnotation.hasTooltip.isTooltip.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : w("", !0),
966
- E("div", Ne, [(j(), T("svg", {
967
- ref_key: "svgRef",
968
- ref: K,
969
- xmlns: F(h),
970
- "aria-describedby": `chart-instructions-${R.value}`,
971
- viewBox: `0 0 ${$t.value.width} ${$t.value.height}`,
972
- class: Se({
973
- "vue-data-ui-fullscreen--on": V.value,
974
- "vue-data-ui-fulscreen--off": !V.value
975
- }),
976
- style: A({
977
- maxWidth: "100%",
978
- overflow: "visible",
979
- background: "transparent",
980
- color: G.value.color
981
- }),
982
- tabindex: "0",
983
- onFocus: zn,
984
- onBlur: Bn,
985
- onKeydown: Vn
986
- }, [
987
- ye(F(tt)),
988
- e.$slots["chart-background"] ? (j(), T("foreignObject", {
989
- key: 0,
990
- x: 0,
991
- y: 0,
992
- width: $t.value.width,
993
- height: $t.value.height,
994
- style: { pointerEvents: "none" }
995
- }, [N(e.$slots, "chart-background", {}, void 0, !0)], 8, Fe)) : w("", !0),
996
- E("defs", null, [(j(!0), T(he, null, we(J.value.links, (e, t) => (j(), T("linearGradient", {
997
- id: e.id,
998
- x1: "0%",
999
- y1: "0%",
1000
- x2: "100%",
1001
- y2: "0%"
1002
- }, [E("stop", {
1003
- offset: "0%",
1004
- "stop-color": e.sourceColor
1005
- }, null, 8, Le), E("stop", {
1006
- offset: "100%",
1007
- "stop-color": e.targetColor
1008
- }, null, 8, Re)], 8, Ie))), 256))]),
1009
- (j(!0), T(he, null, we(J.value.links, (e) => (j(), T("path", {
1010
- class: "vue-ui-flow-link",
1011
- d: e.path,
1012
- "stroke-linejoin": "round",
1013
- "stroke-miterlimit": "1",
1014
- fill: `url(#${e.id})`,
1015
- stroke: Et.value.stroke,
1016
- "stroke-width": Et.value.strokeWidth,
1017
- style: A(`
1018
- opacity:${Y.value ? Y.value.includes(e.source) && Y.value.includes(e.target) ? 1 : .3 : X.value ? [e.target, e.source].includes(X.value) ? 1 : .3 : Et.value.opacity}
1019
- `)
1020
- }, null, 12, ze))), 256)),
1021
- (j(!0), T(he, null, we(J.value.nodes, (e, t) => (j(), T("rect", {
1022
- "data-a11y-node-id": e.id,
1023
- class: "vue-ui-flow-node",
1024
- x: e.x,
1025
- y: F(u)(e.absoluteY) + G.value.padding.top,
1026
- height: F(u)(e.height),
1027
- width: Kt.value,
1028
- fill: e.color,
1029
- stroke: W.value.stroke,
1030
- "stroke-width": W.value.strokeWidth,
1031
- rx: W.value.borderRadius,
1032
- style: A({
1033
- opacity: Y.value ? Y.value.includes(e.name) ? 1 : .3 : 1,
1034
- outline: nn.value !== null && nn.value === e.id ? "2px solid currentColor" : void 0
1035
- }),
1036
- "aria-label": `${e.name}: ${F(d)(U.value.formatter, e.value, F(s)({
1037
- p: U.value.prefix,
1038
- v: e.value,
1039
- s: U.value.suffix,
1040
- r: U.value.rounding
1041
- }))}`,
1042
- onMouseenter: (n) => on(e, t, "pointer", mn.value.get(e.id)),
1043
- onMouseleave: (e) => sn(t),
1044
- onClick: (e) => cn(t)
1045
- }, null, 44, Be))), 256)),
1046
- U.value.show ? (j(), T("g", Ve, [(j(!0), T(he, null, we(J.value.nodes, (e, t) => (j(), T("text", {
1047
- x: e.x + Kt.value / 2,
1048
- y: (U.value.showValue ? F(u)(e.absoluteY + e.height / 2 - U.value.fontSize / 4) : e.absoluteY + e.height / 2 + U.value.fontSize / 3) + G.value.padding.top,
1049
- "font-size": U.value.fontSize,
1050
- fill: F(m)(e.color),
1051
- "text-anchor": "middle",
1052
- style: A(`pointer-events: none; opacity:${Y.value ? +!!Y.value.includes(e.name) : 1}`)
1053
- }, P(U.value.abbreviation.use ? F(f)({
1054
- source: e.name,
1055
- length: W.value.labels.abbreviation.length
1056
- }) : e.name), 13, He))), 256)), U.value.showValue ? (j(!0), T(he, { key: 0 }, we(J.value.nodes, (e, t) => (j(), T("text", {
1057
- x: e.x + Kt.value / 2,
1058
- y: F(u)(e.absoluteY + e.height / 2 + U.value.fontSize / 1.3) + G.value.padding.top,
1059
- "font-size": U.value.fontSize,
1060
- fill: F(m)(e.color),
1061
- "text-anchor": "middle",
1062
- style: A(`pointer-events: none; opacity:${Y.value ? +!!Y.value.includes(e.name) : 1}`)
1063
- }, P(F(d)(U.value.formatter, e.value, F(s)({
1064
- p: U.value.prefix,
1065
- v: e.value,
1066
- s: U.value.suffix,
1067
- r: U.value.rounding
1068
- }), {
1069
- datapoint: e,
1070
- seriesIndex: t
1071
- })), 13, Ue))), 256)) : w("", !0)])) : w("", !0),
1072
- N(e.$slots, "svg", { svg: {
1073
- ...$t.value,
1074
- isPrintingImg: F(Bt) || F(Vt) || F(jn),
1075
- isPrintingSvg: F(Mn)
1076
- } }, void 0, !0)
1077
- ], 46, Pe)), e.$slots.hint ? (j(), T("div", We, [N(e.$slots, "hint", k(O({
1078
- hint: H.value.a11y.translations.keyboardNavigation,
1079
- isVisible: Ct.value
1080
- })), void 0, !0)])) : w("", !0)]),
1081
- e.$slots.watermark ? (j(), T("div", Ge, [N(e.$slots, "watermark", k(O({ isPrinting: F(Bt) || F(Vt) || F(jn) || F(Mn) })), void 0, !0)])) : w("", !0),
1082
- E("div", { id: `legend-bottom-${R.value}` }, null, 8, Ke),
1083
- gt.value && (G.value.legend.show || e.$slots.legend) ? (j(), C(ge, {
1084
- key: 6,
1085
- to: G.value.legend.position === "top" ? `#legend-top-${R.value}` : `#legend-bottom-${R.value}`
1086
- }, [E("div", {
1087
- ref_key: "chartLegend",
1088
- ref: dt
1089
- }, [N(e.$slots, "legend", { legend: bn.value }, () => [G.value.legend.show && xn.value.length ? (j(), C(pe, {
1090
- key: 0,
1091
- legendSet: xn.value,
1092
- config: Cn.value,
1093
- isCursorPointer: Dt.value,
1094
- onClickMarker: t[0] ||= (e) => Sn(e)
1095
- }, {
1096
- item: I(({ legend: e, index: t }) => [F(kt) ? w("", !0) : (j(), T("div", {
1097
- key: 0,
1098
- onClick: (t) => e.segregate(),
1099
- style: A(`opacity:${$.value.length ? $.value.includes(t) ? 1 : .5 : 1}`)
1100
- }, P(e.display), 13, qe))]),
1101
- _: 1
1102
- }, 8, [
1103
- "legendSet",
1104
- "config",
1105
- "isCursorPointer"
1106
- ])) : w("", !0)], !0)], 512)], 8, ["to"])) : w("", !0),
1107
- e.$slots.source ? (j(), T("div", {
1108
- key: 7,
1109
- ref_key: "source",
1110
- ref: pt,
1111
- dir: "auto"
1112
- }, [N(e.$slots, "source", {}, void 0, !0)], 512)) : w("", !0),
1113
- ye(F(Ye), {
1114
- ref_key: "tooltip",
1115
- ref: yt,
1116
- teleportTo: G.value.tooltip.teleportTo,
1117
- show: q.value.showTooltip && lt.value,
1118
- backgroundColor: G.value.tooltip.backgroundColor,
1119
- color: G.value.tooltip.color,
1120
- fontSize: G.value.tooltip.fontSize,
1121
- borderRadius: G.value.tooltip.borderRadius,
1122
- borderColor: G.value.tooltip.borderColor,
1123
- borderWidth: G.value.tooltip.borderWidth,
1124
- backgroundOpacity: G.value.tooltip.backgroundOpacity,
1125
- position: G.value.tooltip.position,
1126
- offsetX: G.value.tooltip.offsetX,
1127
- offsetY: G.value.tooltip.offsetY,
1128
- parent: z.value,
1129
- content: ut.value,
1130
- isCustom: tn.value,
1131
- isFullscreen: V.value,
1132
- smooth: G.value.tooltip.smooth,
1133
- backdropFilter: G.value.tooltip.backdropFilter,
1134
- smoothForce: G.value.tooltip.smoothForce,
1135
- smoothSnapThreshold: G.value.tooltip.smoothSnapThreshold,
1136
- isA11yMode: St.value === "keyboard",
1137
- a11yPosition: xt.value
1138
- }, {
1139
- "tooltip-before": I(() => [N(e.$slots, "tooltip-before", k(O({ ...Z.value })), void 0, !0)]),
1140
- tooltip: I(() => [N(e.$slots, "tooltip", k(O({ ...Z.value })), void 0, !0)]),
1141
- "tooltip-after": I(() => [N(e.$slots, "tooltip-after", k(O({ ...Z.value })), void 0, !0)]),
1142
- _: 3
1143
- }, 8, [
1144
- "teleportTo",
1145
- "show",
1146
- "backgroundColor",
1147
- "color",
1148
- "fontSize",
1149
- "borderRadius",
1150
- "borderColor",
1151
- "borderWidth",
1152
- "backgroundOpacity",
1153
- "position",
1154
- "offsetX",
1155
- "offsetY",
1156
- "parent",
1157
- "content",
1158
- "isCustom",
1159
- "isFullscreen",
1160
- "smooth",
1161
- "backdropFilter",
1162
- "smoothForce",
1163
- "smoothSnapThreshold",
1164
- "isA11yMode",
1165
- "a11yPosition"
1166
- ]),
1167
- wt.value && H.value.userOptions.buttons.table ? (j(), C(Te(Tn.value.component), be({ key: 8 }, Tn.value.props, {
1168
- ref_key: "tableUnit",
1169
- ref: _t,
1170
- onClose: En
1171
- }), _e({
1172
- content: I(() => [ye(F(Qe), {
1173
- colNames: dn.value.colNames,
1174
- head: dn.value.head,
1175
- body: dn.value.body,
1176
- config: dn.value.config,
1177
- title: H.value.table.useDialog ? "" : Tn.value.title,
1178
- withCloseButton: !H.value.table.useDialog,
1179
- isCursorPointer: Dt.value,
1180
- onClose: En
1181
- }, {
1182
- th: I(({ th: e }) => [E("div", Je, P(e), 1)]),
1183
- td: I(({ td: e }) => [ve(P(e.name || e), 1)]),
1184
- _: 1
1185
- }, 8, [
1186
- "colNames",
1187
- "head",
1188
- "body",
1189
- "config",
1190
- "title",
1191
- "withCloseButton",
1192
- "isCursorPointer"
1193
- ])]),
1194
- _: 2
1195
- }, [H.value.table.useDialog ? {
1196
- name: "title",
1197
- fn: I(() => [ve(P(Tn.value.title), 1)]),
1198
- key: "0"
1199
- } : void 0, H.value.table.useDialog ? {
1200
- name: "actions",
1201
- fn: I(() => [E("button", {
1202
- tabindex: "0",
1203
- class: "vue-ui-user-options-button",
1204
- onClick: t[1] ||= (e) => un(H.value.userOptions.callbacks.csv),
1205
- style: A({ cursor: Dt.value ? "pointer" : "default" })
1206
- }, [ye(F(Xe), {
1207
- name: "fileCsv",
1208
- stroke: Tn.value.props.color
1209
- }, null, 8, ["stroke"])], 4)]),
1210
- key: "1"
1211
- } : void 0]), 1040)) : w("", !0),
1212
- N(e.$slots, "skeleton", {}, () => [F(kt) ? (j(), C(b, { key: 0 })) : w("", !0)], !0)
1213
- ], 46, ke));
1214
- }
1215
- }, [["__scopeId", "data-v-fd806b52"]]);
1216
- //#endregion
1217
- export { Oe as n, Ye as t };