vue-data-ui 2.4.0 → 2.4.2
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/README.md +56 -54
- package/dist/{Arrow-CbntjQjr.cjs → Arrow-DLTRnzcG.cjs} +1 -1
- package/dist/{Arrow-NcE21Ngm.js → Arrow-JuK2z9IB.js} +1 -1
- package/dist/BaseIcon-BGExhz6v.cjs +1 -0
- package/dist/{BaseIcon-BUTpMnXi.js → BaseIcon-rRli6Sfv.js} +8 -4
- package/dist/{DataTable-BwH-MU-S.cjs → DataTable-DJzhv96s.cjs} +1 -1
- package/dist/{DataTable-DAgyf9zN.js → DataTable-DTk7C4Pr.js} +2 -2
- package/dist/{Legend-DBhpIX2x.js → Legend-CYF2gpXG.js} +23 -17
- package/dist/Legend-YZ7Hz3o1.cjs +1 -0
- package/dist/{PackageVersion-wB6dCDZw.js → PackageVersion-CvCRsT5_.js} +1 -1
- package/dist/{PackageVersion-Djty0wb2.cjs → PackageVersion-DVZtsuy4.cjs} +1 -1
- package/dist/PenAndPaper-CyXm-yVL.cjs +1 -0
- package/dist/PenAndPaper-Jb0pLt3G.js +269 -0
- package/dist/{Shape-CQVJz33T.js → Shape-BpPn4eWR.js} +1 -1
- package/dist/{Shape-DQ0Hh2Gg.cjs → Shape-X2F-QV_B.cjs} +1 -1
- package/dist/{Slicer-CiSmaE0_.cjs → Slicer-CL0tP5a5.cjs} +1 -1
- package/dist/{Slicer-DXw23eOC.js → Slicer-CU7dRZR0.js} +2 -2
- package/dist/{Title-DlVZnHjs.js → Title-5VmBwT4i.js} +21 -17
- package/dist/Title-Co5jI5ed.cjs +1 -0
- package/dist/{Tooltip-DBzXz806.cjs → Tooltip-Bl6W8Zn7.cjs} +1 -1
- package/dist/{Tooltip-CveCRFgK.js → Tooltip-Cj4EF7v1.js} +1 -1
- package/dist/documentation/installation.md +10 -9
- package/dist/{index-B0CpCD8z.js → index-DnVHQ2xI.js} +1138 -907
- package/dist/index-FfZRtJ6A.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +101 -20
- package/dist/types/vue-data-ui.d.ts +101 -20
- package/dist/{useNestedProp-DGWP4D-K.js → useNestedProp-Cox0K0Y5.js} +1 -1
- package/dist/{useNestedProp-iuDCMc2p.cjs → useNestedProp-q7byAAIJ.cjs} +1 -1
- package/dist/usePrinter-BCAFeO_J.cjs +1 -0
- package/dist/{usePrinter-Dr30K4cu.js → usePrinter-BEeNAqS5.js} +230 -185
- package/dist/vue-data-ui-CRLLZpt0.cjs +9 -0
- package/dist/vue-data-ui-W7nnqn0v.js +261 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +52 -51
- package/dist/{vue-ui-3d-bar-C3hYrYTV.js → vue-ui-3d-bar-BwBrUabe.js} +414 -390
- package/dist/vue-ui-3d-bar-bD_n6qL_.cjs +19 -0
- package/dist/{vue-ui-accordion-CmENcGVW.js → vue-ui-accordion-DspS4q3f.js} +3 -3
- package/dist/{vue-ui-accordion-Deyo7jw7.cjs → vue-ui-accordion-xXgqfR2l.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-C075Lvfe.js → vue-ui-age-pyramid-CxBvm3uM.js} +218 -194
- package/dist/{vue-ui-annotator-Bb6fUz4x.js → vue-ui-annotator-BOofWpzv.js} +1 -1
- package/dist/{vue-ui-annotator-DslXalSQ.cjs → vue-ui-annotator-C6T5_7ZV.cjs} +1 -1
- package/dist/vue-ui-bullet-ChaEgXvR.cjs +23 -0
- package/dist/vue-ui-bullet-DraC-oFu.js +433 -0
- package/dist/vue-ui-candlestick--hPCfMFH.cjs +2 -0
- package/dist/{vue-ui-candlestick-C4VEOmY_.js → vue-ui-candlestick-DQZ5eT1f.js} +267 -243
- package/dist/{vue-ui-carousel-table-Coq4gg_P.cjs → vue-ui-carousel-table-DpRQklDZ.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DZfMMpZ7.js → vue-ui-carousel-table-PdLjpH1p.js} +4 -4
- package/dist/{vue-ui-chestnut-CUnbj-Zb.js → vue-ui-chestnut-ByI_O5hB.js} +293 -269
- package/dist/vue-ui-chestnut-ae6x87wl.cjs +6 -0
- package/dist/{vue-ui-cursor-CtuPho-s.js → vue-ui-cursor-BM74l93B.js} +2 -2
- package/dist/{vue-ui-cursor-B9UvQwLp.cjs → vue-ui-cursor-BvadpA2m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-8gQ1bGCn.js → vue-ui-dashboard-CoANBhAM.js} +2 -2
- package/dist/{vue-ui-dashboard-KMTRqXzR.cjs → vue-ui-dashboard-OP51Gs8I.cjs} +1 -1
- package/dist/{vue-ui-digits-DSMNN4z_.cjs → vue-ui-digits-C7jJJg9k.cjs} +1 -1
- package/dist/{vue-ui-digits-DuEyX8op.js → vue-ui-digits-DioaBnkB.js} +2 -2
- package/dist/vue-ui-donut-CplNylps.cjs +1 -0
- package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DbojarYN.js → vue-ui-donut-evolution-DAb1xzNd.js} +330 -306
- package/dist/{vue-ui-donut-0xdYBc41.js → vue-ui-donut-ldqSm_JV.js} +345 -321
- package/dist/{vue-ui-dumbbell-BxhWjCvR.js → vue-ui-dumbbell-Dg7PkiKJ.js} +265 -241
- package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +9 -0
- package/dist/vue-ui-flow-BPt35d5K.cjs +1 -0
- package/dist/vue-ui-flow-DKT7ZEnr.js +508 -0
- package/dist/vue-ui-galaxy-e06PkTmp.cjs +1 -0
- package/dist/{vue-ui-galaxy-BddgLpP-.js → vue-ui-galaxy-qAA9be3S.js} +193 -169
- package/dist/vue-ui-gauge-D8yVTIgP.js +518 -0
- package/dist/vue-ui-gauge-DiZVIU0D.cjs +1 -0
- package/dist/{vue-ui-gizmo-hXBWaB0c.js → vue-ui-gizmo-DC0uUwI3.js} +3 -3
- package/dist/{vue-ui-gizmo-DRASsqlp.cjs → vue-ui-gizmo-W6bTkg59.cjs} +1 -1
- package/dist/vue-ui-heatmap-CbZcv_2I.cjs +1 -0
- package/dist/{vue-ui-heatmap-B43q8UHu.js → vue-ui-heatmap-u1raIzBQ.js} +252 -228
- package/dist/{vue-ui-kpi-_GVnhxEd.js → vue-ui-kpi-C-iTxMD2.js} +3 -3
- package/dist/{vue-ui-kpi-BiJnqtGR.cjs → vue-ui-kpi-DY_2WF7U.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DVZtFcHw.cjs → vue-ui-mini-loader-Bfq2MNWu.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-qvtu5jtI.js → vue-ui-mini-loader-C7x7S0hi.js} +2 -2
- package/dist/vue-ui-molecule-BFnOIxxs.js +798 -0
- package/dist/vue-ui-molecule-CbKMLrDT.cjs +1 -0
- package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +1 -0
- package/dist/{vue-ui-mood-radar-iZJ0B1Wf.js → vue-ui-mood-radar-CR1v5v2x.js} +263 -239
- package/dist/{vue-ui-nested-donuts-CovQfZ81.js → vue-ui-nested-donuts-DEiloQzq.js} +342 -318
- package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +17 -0
- package/dist/vue-ui-onion-CLvvu4Ku.cjs +5 -0
- package/dist/{vue-ui-onion-CJb2Pg0t.js → vue-ui-onion-LsEhBe4x.js} +226 -202
- package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CUA_fFC3.js → vue-ui-parallel-coordinate-plot-CTlIjJqG.js} +243 -219
- package/dist/{vue-ui-quadrant-IAIp5IZq.js → vue-ui-quadrant-DKVVFufb.js} +350 -326
- package/dist/vue-ui-quadrant-OM5J1mG3.cjs +1 -0
- package/dist/{vue-ui-quick-chart-Bb2RQ6qI.js → vue-ui-quick-chart-8vJikiGH.js} +505 -481
- package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +15 -0
- package/dist/{vue-ui-radar-mIQMBRHx.js → vue-ui-radar-20QhOUer.js} +255 -231
- package/dist/vue-ui-radar-CAaHjDO7.cjs +1 -0
- package/dist/{vue-ui-rating-BGRWSTGr.cjs → vue-ui-rating-Bbzm5nUK.cjs} +1 -1
- package/dist/{vue-ui-rating-DcJb7_bV.js → vue-ui-rating-DRWJsve1.js} +2 -2
- package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +1 -0
- package/dist/vue-ui-relation-circle-I45_Sk5l.js +349 -0
- package/dist/vue-ui-rings-B9WQ7S5m.cjs +2 -0
- package/dist/vue-ui-rings-DG8GCi3y.js +593 -0
- package/dist/vue-ui-scatter-BZfg1YIN.cjs +1 -0
- package/dist/{vue-ui-scatter-DiQJtMz1.js → vue-ui-scatter-Hqu5-F2H.js} +369 -345
- package/dist/{vue-ui-screenshot-BdnW3WFN.cjs → vue-ui-screenshot-D8nxd5RV.cjs} +1 -1
- package/dist/{vue-ui-screenshot-QRt5bT48.js → vue-ui-screenshot-cjiqbtLK.js} +1 -1
- package/dist/{vue-ui-skeleton-fqwO2mHD.cjs → vue-ui-skeleton-Djv08J67.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DEv_1TFa.js → vue-ui-skeleton-aZmkNzAe.js} +3 -3
- package/dist/{vue-ui-smiley-D-zRYR9g.cjs → vue-ui-smiley-B1TA19Hv.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAr3XuJG.js → vue-ui-smiley-ChNvxygm.js} +2 -2
- package/dist/{vue-ui-spark-trend-Br0GTMx_.cjs → vue-ui-spark-trend-BqrPr63O.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CS6jl2aN.js → vue-ui-spark-trend-CQxELQcf.js} +5 -5
- package/dist/{vue-ui-sparkbar-tgfbnVYO.js → vue-ui-sparkbar-0ixbKZzf.js} +4 -4
- package/dist/{vue-ui-sparkbar-N8aFbuJv.cjs → vue-ui-sparkbar-CrTEPTU5.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge--hgbxLQS.cjs → vue-ui-sparkgauge-BYxpe_WV.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CqH25hj7.js → vue-ui-sparkgauge-pdYb7OwH.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-vVRA6Z_l.cjs → vue-ui-sparkhistogram-D21XDUH2.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cry2PFGH.js → vue-ui-sparkhistogram-N69h2q0U.js} +5 -5
- package/dist/{vue-ui-sparkline-DXwqMlzQ.js → vue-ui-sparkline-2BKYZMOb.js} +4 -4
- package/dist/{vue-ui-sparkline-BZir7JxD.cjs → vue-ui-sparkline-Cf4m-Fxo.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Dc6tZvej.cjs → vue-ui-sparkstackbar-dAS8XoJs.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CQjpberv.js → vue-ui-sparkstackbar-sh03cuOU.js} +4 -4
- package/dist/vue-ui-stackbar-B1si-1RM.js +938 -0
- package/dist/vue-ui-stackbar-Dy_saeSe.cjs +6 -0
- package/dist/{vue-ui-strip-plot-C8dme7tS.js → vue-ui-strip-plot-BYn-QrTQ.js} +274 -250
- package/dist/vue-ui-strip-plot-D53LABpZ.cjs +1 -0
- package/dist/{vue-ui-table-DGmUNjR_.cjs → vue-ui-table-Ce4waJaj.cjs} +1 -1
- package/dist/{vue-ui-table-BvbXppa1.js → vue-ui-table-DQORPCDJ.js} +1 -1
- package/dist/{vue-ui-table-heatmap-ccoLJyce.js → vue-ui-table-heatmap-Csp7Tx8N.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Ch2UwsIw.cjs → vue-ui-table-heatmap-EqHt-O7Y.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DT5a8gHs.cjs → vue-ui-table-sparkline-DONmVOMh.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BZ8faxdR.js → vue-ui-table-sparkline-DdwVrfUj.js} +5 -5
- package/dist/vue-ui-thermometer-I6ZnlfAv.js +440 -0
- package/dist/vue-ui-thermometer-hQBkMa7u.cjs +1 -0
- package/dist/{vue-ui-timer-CNpKGbIg.cjs → vue-ui-timer-COOXcn14.cjs} +1 -1
- package/dist/{vue-ui-timer-DE_m5wxu.js → vue-ui-timer-pi1SazTU.js} +5 -5
- package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +1 -0
- package/dist/vue-ui-tiremarks-vdPQYiDp.js +303 -0
- package/dist/vue-ui-treemap-3FNUlKxL.js +816 -0
- package/dist/vue-ui-treemap-Cv0TSFQa.cjs +1 -0
- package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CVZI3v1Y.js → vue-ui-vertical-bar-DwxpB46q.js} +312 -288
- package/dist/vue-ui-waffle-CKM0QyJN.cjs +1 -0
- package/dist/vue-ui-waffle-XecHJIc-.js +782 -0
- package/dist/vue-ui-wheel-Bbih5sSL.js +282 -0
- package/dist/vue-ui-wheel-C0dJrzOJ.cjs +1 -0
- package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +1 -0
- package/dist/vue-ui-word-cloud-DnhXUn5x.js +598 -0
- package/dist/vue-ui-xy-BDpqVzAq.cjs +3 -0
- package/dist/{vue-ui-xy-D3TaTkPR.js → vue-ui-xy-CqlRuFMc.js} +775 -751
- package/dist/{vue-ui-xy-canvas-ClETpddw.js → vue-ui-xy-canvas-C8c2X5fk.js} +409 -385
- package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +9 -0
- package/package.json +1 -1
- package/dist/BaseIcon-7IlvRUX2.cjs +0 -1
- package/dist/Legend-CHQgjBuK.cjs +0 -1
- package/dist/Title-BHmTg9iK.cjs +0 -1
- package/dist/index-Dfhvf8hT.cjs +0 -9
- package/dist/usePrinter-BQQasUin.cjs +0 -1
- package/dist/vue-data-ui-BdSFeW_X.js +0 -256
- package/dist/vue-data-ui-BgVPGbxq.cjs +0 -9
- package/dist/vue-ui-3d-bar-DhHuwXZ1.cjs +0 -19
- package/dist/vue-ui-age-pyramid-DaenyRp2.cjs +0 -1
- package/dist/vue-ui-candlestick-CnVzd826.cjs +0 -2
- package/dist/vue-ui-chestnut-CLnJ0jmo.cjs +0 -6
- package/dist/vue-ui-donut-C4ek9m3R.cjs +0 -1
- package/dist/vue-ui-donut-evolution-B4TkwvNq.cjs +0 -1
- package/dist/vue-ui-dumbbell-Cn3spRSv.cjs +0 -9
- package/dist/vue-ui-flow-D00VdtGU.cjs +0 -1
- package/dist/vue-ui-flow-DreN8go4.js +0 -484
- package/dist/vue-ui-galaxy-DVN-S67V.cjs +0 -1
- package/dist/vue-ui-gauge-DYZYFzHP.cjs +0 -1
- package/dist/vue-ui-gauge-DoTctAHq.js +0 -494
- package/dist/vue-ui-heatmap-ldCySJFf.cjs +0 -1
- package/dist/vue-ui-molecule-DP9jhODZ.cjs +0 -1
- package/dist/vue-ui-molecule-Dpu7Xmu5.js +0 -774
- package/dist/vue-ui-mood-radar-BR0INhYL.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CwIsGnyH.cjs +0 -17
- package/dist/vue-ui-onion-DjEChSmi.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-B8Kl6AMk.cjs +0 -8
- package/dist/vue-ui-quadrant-CmdbW8yZ.cjs +0 -1
- package/dist/vue-ui-quick-chart-DcEk6Ho7.cjs +0 -15
- package/dist/vue-ui-radar-TjgO9_LA.cjs +0 -1
- package/dist/vue-ui-relation-circle-f0fKvSSw.js +0 -325
- package/dist/vue-ui-relation-circle-x4sKnxbi.cjs +0 -1
- package/dist/vue-ui-rings-B3mUyyQ9.cjs +0 -2
- package/dist/vue-ui-rings-M1PUv5Wu.js +0 -569
- package/dist/vue-ui-scatter-DF_nobsG.cjs +0 -1
- package/dist/vue-ui-stackbar-BF0M1KJf.js +0 -915
- package/dist/vue-ui-stackbar-BGmTwxvv.cjs +0 -6
- package/dist/vue-ui-strip-plot-DT9Od_To.cjs +0 -1
- package/dist/vue-ui-thermometer-BOs1_H4X.js +0 -416
- package/dist/vue-ui-thermometer-Biv2CIsy.cjs +0 -1
- package/dist/vue-ui-tiremarks-CTMS_E0z.js +0 -279
- package/dist/vue-ui-tiremarks-YU4wuZl3.cjs +0 -1
- package/dist/vue-ui-treemap-5Dm82baA.js +0 -792
- package/dist/vue-ui-treemap-C0E1_DGA.cjs +0 -1
- package/dist/vue-ui-vertical-bar-CVZHDENz.cjs +0 -4
- package/dist/vue-ui-waffle-Bf4epEaH.js +0 -758
- package/dist/vue-ui-waffle-DD09_Fdb.cjs +0 -1
- package/dist/vue-ui-wheel-BybAQ0bR.cjs +0 -1
- package/dist/vue-ui-wheel-DMvZZCzi.js +0 -258
- package/dist/vue-ui-word-cloud-B8hdGDYI.js +0 -574
- package/dist/vue-ui-word-cloud-MQ0kgdPw.cjs +0 -1
- package/dist/vue-ui-xy-B4C0WR56.cjs +0 -3
- package/dist/vue-ui-xy-canvas-qbn0PHMN.cjs +0 -9
|
@@ -1,484 +0,0 @@
|
|
|
1
|
-
import { computed as m, onMounted as He, ref as y, watch as Oe, openBlock as r, createElementBlock as h, normalizeClass as ce, normalizeStyle as _, createBlock as E, createCommentVNode as T, unref as i, createSlots as Ee, withCtx as k, renderSlot as C, normalizeProps as de, guardReactiveProps as ve, createVNode as fe, createElementVNode as S, Fragment as P, renderList as F, toDisplayString as U, createTextVNode as Se, nextTick as Me } from "vue";
|
|
2
|
-
import { u as ze, o as Ye, e as De, c as he, t as Ge, a as Be, p as V, b as Ae, v, f as me, X as Ue, F as ge, K as Ve, i as je, q as Xe, r as We } from "./index-B0CpCD8z.js";
|
|
3
|
-
import { _ as qe } from "./Title-DlVZnHjs.js";
|
|
4
|
-
import { u as Ke, U as Re } from "./usePrinter-Dr30K4cu.js";
|
|
5
|
-
import { D as Ze } from "./DataTable-DAgyf9zN.js";
|
|
6
|
-
import Je from "./vue-ui-accordion-CmENcGVW.js";
|
|
7
|
-
import Qe from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
8
|
-
import { u as pe } from "./useNestedProp-DGWP4D-K.js";
|
|
9
|
-
import { _ as et } from "./PackageVersion-wB6dCDZw.js";
|
|
10
|
-
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
const lt = ["id"], ot = {
|
|
12
|
-
key: 0,
|
|
13
|
-
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
14
|
-
}, at = ["xmlns", "viewBox"], nt = ["id"], st = ["stop-color"], ut = ["stop-color"], rt = ["d", "fill", "stroke", "stroke-width"], it = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], ct = ["x", "y", "font-size", "fill"], dt = ["x", "y", "font-size", "fill"], vt = {
|
|
15
|
-
key: 2,
|
|
16
|
-
class: "vue-data-ui-watermark"
|
|
17
|
-
}, ft = ["innerHTML"], ht = {
|
|
18
|
-
__name: "vue-ui-flow",
|
|
19
|
-
props: {
|
|
20
|
-
config: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default() {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
dataset: {
|
|
27
|
-
type: Array,
|
|
28
|
-
default() {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
setup(be, { expose: ye }) {
|
|
34
|
-
const g = be, { vue_ui_flow: ke } = ze(), M = m(() => !!g.dataset && g.dataset.length);
|
|
35
|
-
He(() => {
|
|
36
|
-
j();
|
|
37
|
-
});
|
|
38
|
-
function j() {
|
|
39
|
-
Ye(g.dataset) && De({
|
|
40
|
-
componentName: "VueUiFlow",
|
|
41
|
-
type: "dataset"
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const z = y(he()), X = y(null), W = y(0), q = y(0), N = y(!1);
|
|
45
|
-
function we(t) {
|
|
46
|
-
N.value = t, W.value += 1;
|
|
47
|
-
}
|
|
48
|
-
const e = m({
|
|
49
|
-
get: () => K(),
|
|
50
|
-
set: (t) => t
|
|
51
|
-
});
|
|
52
|
-
function K() {
|
|
53
|
-
const t = pe({
|
|
54
|
-
userConfig: g.config,
|
|
55
|
-
defaultConfig: ke
|
|
56
|
-
});
|
|
57
|
-
return t.theme ? {
|
|
58
|
-
...pe({
|
|
59
|
-
userConfig: Ge.vue_ui_flow[t.theme] || g.config,
|
|
60
|
-
defaultConfig: t
|
|
61
|
-
}),
|
|
62
|
-
customPalette: Be[t.theme] || V
|
|
63
|
-
} : t;
|
|
64
|
-
}
|
|
65
|
-
Oe(() => g.config, (t) => {
|
|
66
|
-
e.value = K(), j(), q.value += 1;
|
|
67
|
-
}, { deep: !0 });
|
|
68
|
-
const { isPrinting: R, isImaging: Z, generatePdf: J, generateImage: Q } = Ke({
|
|
69
|
-
elementId: `flow_${z.value}`,
|
|
70
|
-
fileName: e.value.style.chart.title.text || "vue-ui-flow"
|
|
71
|
-
}), Y = m(() => Ae(e.value.customPalette)), ee = m(() => e.value.style.chart.nodes.gap), x = m(() => e.value.style.chart.nodes.width), I = y({
|
|
72
|
-
showTable: e.value.table.show
|
|
73
|
-
}), te = m(() => e.value.style.chart.links.width), D = m(() => !g.dataset || !g.dataset.length ? [] : g.dataset.map((t) => [
|
|
74
|
-
t[0],
|
|
75
|
-
t[1],
|
|
76
|
-
v(t[2])
|
|
77
|
-
])), le = m(() => {
|
|
78
|
-
const t = {};
|
|
79
|
-
function o(n) {
|
|
80
|
-
t[n] || (t[n] = { inflow: 0, outflow: 0 });
|
|
81
|
-
}
|
|
82
|
-
D.value.forEach(([n, a, c]) => {
|
|
83
|
-
o(n), o(a), t[n].outflow += c, t[a].inflow += c;
|
|
84
|
-
});
|
|
85
|
-
let l = 0;
|
|
86
|
-
for (const n in t) {
|
|
87
|
-
const a = Math.max(t[n].inflow, t[n].outflow);
|
|
88
|
-
l = Math.max(l, a);
|
|
89
|
-
}
|
|
90
|
-
return l;
|
|
91
|
-
});
|
|
92
|
-
function Ce(t) {
|
|
93
|
-
return t / le.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
94
|
-
}
|
|
95
|
-
function xe(t) {
|
|
96
|
-
const o = e.value.style.chart.nodes.minHeight;
|
|
97
|
-
return (t - o) / 100 * le.value;
|
|
98
|
-
}
|
|
99
|
-
function $e(t) {
|
|
100
|
-
const o = {}, l = {};
|
|
101
|
-
function n(s, u) {
|
|
102
|
-
o[s] || (o[s] = { height: 0, level: null, inflow: 0, outflow: 0 }), o[s].level === null && (o[s].level = u), l[u] || (l[u] = []), l[u].includes(s) || l[u].push(s);
|
|
103
|
-
}
|
|
104
|
-
t.forEach(([s, u, f], $) => {
|
|
105
|
-
const w = o[s] ? o[s].level : 0, O = w + 1;
|
|
106
|
-
n(s, w), n(u, O), o[s].children || (o[s].children = []), o[s].children.push({ target: u, value: f }), o[s].outflow += f, o[u].inflow += f;
|
|
107
|
-
}), Object.keys(o).forEach((s, u) => {
|
|
108
|
-
o[s].color = Y.value[u] || Y.value[u % Y.value.length] || V[u] || V[u % d.length];
|
|
109
|
-
});
|
|
110
|
-
for (const s in o)
|
|
111
|
-
o[s].height = Ce(Math.max(o[s].inflow, o[s].outflow)), o[s].name = s;
|
|
112
|
-
const a = {};
|
|
113
|
-
for (const s in l) {
|
|
114
|
-
let u = 0;
|
|
115
|
-
l[s].forEach((f, $) => {
|
|
116
|
-
const w = o[f].height;
|
|
117
|
-
a[f] = {
|
|
118
|
-
x: parseInt(s, 10) * te.value + e.value.style.chart.padding.left,
|
|
119
|
-
y: u,
|
|
120
|
-
absoluteY: u,
|
|
121
|
-
height: w,
|
|
122
|
-
i: $,
|
|
123
|
-
color: o[f].color,
|
|
124
|
-
value: xe(w)
|
|
125
|
-
}, u += w + ee.value;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
const c = [];
|
|
129
|
-
for (const s in o) {
|
|
130
|
-
let u = a[s].absoluteY;
|
|
131
|
-
o[s].children && o[s].children.forEach(({ target: f, value: $ }, w) => {
|
|
132
|
-
const O = a[f].y, B = a[s], A = a[f], se = v(u), ue = v(u + $ / o[s].outflow * B.height), re = v(O), ie = v(O + $ / o[f].inflow * A.height), Le = {
|
|
133
|
-
id: he(),
|
|
134
|
-
source: s,
|
|
135
|
-
target: f,
|
|
136
|
-
path: `M ${v(B.x) + v(x.value)} ${se} L ${v(B.x) + v(x.value)} ${ue} L ${v(A.x)} ${ie} L ${v(A.x)} ${re} Z`,
|
|
137
|
-
value: $,
|
|
138
|
-
sourceColor: o[s].color,
|
|
139
|
-
targetColor: o[f].color
|
|
140
|
-
};
|
|
141
|
-
c.push(Le), u += ue - se, a[f].y += ie - re;
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return { nodeCoordinates: a, links: c };
|
|
145
|
-
}
|
|
146
|
-
const p = m(() => {
|
|
147
|
-
const t = $e(g.dataset);
|
|
148
|
-
return {
|
|
149
|
-
nodes: Object.keys(t.nodeCoordinates).map((o, l) => ({
|
|
150
|
-
...t.nodeCoordinates[o],
|
|
151
|
-
name: o
|
|
152
|
-
})),
|
|
153
|
-
links: t.links
|
|
154
|
-
};
|
|
155
|
-
}), _e = m(() => Ne(p.value.nodes));
|
|
156
|
-
function Ne(t) {
|
|
157
|
-
const o = {};
|
|
158
|
-
for (const n in t) {
|
|
159
|
-
const { x: a, height: c } = t[n];
|
|
160
|
-
o[a] || (o[a] = 0), o[a] += c + ee.value;
|
|
161
|
-
}
|
|
162
|
-
return Math.max(...Object.values(o));
|
|
163
|
-
}
|
|
164
|
-
const G = m(() => {
|
|
165
|
-
const { top: t, right: o, left: l, bottom: n } = e.value.style.chart.padding, a = D.value.length * te.value;
|
|
166
|
-
return {
|
|
167
|
-
height: _e.value + t + n,
|
|
168
|
-
width: o + Math.max(...p.value.nodes.map((c) => c.x)) + x.value,
|
|
169
|
-
left: l,
|
|
170
|
-
top: t,
|
|
171
|
-
right: a - o,
|
|
172
|
-
p_top: t,
|
|
173
|
-
p_bottom: n
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
function Te(t) {
|
|
177
|
-
const o = {}, l = {}, n = /* @__PURE__ */ new Set();
|
|
178
|
-
return D.value.forEach(([a, c, s]) => {
|
|
179
|
-
o[a] || (o[a] = []), l[c] || (l[c] = []), o[a].push(c), l[c].push(a);
|
|
180
|
-
}), o[t] && o[t].forEach((a) => n.add(a)), l[t] && l[t].forEach((a) => n.add(a)), Array.from(n).concat(t);
|
|
181
|
-
}
|
|
182
|
-
const b = y(null), L = y(null);
|
|
183
|
-
function Pe(t) {
|
|
184
|
-
b.value = Te(t.name), L.value = t.name;
|
|
185
|
-
}
|
|
186
|
-
function Fe() {
|
|
187
|
-
b.value = null, L.value = null;
|
|
188
|
-
}
|
|
189
|
-
const oe = m(() => p.value.links.map(({ source: t, target: o, sourceColor: l, targetColor: n, value: a }) => ({
|
|
190
|
-
source: t,
|
|
191
|
-
target: o,
|
|
192
|
-
sourceColor: l,
|
|
193
|
-
targetColor: n,
|
|
194
|
-
value: a
|
|
195
|
-
})));
|
|
196
|
-
function ae() {
|
|
197
|
-
Me(() => {
|
|
198
|
-
const t = oe.value.map((n, a) => [
|
|
199
|
-
[n.source],
|
|
200
|
-
[n.target],
|
|
201
|
-
[n.value]
|
|
202
|
-
]), o = [
|
|
203
|
-
[e.value.style.chart.title.text],
|
|
204
|
-
[e.value.style.chart.title.subtitle.text],
|
|
205
|
-
[
|
|
206
|
-
[e.value.table.columnNames.source],
|
|
207
|
-
[e.value.table.columnNames.target],
|
|
208
|
-
[e.value.table.columnNames.value]
|
|
209
|
-
]
|
|
210
|
-
].concat(t), l = Xe(o);
|
|
211
|
-
We({
|
|
212
|
-
csvContent: l,
|
|
213
|
-
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
const H = m(() => {
|
|
218
|
-
const t = [
|
|
219
|
-
e.value.table.columnNames.source,
|
|
220
|
-
e.value.table.columnNames.target,
|
|
221
|
-
e.value.table.columnNames.value
|
|
222
|
-
], o = oe.value.map((a, c) => [
|
|
223
|
-
{
|
|
224
|
-
color: a.sourceColor,
|
|
225
|
-
name: a.source
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
color: a.targetColor,
|
|
229
|
-
name: a.target
|
|
230
|
-
},
|
|
231
|
-
me({
|
|
232
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
233
|
-
v: a.value,
|
|
234
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
235
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
236
|
-
})
|
|
237
|
-
]), l = {
|
|
238
|
-
th: {
|
|
239
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
240
|
-
color: e.value.table.th.color,
|
|
241
|
-
outline: e.value.table.th.outline
|
|
242
|
-
},
|
|
243
|
-
td: {
|
|
244
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
245
|
-
color: e.value.table.td.color,
|
|
246
|
-
outline: e.value.table.td.outline
|
|
247
|
-
},
|
|
248
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
249
|
-
};
|
|
250
|
-
return {
|
|
251
|
-
colNames: [
|
|
252
|
-
e.value.table.columnNames.source,
|
|
253
|
-
e.value.table.columnNames.target,
|
|
254
|
-
e.value.table.columnNames.value
|
|
255
|
-
],
|
|
256
|
-
head: t,
|
|
257
|
-
body: o,
|
|
258
|
-
config: l
|
|
259
|
-
};
|
|
260
|
-
});
|
|
261
|
-
function Ie() {
|
|
262
|
-
return p.value;
|
|
263
|
-
}
|
|
264
|
-
function ne() {
|
|
265
|
-
I.value.showTable = !I.value.showTable;
|
|
266
|
-
}
|
|
267
|
-
return ye({
|
|
268
|
-
getData: Ie,
|
|
269
|
-
generateCsv: ae,
|
|
270
|
-
generateImage: Q,
|
|
271
|
-
generatePdf: J,
|
|
272
|
-
toggleTable: ne
|
|
273
|
-
}), (t, o) => (r(), h("div", {
|
|
274
|
-
ref_key: "flowChart",
|
|
275
|
-
ref: X,
|
|
276
|
-
class: ce(`vue-ui-flow ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
277
|
-
style: _(`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}`),
|
|
278
|
-
id: `flow_${z.value}`
|
|
279
|
-
}, [
|
|
280
|
-
e.value.style.chart.title.text ? (r(), h("div", ot, [
|
|
281
|
-
(r(), E(qe, {
|
|
282
|
-
key: `title_${q.value}`,
|
|
283
|
-
config: {
|
|
284
|
-
title: {
|
|
285
|
-
cy: "flow-title",
|
|
286
|
-
...e.value.style.chart.title
|
|
287
|
-
},
|
|
288
|
-
subtitle: {
|
|
289
|
-
cy: "flow-subtitle",
|
|
290
|
-
...e.value.style.chart.title.subtitle
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}, null, 8, ["config"]))
|
|
294
|
-
])) : T("", !0),
|
|
295
|
-
e.value.userOptions.show && M.value ? (r(), E(Re, {
|
|
296
|
-
ref: "details",
|
|
297
|
-
key: `user_option_${W.value}`,
|
|
298
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
299
|
-
color: e.value.style.chart.color,
|
|
300
|
-
isPrinting: i(R),
|
|
301
|
-
isImaging: i(Z),
|
|
302
|
-
uid: z.value,
|
|
303
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
304
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
305
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
306
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
307
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
308
|
-
isFullscreen: N.value,
|
|
309
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
310
|
-
chartElement: X.value,
|
|
311
|
-
position: e.value.userOptions.position,
|
|
312
|
-
onToggleFullscreen: we,
|
|
313
|
-
onGeneratePdf: i(J),
|
|
314
|
-
onGenerateCsv: ae,
|
|
315
|
-
onGenerateImage: i(Q),
|
|
316
|
-
onToggleTable: ne
|
|
317
|
-
}, Ee({ _: 2 }, [
|
|
318
|
-
t.$slots.optionPdf ? {
|
|
319
|
-
name: "optionPdf",
|
|
320
|
-
fn: k(() => [
|
|
321
|
-
C(t.$slots, "optionPdf", {}, void 0, !0)
|
|
322
|
-
]),
|
|
323
|
-
key: "0"
|
|
324
|
-
} : void 0,
|
|
325
|
-
t.$slots.optionCsv ? {
|
|
326
|
-
name: "optionCsv",
|
|
327
|
-
fn: k(() => [
|
|
328
|
-
C(t.$slots, "optionCsv", {}, void 0, !0)
|
|
329
|
-
]),
|
|
330
|
-
key: "1"
|
|
331
|
-
} : void 0,
|
|
332
|
-
t.$slots.optionImg ? {
|
|
333
|
-
name: "optionImg",
|
|
334
|
-
fn: k(() => [
|
|
335
|
-
C(t.$slots, "optionImg", {}, void 0, !0)
|
|
336
|
-
]),
|
|
337
|
-
key: "2"
|
|
338
|
-
} : void 0,
|
|
339
|
-
t.$slots.optionTable ? {
|
|
340
|
-
name: "optionTable",
|
|
341
|
-
fn: k(() => [
|
|
342
|
-
C(t.$slots, "optionTable", {}, void 0, !0)
|
|
343
|
-
]),
|
|
344
|
-
key: "3"
|
|
345
|
-
} : void 0,
|
|
346
|
-
t.$slots.optionFullscreen ? {
|
|
347
|
-
name: "optionFullscreen",
|
|
348
|
-
fn: k(({ toggleFullscreen: l, isFullscreen: n }) => [
|
|
349
|
-
C(t.$slots, "optionFullscreen", de(ve({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
|
|
350
|
-
]),
|
|
351
|
-
key: "4"
|
|
352
|
-
} : void 0
|
|
353
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : T("", !0),
|
|
354
|
-
(r(), h("svg", {
|
|
355
|
-
xmlns: i(Ue),
|
|
356
|
-
viewBox: `0 0 ${G.value.width} ${G.value.height}`,
|
|
357
|
-
class: ce({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
|
|
358
|
-
style: _(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
359
|
-
}, [
|
|
360
|
-
fe(et),
|
|
361
|
-
S("defs", null, [
|
|
362
|
-
(r(!0), h(P, null, F(p.value.links, (l, n) => (r(), h("linearGradient", {
|
|
363
|
-
id: l.id,
|
|
364
|
-
x1: "0%",
|
|
365
|
-
y1: "0%",
|
|
366
|
-
x2: "100%",
|
|
367
|
-
y2: "0%"
|
|
368
|
-
}, [
|
|
369
|
-
S("stop", {
|
|
370
|
-
offset: "0%",
|
|
371
|
-
"stop-color": l.sourceColor
|
|
372
|
-
}, null, 8, st),
|
|
373
|
-
S("stop", {
|
|
374
|
-
offset: "100%",
|
|
375
|
-
"stop-color": l.targetColor
|
|
376
|
-
}, null, 8, ut)
|
|
377
|
-
], 8, nt))), 256))
|
|
378
|
-
]),
|
|
379
|
-
(r(!0), h(P, null, F(p.value.links, (l) => (r(), h("path", {
|
|
380
|
-
class: "vue-ui-flow-link",
|
|
381
|
-
d: l.path,
|
|
382
|
-
fill: `url(#${l.id})`,
|
|
383
|
-
stroke: e.value.style.chart.links.stroke,
|
|
384
|
-
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
385
|
-
style: _(`opacity:${L.value ? [l.target, l.source].includes(L.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
386
|
-
}, null, 12, rt))), 256)),
|
|
387
|
-
(r(!0), h(P, null, F(p.value.nodes, (l, n) => (r(), h("rect", {
|
|
388
|
-
class: "vue-ui-flow-node",
|
|
389
|
-
x: l.x,
|
|
390
|
-
y: i(v)(l.absoluteY),
|
|
391
|
-
height: i(v)(l.height),
|
|
392
|
-
width: x.value,
|
|
393
|
-
fill: l.color,
|
|
394
|
-
stroke: e.value.style.chart.nodes.stroke,
|
|
395
|
-
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
396
|
-
onMouseenter: (a) => Pe(l),
|
|
397
|
-
onMouseleave: o[0] || (o[0] = (a) => Fe()),
|
|
398
|
-
style: _(`opacity:${b.value ? b.value.includes(l.name) ? 1 : 0.2 : 1}`)
|
|
399
|
-
}, null, 44, it))), 256)),
|
|
400
|
-
(r(!0), h(P, null, F(p.value.nodes, (l, n) => (r(), h("text", {
|
|
401
|
-
x: l.x + x.value / 2,
|
|
402
|
-
y: i(v)(l.absoluteY + l.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4),
|
|
403
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
404
|
-
fill: i(ge)(l.color),
|
|
405
|
-
"text-anchor": "middle",
|
|
406
|
-
style: _(`pointer-events: none; opacity:${b.value ? b.value.includes(l.name) ? 1 : 0 : 1}`)
|
|
407
|
-
}, U(e.value.style.chart.nodes.labels.abbreviation.use ? i(Ve)({ source: l.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : l.name), 13, ct))), 256)),
|
|
408
|
-
(r(!0), h(P, null, F(p.value.nodes, (l, n) => (r(), h("text", {
|
|
409
|
-
x: l.x + x.value / 2,
|
|
410
|
-
y: i(v)(l.absoluteY + l.height / 2 + e.value.style.chart.nodes.labels.fontSize),
|
|
411
|
-
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
412
|
-
fill: i(ge)(l.color),
|
|
413
|
-
"text-anchor": "middle",
|
|
414
|
-
style: _(`pointer-events: none; opacity:${b.value ? b.value.includes(l.name) ? 1 : 0 : 1}`)
|
|
415
|
-
}, U(i(je)(
|
|
416
|
-
e.value.style.chart.nodes.labels.formatter,
|
|
417
|
-
l.value,
|
|
418
|
-
i(me)({
|
|
419
|
-
p: e.value.style.chart.nodes.labels.prefix,
|
|
420
|
-
v: l.value,
|
|
421
|
-
s: e.value.style.chart.nodes.labels.suffix,
|
|
422
|
-
r: e.value.style.chart.nodes.labels.rounding
|
|
423
|
-
}),
|
|
424
|
-
{ datapoint: l, seriesIndex: n }
|
|
425
|
-
)), 13, dt))), 256)),
|
|
426
|
-
C(t.$slots, "svg", { svg: G.value }, void 0, !0)
|
|
427
|
-
], 14, at)),
|
|
428
|
-
t.$slots.watermark ? (r(), h("div", vt, [
|
|
429
|
-
C(t.$slots, "watermark", de(ve({ isPrinting: i(R) || i(Z) })), void 0, !0)
|
|
430
|
-
])) : T("", !0),
|
|
431
|
-
M.value ? T("", !0) : (r(), E(Qe, {
|
|
432
|
-
key: 3,
|
|
433
|
-
config: {
|
|
434
|
-
type: "flow",
|
|
435
|
-
style: {
|
|
436
|
-
backgroundColor: e.value.style.chart.backgroundColor
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}, null, 8, ["config"])),
|
|
440
|
-
M.value ? (r(), E(Je, {
|
|
441
|
-
key: 4,
|
|
442
|
-
hideDetails: "",
|
|
443
|
-
config: {
|
|
444
|
-
open: I.value.showTable,
|
|
445
|
-
maxHeight: 1e4,
|
|
446
|
-
body: {
|
|
447
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
448
|
-
color: e.value.style.chart.color
|
|
449
|
-
},
|
|
450
|
-
head: {
|
|
451
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
452
|
-
color: e.value.style.chart.color
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}, {
|
|
456
|
-
content: k(() => [
|
|
457
|
-
fe(Ze, {
|
|
458
|
-
colNames: H.value.colNames,
|
|
459
|
-
head: H.value.head,
|
|
460
|
-
body: H.value.body,
|
|
461
|
-
config: H.value.config,
|
|
462
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
463
|
-
onClose: o[1] || (o[1] = (l) => I.value.showTable = !1)
|
|
464
|
-
}, {
|
|
465
|
-
th: k(({ th: l }) => [
|
|
466
|
-
S("div", {
|
|
467
|
-
innerHTML: l,
|
|
468
|
-
style: { display: "flex", "align-items": "center" }
|
|
469
|
-
}, null, 8, ft)
|
|
470
|
-
]),
|
|
471
|
-
td: k(({ td: l }) => [
|
|
472
|
-
Se(U(l.name || l), 1)
|
|
473
|
-
]),
|
|
474
|
-
_: 1
|
|
475
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
476
|
-
]),
|
|
477
|
-
_: 1
|
|
478
|
-
}, 8, ["config"])) : T("", !0)
|
|
479
|
-
], 14, lt));
|
|
480
|
-
}
|
|
481
|
-
}, _t = /* @__PURE__ */ tt(ht, [["__scopeId", "data-v-53bf76e7"]]);
|
|
482
|
-
export {
|
|
483
|
-
_t as default
|
|
484
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dfhvf8hT.cjs"),le=require("./Legend-CHQgjBuK.cjs"),oe=require("./Title-BHmTg9iK.cjs"),ae=require("./Tooltip-DBzXz806.cjs"),re=require("./DataTable-BwH-MU-S.cjs"),W=require("./usePrinter-BQQasUin.cjs"),ne=require("./vue-ui-skeleton-fqwO2mHD.cjs"),se=require("./vue-ui-accordion-Deyo7jw7.cjs"),U=require("./useNestedProp-iuDCMc2p.cjs"),ue=require("./PackageVersion-Djty0wb2.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},ve=["xmlns","viewBox"],he=["id"],pe=["stdDeviation"],fe=["d","stroke","stroke-width"],ye=["d","stroke","stroke-width"],ge=["filter"],me=["d","stroke","stroke-width"],be=["d","stroke-width","onMouseenter","onClick"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},$e=["innerHTML"],Be={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),S=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:O,generateImage:z}=W.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=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}),u=e.ref([]);function B(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),T("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<D.value.length;a+=1){const o=D.value[a];let n=o.value/d.value*K.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function Q(l){m.value=l,S.value+=1}const _=e.ref(null);function Z({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){_.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<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>`,s+=`<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&&(s+=`<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?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${s}</div>`)}const q=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:u.value.includes(l.id)}))),ee=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 G(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/d.value)?"-":h.value.body[s]/d.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:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},te,isNaN(h.value.body[f]/d.value)?"-":r.dataLabel({v:h.value.body[f]/d.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 M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:O,generateCsv:G,generateImage:z,toggleTable:M,toggleTooltip:A}),(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_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,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"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.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,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(O),onGenerateCsv:G,onGenerateImage:e.unref(z),onToggleTable:M,onToggleTooltip:A},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ue._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.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,pe)],8,he)]),(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)*(c.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,fe)):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*(c.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(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ye)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.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*(c.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 ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,me)],8,ge)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(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:s=>Z({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{w.value=!1,c.value=null}),onClick:s=>T("selectDatapoint",o)},null,40,be)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.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(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>B(o),style:e.normalizeStyle(`opacity:${u.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:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(ae._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({..._.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"]),b.value?(e.openBlock(),e.createBlock(se.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.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,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,$e)]),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,ce))}},_e=ie._export_sfc(Be,[["__scopeId","data-v-20ef4a66"]]);exports.default=_e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Dfhvf8hT.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),R=require("./usePrinter-BQQasUin.cjs"),J=require("./vue-ui-skeleton-fqwO2mHD.cjs"),K=require("./Title-BHmTg9iK.cjs"),D=require("./useNestedProp-iuDCMc2p.cjs"),Q=require("./PackageVersion-Djty0wb2.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ae={key:0},le=["xmlns","viewBox"],re=["id"],oe=["stop-color"],ne=["stop-color"],se=["stop-color"],ue=["id"],ie=["stdDeviation"],ce=["d","fill","stroke"],de=["d","filter"],ve=["x","y","text-anchor","font-size","font-weight","fill"],he=["x","y","font-size","font-weight","fill"],fe={key:1},pe=["x1","y1","x2","y2","stroke","stroke-width"],me=["x1","y1","x2","y2","stroke","stroke-width"],ye=["x1","y1","x2","y2","stroke-width","filter"],ge={key:2},ke=["d","fill","stroke","stroke-width"],be=["cx","cy","fill","r","stroke-width","stroke"],_e=["x","y","font-size","fill"],xe={key:3,class:"vue-data-ui-watermark"},Se={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:G}){const s=w,{vue_ui_gauge:j}=o.useConfig(),k=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length>0&&s.dataset.series&&s.dataset.series.length),h=e.ref(o.createUid()),q=e.ref(null),C=e.ref(0),b=e.ref(null),z=e.ref(null),B=e.ref(null),N=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});e.watch(()=>s.config,l=>{t.value=P(),V(),N.value+=1},{deep:!0});function P(){const l=D.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...D.useNestedProp({userConfig:o.themes.vue_ui_gauge[l.theme]||s.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}const{isPrinting:E,isImaging:M,generatePdf:$,generateImage:I}=R.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),A=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!k.value||o.objectIsEmpty(s.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const l=[];(s.dataset.series||[]).forEach(r=>{l.push(r.from||0),l.push(r.to||0)});const n=Math.max(...l);return{...s.dataset,series:(s.dataset.series||[]).map((r,i)=>({...r,color:o.convertColorToHex(r.color)||A.value[i]||o.palette[i],value:((r.to||0)-(r.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}),_=e.ref(0),y=e.ref(0),c=e.ref(t.value.style.chart.animation.use?0:s.dataset.value);e.watch(()=>s.dataset.value,()=>{X(s.dataset.value)});const d=e.computed(()=>{const l=a.value.width/2,n=u.value.base,r=Math.PI*((c.value+0-y.value)/(_.value-y.value))+Math.PI;return{x1:l,y1:n,x2:l+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(r),y2:n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(r)}}),O=e.computed(()=>{const l=a.value.width/2,n=u.value.base,r=Math.PI*((c.value+0-y.value)/(_.value-y.value))+Math.PI,i=l+u.value.pointerSize*a.value.pointerSize*.9*Math.cos(r),S=n+u.value.pointerSize*a.value.pointerSize*.9*Math.sin(r),f=a.value.pointerRadius,W=l+f*Math.cos(r+Math.PI/2),T=n+f*Math.sin(r+Math.PI/2),H=l+f*Math.cos(r-Math.PI/2),Z=n+f*Math.sin(r-Math.PI/2);return isNaN(i)?null:`M ${i},${S} ${W},${T} ${H},${Z} Z`}),F=e.computed(()=>{for(let l=0;l<p.value.series.length;l+=1){const{color:n,from:r,to:i}=p.value.series[l];if(c.value>=r&&c.value<=i)return n}return"#2D353C"}),x=e.ref(null);function V(){if(o.objectIsEmpty(s.dataset)?o.error({componentName:"VueUiGauge",type:"dataset"}):(o.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","series"]}).forEach(l=>{o.error({componentName:"VueUiGauge",type:"datasetAttribute",property:l})}),Object.hasOwn(s.dataset,"series")&&(s.dataset.series.length?s.dataset.series.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["from","to"]}).forEach(r=>{o.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:r,index:n})})}):o.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),X(s.dataset.value||0),t.value.responsive){const l=Y.throttle(()=>{const{width:n,height:r}=Y.useResponsive({chart:b.value,title:t.value.style.chart.title.text?z.value:null,legend:B.value});a.value.width=n,a.value.height=r,a.value.centerX=n/2,a.value.centerY=v.value/2/358.4*r,a.value.bottom=r,a.value.labelFontSize=18/v.value*Math.min(r,n)<10?10:18/v.value*Math.min(r,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/v.value*Math.min(r,n)<14?14:t.value.style.chart.legend.fontSize/v.value*Math.min(r,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/v.value*Math.min(r,n),a.value.trackSize=t.value.style.chart.layout.track.size/v.value*Math.min(r,n),a.value.pointerStrokeWidth=o.translateSize({relator:Math.min(n,r),adjuster:v.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=o.translateSize({relator:Math.max(n,r),adjuster:v.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});x.value=new ResizeObserver(l),x.value.observe(b.value.parentNode)}}e.onMounted(()=>{V()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function X(l){const n=[];(p.value.series||[]).forEach(f=>{n.push(f.from||0),n.push(f.to||0)}),_.value=Math.max(...n),y.value=Math.min(...n);let r=t.value.style.chart.animation.speed;const i=Math.abs(l-c.value)/(r*60);function S(){c.value<l?c.value=Math.min(c.value+i,l):c.value>l&&(c.value=Math.max(c.value-i,l)),c.value!==l&&requestAnimationFrame(S)}S()}const u=e.computed(()=>{const l=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:l/2.5,gradients:l/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}}),m=e.computed(()=>o.makeDonut({series:p.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)),L=e.computed(()=>o.makeDonut({series:p.value.series},a.value.width/2,u.value.base,u.value.gradients,u.value.gradients,.95,1,1,180,110.02,2*a.value.trackSize)),g=e.ref(!1);function U(l){g.value=l,C.value+=1}return G({generatePdf:$,generateImage:I}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:b,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:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${N.value}`,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&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:q,key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(M),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:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,onToggleFullscreen:U,onGeneratePdf:e.unref($),onGenerateImage:e.unref(I)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Q._sfc_main),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":e.unref(o.setOpacity)("#FFFFFF",1)},null,8,oe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",1)},null,8,se)],8,re)]),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,ie)],8,ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:r.arcSlice,fill:r.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ce))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(L.value,(r,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:r.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,de))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(o.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:r.center.startX,initY:r.center.startY,offset:a.value.markerOffset}).x,y:e.unref(o.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:r.center.startX,initY:r.center.startY,offset:a.value.markerOffset}).y,"text-anchor":r.center.startX<a.value.width/2-5?"end":r.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(r.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ve))),256)),e.createElementVNode("text",{x:e.unref(o.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:m.value.at(-1).endX,initY:m.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(o.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:u.value.base,initX:m.value.at(-1).endX,initY:m.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(_.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,he),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",fe,[isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,pe)),isNaN(d.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.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,me)),!isNaN(d.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:d.value.x1,y1:d.value.y1,x2:d.value.x2,y2:d.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,ye)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",ge,[O.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:O.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,ke)):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,be),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(o.applyDataLabel)(t.value.style.chart.legend.formatter,c.value,e.unref(o.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&c.value>0?"+":""),v:c.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,_e),e.renderSlot(l.$slots,"svg",{svg:a.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(M)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.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:B},[e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0)],512)],14,te))}},we=ee._export_sfc(Se,[["__scopeId","data-v-2575317d"]]);exports.default=we;
|