vue-data-ui 3.2.7 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/{Arrow-Bb0bGghy.js → Arrow-CKLBHe3L.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CHhZIht2.js → BaseDraggableDialog-q3pgSDTz.js} +2 -2
  3. package/dist/{BaseIcon-Bz-1GQhu.js → BaseIcon-CtqN7W_g.js} +4 -3
  4. package/dist/{ColorPicker-B-WUqMoV.js → ColorPicker-Cr6rUDTP.js} +2 -2
  5. package/dist/{DataTable-BvjacRbw.js → DataTable-BeI6gYJX.js} +2 -2
  6. package/dist/{Legend-BpoFJ8fc.js → Legend-DsogCeTb.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-l9giyY1Z.js → NonSvgPenAndPaper-BDK_ucTG.js} +3 -3
  8. package/dist/{PackageVersion-Cwrh45ON.js → PackageVersion-C9oklnuy.js} +1 -1
  9. package/dist/{PenAndPaper-CR8q353D.js → PenAndPaper-BxbYiPy4.js} +3 -3
  10. package/dist/{Shape-C_C_OmqR.js → Shape-DJG2zW7b.js} +1 -1
  11. package/dist/{Slicer-BA2GhOmY.js → Slicer-D6T4aUhr.js} +2 -2
  12. package/dist/{SparkTooltip-Dz1PDE_h.js → SparkTooltip-Cp0G9giW.js} +1 -1
  13. package/dist/{Title-DG2nloSB.js → Title-D17CJXko.js} +1 -1
  14. package/dist/{Tooltip-BOXz8skU.js → Tooltip-CtVdvbZi.js} +1 -1
  15. package/dist/{UserOptions-DsTgvAok.js → UserOptions-B3vCIe-u.js} +168 -126
  16. package/dist/components/arrow.js +1 -1
  17. package/dist/components/vue-ui-3d-bar.js +1 -1
  18. package/dist/components/vue-ui-accordion.js +1 -1
  19. package/dist/components/vue-ui-age-pyramid.js +1 -1
  20. package/dist/components/vue-ui-annotator.js +1 -1
  21. package/dist/components/vue-ui-bullet.js +1 -1
  22. package/dist/components/vue-ui-candlestick.js +1 -1
  23. package/dist/components/vue-ui-carousel-table.js +1 -1
  24. package/dist/components/vue-ui-chestnut.js +1 -1
  25. package/dist/components/vue-ui-chord.js +1 -1
  26. package/dist/components/vue-ui-circle-pack.js +1 -1
  27. package/dist/components/vue-ui-cursor.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-gizmo.js +1 -1
  38. package/dist/components/vue-ui-heatmap.js +1 -1
  39. package/dist/components/vue-ui-history-plot.js +1 -1
  40. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  41. package/dist/components/vue-ui-icon.js +1 -1
  42. package/dist/components/vue-ui-kpi.js +1 -1
  43. package/dist/components/vue-ui-mini-loader.js +1 -1
  44. package/dist/components/vue-ui-molecule.js +1 -1
  45. package/dist/components/vue-ui-mood-radar.js +1 -1
  46. package/dist/components/vue-ui-nested-donuts.js +1 -1
  47. package/dist/components/vue-ui-onion.js +1 -1
  48. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  49. package/dist/components/vue-ui-quadrant.js +1 -1
  50. package/dist/components/vue-ui-quick-chart.js +1 -1
  51. package/dist/components/vue-ui-radar.js +1 -1
  52. package/dist/components/vue-ui-rating.js +1 -1
  53. package/dist/components/vue-ui-relation-circle.js +1 -1
  54. package/dist/components/vue-ui-ridgeline.js +1 -1
  55. package/dist/components/vue-ui-rings.js +1 -1
  56. package/dist/components/vue-ui-scatter.js +1 -1
  57. package/dist/components/vue-ui-skeleton.js +1 -1
  58. package/dist/components/vue-ui-smiley.js +1 -1
  59. package/dist/components/vue-ui-spark-trend.js +1 -1
  60. package/dist/components/vue-ui-sparkbar.js +1 -1
  61. package/dist/components/vue-ui-sparkgauge.js +1 -1
  62. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  63. package/dist/components/vue-ui-sparkline.js +1 -1
  64. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  65. package/dist/components/vue-ui-stackbar.js +1 -1
  66. package/dist/components/vue-ui-strip-plot.js +1 -1
  67. package/dist/components/vue-ui-table-heatmap.js +1 -1
  68. package/dist/components/vue-ui-table-sparkline.js +1 -1
  69. package/dist/components/vue-ui-table.js +1 -1
  70. package/dist/components/vue-ui-thermometer.js +1 -1
  71. package/dist/components/vue-ui-timer.js +1 -1
  72. package/dist/components/vue-ui-tiremarks.js +1 -1
  73. package/dist/components/vue-ui-treemap.js +1 -1
  74. package/dist/components/vue-ui-vertical-bar.js +1 -1
  75. package/dist/components/vue-ui-waffle.js +1 -1
  76. package/dist/components/vue-ui-wheel.js +1 -1
  77. package/dist/components/vue-ui-word-cloud.js +1 -1
  78. package/dist/components/vue-ui-world.js +1 -1
  79. package/dist/components/vue-ui-xy-canvas.js +1 -1
  80. package/dist/components/vue-ui-xy.js +1 -1
  81. package/dist/{dom-to-png-BgvOdfyW.js → dom-to-png-BiyqJA3t.js} +1 -1
  82. package/dist/{img-DjWwQXVS.js → img-6wPuVVtk.js} +1 -1
  83. package/dist/{lib-BEpWEyMm.js → lib-GIYcnm0E.js} +110 -96
  84. package/dist/{pdf-YD0ShN36.js → pdf-DjbHsnrb.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/types/vue-data-ui.d.ts +8 -1
  87. package/dist/{useAutoSizeLabelsInsideViewbox-BVJkib7z.js → useAutoSizeLabelsInsideViewbox-Csv3pVmh.js} +1 -1
  88. package/dist/{useNestedProp-BOk-tPdu.js → useNestedProp-mxyyqd0B.js} +291 -246
  89. package/dist/{usePrinter-w23K-ezx.js → usePrinter-DYRFiw7X.js} +2 -2
  90. package/dist/useSvgExport-B7-Vrjtu.js +732 -0
  91. package/dist/vue-data-ui-DLU1snC3.js +326 -0
  92. package/dist/vue-data-ui.js +68 -68
  93. package/dist/{vue-ui-3d-bar-CRXnB8wH.js → vue-ui-3d-bar-D6xoBrN6.js} +358 -342
  94. package/dist/{vue-ui-accordion-CeMTgpl0.js → vue-ui-accordion-Dch9YrCi.js} +19 -19
  95. package/dist/{vue-ui-age-pyramid-BEGsngR6.js → vue-ui-age-pyramid-D74mAaLA.js} +228 -212
  96. package/dist/{vue-ui-annotator-BhZr9pFJ.js → vue-ui-annotator-DwRwhrgB.js} +9 -9
  97. package/dist/{vue-ui-bullet-CrCHb15S.js → vue-ui-bullet-D2qVUqWs.js} +197 -179
  98. package/dist/{vue-ui-candlestick-CnWY88nd.js → vue-ui-candlestick-C81k1_f9.js} +279 -263
  99. package/dist/{vue-ui-carousel-table-CsVWXrdA.js → vue-ui-carousel-table-DBIhnEj-.js} +6 -6
  100. package/dist/{vue-ui-chestnut-NpO91zJV.js → vue-ui-chestnut-CSM-_IWw.js} +426 -380
  101. package/dist/{vue-ui-chord-bIihB6Qf.js → vue-ui-chord-BFW9nnNh.js} +318 -299
  102. package/dist/{vue-ui-circle-pack-Z5VTiXZU.js → vue-ui-circle-pack-D6mTG5i0.js} +249 -233
  103. package/dist/{vue-ui-cursor-Detis-4Y.js → vue-ui-cursor-BJmTAMpP.js} +2 -2
  104. package/dist/{vue-ui-dashboard-BEJ5uSZV.js → vue-ui-dashboard-BdFLsK4u.js} +72 -71
  105. package/dist/{vue-ui-digits-CDtdGqLS.js → vue-ui-digits-DXum1rs6.js} +10 -10
  106. package/dist/{vue-ui-donut-a82yzfvT.js → vue-ui-donut-CqefukGp.js} +662 -645
  107. package/dist/{vue-ui-donut-evolution-DP_dXmIC.js → vue-ui-donut-evolution-DFIbK50s.js} +407 -385
  108. package/dist/{vue-ui-dumbbell-BDIzPnlX.js → vue-ui-dumbbell-DIo2ecGY.js} +295 -274
  109. package/dist/vue-ui-flow--kiGWaq4.js +931 -0
  110. package/dist/{vue-ui-funnel-CaxHiJIB.js → vue-ui-funnel-B8UHwj15.js} +197 -181
  111. package/dist/{vue-ui-galaxy-CbGRAAFI.js → vue-ui-galaxy-eQZh_y3l.js} +265 -252
  112. package/dist/{vue-ui-gauge-But_1QwV.js → vue-ui-gauge-DJ-E6L2T.js} +256 -240
  113. package/dist/{vue-ui-gizmo-DcBQp-C8.js → vue-ui-gizmo-DFxlqPz7.js} +18 -18
  114. package/dist/{vue-ui-heatmap-BAVkwnbX.js → vue-ui-heatmap-CcAe5dDN.js} +394 -373
  115. package/dist/{vue-ui-history-plot-BlVib573.js → vue-ui-history-plot-CgKvd7Jx.js} +337 -319
  116. package/dist/{vue-ui-kpi-DuFgWXJM.js → vue-ui-kpi-Ct2iyD49.js} +4 -4
  117. package/dist/{vue-ui-mini-loader-D4W9oE3V.js → vue-ui-mini-loader-ByjcvXBB.js} +19 -19
  118. package/dist/{vue-ui-molecule-CEb6_0wR.js → vue-ui-molecule-CGDBEAkX.js} +176 -160
  119. package/dist/vue-ui-mood-radar-D9GuK4cI.js +876 -0
  120. package/dist/{vue-ui-nested-donuts-B6rmNl9X.js → vue-ui-nested-donuts-CGKgOTX2.js} +542 -519
  121. package/dist/{vue-ui-onion-BWAdTZ6V.js → vue-ui-onion-C5tE1Woz.js} +318 -289
  122. package/dist/{vue-ui-parallel-coordinate-plot-DXbgnatq.js → vue-ui-parallel-coordinate-plot-CVhD6IoH.js} +253 -234
  123. package/dist/{vue-ui-quadrant-BwGMZ_d_.js → vue-ui-quadrant-BGDCaOXv.js} +295 -277
  124. package/dist/{vue-ui-quick-chart-2bQ0DX_A.js → vue-ui-quick-chart-CjXSB-2S.js} +724 -686
  125. package/dist/{vue-ui-radar-DPXvVIbh.js → vue-ui-radar-rhxkROX7.js} +307 -282
  126. package/dist/{vue-ui-rating-CxIBq7Xr.js → vue-ui-rating-Bo9gSy-z.js} +4 -4
  127. package/dist/{vue-ui-relation-circle-BVGAfqBj.js → vue-ui-relation-circle-Qo8FKbL2.js} +147 -132
  128. package/dist/{vue-ui-ridgeline-C6UdClMT.js → vue-ui-ridgeline-ahOApbEC.js} +320 -299
  129. package/dist/{vue-ui-rings-B_7zAshC.js → vue-ui-rings-DFAVaEBs.js} +323 -310
  130. package/dist/{vue-ui-scatter-BRr9oPfo.js → vue-ui-scatter-zjlWyvVd.js} +390 -372
  131. package/dist/{vue-ui-skeleton-C3tGR_lR.js → vue-ui-skeleton-CKfOnyd_.js} +105 -105
  132. package/dist/{vue-ui-smiley-B70Ck-49.js → vue-ui-smiley-CY7UiJ9C.js} +88 -88
  133. package/dist/{vue-ui-spark-trend-C2tSZULg.js → vue-ui-spark-trend-DwNYP97M.js} +5 -5
  134. package/dist/{vue-ui-sparkbar-BUPDw_qR.js → vue-ui-sparkbar-BkdcYrmg.js} +30 -30
  135. package/dist/{vue-ui-sparkgauge-DufAZyFK.js → vue-ui-sparkgauge-C6Kq_OGV.js} +4 -4
  136. package/dist/{vue-ui-sparkhistogram-DDunWMKu.js → vue-ui-sparkhistogram-CjB33yXB.js} +7 -7
  137. package/dist/{vue-ui-sparkline-lRx2nNde.js → vue-ui-sparkline-DcH4yIEd.js} +5 -5
  138. package/dist/{vue-ui-sparkstackbar-CB6WHJHd.js → vue-ui-sparkstackbar-MKr2u_pO.js} +5 -5
  139. package/dist/{vue-ui-stackbar-CQ9Zvuxh.js → vue-ui-stackbar-DKV-exfd.js} +356 -338
  140. package/dist/{vue-ui-strip-plot-DW3c82dV.js → vue-ui-strip-plot-ncTrDlNC.js} +368 -352
  141. package/dist/{vue-ui-table-CEt97z7F.js → vue-ui-table-BdT3lGuv.js} +16 -16
  142. package/dist/{vue-ui-table-heatmap-DFZCaMxK.js → vue-ui-table-heatmap-D929cWB0.js} +9 -9
  143. package/dist/{vue-ui-table-sparkline-RB40-Z1R.js → vue-ui-table-sparkline-CkZ_ygR1.js} +7 -7
  144. package/dist/{vue-ui-thermometer-fmPzO-eT.js → vue-ui-thermometer-CjBLR6H9.js} +148 -133
  145. package/dist/{vue-ui-timer-qxLpO3HX.js → vue-ui-timer-Bs7eMmiC.js} +7 -7
  146. package/dist/vue-ui-tiremarks-nGOZKRcz.js +423 -0
  147. package/dist/{vue-ui-treemap-B4-IPDxV.js → vue-ui-treemap-SQ2f5wbN.js} +403 -373
  148. package/dist/{vue-ui-vertical-bar-Y5LefeNg.js → vue-ui-vertical-bar-Hh9gAN5j.js} +295 -260
  149. package/dist/{vue-ui-waffle-gvnJOZlg.js → vue-ui-waffle-C7moVBln.js} +396 -377
  150. package/dist/{vue-ui-wheel-BzS_N3GP.js → vue-ui-wheel-KrGLMCqW.js} +185 -169
  151. package/dist/{vue-ui-word-cloud-vWhTarrE.js → vue-ui-word-cloud-BQSu6kiR.js} +234 -218
  152. package/dist/{vue-ui-world-CqWuE8ZR.js → vue-ui-world-DdoMFJcV.js} +344 -326
  153. package/dist/{vue-ui-xy-BxpuE9Ng.js → vue-ui-xy-B2fjTYMJ.js} +1602 -1708
  154. package/dist/{vue-ui-xy-canvas-C9YQjaUA.js → vue-ui-xy-canvas-oUXISeU8.js} +12 -12
  155. package/package.json +1 -1
  156. package/dist/vue-data-ui-DH8opsJv.js +0 -325
  157. package/dist/vue-ui-flow-B72CBzC3.js +0 -909
  158. package/dist/vue-ui-mood-radar-CqJPicZv.js +0 -853
  159. package/dist/vue-ui-tiremarks-Cxx97FLg.js +0 -407
@@ -1,909 +0,0 @@
1
- import { defineAsyncComponent as H, ref as c, computed as g, onMounted as Jt, toRefs as Qt, watch as Te, createElementBlock as p, openBlock as i, unref as r, normalizeStyle as W, normalizeClass as kt, createBlock as q, createCommentVNode as T, createElementVNode as Y, createVNode as xe, createSlots as wt, withCtx as y, renderSlot as k, normalizeProps as Q, guardReactiveProps as ee, Fragment as de, renderList as he, toDisplayString as te, Teleport as eo, resolveDynamicComponent as to, mergeProps as oo, createTextVNode as $t, nextTick as lo } from "vue";
2
- import { c as He, t as ao, o as At, f as no, b as so, p as z, e as ro, q as x, h as uo, d as fe, X as io, E as Tt, O as co, a as We, x as vo, y as ho, z as fo } from "./lib-BEpWEyMm.js";
3
- import { t as po, u as go } from "./useResponsive-DfdjqQps.js";
4
- import { u as mo, a as xt } from "./useNestedProp-BOk-tPdu.js";
5
- import { u as bo } from "./usePrinter-w23K-ezx.js";
6
- import { u as yo, B as Co } from "./BaseScanner-BgWxam9d.js";
7
- import { u as ko } from "./useUserOptionState-BIvW1Kz7.js";
8
- import { u as wo } from "./useChartAccessibility-9icAAmYg.js";
9
- import { t as $o } from "./themes-Dw-dDudK.js";
10
- import Ao from "./Legend-BpoFJ8fc.js";
11
- import To from "./Title-DG2nloSB.js";
12
- import xo from "./img-DjWwQXVS.js";
13
- import { _ as _o } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const So = ["id"], Oo = {
15
- key: 1,
16
- ref: "noTitle",
17
- class: "vue-data-ui-no-title-space",
18
- style: "height:36px; width: 100%;background:transparent"
19
- }, No = ["id"], Fo = ["xmlns", "viewBox"], Eo = ["width", "height"], Po = ["id"], Io = ["stop-color"], Mo = ["stop-color"], Do = ["d", "fill", "stroke", "stroke-width"], zo = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Bo = { key: 1 }, Lo = ["x", "y", "font-size", "fill"], Ro = ["x", "y", "font-size", "fill"], Ho = {
20
- key: 4,
21
- class: "vue-data-ui-watermark"
22
- }, Wo = ["id"], Yo = ["onClick"], Go = ["innerHTML"], Uo = {
23
- __name: "vue-ui-flow",
24
- props: {
25
- config: {
26
- type: Object,
27
- default() {
28
- return {};
29
- }
30
- },
31
- dataset: {
32
- type: Array,
33
- default() {
34
- return [];
35
- }
36
- }
37
- },
38
- setup(_t, { expose: St }) {
39
- const Ot = H(() => import("./Tooltip-BOXz8skU.js")), Nt = H(() => import("./BaseIcon-Bz-1GQhu.js")), Ft = H(() => import("./vue-ui-accordion-CeMTgpl0.js")), Et = H(() => import("./DataTable-BvjacRbw.js")), Pt = H(() => import("./PenAndPaper-CR8q353D.js")), It = H(() => import("./UserOptions-DsTgvAok.js")), Mt = H(() => import("./PackageVersion-Cwrh45ON.js")), Dt = H(() => import("./BaseDraggableDialog-CHhZIht2.js")), { vue_ui_flow: zt } = mo(), F = _t, G = c(He()), M = c(null), Ye = c(0), Ge = c(0), _e = c(!1), Se = c(""), Ue = c(null), je = c(null), Ve = c(null), oe = c(null), pe = c(null), Xe = c(!1), le = c(null), Oe = c(null), qe = g(() => !!F.dataset && F.dataset.length);
40
- Jt(() => {
41
- Xe.value = !0, Ze();
42
- });
43
- const U = c(!1);
44
- function Ke(o) {
45
- U.value = o, Ye.value += 1;
46
- }
47
- const e = c(Pe()), { loading: Ne, FINAL_DATASET: ge, manualLoading: Fe } = yo({
48
- ...Qt(F),
49
- FINAL_CONFIG: e,
50
- prepareConfig: Pe,
51
- skeletonDataset: [
52
- ["A", "B", 2, "#CACACA"],
53
- ["B", "C", 1, "#CACACA"],
54
- ["C", "D", 0.5, "#CACACA"],
55
- ["E", "F", 1, "#AAAAAA"],
56
- ["F", "G", 0.5, "#AAAAAA"],
57
- ["G", "H", 0.25, "#AAAAAA"]
58
- ],
59
- skeletonConfig: ao({
60
- defaultConfig: e.value,
61
- userConfig: {
62
- userOptions: { show: !1 },
63
- nodeCategories: {
64
- B: "A",
65
- C: "B"
66
- },
67
- nodeCategoryColors: {
68
- A: "#CACACA",
69
- B: "#AAAAAA"
70
- },
71
- table: { show: !1 },
72
- style: {
73
- chart: {
74
- backgroundColor: "#99999930",
75
- legend: {
76
- backgroundColor: "transparent"
77
- },
78
- nodes: {
79
- labels: {
80
- show: !1
81
- },
82
- stroke: "#666666"
83
- },
84
- links: {
85
- stroke: "#666666"
86
- }
87
- }
88
- }
89
- }
90
- })
91
- }), Bt = g(() => !!e.value.debug);
92
- function Ze() {
93
- if (At(F.dataset) && (no({
94
- componentName: "VueUiFlow",
95
- type: "dataset",
96
- debug: Bt.value
97
- }), Fe.value = !0), At(F.dataset) || (Fe.value = e.value.loading), e.value.responsive) {
98
- const o = po(() => {
99
- const { width: l, height: t } = go({
100
- chart: M.value,
101
- title: e.value.style.chart.title.text ? je.value : null,
102
- legend: e.value.style.chart.legend.show ? Ue.value : null,
103
- source: Ve.value
104
- });
105
- requestAnimationFrame(() => {
106
- tt.value = l, ot.value = t;
107
- });
108
- });
109
- oe.value && (pe.value && oe.value.unobserve(pe.value), oe.value.disconnect()), oe.value = new ResizeObserver(o), pe.value = M.value.parentNode, oe.value.observe(pe.value);
110
- }
111
- }
112
- const { userOptionsVisible: Ee, setUserOptionsVisibility: Je, keepUserOptionState: Qe } = ko({ config: e.value }), { svgRef: et } = wo({
113
- config: e.value.style.chart.title
114
- });
115
- function Pe() {
116
- const o = xt({
117
- userConfig: F.config,
118
- defaultConfig: zt
119
- });
120
- let l = o;
121
- return o.theme ? l = {
122
- ...xt({
123
- userConfig: $o.vue_ui_flow[o.theme] || F.config,
124
- defaultConfig: o
125
- }),
126
- customPalette: so[o.theme] || z
127
- } : l = o, l.nodeCategories = F.config.nodeCategories || {}, l.nodeCategoryColors = F.config.nodeCategoryColors || {}, l;
128
- }
129
- const tt = c(e.value.style.chart.width), ot = c(e.value.style.chart.height);
130
- Te(
131
- () => F.config,
132
- (o) => {
133
- Ne.value || (e.value = Pe()), Ee.value = !e.value.userOptions.showOnChartHover, Ze(), Ge.value += 1, E.value.showTable = e.value.table.show;
134
- },
135
- { deep: !0 }
136
- ), Te(() => F.dataset, (o) => {
137
- Array.isArray(o) && o.length > 0 && (Fe.value = !1);
138
- }, { deep: !0 });
139
- const { isPrinting: lt, isImaging: at, generatePdf: nt, generateImage: st } = bo({
140
- elementId: `flow_${G.value}`,
141
- fileName: e.value.style.chart.title.text || "vue-ui-flow",
142
- options: e.value.userOptions.print
143
- }), Lt = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), me = g(() => ro(e.value.customPalette)), be = g(() => e.value.style.chart.nodes.width), E = c({
144
- showTable: e.value.table.show,
145
- showTooltip: e.value.style.chart.tooltip.show
146
- });
147
- Te(e, () => {
148
- E.value = {
149
- showTable: e.value.table.show,
150
- showTooltip: e.value.style.chart.tooltip.show
151
- };
152
- }, { immediate: !0 });
153
- const rt = g(() => !ge.value || !ge.value.length ? [] : ge.value.map((o, l) => [
154
- o[0],
155
- o[1],
156
- x(o[2]),
157
- o[3] ? uo(o[3]) : me.value[l] || me.value[l % me.value.length] || z[l] || z[l % z.length]
158
- ]));
159
- function Rt(o) {
160
- const l = {}, t = {};
161
- function n(a, u) {
162
- l[a] || (l[a] = {
163
- level: null,
164
- inflow: 0,
165
- outflow: 0,
166
- children: [],
167
- color: null,
168
- uid: He()
169
- }), l[a].level === null && (l[a].level = u), t[u] || (t[u] = []), t[u].includes(a) || t[u].push(a);
170
- }
171
- o.forEach(([a, u, d]) => {
172
- const h = l[a]?.level ?? 0, S = h + 1;
173
- n(a, h), n(u, S), l[a].children.push({ target: u, value: d }), l[a].outflow += d, l[u].inflow += d;
174
- });
175
- const s = new Set(o.map(([a]) => a)), $ = new Set(o.map(([, a]) => a)), Z = Array.from(s).filter((a) => !$.has(a)), ue = {};
176
- Z.forEach((a, u) => {
177
- ue[a] = me.value[u] || z[u % z.length];
178
- });
179
- const ie = {};
180
- o.forEach(([a, u, d, h]) => {
181
- h && (ie[a] = h, ie[u] = h);
182
- }), Object.keys(l).forEach((a, u) => {
183
- const d = e.value.nodeCategories?.[a], h = d ? e.value.nodeCategoryColors?.[d] : null;
184
- l[a].color = ie[a] || h || (Z.includes(a) ? ue[a] : null) || z[u % z.length];
185
- }), Object.keys(l).forEach((a) => {
186
- l[a].value = Math.max(l[a].inflow, l[a].outflow);
187
- });
188
- const we = ae.value, ze = ct.value.width, J = ct.value.height, D = Object.keys(t).map(Number).sort((a, u) => a - u), $e = D.length || 1, Be = $e > 1 ? ze / ($e - 1) : 0, A = Number(be.value), I = Number(
189
- e.value.style.chart.nodes.gapPx ?? e.value.style.chart.nodes.gap ?? 8
190
- ), ce = Number(e.value.style.chart.nodes.minHeight || 0);
191
- function v(a) {
192
- const u = t[a], d = u.length;
193
- if (!d) return 1 / 0;
194
- const h = Math.max(0, (d - 1) * I), S = Math.max(0, J - h), B = Math.min(ce, d ? S / d : 0);
195
- let C = 0, O = u.map((f) => l[f].value || 0), b = O.reduce((f, N) => f + N, 0);
196
- for (let f = 0; f < 12; f += 1) {
197
- const N = b > 0 ? (S - C) / b : 0, L = [];
198
- for (let P = 0; P < O.length; P += 1) {
199
- const R = O[P];
200
- R < 0 || R * N < B && L.push(P);
201
- }
202
- if (!L.length) return Math.max(0, N);
203
- for (const P of L)
204
- C += B, b -= O[P], O[P] = -1;
205
- if (b <= 0) return 0;
206
- }
207
- return b > 0 ? Math.max(0, (S - C) / b) : 0;
208
- }
209
- const m = D.map(v), V = m.length ? Math.min(...m) : 0, X = {};
210
- D.forEach((a) => {
211
- const u = t[a], d = u.length, h = Math.max(0, (d - 1) * I), S = Math.max(0, J - h), B = Math.min(ce, d ? S / d : 0), C = u.map(
212
- (f) => Math.max(B, (l[f].value || 0) * V)
213
- ), O = C.reduce((f, N) => f + N, 0) + h;
214
- let b = Math.max(0, (J - O) / 2);
215
- u.forEach((f, N) => {
216
- const L = C[N], P = we.left + a * Be, R = b;
217
- X[f] = {
218
- x: P,
219
- y: R,
220
- absoluteY: R,
221
- height: L,
222
- i: N,
223
- color: l[f].color,
224
- value: l[f].value
225
- }, b += L, N < d - 1 && (b += I);
226
- });
227
- });
228
- const bt = [], ve = we.top, Le = {}, Re = {};
229
- Object.keys(l).forEach((a) => {
230
- Le[a] = X[a]?.y ?? 0, Re[a] = 0;
231
- });
232
- const Vt = 1e-6, Xt = 0.25;
233
- return D.forEach((a) => {
234
- t[a].forEach((d) => {
235
- const h = l[d], S = X[d];
236
- if (!h.children || !h.children.length) return;
237
- let B = S.y;
238
- h.children.forEach(({ target: C, value: O }) => {
239
- const b = X[C], f = l[C], N = h.outflow > 0 ? O / h.outflow : 0, L = f.inflow > 0 ? O / f.inflow : 0, P = x(B + ve), R = x(B + N * S.height + ve), yt = Le[C];
240
- let Ae = yt + L * b.height;
241
- Re[C] += O;
242
- const qt = f.inflow > 0 && Re[C] >= f.inflow - Vt, Ct = b.y + b.height;
243
- (qt || Ae > Ct - Xt) && (Ae = Ct);
244
- const Kt = x(yt + ve), Zt = x(Ae + ve);
245
- bt.push({
246
- id: He(),
247
- source: d,
248
- target: C,
249
- path: `M ${x(S.x + A)} ${P} L ${x(S.x + A)} ${R} L ${x(b.x)} ${Zt} L ${x(b.x)} ${Kt} Z`,
250
- value: O,
251
- sourceColor: h.color,
252
- targetColor: l[C].color
253
- }), B = R - ve, Le[C] = Ae;
254
- });
255
- });
256
- }), { nodeCoordinates: X, links: bt };
257
- }
258
- const _ = g(() => {
259
- const o = Rt(ge.value);
260
- return {
261
- nodes: Object.keys(o.nodeCoordinates).map((l, t) => ({
262
- ...o.nodeCoordinates[l],
263
- name: l
264
- })),
265
- links: o.links
266
- };
267
- }), ut = g(() => tt.value), it = g(() => ot.value), ae = g(() => e.value.style.chart.padding), ct = g(() => ({
268
- width: Math.max(0, ut.value - 40 - ae.value.right - ae.value.left),
269
- height: Math.max(0, it.value - ae.value.top - ae.value.bottom)
270
- })), ne = g(() => ({
271
- width: ut.value,
272
- height: it.value
273
- }));
274
- function Ht(o) {
275
- const l = {}, t = {}, n = /* @__PURE__ */ new Set();
276
- return rt.value.forEach(([s, $, Z]) => {
277
- l[s] || (l[s] = []), t[$] || (t[$] = []), l[s].push($), t[$].push(s);
278
- }), l[o] && l[o].forEach((s) => n.add(s)), t[o] && t[o].forEach((s) => n.add(s)), Array.from(n).concat(o);
279
- }
280
- const w = c(null), K = c(null), se = c(null), ye = c(!1);
281
- function Wt(o, l) {
282
- j.value = [], w.value = Ht(o.name), K.value = o.name;
283
- const t = o.name, n = rt.value;
284
- let s = 0, $ = 0, Z = [], ue = [];
285
- const ie = new Set(n.map(([v]) => v)), we = new Set(n.map(([, v]) => v)), ze = Array.from(ie).filter((v) => !we.has(v)), J = n.filter(([v]) => ze.includes(v)).reduce((v, [m, V, X]) => v + X, 0), D = {};
286
- _.value.nodes.forEach((v) => {
287
- D[v.name] = v.color;
288
- }), n.forEach(([v, m, V]) => {
289
- m === t && (s += V, Z.push({ source: v, value: V, color: D[v] })), v === t && ($ += V, ue.push({ target: m, value: V, color: D[m] }));
290
- });
291
- const $e = Math.max(s, $), Be = J > 0 ? $e / J * 100 : 0, A = {
292
- name: t,
293
- inflow: s,
294
- outflow: $,
295
- from: Z,
296
- to: ue,
297
- percentOfTotal: Be,
298
- color: D[t] || "#000000"
299
- };
300
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: A, seriesIndex: l }), se.value = { datapoint: A }, _e.value = !0;
301
- let I = "";
302
- const ce = e.value.style.chart.tooltip.customFormat;
303
- if (ye.value = !1, fo(ce))
304
- try {
305
- const v = ce({
306
- datapoint: A,
307
- series: _.value,
308
- config: e.value
309
- });
310
- typeof v == "string" && (Se.value = v, ye.value = !0);
311
- } catch {
312
- console.warn("Custom format cannot be applied.");
313
- }
314
- if (!ye.value) {
315
- const v = e.value.style.chart.tooltip.showPercentage ? `<div>${fe({
316
- p: e.value.style.chart.tooltip.translations.percentOfTotal,
317
- v: A.percentOfTotal,
318
- s: "%",
319
- r: e.value.style.chart.tooltip.roundingPercentage
320
- })}</div>` : "";
321
- I += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${A.color}">⏹</span>${A.name}${v}</div>`, A.from.length && (I += `<div>${e.value.style.chart.tooltip.translations.from}</div>`, A.from.forEach((m) => {
322
- I += `<div><span style="color:${m.color}">⏹←</span> ${m.source}: ${We(
323
- e.value.style.chart.nodes.labels.formatter,
324
- m.value,
325
- fe({
326
- p: e.value.style.chart.nodes.labels.prefix,
327
- v: m.value,
328
- s: e.value.style.chart.nodes.labels.suffix,
329
- r: e.value.style.chart.nodes.labels.rounding
330
- })
331
- )}</div>`;
332
- })), A.to.length && (I += `<div style="margin-top:6px;">${e.value.style.chart.tooltip.translations.to}</div>`, A.to.forEach((m) => {
333
- I += `<div><span style="color:${m.color}">⏹→</span> ${m.target}: ${We(
334
- e.value.style.chart.nodes.labels.formatter,
335
- m.value,
336
- fe({
337
- p: e.value.style.chart.nodes.labels.prefix,
338
- v: m.value,
339
- s: e.value.style.chart.nodes.labels.suffix,
340
- r: e.value.style.chart.nodes.labels.rounding
341
- })
342
- )}</div>`;
343
- })), Se.value = I;
344
- }
345
- }
346
- function vt(o) {
347
- const l = se.value;
348
- e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), w.value = null, K.value = null, _e.value = !1;
349
- }
350
- function Yt(o) {
351
- const l = se.value;
352
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: o });
353
- }
354
- const dt = g(() => _.value.links.map(
355
- ({ source: o, target: l, sourceColor: t, targetColor: n, value: s }) => ({
356
- source: o,
357
- target: l,
358
- sourceColor: t,
359
- targetColor: n,
360
- value: s
361
- })
362
- ));
363
- function Ie(o = null) {
364
- lo(() => {
365
- const l = dt.value.map((s, $) => [[s.source], [s.target], [s.value]]), t = [
366
- [e.value.style.chart.title.text],
367
- [e.value.style.chart.title.subtitle.text],
368
- [
369
- [e.value.table.columnNames.source],
370
- [e.value.table.columnNames.target],
371
- [e.value.table.columnNames.value]
372
- ]
373
- ].concat(l), n = vo(t);
374
- o ? o(n) : ho({
375
- csvContent: n,
376
- title: e.value.style.chart.title.text || "vue-ui-flow"
377
- });
378
- });
379
- }
380
- const Ce = g(() => {
381
- const o = [
382
- e.value.table.columnNames.source,
383
- e.value.table.columnNames.target,
384
- e.value.table.columnNames.value
385
- ], l = dt.value.map((s, $) => [
386
- {
387
- color: s.sourceColor,
388
- name: s.source,
389
- shape: "square"
390
- },
391
- {
392
- color: s.targetColor,
393
- name: s.target,
394
- shape: "square"
395
- },
396
- fe({
397
- p: e.value.style.chart.nodes.labels.prefix,
398
- v: s.value,
399
- s: e.value.style.chart.nodes.labels.suffix,
400
- r: e.value.style.chart.nodes.labels.rounding
401
- })
402
- ]), t = {
403
- th: {
404
- backgroundColor: e.value.table.th.backgroundColor,
405
- color: e.value.table.th.color,
406
- outline: e.value.table.th.outline
407
- },
408
- td: {
409
- backgroundColor: e.value.table.td.backgroundColor,
410
- color: e.value.table.td.color,
411
- outline: e.value.table.td.outline
412
- },
413
- breakpoint: e.value.table.responsiveBreakpoint
414
- };
415
- return {
416
- colNames: [
417
- e.value.table.columnNames.source,
418
- e.value.table.columnNames.target,
419
- e.value.table.columnNames.value
420
- ],
421
- head: o,
422
- body: l,
423
- config: t
424
- };
425
- });
426
- function Gt() {
427
- return _.value;
428
- }
429
- function ht() {
430
- E.value.showTable = !E.value.showTable;
431
- }
432
- const ke = c(!1);
433
- function Me() {
434
- ke.value = !ke.value;
435
- }
436
- function ft() {
437
- E.value.showTooltip = !E.value.showTooltip;
438
- }
439
- const pt = g(() => {
440
- const o = new Set(
441
- _.value.nodes.map(
442
- (l) => e.value.nodeCategories[l.name] || "__uncategorized__"
443
- )
444
- );
445
- return Array.from(o).map((l) => ({
446
- name: l,
447
- color: e.value.nodeCategoryColors[l] || z[0],
448
- shape: "square",
449
- count: _.value.nodes.filter(
450
- (t) => (e.value.nodeCategories[t.name] || "__uncategorized__") === l
451
- ).length
452
- })).map((l, t) => ({
453
- ...l,
454
- segregate: () => De({ legend: l, i: t }),
455
- opacity: j.value.length ? j.value.includes(t) ? 1 : 0.5 : 1
456
- }));
457
- }), gt = g(
458
- () => pt.value.filter((o) => o.name !== "__uncategorized__")
459
- ), j = c([]);
460
- function De({ legend: o, i: l }) {
461
- const t = o.name;
462
- if (w.value?.every(
463
- (n) => e.value.nodeCategories[n] === t
464
- )) {
465
- w.value = null, K.value = null, j.value = [];
466
- return;
467
- }
468
- j.value = [l], w.value = _.value.nodes.filter((n) => e.value.nodeCategories[n.name] === t).map((n) => n.name), K.value = null;
469
- }
470
- const Ut = g(() => ({
471
- cy: "flow-legend",
472
- backgroundColor: e.value.style.chart.legend.backgroundColor,
473
- color: e.value.style.chart.legend.color,
474
- fontSize: e.value.style.chart.legend.fontSize,
475
- paddingBottom: e.value.style.chart.legend.paddingBottom,
476
- fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
477
- }));
478
- async function jt({ scale: o = 2 } = {}) {
479
- if (!M.value) return;
480
- const { width: l, height: t } = M.value.getBoundingClientRect(), n = l / t, { imageUri: s, base64: $ } = await xo({ domElement: M.value, base64: !0, img: !0, scale: o });
481
- return {
482
- imageUri: s,
483
- base64: $,
484
- title: e.value.style.chart.title.text,
485
- width: l,
486
- height: t,
487
- aspectRatio: n
488
- };
489
- }
490
- const re = g(() => {
491
- const o = e.value.table.useDialog && !e.value.table.show, l = E.value.showTable;
492
- return {
493
- component: o ? Dt : Ft,
494
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
495
- props: o ? {
496
- backgroundColor: e.value.table.th.backgroundColor,
497
- color: e.value.table.th.color,
498
- headerColor: e.value.table.th.color,
499
- headerBg: e.value.table.th.backgroundColor,
500
- isFullscreen: U.value,
501
- fullscreenParent: M.value,
502
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
503
- } : {
504
- hideDetails: !0,
505
- config: {
506
- open: l,
507
- maxHeight: 1e4,
508
- body: {
509
- backgroundColor: e.value.style.chart.backgroundColor,
510
- color: e.value.style.chart.color
511
- },
512
- head: {
513
- backgroundColor: e.value.style.chart.backgroundColor,
514
- color: e.value.style.chart.color
515
- }
516
- }
517
- }
518
- };
519
- });
520
- Te(() => E.value.showTable, (o) => {
521
- e.value.table.show || (o && e.value.table.useDialog && le.value ? le.value.open() : "close" in le.value && le.value.close());
522
- });
523
- function mt() {
524
- E.value.showTable = !1, Oe.value && Oe.value.setTableIconState(!1);
525
- }
526
- return St({
527
- getData: Gt,
528
- getImage: jt,
529
- generateCsv: Ie,
530
- generateImage: st,
531
- generatePdf: nt,
532
- toggleTable: ht,
533
- toggleAnnotator: Me,
534
- toggleTooltip: ft,
535
- drillCategory: De,
536
- unselectNode: vt,
537
- toggleFullscreen: Ke
538
- }), (o, l) => (i(), p("div", {
539
- ref_key: "flowChart",
540
- ref: M,
541
- class: kt(`vue-ui-flow ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
542
- style: W(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
543
- id: `flow_${G.value}`,
544
- onMouseenter: l[2] || (l[2] = () => r(Je)(!0)),
545
- onMouseleave: l[3] || (l[3] = () => r(Je)(!1))
546
- }, [
547
- e.value.userOptions.buttons.annotator ? (i(), q(r(Pt), {
548
- key: 0,
549
- svgRef: r(et),
550
- backgroundColor: e.value.style.chart.backgroundColor,
551
- color: e.value.style.chart.color,
552
- active: ke.value,
553
- onClose: Me
554
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : T("", !0),
555
- Lt.value ? (i(), p("div", Oo, null, 512)) : T("", !0),
556
- e.value.style.chart.title.text ? (i(), p("div", {
557
- key: 2,
558
- ref_key: "chartTitle",
559
- ref: je,
560
- style: "width:100%;background:transparent;padding-bottom:24px"
561
- }, [
562
- (i(), q(To, {
563
- key: `title_${Ge.value}`,
564
- config: {
565
- title: {
566
- cy: "flow-title",
567
- ...e.value.style.chart.title
568
- },
569
- subtitle: {
570
- cy: "flow-subtitle",
571
- ...e.value.style.chart.title.subtitle
572
- }
573
- }
574
- }, null, 8, ["config"]))
575
- ], 512)) : T("", !0),
576
- Y("div", {
577
- id: `legend-top-${G.value}`
578
- }, null, 8, No),
579
- e.value.userOptions.show && qe.value && (r(Qe) || r(Ee)) ? (i(), q(r(It), {
580
- ref_key: "userOptionsRef",
581
- ref: Oe,
582
- key: `user_option_${Ye.value}`,
583
- backgroundColor: e.value.style.chart.backgroundColor,
584
- color: e.value.style.chart.color,
585
- isPrinting: r(lt),
586
- isImaging: r(at),
587
- uid: G.value,
588
- hasPdf: e.value.userOptions.buttons.pdf,
589
- hasXls: e.value.userOptions.buttons.csv,
590
- hasImg: e.value.userOptions.buttons.img,
591
- hasTable: e.value.userOptions.buttons.table,
592
- callbacks: e.value.userOptions.callbacks,
593
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
594
- isFullscreen: U.value,
595
- titles: { ...e.value.userOptions.buttonTitles },
596
- chartElement: M.value,
597
- position: e.value.userOptions.position,
598
- hasAnnotator: e.value.userOptions.buttons.annotator,
599
- printScale: e.value.userOptions.print.scale,
600
- isAnnotation: ke.value,
601
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
602
- isTooltip: E.value.showTooltip,
603
- tableDialog: e.value.table.useDialog,
604
- onToggleTooltip: ft,
605
- onToggleFullscreen: Ke,
606
- onGeneratePdf: r(nt),
607
- onGenerateCsv: Ie,
608
- onGenerateImage: r(st),
609
- onToggleTable: ht,
610
- onToggleAnnotator: Me,
611
- style: W({
612
- visibility: r(Qe) ? r(Ee) ? "visible" : "hidden" : "visible"
613
- })
614
- }, wt({ _: 2 }, [
615
- o.$slots.menuIcon ? {
616
- name: "menuIcon",
617
- fn: y(({ isOpen: t, color: n }) => [
618
- k(o.$slots, "menuIcon", Q(ee({ isOpen: t, color: n })), void 0, !0)
619
- ]),
620
- key: "0"
621
- } : void 0,
622
- o.$slots.optionTooltip ? {
623
- name: "optionTooltip",
624
- fn: y(() => [
625
- k(o.$slots, "optionTooltip", {}, void 0, !0)
626
- ]),
627
- key: "1"
628
- } : void 0,
629
- o.$slots.optionPdf ? {
630
- name: "optionPdf",
631
- fn: y(() => [
632
- k(o.$slots, "optionPdf", {}, void 0, !0)
633
- ]),
634
- key: "2"
635
- } : void 0,
636
- o.$slots.optionCsv ? {
637
- name: "optionCsv",
638
- fn: y(() => [
639
- k(o.$slots, "optionCsv", {}, void 0, !0)
640
- ]),
641
- key: "3"
642
- } : void 0,
643
- o.$slots.optionImg ? {
644
- name: "optionImg",
645
- fn: y(() => [
646
- k(o.$slots, "optionImg", {}, void 0, !0)
647
- ]),
648
- key: "4"
649
- } : void 0,
650
- o.$slots.optionTable ? {
651
- name: "optionTable",
652
- fn: y(() => [
653
- k(o.$slots, "optionTable", {}, void 0, !0)
654
- ]),
655
- key: "5"
656
- } : void 0,
657
- o.$slots.optionFullscreen ? {
658
- name: "optionFullscreen",
659
- fn: y(({ toggleFullscreen: t, isFullscreen: n }) => [
660
- k(o.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
661
- ]),
662
- key: "6"
663
- } : void 0,
664
- o.$slots.optionAnnotator ? {
665
- name: "optionAnnotator",
666
- fn: y(({ toggleAnnotator: t, isAnnotator: n }) => [
667
- k(o.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
668
- ]),
669
- key: "7"
670
- } : void 0
671
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "callbacks", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "printScale", "isAnnotation", "hasTooltip", "isTooltip", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : T("", !0),
672
- (i(), p("svg", {
673
- ref_key: "svgRef",
674
- ref: et,
675
- xmlns: r(io),
676
- viewBox: `0 0 ${ne.value.width} ${ne.value.height}`,
677
- class: kt({
678
- "vue-data-ui-fullscreen--on": U.value,
679
- "vue-data-ui-fulscreen--off": !U.value
680
- }),
681
- style: W({
682
- maxWidth: "100%",
683
- overflow: "visible",
684
- background: "transparent",
685
- color: e.value.style.chart.color
686
- })
687
- }, [
688
- xe(r(Mt)),
689
- o.$slots["chart-background"] ? (i(), p("foreignObject", {
690
- key: 0,
691
- x: 0,
692
- y: 0,
693
- width: ne.value.width,
694
- height: ne.value.height,
695
- style: {
696
- pointerEvents: "none"
697
- }
698
- }, [
699
- k(o.$slots, "chart-background", {}, void 0, !0)
700
- ], 8, Eo)) : T("", !0),
701
- Y("defs", null, [
702
- (i(!0), p(de, null, he(_.value.links, (t, n) => (i(), p("linearGradient", {
703
- id: t.id,
704
- x1: "0%",
705
- y1: "0%",
706
- x2: "100%",
707
- y2: "0%"
708
- }, [
709
- Y("stop", {
710
- offset: "0%",
711
- "stop-color": t.sourceColor
712
- }, null, 8, Io),
713
- Y("stop", {
714
- offset: "100%",
715
- "stop-color": t.targetColor
716
- }, null, 8, Mo)
717
- ], 8, Po))), 256))
718
- ]),
719
- (i(!0), p(de, null, he(_.value.links, (t) => (i(), p("path", {
720
- class: "vue-ui-flow-link",
721
- d: t.path,
722
- "stroke-linejoin": "round",
723
- "stroke-miterlimit": "1",
724
- fill: `url(#${t.id})`,
725
- stroke: e.value.style.chart.links.stroke,
726
- "stroke-width": e.value.style.chart.links.strokeWidth,
727
- style: W(`
728
- opacity:${w.value ? w.value.includes(t.source) && w.value.includes(t.target) ? 1 : 0.3 : K.value ? [t.target, t.source].includes(K.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
729
- `)
730
- }, null, 12, Do))), 256)),
731
- (i(!0), p(de, null, he(_.value.nodes, (t, n) => (i(), p("rect", {
732
- class: "vue-ui-flow-node",
733
- x: t.x,
734
- y: r(x)(t.absoluteY) + e.value.style.chart.padding.top,
735
- height: r(x)(t.height),
736
- width: be.value,
737
- fill: t.color,
738
- stroke: e.value.style.chart.nodes.stroke,
739
- "stroke-width": e.value.style.chart.nodes.strokeWidth,
740
- onMouseenter: (s) => Wt(t, n),
741
- onMouseleave: (s) => vt(n),
742
- style: W(`opacity:${w.value ? w.value.includes(t.name) ? 1 : 0.3 : 1}`),
743
- onClick: (s) => Yt(n)
744
- }, null, 44, zo))), 256)),
745
- e.value.style.chart.nodes.labels.show ? (i(), p("g", Bo, [
746
- (i(!0), p(de, null, he(_.value.nodes, (t, n) => (i(), p("text", {
747
- x: t.x + be.value / 2,
748
- y: r(x)(
749
- t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
750
- ) + e.value.style.chart.padding.top,
751
- "font-size": e.value.style.chart.nodes.labels.fontSize,
752
- fill: r(Tt)(t.color),
753
- "text-anchor": "middle",
754
- style: W(`pointer-events: none; opacity:${w.value ? w.value.includes(t.name) ? 1 : 0 : 1}`)
755
- }, te(e.value.style.chart.nodes.labels.abbreviation.use ? r(co)({
756
- source: t.name,
757
- length: e.value.style.chart.nodes.labels.abbreviation.length
758
- }) : t.name), 13, Lo))), 256)),
759
- (i(!0), p(de, null, he(_.value.nodes, (t, n) => (i(), p("text", {
760
- x: t.x + be.value / 2,
761
- y: r(x)(
762
- t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize
763
- ) + e.value.style.chart.padding.top,
764
- "font-size": e.value.style.chart.nodes.labels.fontSize,
765
- fill: r(Tt)(t.color),
766
- "text-anchor": "middle",
767
- style: W(`pointer-events: none; opacity:${w.value ? w.value.includes(t.name) ? 1 : 0 : 1}`)
768
- }, te(r(We)(
769
- e.value.style.chart.nodes.labels.formatter,
770
- t.value,
771
- r(fe)({
772
- p: e.value.style.chart.nodes.labels.prefix,
773
- v: t.value,
774
- s: e.value.style.chart.nodes.labels.suffix,
775
- r: e.value.style.chart.nodes.labels.rounding
776
- }),
777
- { datapoint: t, seriesIndex: n }
778
- )), 13, Ro))), 256))
779
- ])) : T("", !0),
780
- k(o.$slots, "svg", { svg: ne.value }, void 0, !0)
781
- ], 14, Fo)),
782
- o.$slots.watermark ? (i(), p("div", Ho, [
783
- k(o.$slots, "watermark", Q(ee({ isPrinting: r(lt) || r(at) })), void 0, !0)
784
- ])) : T("", !0),
785
- Y("div", {
786
- id: `legend-bottom-${G.value}`
787
- }, null, 8, Wo),
788
- Xe.value ? (i(), q(eo, {
789
- key: 5,
790
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${G.value}` : `#legend-bottom-${G.value}`
791
- }, [
792
- Y("div", {
793
- ref_key: "chartLegend",
794
- ref: Ue
795
- }, [
796
- e.value.style.chart.legend.show && gt.value.length ? (i(), q(Ao, {
797
- key: 0,
798
- legendSet: gt.value,
799
- config: Ut.value,
800
- onClickMarker: l[0] || (l[0] = (t) => De(t))
801
- }, {
802
- item: y(({ legend: t, index: n }) => [
803
- r(Ne) ? T("", !0) : (i(), p("div", {
804
- key: 0,
805
- onClick: (s) => t.segregate(),
806
- style: W(`opacity:${j.value.length ? j.value.includes(n) ? 1 : 0.5 : 1}`)
807
- }, te(t.name) + " (" + te(t.count) + ") ", 13, Yo))
808
- ]),
809
- _: 1
810
- }, 8, ["legendSet", "config"])) : T("", !0),
811
- k(o.$slots, "legend", { legend: pt.value }, void 0, !0)
812
- ], 512)
813
- ], 8, ["to"])) : T("", !0),
814
- o.$slots.source ? (i(), p("div", {
815
- key: 6,
816
- ref_key: "source",
817
- ref: Ve,
818
- dir: "auto"
819
- }, [
820
- k(o.$slots, "source", {}, void 0, !0)
821
- ], 512)) : T("", !0),
822
- xe(r(Ot), {
823
- show: E.value.showTooltip && _e.value,
824
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
825
- color: e.value.style.chart.tooltip.color,
826
- fontSize: e.value.style.chart.tooltip.fontSize,
827
- borderRadius: e.value.style.chart.tooltip.borderRadius,
828
- borderColor: e.value.style.chart.tooltip.borderColor,
829
- borderWidth: e.value.style.chart.tooltip.borderWidth,
830
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
831
- position: e.value.style.chart.tooltip.position,
832
- offsetY: e.value.style.chart.tooltip.offsetY,
833
- parent: M.value,
834
- content: Se.value,
835
- isCustom: ye.value,
836
- isFullscreen: U.value,
837
- smooth: e.value.style.chart.tooltip.smooth,
838
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
839
- smoothForce: e.value.style.chart.tooltip.smoothForce,
840
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
841
- }, {
842
- "tooltip-before": y(() => [
843
- k(o.$slots, "tooltip-before", Q(ee({ ...se.value })), void 0, !0)
844
- ]),
845
- "tooltip-after": y(() => [
846
- k(o.$slots, "tooltip-after", Q(ee({ ...se.value })), void 0, !0)
847
- ]),
848
- _: 3
849
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
850
- qe.value && e.value.userOptions.buttons.table ? (i(), q(to(re.value.component), oo({ key: 7 }, re.value.props, {
851
- ref_key: "tableUnit",
852
- ref: le,
853
- onClose: mt
854
- }), wt({
855
- content: y(() => [
856
- xe(r(Et), {
857
- colNames: Ce.value.colNames,
858
- head: Ce.value.head,
859
- body: Ce.value.body,
860
- config: Ce.value.config,
861
- title: e.value.table.useDialog ? "" : re.value.title,
862
- withCloseButton: !e.value.table.useDialog,
863
- onClose: mt
864
- }, {
865
- th: y(({ th: t }) => [
866
- Y("div", {
867
- innerHTML: t,
868
- style: { display: "flex", "align-items": "center" }
869
- }, null, 8, Go)
870
- ]),
871
- td: y(({ td: t }) => [
872
- $t(te(t.name || t), 1)
873
- ]),
874
- _: 1
875
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
876
- ]),
877
- _: 2
878
- }, [
879
- e.value.table.useDialog ? {
880
- name: "title",
881
- fn: y(() => [
882
- $t(te(re.value.title), 1)
883
- ]),
884
- key: "0"
885
- } : void 0,
886
- e.value.table.useDialog ? {
887
- name: "actions",
888
- fn: y(() => [
889
- Y("button", {
890
- tabindex: "0",
891
- class: "vue-ui-user-options-button",
892
- onClick: l[1] || (l[1] = (t) => Ie(e.value.userOptions.callbacks.csv))
893
- }, [
894
- xe(r(Nt), {
895
- name: "excel",
896
- stroke: re.value.props.color
897
- }, null, 8, ["stroke"])
898
- ])
899
- ]),
900
- key: "1"
901
- } : void 0
902
- ]), 1040)) : T("", !0),
903
- r(Ne) ? (i(), q(Co, { key: 8 })) : T("", !0)
904
- ], 46, So));
905
- }
906
- }, nl = /* @__PURE__ */ _o(Uo, [["__scopeId", "data-v-4bb3bdeb"]]);
907
- export {
908
- nl as default
909
- };