vue-data-ui 2.3.60 → 2.3.62
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-BJ47KXjY.js → Arrow-Dho8ylDy.js} +1 -1
- package/dist/{Arrow-VxZlHkwt.cjs → Arrow-ov-EIAPu.cjs} +1 -1
- package/dist/{BaseIcon-Bv5uh10R.cjs → BaseIcon-B6v-Txn-.cjs} +1 -1
- package/dist/{BaseIcon-Fm7sUbd2.js → BaseIcon-BNStcP8c.js} +1 -1
- package/dist/{DataTable-1VV0us-8.js → DataTable-luIjNnne.js} +2 -2
- package/dist/{DataTable-CPAt686N.cjs → DataTable-yf_eyv8c.cjs} +1 -1
- package/dist/{Legend-BJ2Mynop.cjs → Legend-6JY5pUsT.cjs} +1 -1
- package/dist/{Legend-DB6v_LvZ.js → Legend-B9dawQa7.js} +1 -1
- package/dist/{Shape-DWZSJJ6-.cjs → Shape-BoXM3HKY.cjs} +1 -1
- package/dist/{Shape-B_f1_6Ob.js → Shape-BsAETTif.js} +1 -1
- package/dist/Slicer-DoMAeSUY.cjs +1 -0
- package/dist/{Slicer-CHiUxRAh.js → Slicer-iGmqxtRQ.js} +51 -54
- package/dist/{Title-CR-JDJwq.cjs → Title-CBcoQe02.cjs} +1 -1
- package/dist/{Title-xP0rAF4q.js → Title-fb3BzoXj.js} +1 -1
- package/dist/{Tooltip-B4DNihSF.cjs → Tooltip-BhuD1Kc5.cjs} +1 -1
- package/dist/{Tooltip-DfBa_7Ur.js → Tooltip-CBugtvWB.js} +5 -5
- package/dist/{index-CpHoINpJ.js → index-BshV7sX1.js} +538 -515
- package/dist/{index-CDK3omwG.cjs → index-D2ZScauW.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BOjw3Yqn.js → useNestedProp-B235bkr5.js} +1 -1
- package/dist/{useNestedProp-CaaW8JIS.cjs → useNestedProp-BU7yyXFA.cjs} +1 -1
- package/dist/{usePrinter-BHy-mfVg.js → usePrinter-Culo-aKo.js} +1 -1
- package/dist/{usePrinter-vQu-8tRD.cjs → usePrinter-eqT4IYET.cjs} +1 -1
- package/dist/{vue-data-ui-Ccdrn4OV.cjs → vue-data-ui-B7ebF4_E.cjs} +1 -1
- package/dist/{vue-data-ui-Dcg7DPMn.js → vue-data-ui-aJ6K70wA.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-BqtnNU7h.js → vue-ui-3d-bar-BYgxIW27.js} +7 -7
- package/dist/{vue-ui-3d-bar-DdBlV5AX.cjs → vue-ui-3d-bar-DFv8qpsI.cjs} +1 -1
- package/dist/{vue-ui-accordion-BZloYo0L.js → vue-ui-accordion-B6AxEnAr.js} +3 -3
- package/dist/{vue-ui-accordion-EVAolVkD.cjs → vue-ui-accordion-BhCJcWDd.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BBRjCRtS.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CTxkOn4v.js → vue-ui-age-pyramid-yZrvdnPP.js} +226 -226
- package/dist/{vue-ui-annotator-D_AK0JCi.cjs → vue-ui-annotator-CEVmAufb.cjs} +1 -1
- package/dist/{vue-ui-annotator-BDWKiQ6S.js → vue-ui-annotator-ZKUlOqUq.js} +1 -1
- package/dist/{vue-ui-candlestick-CIKgu0F2.cjs → vue-ui-candlestick-CUNLZRIM.cjs} +2 -2
- package/dist/{vue-ui-candlestick-ByA9FGZb.js → vue-ui-candlestick-De4WgpPk.js} +158 -158
- package/dist/{vue-ui-carousel-table-ez9gbOZ7.cjs → vue-ui-carousel-table-C968uL6J.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnYxbq5A.js → vue-ui-carousel-table-DJ0AWPea.js} +4 -4
- package/dist/{vue-ui-chestnut-BumsSmCv.js → vue-ui-chestnut-Cl0UKWsI.js} +65 -64
- package/dist/{vue-ui-chestnut-CnYqa2Fx.cjs → vue-ui-chestnut-DmjmL02K.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-4-MMw7.js → vue-ui-cursor-BWyE3tgm.js} +2 -2
- package/dist/{vue-ui-cursor-Drl8jibt.cjs → vue-ui-cursor-D5XEblLW.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CX0jA181.cjs → vue-ui-dashboard-BJLi81kg.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_iV-3hq.js → vue-ui-dashboard-D9dQIIti.js} +2 -2
- package/dist/{vue-ui-digits-DMhl9plv.js → vue-ui-digits-DkYpomD9.js} +2 -2
- package/dist/{vue-ui-digits-RAZl_4Kb.cjs → vue-ui-digits-IIiSTczs.cjs} +1 -1
- package/dist/{vue-ui-donut-BG28U01c.cjs → vue-ui-donut-Bq66xmG0.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DPU-Nd8y.js → vue-ui-donut-evolution-Bto1ZaWx.js} +95 -95
- package/dist/vue-ui-donut-evolution-CNVUtEEk.cjs +1 -0
- package/dist/{vue-ui-donut-BpQC9-Uz.js → vue-ui-donut-uujhj36t.js} +42 -42
- package/dist/vue-ui-dumbbell-CLNVYG0j.cjs +9 -0
- package/dist/{vue-ui-dumbbell-C4JnuC1b.js → vue-ui-dumbbell-D6Xyfvff.js} +72 -72
- package/dist/vue-ui-flow-BwrqexSU.cjs +1 -0
- package/dist/vue-ui-flow-Cg4oKZz8.js +469 -0
- package/dist/{vue-ui-galaxy-148JtEdK.js → vue-ui-galaxy-D_s9dfYN.js} +91 -91
- package/dist/vue-ui-galaxy-DixlciaO.cjs +1 -0
- package/dist/{vue-ui-gauge-DOJ98R_N.js → vue-ui-gauge-DGQVW6UO.js} +84 -84
- package/dist/vue-ui-gauge-Jse5ZYyj.cjs +1 -0
- package/dist/{vue-ui-gizmo-KeWvd226.js → vue-ui-gizmo-DDTaLaSI.js} +2 -2
- package/dist/{vue-ui-gizmo-a6WNWyf7.cjs → vue-ui-gizmo-sgq75uBG.cjs} +1 -1
- package/dist/vue-ui-heatmap-4-gnNgQ_.cjs +1 -0
- package/dist/{vue-ui-heatmap-BGsSOTPJ.js → vue-ui-heatmap-Dvd5ZGVw.js} +257 -239
- package/dist/{vue-ui-kpi-Dhah6Fgx.cjs → vue-ui-kpi-Co1WqN3k.cjs} +1 -1
- package/dist/{vue-ui-kpi-Leb1rK38.js → vue-ui-kpi-aLwUkIjv.js} +3 -3
- package/dist/{vue-ui-mini-loader-BLH4ncUB.js → vue-ui-mini-loader-Bm2xpTIh.js} +2 -2
- package/dist/{vue-ui-mini-loader-Dpa9uYkn.cjs → vue-ui-mini-loader-D98KCpoT.cjs} +1 -1
- package/dist/{vue-ui-molecule-DjvOvDUa.cjs → vue-ui-molecule-C3-9ojnv.cjs} +1 -1
- package/dist/{vue-ui-molecule-DuPAOQcj.js → vue-ui-molecule-Dv4hYPVd.js} +20 -20
- package/dist/{vue-ui-mood-radar-AOHK6R10.cjs → vue-ui-mood-radar-Dh3Q2NiI.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BmcIz0JR.js → vue-ui-mood-radar-DsIPsXTh.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CMmcmAd9.cjs → vue-ui-nested-donuts-CFC8tyGY.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-BYLc86qs.js → vue-ui-nested-donuts-CZ9vcclX.js} +120 -120
- package/dist/{vue-ui-onion-BjG8xbMh.cjs → vue-ui-onion-BLV33CBr.cjs} +1 -1
- package/dist/{vue-ui-onion-shZ4g9mJ.js → vue-ui-onion-CI9ARfRM.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-O7lS6u2q.cjs → vue-ui-parallel-coordinate-plot-CIhpHeCI.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-wv0O9t7U.js → vue-ui-parallel-coordinate-plot-CxzFJuza.js} +69 -69
- package/dist/{vue-ui-quadrant-CuB8sYgF.cjs → vue-ui-quadrant-CS3LAiCu.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BRF5Czj4.js → vue-ui-quadrant-DenUcNcS.js} +36 -36
- package/dist/{vue-ui-quick-chart-BQdUHrm2.js → vue-ui-quick-chart-BdpKv0ES.js} +549 -515
- package/dist/vue-ui-quick-chart-UxaO0jzI.cjs +15 -0
- package/dist/vue-ui-radar-CQ-LymAS.cjs +1 -0
- package/dist/{vue-ui-radar-CLUs0tD9.js → vue-ui-radar-Dd24aGwh.js} +59 -59
- package/dist/{vue-ui-rating-Dcy1l1PB.js → vue-ui-rating-CQWK2lk1.js} +9 -9
- package/dist/{vue-ui-rating-CA25nHJe.cjs → vue-ui-rating-DTuDjrt8.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DC-RFa9X.js → vue-ui-relation-circle-BcOzK8Iz.js} +5 -5
- package/dist/{vue-ui-relation-circle-Drr6Gdnq.cjs → vue-ui-relation-circle-DMhNCwpg.cjs} +1 -1
- package/dist/vue-ui-rings--pu1fIcl.cjs +2 -0
- package/dist/{vue-ui-rings-DbPbelCU.js → vue-ui-rings-yyFx2W1b.js} +188 -185
- package/dist/{vue-ui-scatter-D2jYZ4Wu.js → vue-ui-scatter-BV4sXNqz.js} +378 -375
- package/dist/{vue-ui-scatter-xyLvaw0d.cjs → vue-ui-scatter-CrmsJjjl.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DXCBzrPZ.js → vue-ui-screenshot-C6wYv3cc.js} +6 -6
- package/dist/{vue-ui-screenshot-DGqjaE1x.cjs → vue-ui-screenshot-eoAWixSo.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DuM6yey6.js → vue-ui-skeleton-7qakoAGH.js} +23 -23
- package/dist/{vue-ui-skeleton-DRDC3yxK.cjs → vue-ui-skeleton-BLhbQje-.cjs} +1 -1
- package/dist/{vue-ui-smiley-DQrvx_S9.js → vue-ui-smiley-DG3_ORXA.js} +2 -2
- package/dist/{vue-ui-smiley-BCmY1siL.cjs → vue-ui-smiley-sS92V85O.cjs} +1 -1
- package/dist/vue-ui-spark-trend-C9Ii4Ue5.cjs +1 -0
- package/dist/vue-ui-spark-trend-D8_rEspZ.js +251 -0
- package/dist/{vue-ui-sparkbar-C_vNsxM_.cjs → vue-ui-sparkbar-CQz9GWxh.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DiU5Yt-V.js → vue-ui-sparkbar-DuNNnbs9.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BnF9Vbs0.js → vue-ui-sparkgauge-Buo2ms6b.js} +64 -64
- package/dist/vue-ui-sparkgauge-Dxsnkehz.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-BUBwn9A4.cjs → vue-ui-sparkhistogram-Cw-w_Rhv.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CsOfCo_3.js → vue-ui-sparkhistogram-edeeQ1HN.js} +4 -4
- package/dist/{vue-ui-sparkline-CoUeD8Np.cjs → vue-ui-sparkline-Cyddej9t.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B628G3Nl.js → vue-ui-sparkline-DGIqGoR2.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cr-Q7uDo.cjs → vue-ui-sparkstackbar-DN0XiDpQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DIHGbrF5.js → vue-ui-sparkstackbar-G7Ojd39B.js} +3 -3
- package/dist/{vue-ui-stackbar-DCbJhdZy.js → vue-ui-stackbar-CfK9lv_E.js} +35 -35
- package/dist/{vue-ui-stackbar-DMyP3IRK.cjs → vue-ui-stackbar-kiZ9J1eh.cjs} +1 -1
- package/dist/vue-ui-strip-plot-Bd4NwUia.cjs +1 -0
- package/dist/{vue-ui-strip-plot-CNb3VtYF.js → vue-ui-strip-plot-d-bNHZDG.js} +64 -64
- package/dist/{vue-ui-table-CjuXpy2d.cjs → vue-ui-table-ChORiy2h.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D6px_Z1a.cjs → vue-ui-table-heatmap-BcA1TmV1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-nbBDuSiw.js → vue-ui-table-heatmap-BcPqaYXz.js} +26 -26
- package/dist/{vue-ui-table-BqcI8E7E.js → vue-ui-table-ipCsGZPx.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Blbaz2zX.js → vue-ui-table-sparkline-BwwiWOX_.js} +13 -13
- package/dist/{vue-ui-table-sparkline-CqNPx5Zw.cjs → vue-ui-table-sparkline-dXyBTv6X.cjs} +1 -1
- package/dist/vue-ui-thermometer-DpWtOskJ.cjs +1 -0
- package/dist/{vue-ui-thermometer-BCGHbgj9.js → vue-ui-thermometer-U5IIot6j.js} +116 -116
- package/dist/{vue-ui-timer-BjqbxjQO.cjs → vue-ui-timer-DqVQjRdU.cjs} +1 -1
- package/dist/{vue-ui-timer-DhpBvc_5.js → vue-ui-timer-cCfNkOpe.js} +4 -4
- package/dist/{vue-ui-tiremarks-CNhB7Iqe.js → vue-ui-tiremarks-BcXrnO0N.js} +71 -71
- package/dist/vue-ui-tiremarks-C8pNPR_E.cjs +1 -0
- package/dist/vue-ui-treemap-24TuOX-H.cjs +1 -0
- package/dist/{vue-ui-treemap-C4memkYu.js → vue-ui-treemap-CVCaxcwW.js} +89 -82
- package/dist/{vue-ui-vertical-bar-LZ-GMZ2T.js → vue-ui-vertical-bar-Cuz2Qxi6.js} +246 -242
- package/dist/vue-ui-vertical-bar-kZxc3vG5.cjs +4 -0
- package/dist/{vue-ui-waffle-Cd4IU62n.js → vue-ui-waffle-BVFZf7mm.js} +44 -44
- package/dist/{vue-ui-waffle-CtY5CSX9.cjs → vue-ui-waffle-X-mNfs6F.cjs} +1 -1
- package/dist/{vue-ui-wheel-Do3pWPFB.cjs → vue-ui-wheel-CWOh-9CT.cjs} +1 -1
- package/dist/{vue-ui-wheel-CaEAQhJt.js → vue-ui-wheel-SUtbKs4l.js} +5 -5
- package/dist/vue-ui-word-cloud-BE_jkp2h.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BSalPYqO.js → vue-ui-word-cloud-DAa0far7.js} +68 -65
- package/dist/vue-ui-xy-BTocPMsA.cjs +3 -0
- package/dist/{vue-ui-xy-C7tpVpGu.js → vue-ui-xy-B_dmMYPU.js} +82 -82
- package/dist/vue-ui-xy-canvas-BtuD8xjy.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-rHcYmvec.js → vue-ui-xy-canvas-jq1j84oA.js} +122 -121
- package/package.json +1 -1
- package/dist/Slicer-PPS43jOo.cjs +0 -1
- package/dist/vue-ui-age-pyramid-Ce3DbeqC.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BWvrYKlH.cjs +0 -1
- package/dist/vue-ui-dumbbell-2Lsks-8o.cjs +0 -9
- package/dist/vue-ui-flow-DBhdVKxF.cjs +0 -1
- package/dist/vue-ui-flow-DSdWqWgh.js +0 -465
- package/dist/vue-ui-galaxy-BMsdd9Rh.cjs +0 -1
- package/dist/vue-ui-gauge-fVk9B_1W.cjs +0 -1
- package/dist/vue-ui-heatmap-DFpSo2gr.cjs +0 -1
- package/dist/vue-ui-quick-chart-DsVFRO68.cjs +0 -15
- package/dist/vue-ui-radar-lcS6n5TC.cjs +0 -1
- package/dist/vue-ui-rings-DxqSAs9h.cjs +0 -2
- package/dist/vue-ui-spark-trend-B9PR0wxN.js +0 -251
- package/dist/vue-ui-spark-trend-Kj1bJmBL.cjs +0 -1
- package/dist/vue-ui-sparkgauge-SlYA1lqc.cjs +0 -1
- package/dist/vue-ui-strip-plot-Da_TQpOq.cjs +0 -1
- package/dist/vue-ui-thermometer-coTC0T6k.cjs +0 -1
- package/dist/vue-ui-tiremarks-DgbTo_Cb.cjs +0 -1
- package/dist/vue-ui-treemap-B5moKzuO.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DtkGW5Tk.cjs +0 -4
- package/dist/vue-ui-word-cloud-pzaBe3Et.cjs +0 -1
- package/dist/vue-ui-xy-BgLF5ZNP.cjs +0 -3
- package/dist/vue-ui-xy-canvas-OuDGiOOW.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-CpHoINpJ.js";
|
|
3
|
-
import { _ as Ae } from "./Title-xP0rAF4q.js";
|
|
4
|
-
import { u as Ue, U as Ve } from "./usePrinter-BHy-mfVg.js";
|
|
5
|
-
import { D as je } from "./DataTable-1VV0us-8.js";
|
|
6
|
-
import Xe from "./vue-ui-accordion-BZloYo0L.js";
|
|
7
|
-
import We from "./vue-ui-skeleton-DuM6yey6.js";
|
|
8
|
-
import { u as ve } from "./useNestedProp-BOjw3Yqn.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"),r=require("./index-CDK3omwG.cjs"),K=require("./Legend-BJ2Mynop.cjs"),Q=require("./Title-CR-JDJwq.cjs"),Z=require("./Tooltip-B4DNihSF.cjs"),ee=require("./DataTable-CPAt686N.cjs"),D=require("./usePrinter-vQu-8tRD.cjs"),te=require("./vue-ui-skeleton-DRDC3yxK.cjs"),le=require("./vue-ui-accordion-EVAolVkD.cjs"),q=require("./useNestedProp-CaaW8JIS.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-CDK3omwG.cjs"),O=require("./useResponsive-B3TrDDIG.cjs"),X=require("./usePrinter-vQu-8tRD.cjs"),T=require("./vue-ui-skeleton-DRDC3yxK.cjs"),H=require("./Title-CR-JDJwq.cjs"),Y=require("./useNestedProp-CaaW8JIS.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-CDK3omwG.cjs"),oe=require("./Title-CR-JDJwq.cjs"),Y=require("./usePrinter-vQu-8tRD.cjs"),se=require("./Tooltip-B4DNihSF.cjs"),ue=require("./vue-ui-skeleton-DRDC3yxK.cjs"),ne=require("./BaseIcon-Bv5uh10R.cjs"),re=require("./vue-ui-accordion-EVAolVkD.cjs"),W=require("./useNestedProp-CaaW8JIS.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;
|