vue-data-ui 2.3.61 → 2.3.63
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.
- package/dist/{Arrow-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
import { computed as f, onMounted as Te, ref as k, openBlock as r, createElementBlock as v, normalizeClass as ne, normalizeStyle as w, createVNode as se, createCommentVNode as N, createBlock as G, unref as h, createSlots as Pe, withCtx as b, renderSlot as C, normalizeProps as ue, guardReactiveProps as re, createElementVNode as O, Fragment as T, renderList as P, toDisplayString as B, createTextVNode as Fe, nextTick as Ie } from "vue";
|
|
2
|
-
import { u as Le, o as He, e as Oe, c as ie, t as Ee, a as Me, p as A, b as Se, f as ce, X as ze, D as de, F as Ye, i as De, q as Ge, r as Be } from "./index-CwG--L4Z.js";
|
|
3
|
-
import { _ as Ae } from "./Title-BAQrVaNA.js";
|
|
4
|
-
import { u as Ue, U as Ve } from "./usePrinter-Do9tGYem.js";
|
|
5
|
-
import { D as je } from "./DataTable-NUzEZXWt.js";
|
|
6
|
-
import Xe from "./vue-ui-accordion-Be_wWB1T.js";
|
|
7
|
-
import We from "./vue-ui-skeleton-ClzVF3vm.js";
|
|
8
|
-
import { u as ve } from "./useNestedProp-BqwYEJGM.js";
|
|
9
|
-
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const Re = ["id"], Ze = ["xmlns", "viewBox"], Je = ["id"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["d", "fill", "stroke", "stroke-width"], tt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], lt = ["x", "y", "font-size", "fill"], ot = ["x", "y", "font-size", "fill"], at = {
|
|
11
|
-
key: 2,
|
|
12
|
-
class: "vue-data-ui-watermark"
|
|
13
|
-
}, nt = ["innerHTML"], st = {
|
|
14
|
-
__name: "vue-ui-flow",
|
|
15
|
-
props: {
|
|
16
|
-
config: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default() {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
dataset: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default() {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
setup(fe, { expose: he }) {
|
|
30
|
-
const m = fe, { vue_ui_flow: me } = Le(), E = f(() => !!m.dataset && m.dataset.length);
|
|
31
|
-
Te(() => {
|
|
32
|
-
He(m.dataset) && Oe({
|
|
33
|
-
componentName: "VueUiFlow",
|
|
34
|
-
type: "dataset"
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
const M = k(ie()), U = k(null), V = k(0), _ = k(!1);
|
|
38
|
-
function ge(l) {
|
|
39
|
-
_.value = l, V.value += 1;
|
|
40
|
-
}
|
|
41
|
-
const e = f(() => {
|
|
42
|
-
const l = ve({
|
|
43
|
-
userConfig: m.config,
|
|
44
|
-
defaultConfig: me
|
|
45
|
-
});
|
|
46
|
-
return l.theme ? {
|
|
47
|
-
...ve({
|
|
48
|
-
userConfig: Ee.vue_ui_flow[l.theme] || m.config,
|
|
49
|
-
defaultConfig: l
|
|
50
|
-
}),
|
|
51
|
-
customPalette: Me[l.theme] || A
|
|
52
|
-
} : l;
|
|
53
|
-
}), { isPrinting: j, isImaging: X, generatePdf: W, generateImage: q } = Ue({
|
|
54
|
-
elementId: `flow_${M.value}`,
|
|
55
|
-
fileName: e.value.style.chart.title.text || "vue-ui-flow"
|
|
56
|
-
}), S = f(() => Se(e.value.customPalette)), R = f(() => e.value.style.chart.nodes.gap), x = f(() => e.value.style.chart.nodes.width), F = k({
|
|
57
|
-
showTable: e.value.table.show
|
|
58
|
-
}), Z = f(() => e.value.style.chart.links.width), J = f(() => {
|
|
59
|
-
const l = {};
|
|
60
|
-
function o(n) {
|
|
61
|
-
l[n] || (l[n] = { inflow: 0, outflow: 0 });
|
|
62
|
-
}
|
|
63
|
-
m.dataset.forEach(([n, a, i]) => {
|
|
64
|
-
o(n), o(a), l[n].outflow += i, l[a].inflow += i;
|
|
65
|
-
});
|
|
66
|
-
let t = 0;
|
|
67
|
-
for (const n in l) {
|
|
68
|
-
const a = Math.max(l[n].inflow, l[n].outflow);
|
|
69
|
-
t = Math.max(t, a);
|
|
70
|
-
}
|
|
71
|
-
return t;
|
|
72
|
-
});
|
|
73
|
-
function pe(l) {
|
|
74
|
-
return l / J.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
75
|
-
}
|
|
76
|
-
function be(l) {
|
|
77
|
-
const o = e.value.style.chart.nodes.minHeight;
|
|
78
|
-
return (l - o) / 100 * J.value;
|
|
79
|
-
}
|
|
80
|
-
function ye(l) {
|
|
81
|
-
const o = {}, t = {};
|
|
82
|
-
function n(s, u) {
|
|
83
|
-
o[s] || (o[s] = { height: 0, level: null, inflow: 0, outflow: 0 }), o[s].level === null && (o[s].level = u), t[u] || (t[u] = []), t[u].includes(s) || t[u].push(s);
|
|
84
|
-
}
|
|
85
|
-
l.forEach(([s, u, c], $) => {
|
|
86
|
-
const y = o[s] ? o[s].level : 0, H = y + 1;
|
|
87
|
-
n(s, y), n(u, H), o[s].children || (o[s].children = []), o[s].children.push({ target: u, value: c }), o[s].outflow += c, o[u].inflow += c;
|
|
88
|
-
}), Object.keys(o).forEach((s, u) => {
|
|
89
|
-
o[s].color = S.value[u] || S.value[u % S.value.length] || A[u] || A[u % d.length];
|
|
90
|
-
});
|
|
91
|
-
for (const s in o)
|
|
92
|
-
o[s].height = pe(Math.max(o[s].inflow, o[s].outflow)), o[s].name = s;
|
|
93
|
-
const a = {};
|
|
94
|
-
for (const s in t) {
|
|
95
|
-
let u = 0;
|
|
96
|
-
t[s].forEach((c, $) => {
|
|
97
|
-
const y = o[c].height;
|
|
98
|
-
a[c] = {
|
|
99
|
-
x: parseInt(s, 10) * Z.value + e.value.style.chart.padding.left,
|
|
100
|
-
y: u,
|
|
101
|
-
absoluteY: u,
|
|
102
|
-
height: y,
|
|
103
|
-
i: $,
|
|
104
|
-
color: o[c].color,
|
|
105
|
-
value: be(y)
|
|
106
|
-
}, u += y + R.value;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
const i = [];
|
|
110
|
-
for (const s in o) {
|
|
111
|
-
let u = a[s].absoluteY;
|
|
112
|
-
o[s].children && o[s].children.forEach(({ target: c, value: $ }, y) => {
|
|
113
|
-
const H = a[c].y, Y = a[s], D = a[c], te = u, le = u + $ / o[s].outflow * Y.height, oe = H, ae = H + $ / o[c].inflow * D.height, Ne = {
|
|
114
|
-
id: ie(),
|
|
115
|
-
source: s,
|
|
116
|
-
target: c,
|
|
117
|
-
path: `M ${Y.x + x.value} ${te} L ${Y.x + x.value} ${le} L ${D.x} ${ae} L ${D.x} ${oe} Z`,
|
|
118
|
-
value: $,
|
|
119
|
-
sourceColor: o[s].color,
|
|
120
|
-
targetColor: o[c].color
|
|
121
|
-
};
|
|
122
|
-
i.push(Ne), u += le - te, a[c].y += ae - oe;
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
return { nodeCoordinates: a, links: i };
|
|
126
|
-
}
|
|
127
|
-
const g = f(() => {
|
|
128
|
-
const l = ye(m.dataset);
|
|
129
|
-
return {
|
|
130
|
-
nodes: Object.keys(l.nodeCoordinates).map((o, t) => ({
|
|
131
|
-
...l.nodeCoordinates[o],
|
|
132
|
-
name: o
|
|
133
|
-
})),
|
|
134
|
-
links: l.links
|
|
135
|
-
};
|
|
136
|
-
}), ke = f(() => we(g.value.nodes));
|
|
137
|
-
function we(l) {
|
|
138
|
-
const o = {};
|
|
139
|
-
for (const n in l) {
|
|
140
|
-
const { x: a, height: i } = l[n];
|
|
141
|
-
o[a] || (o[a] = 0), o[a] += i + R.value;
|
|
142
|
-
}
|
|
143
|
-
return Math.max(...Object.values(o));
|
|
144
|
-
}
|
|
145
|
-
const z = f(() => {
|
|
146
|
-
const { top: l, right: o, left: t, bottom: n } = e.value.style.chart.padding, a = m.dataset.length * Z.value;
|
|
147
|
-
return {
|
|
148
|
-
height: ke.value + l + n,
|
|
149
|
-
width: o + Math.max(...g.value.nodes.map((i) => i.x)) + x.value,
|
|
150
|
-
left: t,
|
|
151
|
-
top: l,
|
|
152
|
-
right: a - o,
|
|
153
|
-
p_top: l,
|
|
154
|
-
p_bottom: n
|
|
155
|
-
};
|
|
156
|
-
});
|
|
157
|
-
function Ce(l) {
|
|
158
|
-
const o = {}, t = {}, n = /* @__PURE__ */ new Set();
|
|
159
|
-
return m.dataset.forEach(([a, i, s]) => {
|
|
160
|
-
o[a] || (o[a] = []), t[i] || (t[i] = []), o[a].push(i), t[i].push(a);
|
|
161
|
-
}), o[l] && o[l].forEach((a) => n.add(a)), t[l] && t[l].forEach((a) => n.add(a)), Array.from(n).concat(l);
|
|
162
|
-
}
|
|
163
|
-
const p = k(null), I = k(null);
|
|
164
|
-
function xe(l) {
|
|
165
|
-
p.value = Ce(l.name), I.value = l.name;
|
|
166
|
-
}
|
|
167
|
-
function $e() {
|
|
168
|
-
p.value = null, I.value = null;
|
|
169
|
-
}
|
|
170
|
-
const K = f(() => g.value.links.map(({ source: l, target: o, sourceColor: t, targetColor: n, value: a }) => ({
|
|
171
|
-
source: l,
|
|
172
|
-
target: o,
|
|
173
|
-
sourceColor: t,
|
|
174
|
-
targetColor: n,
|
|
175
|
-
value: a
|
|
176
|
-
})));
|
|
177
|
-
function Q() {
|
|
178
|
-
Ie(() => {
|
|
179
|
-
const l = K.value.map((n, a) => [
|
|
180
|
-
[n.source],
|
|
181
|
-
[n.target],
|
|
182
|
-
[n.value]
|
|
183
|
-
]), o = [
|
|
184
|
-
[e.value.style.chart.title.text],
|
|
185
|
-
[e.value.style.chart.title.subtitle.text],
|
|
186
|
-
[
|
|
187
|
-
[e.value.table.columnNames.source],
|
|
188
|
-
[e.value.table.columnNames.target],
|
|
189
|
-
[e.value.table.columnNames.value]
|
|
190
|
-
]
|
|
191
|
-
].concat(l), t = Ge(o);
|
|
192
|
-
Be({
|
|
193
|
-
csvContent: t,
|
|
194
|
-
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
const L = f(() => {
|
|
199
|
-
const l = [
|
|
200
|
-
e.value.table.columnNames.source,
|
|
201
|
-
e.value.table.columnNames.target,
|
|
202
|
-
e.value.table.columnNames.value
|
|
203
|
-
], o = K.value.map((a, i) => [
|
|
204
|
-
{
|
|
205
|
-
color: a.sourceColor,
|
|
206
|
-
name: a.source
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
color: a.targetColor,
|
|
210
|
-
name: a.target
|
|
211
|
-
},
|
|
212
|
-
ce({
|
|
213
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
214
|
-
v: a.value,
|
|
215
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
216
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
217
|
-
})
|
|
218
|
-
]), t = {
|
|
219
|
-
th: {
|
|
220
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
221
|
-
color: e.value.table.th.color,
|
|
222
|
-
outline: e.value.table.th.outline
|
|
223
|
-
},
|
|
224
|
-
td: {
|
|
225
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
226
|
-
color: e.value.table.td.color,
|
|
227
|
-
outline: e.value.table.td.outline
|
|
228
|
-
},
|
|
229
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
230
|
-
};
|
|
231
|
-
return {
|
|
232
|
-
colNames: [
|
|
233
|
-
e.value.table.columnNames.source,
|
|
234
|
-
e.value.table.columnNames.target,
|
|
235
|
-
e.value.table.columnNames.value
|
|
236
|
-
],
|
|
237
|
-
head: l,
|
|
238
|
-
body: o,
|
|
239
|
-
config: t
|
|
240
|
-
};
|
|
241
|
-
});
|
|
242
|
-
function _e() {
|
|
243
|
-
return g.value;
|
|
244
|
-
}
|
|
245
|
-
function ee() {
|
|
246
|
-
F.value.showTable = !F.value.showTable;
|
|
247
|
-
}
|
|
248
|
-
return he({
|
|
249
|
-
getData: _e,
|
|
250
|
-
generateCsv: Q,
|
|
251
|
-
generateImage: q,
|
|
252
|
-
generatePdf: W,
|
|
253
|
-
toggleTable: ee
|
|
254
|
-
}), (l, o) => (r(), v("div", {
|
|
255
|
-
ref_key: "flowChart",
|
|
256
|
-
ref: U,
|
|
257
|
-
class: ne(`vue-ui-flow ${_.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
258
|
-
style: w(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
259
|
-
id: `flow_${M.value}`
|
|
260
|
-
}, [
|
|
261
|
-
e.value.style.chart.title.text ? (r(), v("div", {
|
|
262
|
-
key: 0,
|
|
263
|
-
style: w(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
264
|
-
}, [
|
|
265
|
-
se(Ae, {
|
|
266
|
-
config: {
|
|
267
|
-
title: {
|
|
268
|
-
cy: "flow-title",
|
|
269
|
-
...e.value.style.chart.title
|
|
270
|
-
},
|
|
271
|
-
subtitle: {
|
|
272
|
-
cy: "flow-subtitle",
|
|
273
|
-
...e.value.style.chart.title.subtitle
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}, null, 8, ["config"])
|
|
277
|
-
], 4)) : N("", !0),
|
|
278
|
-
e.value.userOptions.show && E.value ? (r(), G(Ve, {
|
|
279
|
-
ref: "details",
|
|
280
|
-
key: `user_option_${V.value}`,
|
|
281
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
282
|
-
color: e.value.style.chart.color,
|
|
283
|
-
isPrinting: h(j),
|
|
284
|
-
isImaging: h(X),
|
|
285
|
-
uid: M.value,
|
|
286
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
287
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
288
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
289
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
290
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
291
|
-
isFullscreen: _.value,
|
|
292
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
293
|
-
chartElement: U.value,
|
|
294
|
-
onToggleFullscreen: ge,
|
|
295
|
-
onGeneratePdf: h(W),
|
|
296
|
-
onGenerateCsv: Q,
|
|
297
|
-
onGenerateImage: h(q),
|
|
298
|
-
onToggleTable: ee
|
|
299
|
-
}, Pe({ _: 2 }, [
|
|
300
|
-
l.$slots.optionPdf ? {
|
|
301
|
-
name: "optionPdf",
|
|
302
|
-
fn: b(() => [
|
|
303
|
-
C(l.$slots, "optionPdf", {}, void 0, !0)
|
|
304
|
-
]),
|
|
305
|
-
key: "0"
|
|
306
|
-
} : void 0,
|
|
307
|
-
l.$slots.optionCsv ? {
|
|
308
|
-
name: "optionCsv",
|
|
309
|
-
fn: b(() => [
|
|
310
|
-
C(l.$slots, "optionCsv", {}, void 0, !0)
|
|
311
|
-
]),
|
|
312
|
-
key: "1"
|
|
313
|
-
} : void 0,
|
|
314
|
-
l.$slots.optionImg ? {
|
|
315
|
-
name: "optionImg",
|
|
316
|
-
fn: b(() => [
|
|
317
|
-
C(l.$slots, "optionImg", {}, void 0, !0)
|
|
318
|
-
]),
|
|
319
|
-
key: "2"
|
|
320
|
-
} : void 0,
|
|
321
|
-
l.$slots.optionTable ? {
|
|
322
|
-
name: "optionTable",
|
|
323
|
-
fn: b(() => [
|
|
324
|
-
C(l.$slots, "optionTable", {}, void 0, !0)
|
|
325
|
-
]),
|
|
326
|
-
key: "3"
|
|
327
|
-
} : void 0,
|
|
328
|
-
l.$slots.optionFullscreen ? {
|
|
329
|
-
name: "optionFullscreen",
|
|
330
|
-
fn: b(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
331
|
-
C(l.$slots, "optionFullscreen", ue(re({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
332
|
-
]),
|
|
333
|
-
key: "4"
|
|
334
|
-
} : void 0
|
|
335
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : N("", !0),
|
|
336
|
-
(r(), v("svg", {
|
|
337
|
-
xmlns: h(ze),
|
|
338
|
-
viewBox: `0 0 ${z.value.width} ${z.value.height}`,
|
|
339
|
-
class: ne({ "vue-data-ui-fullscreen--on": _.value, "vue-data-ui-fulscreen--off": !_.value }),
|
|
340
|
-
style: w(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
341
|
-
}, [
|
|
342
|
-
O("defs", null, [
|
|
343
|
-
(r(!0), v(T, null, P(g.value.links, (t, n) => (r(), v("linearGradient", {
|
|
344
|
-
id: t.id,
|
|
345
|
-
x1: "0%",
|
|
346
|
-
y1: "0%",
|
|
347
|
-
x2: "100%",
|
|
348
|
-
y2: "0%"
|
|
349
|
-
}, [
|
|
350
|
-
O("stop", {
|
|
351
|
-
offset: "0%",
|
|
352
|
-
"stop-color": t.sourceColor
|
|
353
|
-
}, null, 8, Ke),
|
|
354
|
-
O("stop", {
|
|
355
|
-
offset: "100%",
|
|
356
|
-
"stop-color": t.targetColor
|
|
357
|
-
}, null, 8, Qe)
|
|
358
|
-
], 8, Je))), 256))
|
|
359
|
-
]),
|
|
360
|
-
(r(!0), v(T, null, P(g.value.links, (t) => (r(), v("path", {
|
|
361
|
-
class: "vue-ui-flow-link",
|
|
362
|
-
d: t.path,
|
|
363
|
-
fill: `url(#${t.id})`,
|
|
364
|
-
stroke: e.value.style.chart.links.stroke,
|
|
365
|
-
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
366
|
-
style: w(`opacity:${I.value ? [t.target, t.source].includes(I.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
367
|
-
}, null, 12, et))), 256)),
|
|
368
|
-
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("rect", {
|
|
369
|
-
class: "vue-ui-flow-node",
|
|
370
|
-
x: t.x,
|
|
371
|
-
y: t.absoluteY,
|
|
372
|
-
height: t.height,
|
|
373
|
-
width: x.value,
|
|
374
|
-
fill: t.color,
|
|
375
|
-
stroke: e.value.style.chart.nodes.stroke,
|
|
376
|
-
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
377
|
-
onMouseenter: (a) => xe(t),
|
|
378
|
-
onMouseleave: o[0] || (o[0] = (a) => $e()),
|
|
379
|
-
style: w(`opacity:${p.value ? p.value.includes(t.name) ? 1 : 0.2 : 1}`)
|
|
380
|
-
}, null, 44, tt))), 256)),
|
|
381
|
-
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("text", {
|
|
382
|
-
x: t.x + x.value / 2,
|
|
383
|
-
y: t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4,
|
|
384
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
385
|
-
fill: h(de)(t.color),
|
|
386
|
-
"text-anchor": "middle",
|
|
387
|
-
style: w(`pointer-events: none; opacity:${p.value ? p.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
388
|
-
}, B(e.value.style.chart.nodes.labels.abbreviation.use ? h(Ye)({ source: t.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : t.name), 13, lt))), 256)),
|
|
389
|
-
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("text", {
|
|
390
|
-
x: t.x + x.value / 2,
|
|
391
|
-
y: t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize,
|
|
392
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
393
|
-
fill: h(de)(t.color),
|
|
394
|
-
"text-anchor": "middle",
|
|
395
|
-
style: w(`pointer-events: none; opacity:${p.value ? p.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
396
|
-
}, B(h(De)(
|
|
397
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
398
|
-
t.value,
|
|
399
|
-
h(ce)({
|
|
400
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
401
|
-
v: t.value,
|
|
402
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
403
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
404
|
-
}),
|
|
405
|
-
{ datapoint: t, seriesIndex: n }
|
|
406
|
-
)), 13, ot))), 256)),
|
|
407
|
-
C(l.$slots, "svg", { svg: z.value }, void 0, !0)
|
|
408
|
-
], 14, Ze)),
|
|
409
|
-
l.$slots.watermark ? (r(), v("div", at, [
|
|
410
|
-
C(l.$slots, "watermark", ue(re({ isPrinting: h(j) || h(X) })), void 0, !0)
|
|
411
|
-
])) : N("", !0),
|
|
412
|
-
E.value ? N("", !0) : (r(), G(We, {
|
|
413
|
-
key: 3,
|
|
414
|
-
config: {
|
|
415
|
-
type: "flow",
|
|
416
|
-
style: {
|
|
417
|
-
backgroundColor: e.value.style.chart.backgroundColor
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}, null, 8, ["config"])),
|
|
421
|
-
E.value ? (r(), G(Xe, {
|
|
422
|
-
key: 4,
|
|
423
|
-
hideDetails: "",
|
|
424
|
-
config: {
|
|
425
|
-
open: F.value.showTable,
|
|
426
|
-
maxHeight: 1e4,
|
|
427
|
-
body: {
|
|
428
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
429
|
-
color: e.value.style.chart.color
|
|
430
|
-
},
|
|
431
|
-
head: {
|
|
432
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
433
|
-
color: e.value.style.chart.color
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}, {
|
|
437
|
-
content: b(() => [
|
|
438
|
-
se(je, {
|
|
439
|
-
colNames: L.value.colNames,
|
|
440
|
-
head: L.value.head,
|
|
441
|
-
body: L.value.body,
|
|
442
|
-
config: L.value.config,
|
|
443
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
444
|
-
onClose: o[1] || (o[1] = (t) => F.value.showTable = !1)
|
|
445
|
-
}, {
|
|
446
|
-
th: b(({ th: t }) => [
|
|
447
|
-
O("div", {
|
|
448
|
-
innerHTML: t,
|
|
449
|
-
style: { display: "flex", "align-items": "center" }
|
|
450
|
-
}, null, 8, nt)
|
|
451
|
-
]),
|
|
452
|
-
td: b(({ td: t }) => [
|
|
453
|
-
Fe(B(t.name || t), 1)
|
|
454
|
-
]),
|
|
455
|
-
_: 1
|
|
456
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
}, 8, ["config"])) : N("", !0)
|
|
460
|
-
], 14, Re));
|
|
461
|
-
}
|
|
462
|
-
}, gt = /* @__PURE__ */ qe(st, [["__scopeId", "data-v-2f88276e"]]);
|
|
463
|
-
export {
|
|
464
|
-
gt as default
|
|
465
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-nPEJmXmf.cjs"),ue=require("./Title-B_p983os.cjs"),A=require("./usePrinter-D012Olnq.cjs"),ie=require("./DataTable-B6xCb-DR.cjs"),ce=require("./vue-ui-accordion-CHL4xuW4.cjs"),de=require("./vue-ui-skeleton-D6wHGzmu.cjs"),W=require("./useNestedProp-TbnnNrH2.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],pe=["stop-color"],ge=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce={key:2,class:"vue-data-ui-watermark"},xe=["innerHTML"],$e={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(X,{expose:R}){const f=X,{vue_ui_flow:Z}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function J(o){b.value=o,P.value+=1}const t=e.computed(()=>{const o=W.useNestedProp({userConfig:f.config,defaultConfig:Z});return o.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),{isPrinting:F,isImaging:L,generatePdf:z,generateImage:I}=A.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),O=e.computed(()=>t.value.style.chart.links.width),V=e.computed(()=>{const o={};function n(s){o[s]||(o[s]={inflow:0,outflow:0})}f.dataset.forEach(([s,a,c])=>{n(s),n(a),o[s].outflow+=c,o[a].inflow+=c});let l=0;for(const s in o){const a=Math.max(o[s].inflow,o[s].outflow);l=Math.max(l,a)}return l});function K(o){return o/V.value*100+t.value.style.chart.nodes.minHeight}function Q(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*V.value}function ee(o){const n={},l={};function s(r,u){n[r]||(n[r]={height:0,level:null,inflow:0,outflow:0}),n[r].level===null&&(n[r].level=u),l[u]||(l[u]=[]),l[u].includes(r)||l[u].push(r)}o.forEach(([r,u,v],y)=>{const p=n[r]?n[r].level:0,x=p+1;s(r,p),s(u,x),n[r].children||(n[r].children=[]),n[r].children.push({target:u,value:v}),n[r].outflow+=v,n[u].inflow+=v}),Object.keys(n).forEach((r,u)=>{n[r].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const r in n)n[r].height=K(Math.max(n[r].inflow,n[r].outflow)),n[r].name=r;const a={};for(const r in l){let u=0;l[r].forEach((v,y)=>{const p=n[v].height;a[v]={x:parseInt(r,10)*O.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:p,i:y,color:n[v].color,value:Q(p)},u+=p+H.value})}const c=[];for(const r in n){let u=a[r].absoluteY;n[r].children&&n[r].children.forEach(({target:v,value:y},p)=>{const x=a[v].y,E=a[r],S=a[v],q=u,G=u+y/n[r].outflow*E.height,U=x,j=x+y/n[v].inflow*S.height,re={id:i.createUid(),source:r,target:v,path:`M ${E.x+g.value} ${q} L ${E.x+g.value} ${G} L ${S.x} ${j} L ${S.x} ${U} Z`,value:y,sourceColor:n[r].color,targetColor:n[v].color};c.push(re),u+=G-q,a[v].y+=j-U})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=ee(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),te=e.computed(()=>le(h.value.nodes));function le(o){const n={};for(const s in o){const{x:a,height:c}=o[s];n[a]||(n[a]=0),n[a]+=c+H.value}return Math.max(...Object.values(n))}const _=e.computed(()=>{const{top:o,right:n,left:l,bottom:s}=t.value.style.chart.padding,a=f.dataset.length*O.value;return{height:te.value+o+s,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:s}});function oe(o){const n={},l={},s=new Set;return f.dataset.forEach(([a,c,r])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>s.add(a)),l[o]&&l[o].forEach(a=>s.add(a)),Array.from(s).concat(o)}const m=e.ref(null),w=e.ref(null);function ne(o){m.value=oe(o.name),w.value=o.name}function ae(){m.value=null,w.value=null}const M=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:s,value:a})=>({source:o,target:n,sourceColor:l,targetColor:s,value:a})));function D(){e.nextTick(()=>{const o=M.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=i.createCsvContent(n);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=M.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function se(){return h.value}function Y(){k.value.showTable=!k.value.showTable}return R({getData:se,generateCsv:D,generateImage:I,generatePdf:z,toggleTable:Y}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(L),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:J,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(I),onToggleTable:Y},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ge)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:n[0]||(n[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:s})),13,we))),256)),e.renderSlot(o.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Be=ve._export_sfc($e,[["__scopeId","data-v-2f88276e"]]);exports.default=Be;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-nPEJmXmf.cjs"),K=require("./Legend-ePmJ_YIA.cjs"),Q=require("./Title-B_p983os.cjs"),Z=require("./Tooltip-C2dhDgoh.cjs"),ee=require("./DataTable-B6xCb-DR.cjs"),D=require("./usePrinter-D012Olnq.cjs"),te=require("./vue-ui-skeleton-D6wHGzmu.cjs"),le=require("./vue-ui-accordion-CHL4xuW4.cjs"),q=require("./useNestedProp-TbnnNrH2.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["id"],ue=["stdDeviation"],ne=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he={key:3,class:"vue-data-ui-watermark"},pe=["onClick"],ye={key:0},fe={key:1},ge=["innerHTML"],me={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(G,{expose:M,emit:B}){const d=G,{vue_ui_galaxy:W}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const f=e.ref(r.createUid()),C=e.ref(null),U=e.ref(null),w=e.ref(!1),x=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=q.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:_,isImaging:P,generatePdf:L,generateImage:E}=D.usePrinter({elementId:`galaxy_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),n=e.ref([]);function N(l){n.value.includes(l.id)?n.value=n.value.filter(a=>a!==l.id):n.value.push(l.id),B("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,s)=>o+s,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!n.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),V=e.computed(()=>p.value.filter(l=>!n.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<V.value.length;a+=1){const o=V.value[a];let s=o.value/c.value*R.value;a>0&&l.length&&(s+=l[a-1].points),l.push({points:s,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:s,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!n.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const T=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:s=!1}){T.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=s,i.value=l.id;let u="";const y=t.value.style.chart.tooltip.customFormat;r.isFunction(y)&&r.functionReturnsString(()=>y({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=y({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${u}</div>`)}const F=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((s,u)=>s+u,0)).reduce((o,s)=>o+s,0),opacity:n.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:n.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=h.value.head.map((s,u)=>[[s.name],[h.value.body[u]],[isNaN(h.value.body[u]/c.value)?"-":h.value.body[u]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((u,y)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[y],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},J,isNaN(h.value.body[y]/c.value)?"-":r.dataLabel({v:h.value.body[y]/c.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function O(){v.value.showTable=!v.value.showTable}function z(){v.value.showTooltip=!v.value.showTooltip}return M({getData:H,generatePdf:L,generateCsv:I,generateImage:E,toggleTable:O,toggleTooltip:z}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:U,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(P),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(L),onGenerateCsv:I,onGenerateImage:e.unref(E),onToggleTable:O,onToggleTooltip:z},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ue)],8,se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${f.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,s)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>j({datapoint:o,relativeIndex:s,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=u=>{w.value=!1,i.value=null}),onClick:u=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:5,legendSet:F.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:u=>N(o),style:e.normalizeStyle(`opacity:${n.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:s}))+" ",1),n.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ye," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":e.unref(r.dataLabel)({v:o.value/c.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,pe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:F.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ge)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},be=oe._export_sfc(me,[["__scopeId","data-v-6f44b172"]]);exports.default=be;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-nPEJmXmf.cjs"),O=require("./useResponsive-B3TrDDIG.cjs"),X=require("./usePrinter-D012Olnq.cjs"),T=require("./vue-ui-skeleton-D6wHGzmu.cjs"),H=require("./Title-B_p983os.cjs"),Y=require("./useNestedProp-TbnnNrH2.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),J=["id"],K={key:0},Q=["xmlns","viewBox"],ee=["id"],te=["stop-color"],ae=["stop-color"],le=["stop-color"],oe=["id"],re=["stdDeviation"],ne=["d","fill","stroke"],ue=["d","filter"],se=["y","width","height","fill"],ie=["x","y","text-anchor","font-size","font-weight","fill"],ce=["x","y","font-size","font-weight","fill"],de={key:1},ve=["x1","y1","x2","y2","stroke","stroke-width"],he=["x1","y1","x2","y2","stroke","stroke-width"],fe=["x1","y1","x2","y2","stroke-width","filter"],me={key:2},ye=["d","fill","stroke","stroke-width"],pe=["cx","cy","fill","r","stroke-width","stroke"],ge=["x","y","font-size","fill"],ke={key:3,class:"vue-data-ui-watermark"},be={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(S,{expose:R}){const s=S,{vue_ui_gauge:D}=r.useConfig(),b=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length),h=e.ref(r.createUid()),G=e.ref(null),z=e.ref(0),_=e.ref(null),B=e.ref(null),N=e.ref(null),t=e.computed(()=>{const o=Y.useNestedProp({userConfig:s.config,defaultConfig:D});return o.theme?{...Y.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:E,isImaging:P,generatePdf:$,generateImage:M}=X.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=e.computed(()=>{if(!b.value||r.objectIsEmpty(s.dataset.series||{}))return{value:0,series:[{from:0,to:1}]};const o=[];(s.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...s.dataset,series:(s.dataset.series||[]).map((l,i)=>({...l,color:r.convertColorToHex(l.color)||j.value[i]||r.palette[i],value:((l.to||0)-(l.from||0))/n*100}))}}),v=e.ref(512),a=e.ref({height:358.4,width:v.value,top:0,bottom:358.4,centerX:179.2,centerY:v.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),g=e.ref(0),y=e.ref(0),d=e.ref(t.value.style.chart.animation.use?0:s.dataset.value);e.watch(()=>s.dataset.value,()=>{d.value=t.value.style.chart.animation.use?0:s.dataset.value,I()});const c=e.computed(()=>{const o=a.value.width/2,n=u.value.base,l=Math.PI*((d.value+0-y.value)/(g.value-y.value))+Math.PI;return{x1:o,y1:n,x2:o+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),V=e.computed(()=>{const o=a.value.width/2,n=u.value.base,l=Math.PI*((d.value+0-y.value)/(g.value-y.value))+Math.PI,i=o+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),C=n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),f=a.value.pointerRadius,w=o+f*Math.cos(l+Math.PI/2),q=n+f*Math.sin(l+Math.PI/2),U=o+f*Math.cos(l-Math.PI/2),W=n+f*Math.sin(l-Math.PI/2);return isNaN(i)?null:`M ${i},${C} ${w},${q} ${U},${W} Z`}),F=e.computed(()=>{for(let o=0;o<m.value.series.length;o+=1){const{color:n,from:l,to:i}=m.value.series[o];if(d.value>=l&&d.value<=i)return n}return"#2D353C"}),x=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(s.dataset,"series")&&(s.dataset.series.length?s.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),I(),t.value.responsive){const o=O.throttle(()=>{const{width:n,height:l}=O.useResponsive({chart:_.value,title:t.value.style.chart.title.text?B.value:null,legend:N.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=v.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/v.value*Math.min(l,n)<10?10:18/v.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/v.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/v.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/v.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/v.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:v.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:v.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});x.value=new ResizeObserver(o),x.value.observe(_.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function I(){const o=[];(m.value.series||[]).forEach(w=>{o.push(w.from||0),o.push(w.to||0)}),g.value=Math.max(...o),y.value=Math.min(...o);const n=String(g.value).length;let l=0,i=(n>2?.01:.001)*t.value.style.chart.animation.speed,C=(n>2?.05:.005)*t.value.style.chart.animation.acceleration;function f(){d.value+=i+l,l+=C,d.value<s.dataset.value?requestAnimationFrame(f):d.value=s.dataset.value}t.value.style.chart.animation.use&&(d.value=y.value,f())}const u=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),p=e.computed(()=>r.makeDonut({series:m.value.series},a.value.width/2,u.value.base,u.value.arcs,u.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),A=e.computed(()=>r.makeDonut({series:m.value.series},a.value.width/2,u.value.base,u.value.gradients,u.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),k=e.ref(!1);function L(o){k.value=o,z.value+=1}return R({generatePdf:$,generateImage:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:_,id:`vue-ui-gauge_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(H._sfc_main,{config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&S.dataset.base?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(S.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:G,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(P),isPrinting:e.unref(E),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,onToggleFullscreen:L,onGeneratePdf:e.unref($),onGenerateImage:e.unref(M)},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,te),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,ae),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,le)],8,ee)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,re)],8,oe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ne))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,ue))),128)),e.createElementVNode("rect",{x:0,y:u.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,se)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ie))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(g.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ce),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",de,[isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ve)),isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,he)),!isNaN(c.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,fe)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",me,[V.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:V.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,ye)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:u.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,pe),e.createElementVNode("text",{x:a.value.width/2,y:u.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.legend.formatter,d.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":""),v:d.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,ge),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,Q)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:4,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:N},[e.renderSlot(o.$slots,"legend",{legend:m.value},void 0,!0)],512)],14,J))}},_e=Z._export_sfc(be,[["__scopeId","data-v-938ebae3"]]);exports.default=_e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-nPEJmXmf.cjs"),oe=require("./Title-B_p983os.cjs"),Y=require("./usePrinter-D012Olnq.cjs"),se=require("./Tooltip-C2dhDgoh.cjs"),ue=require("./vue-ui-skeleton-D6wHGzmu.cjs"),ne=require("./BaseIcon-aPcCSO_Z.cjs"),re=require("./vue-ui-accordion-CHL4xuW4.cjs"),W=require("./useNestedProp-TbnnNrH2.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},fe=["font-size","fill","x","y","font-weight"],me={key:0},be=["text-anchor","font-size","fill","font-weight","transform"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Be=["stop-color"],Ne=["x","y","font-size","fill"],Le=["x","y","height","rx","fill"],$e=["x","y","font-size","fill"],Ve=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],Se={key:3},ze={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Ae=["stop-color"],Te=["stop-color"],Me=["x","y","width","height","rx"],Fe=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],Oe=["stroke","x1","x2","y1","y2"],De=["fill","d"],Ie={key:3,class:"vue-data-ui-watermark"},Re={class:"vue-ui-data-table"},qe={key:0},He=["data-cell"],Ue={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ge=["data-cell"],Xe={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},je={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:K}){const n=L;e.useCssVars(l=>({"601200a2":l.tdo}));const{vue_ui_heatmap:J}=u.useConfig(),$=e.computed(()=>!!n.dataset&&n.dataset.length);u.objectIsEmpty(n.dataset)&&u.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(u.createUid()),S=e.ref(null),Q=e.ref(null),z=e.ref(!1),A=e.ref(""),P=e.ref(void 0),w=e.ref(null),O=e.ref(0),D=e.ref(null),I=e.ref(!1),t=e.computed(()=>{const l=W.useNestedProp({userConfig:n.config,defaultConfig:J});let o={};return l.theme?o={...W.useNestedProp({userConfig:u.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:o=l,n.config&&u.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?o.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:o.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,o}),{isPrinting:R,isImaging:q,generatePdf:H,generateImage:U}=Y.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(o=>{o.forEach(s=>{I.value=s.contentRect.width<Z.value})}).observe(D.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),h=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,o=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<n.dataset.length?n.dataset.length:b.value)*t.value.style.layout.cells.height,s=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:s,width:o}}),V=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:h.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:h.value.height-t.value.style.layout.padding.bottom,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:h.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),T=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),x=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>{const l=n.dataset.flatMap(s=>s.values);return l.reduce((s,r)=>s+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/b.value,height:a.value.width/(b.value<n.dataset.length?n.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(s=>s.name),o=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:o.slice(0,b.value)}}),E=e.computed(()=>(n.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{u.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:o})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((o,s)=>o>=m.value?{side:"up",color:u.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,v.value,o),ratio:Math.abs(Math.abs(o-m.value)/Math.abs(v.value-m.value))>1?1:Math.abs(Math.abs(o-m.value)/Math.abs(v.value-m.value)),value:o,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${u.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(o)/Math.abs(m.value))>1?1:Math.abs(1-Math.abs(o)/Math.abs(m.value)),color:u.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,v.value,o),value:o,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${u.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function te(l,o,s,r){w.value={x:s,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ae}=l;P.value=ae,g.value=d,_.value={datapoint:l,seriesIndex:o,series:E.value,config:t.value},z.value=!0;let M="";const F=t.value.style.tooltip.customFormat;u.isFunction(F)&&u.functionReturnsString(()=>F({datapoint:l,seriesIndex:o,series:E.value,config:t.value}))?A.value=F({datapoint:l,seriesIndex:o,series:E.value,config:t.value}):(M+=`<div>${c} ${f?`${f}`:""}</div>`,M+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${u.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":u.applyDataLabel(t.value.style.layout.cells.value.formatter,d,u.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${M}</div>`)}const C=e.computed(()=>a.value.top+T.value*(1-g.value/v.value)),B=e.computed(()=>a.value.left+(h.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(s=>({name:s.name})),o=n.dataset.map(s=>s.values);return{head:l,body:o}});function G(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],o=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);o.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(o),r=u.createCsvContent(s);u.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const N=e.ref(!1);function le(l){N.value=l,O.value+=1}function X(){y.value.showTable=!y.value.showTable}function j(){y.value.showTooltip=!y.value.showTooltip}return K({generatePdf:H,generateCsv:G,generateImage:U,toggleTable:X,toggleTooltip:j}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(oe._sfc_main,{config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(q),isPrinting:e.unref(R),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:le,onGeneratePdf:e.unref(H),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:X,onToggleTooltip:j},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${h.value.width} ${h.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(s,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(u.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(u.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>te(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:o[0]||(o[0]=f=>{z.value=!1,P.value=void 0,g.value=null,w.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[r]),9,fe)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/p.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(s),9,be)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Be)],8,_e)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.layout.cells.value.formatter,v.value,e.unref(u.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:v.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ne),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:T.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,Le),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+T.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.layout.cells.value.formatter,x.value,e.unref(u.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:x.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,$e),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(u.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,Ve)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",ze,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Te)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:h.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Me),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(x.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Fe),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(v.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(u.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,Oe)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${a.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,De)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),$.value?(e.openBlock(),e.createBlock(re.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:D,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":I.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[1]||(o[1]=s=>y.value.showTable=!1),onKeypress:o[2]||(o[2]=e.withKeys(s=>y.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Re,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(s,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ue,e.toDisplayString(s),1)],12,He),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Xe,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(u.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ge))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Ye=ie._export_sfc(je,[["__scopeId","data-v-7aca40a7"]]);exports.default=Ye;
|