vue-data-ui 3.25.7 → 3.25.9
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/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
- package/dist/{PackageVersion-UfoQuPMf.js → PackageVersion-KBMdaOXg.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-B-3S5q00.js → package-BL27Ev_h.js} +1 -1
- package/dist/{render-common-CAXK7ycr.js → render-common-By8J0AE-.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useConfig-CIQZ6_r7.js → useConfig-D32D002m.js} +2 -0
- package/dist/{useObjectBindings---mHNfbS.js → useObjectBindings-Cd_WuYIn.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DlWT702n.js → vue-data-ui-CBWuUAXT.js} +69 -69
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-DbOk2kpM.js → vue-ui-3d-bar-BSbq90H3.js} +3 -3
- package/dist/{vue-ui-accordion-BSmBUjwZ.js → vue-ui-accordion-DmkL8A59.js} +1 -1
- package/dist/{vue-ui-age-pyramid-C7_mGIRk.js → vue-ui-age-pyramid-CrXl71iC.js} +263 -251
- package/dist/{vue-ui-annotator-CTQHAPho.js → vue-ui-annotator-BO5ihHOB.js} +2 -2
- package/dist/{vue-ui-bullet-CDy_dkYz.js → vue-ui-bullet-B2Y3Wqh9.js} +3 -3
- package/dist/{vue-ui-bump-DP24leiD.js → vue-ui-bump-DXvvjG4I.js} +3 -3
- package/dist/{vue-ui-candlestick-kJLmYaR7.js → vue-ui-candlestick-CFqR6W56.js} +453 -441
- package/dist/{vue-ui-carousel-table-BQzAQDw6.js → vue-ui-carousel-table-D-ZkPRta.js} +2 -2
- package/dist/{vue-ui-chestnut-DnnRp3Kl.js → vue-ui-chestnut-CyW3IoYC.js} +3 -3
- package/dist/{vue-ui-chord-DO15ZDCS.js → vue-ui-chord-DS0jni9A.js} +3 -3
- package/dist/{vue-ui-circle-pack-DYTllMPV.js → vue-ui-circle-pack-j2ChgLWr.js} +494 -482
- package/dist/{vue-ui-cursor-CtViSjNp.js → vue-ui-cursor-qOONOtcv.js} +2 -2
- package/dist/{vue-ui-dag-NXtGYzqg.js → vue-ui-dag-CmeFsKhR.js} +3 -3
- package/dist/{vue-ui-dashboard-D3_4QohV.js → vue-ui-dashboard-C7Z5BTN4.js} +65 -65
- package/dist/{vue-ui-digits-CB09pLQx.js → vue-ui-digits-Bf68x6fb.js} +2 -2
- package/dist/{vue-ui-donut-yTE6D8yV.js → vue-ui-donut-CkBPJW_T.js} +837 -825
- package/dist/{vue-ui-donut-eysaEyTy.js → vue-ui-donut-DzDSYgVp.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DhrtxvAd.js → vue-ui-donut-evolution-CDJumo0t.js} +3 -3
- package/dist/{vue-ui-dumbbell-CmGIeULQ.js → vue-ui-dumbbell-Cr__26dN.js} +3 -3
- package/dist/vue-ui-flow-Cz6WRi2c.js +1229 -0
- package/dist/{vue-ui-funnel-CLAii4wi.js → vue-ui-funnel-BlC7KxS6.js} +2 -2
- package/dist/vue-ui-galaxy-Bg2smlcI.js +1097 -0
- package/dist/{vue-ui-gauge-D76-4Z_0.js → vue-ui-gauge-BHsaent1.js} +3 -3
- package/dist/{vue-ui-geo-BQ7-UnuG.js → vue-ui-geo-CE3Cr0or.js} +407 -395
- package/dist/{vue-ui-gizmo-C47zjcs-.js → vue-ui-gizmo-DqFUBEai.js} +3 -3
- package/dist/{vue-ui-heatmap-XJef60IZ.js → vue-ui-heatmap-DXqj9ial.js} +478 -446
- package/dist/{vue-ui-hill-D5BYGPXB.js → vue-ui-hill-B3fPAfhL.js} +2 -2
- package/dist/vue-ui-history-plot-CrnTnpaM.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-BgFHi6_7.js → vue-ui-horizontal-bar-DqvN3imH.js} +432 -420
- package/dist/{vue-ui-kpi-Cb8QJeaj.js → vue-ui-kpi-Mf318HvK.js} +2 -2
- package/dist/{vue-ui-label-ClMQ5Gez.js → vue-ui-label-C1UAzvAu.js} +1 -1
- package/dist/{vue-ui-mini-loader-DtPOVIkK.js → vue-ui-mini-loader-wGeACd-Y.js} +1 -1
- package/dist/{vue-ui-molecule-BzwMl-in.js → vue-ui-molecule-CaLReo4h.js} +346 -334
- package/dist/{vue-ui-mood-radar-BUR_YCcr.js → vue-ui-mood-radar-jkE2ENX5.js} +3 -3
- package/dist/{vue-ui-nested-donuts-BEB4nfsD.js → vue-ui-nested-donuts-BgMOKjil.js} +360 -348
- package/dist/vue-ui-onion-DBN3Ev4j.js +1247 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CSO4johj.js → vue-ui-parallel-coordinate-plot-BcJzEGJ-.js} +387 -375
- package/dist/{vue-ui-quadrant-CKav0I6g.js → vue-ui-quadrant-BvoVlxTI.js} +418 -406
- package/dist/{vue-ui-quick-chart-BAQNS9_2.js → vue-ui-quick-chart-2hn8-F_C.js} +550 -538
- package/dist/{vue-ui-radar-ClPAgf5I.js → vue-ui-radar-O3AjGrc-.js} +330 -318
- package/dist/{vue-ui-rating-CWFMoYpE.js → vue-ui-rating-Criq0ofQ.js} +1 -1
- package/dist/{vue-ui-relation-circle-Da2MhrVe.js → vue-ui-relation-circle-CRnH2ikm.js} +3 -3
- package/dist/{vue-ui-ridgeline-D7gFs8yR.js → vue-ui-ridgeline-Blejn8LY.js} +3 -3
- package/dist/{vue-ui-rings-DkDJ0k5b.js → vue-ui-rings-C1U38Bp0.js} +321 -309
- package/dist/{vue-ui-scatter-yv4JzJID.js → vue-ui-scatter-DTsCc9hg.js} +584 -572
- package/dist/{vue-ui-skeleton-oFnh5zWs.js → vue-ui-skeleton-BPr3u7IL.js} +2 -2
- package/dist/{vue-ui-smiley-DJVusLnp.js → vue-ui-smiley-BIjAIpJ9.js} +1 -1
- package/dist/{vue-ui-spark-trend-IqZWPvSB.js → vue-ui-spark-trend-B7w4Mg8O.js} +3 -3
- package/dist/{vue-ui-sparkbar-_FW47iYj.js → vue-ui-sparkbar-lVDnYEYA.js} +3 -3
- package/dist/{vue-ui-sparkgauge--2vk2Y23.js → vue-ui-sparkgauge-BryoGCoc.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CFEIPa5n.js → vue-ui-sparkhistogram-BdNoLb9L.js} +3 -3
- package/dist/{vue-ui-sparkline-Cs9CJR6W.js → vue-ui-sparkline-CNFD5K6z.js} +3 -3
- package/dist/vue-ui-sparkstackbar-CZ4tGL-_.js +750 -0
- package/dist/vue-ui-stackbar-DfsgaZy7.js +2369 -0
- package/dist/vue-ui-stackline-Cx7q2sGF.js +2483 -0
- package/dist/vue-ui-strip-plot-BcYhLPHM.js +1752 -0
- package/dist/{vue-ui-table-CiccGbRB.js → vue-ui-table-BzF75YjN.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DnP3pzh2.js → vue-ui-table-heatmap-BSUab4fG.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Bp7RiZh4.js → vue-ui-table-sparkline-B9ICTtoE.js} +2 -2
- package/dist/{vue-ui-thermometer-CawumQKP.js → vue-ui-thermometer-Am7llqdI.js} +3 -3
- package/dist/{vue-ui-timer-CXinMW7q.js → vue-ui-timer-D6EvkM31.js} +2 -2
- package/dist/{vue-ui-tiremarks-BnI2uhki.js → vue-ui-tiremarks-DiQJu8Em.js} +3 -3
- package/dist/{vue-ui-treemap-DTlFbfD6.js → vue-ui-treemap-wUZpijpr.js} +310 -298
- package/dist/vue-ui-waffle-6hO0flDT.js +1633 -0
- package/dist/{vue-ui-wheel-B02tiG0p.js → vue-ui-wheel-DnyCE0CK.js} +3 -3
- package/dist/{vue-ui-word-cloud-BZnCOMHx.js → vue-ui-word-cloud-D_MZ3gCS.js} +385 -372
- package/dist/{vue-ui-world-DO2VZ-T-.js → vue-ui-world-QNGY2WPz.js} +474 -462
- package/dist/{vue-ui-xy-CD6BiP_g.js → vue-ui-xy-BD-ighya.js} +2 -2
- package/dist/{vue-ui-xy-BC9GVdWE.js → vue-ui-xy-Ctcwn7Rk.js} +1447 -1432
- package/dist/{vue-ui-xy-canvas-DANPuyf4.js → vue-ui-xy-canvas-DUeglcdP.js} +523 -511
- package/package.json +1 -1
- package/dist/vue-ui-flow-qYAq3Rmn.js +0 -1217
- package/dist/vue-ui-galaxy-BVX-o2f-.js +0 -1085
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +0 -1698
- package/dist/vue-ui-onion-CG6myK7a.js +0 -1235
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +0 -738
- package/dist/vue-ui-stackbar-C5ANS2hd.js +0 -2355
- package/dist/vue-ui-stackline-7yajJFW4.js +0 -2469
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +0 -1740
- package/dist/vue-ui-waffle-CjgRkQAp.js +0 -1621
|
@@ -0,0 +1,1633 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Lt as i, Pt as a, S as o, Ut as s, Wt as ee, X as c, Yt as te, Z as ne, Zt as re, ht as ie, i as ae, lt as oe, n as se, nt as ce, q as le, r as ue, t as de, w as fe } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as he } from "./useConfig-D32D002m.js";
|
|
5
|
+
import { t as ge } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as _e, t as ve } from "./BaseScanner-Dzc8VT3j.js";
|
|
7
|
+
import { t as ye } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as be } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as xe } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as Se } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as Ce } from "./img-DhGApYG0.js";
|
|
12
|
+
import { n as we } from "./Title-CPHi-evi.js";
|
|
13
|
+
import { t as Te } from "./Shape-CIqU-p2F.js";
|
|
14
|
+
import { t as Ee } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { l as De, t as Oe } from "./useResponsive-ZtArZtUf.js";
|
|
16
|
+
import { t as ke } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as Ae } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
18
|
+
import { t as je } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as Me } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as Ne } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as Pe } from "./labelUtils-BXX2NzRe.js";
|
|
22
|
+
import { t as Fe } from "./Legend-X4kF4PvW.js";
|
|
23
|
+
import { t as Ie } from "./usePrefersMotion-BC-CsqR1.js";
|
|
24
|
+
import { t as Le } from "./vue_ui_waffle-DE_DiSVP.js";
|
|
25
|
+
import { Fragment as l, Teleport as Re, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ze, createTextVNode as Be, createVNode as Ve, defineAsyncComponent as He, guardReactiveProps as h, mergeProps as Ue, nextTick as We, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as Ge, onMounted as Ke, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as Ye, toRefs as Xe, unref as C, useSlots as Ze, watch as Qe, withCtx as w } from "vue";
|
|
26
|
+
//#region src/components/vue-ui-waffle.vue
|
|
27
|
+
var $e = /* @__PURE__ */ e({ default: () => Dt }), et = ["id"], tt = ["id"], nt = ["id"], rt = { style: { position: "relative" } }, it = [
|
|
28
|
+
"xmlns",
|
|
29
|
+
"aria-describedby",
|
|
30
|
+
"viewBox"
|
|
31
|
+
], at = ["id"], ot = [
|
|
32
|
+
"x",
|
|
33
|
+
"y",
|
|
34
|
+
"height",
|
|
35
|
+
"width"
|
|
36
|
+
], st = ["height", "width"], ct = { key: 0 }, lt = [
|
|
37
|
+
"d",
|
|
38
|
+
"stroke",
|
|
39
|
+
"stroke-width",
|
|
40
|
+
"filter"
|
|
41
|
+
], ut = [
|
|
42
|
+
"d",
|
|
43
|
+
"fill",
|
|
44
|
+
"stroke",
|
|
45
|
+
"stroke-width",
|
|
46
|
+
"filter"
|
|
47
|
+
], dt = { key: 0 }, ft = [
|
|
48
|
+
"d",
|
|
49
|
+
"fill",
|
|
50
|
+
"filter"
|
|
51
|
+
], pt = [
|
|
52
|
+
"rx",
|
|
53
|
+
"x",
|
|
54
|
+
"y",
|
|
55
|
+
"height",
|
|
56
|
+
"width",
|
|
57
|
+
"stroke",
|
|
58
|
+
"stroke-width",
|
|
59
|
+
"filter"
|
|
60
|
+
], mt = [
|
|
61
|
+
"rx",
|
|
62
|
+
"x",
|
|
63
|
+
"y",
|
|
64
|
+
"height",
|
|
65
|
+
"width",
|
|
66
|
+
"fill",
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width",
|
|
69
|
+
"filter"
|
|
70
|
+
], ht = { key: 0 }, gt = [
|
|
71
|
+
"rx",
|
|
72
|
+
"x",
|
|
73
|
+
"y",
|
|
74
|
+
"height",
|
|
75
|
+
"width",
|
|
76
|
+
"fill",
|
|
77
|
+
"filter"
|
|
78
|
+
], _t = [
|
|
79
|
+
"points",
|
|
80
|
+
"stroke",
|
|
81
|
+
"stroke-width",
|
|
82
|
+
"stroke-linejoin"
|
|
83
|
+
], vt = [
|
|
84
|
+
"textContent",
|
|
85
|
+
"x",
|
|
86
|
+
"y",
|
|
87
|
+
"font-size",
|
|
88
|
+
"fill",
|
|
89
|
+
"filter"
|
|
90
|
+
], yt = [
|
|
91
|
+
"d",
|
|
92
|
+
"onMouseover",
|
|
93
|
+
"onMouseleave",
|
|
94
|
+
"onClick"
|
|
95
|
+
], bt = [
|
|
96
|
+
"x",
|
|
97
|
+
"y",
|
|
98
|
+
"height",
|
|
99
|
+
"width",
|
|
100
|
+
"onMouseover",
|
|
101
|
+
"onMouseleave",
|
|
102
|
+
"onClick"
|
|
103
|
+
], xt = {
|
|
104
|
+
key: 0,
|
|
105
|
+
style: {
|
|
106
|
+
position: "absolute",
|
|
107
|
+
top: "100%",
|
|
108
|
+
left: "0",
|
|
109
|
+
width: "100%"
|
|
110
|
+
},
|
|
111
|
+
"data-dom-to-png-ignore": "",
|
|
112
|
+
"aria-hidden": "true"
|
|
113
|
+
}, St = {
|
|
114
|
+
key: 5,
|
|
115
|
+
class: "vue-data-ui-watermark"
|
|
116
|
+
}, Ct = ["id"], wt = ["onClick"], Tt = { key: 0 }, Et = { key: 1 }, Dt = /*#__PURE__*/ Ee({
|
|
117
|
+
__name: "vue-ui-waffle",
|
|
118
|
+
props: {
|
|
119
|
+
config: {
|
|
120
|
+
type: Object,
|
|
121
|
+
default() {
|
|
122
|
+
return {};
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
dataset: {
|
|
126
|
+
type: Array,
|
|
127
|
+
default() {
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
emits: ["selectLegend", "copyAlt"],
|
|
133
|
+
setup(e, { expose: Ee, emit: $e }) {
|
|
134
|
+
let Dt = He(() => import("./Tooltip-hhrkQ3Lk.js")), Ot = He(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), kt = He(() => import("./DataTable-oiM9uWrQ.js")), At = He(() => import("./vue-ui-accordion-DmkL8A59.js").then((e) => e.n)), jt = He(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Mt = He(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Nt = He(() => import("./PackageVersion-KBMdaOXg.js").then((e) => e.t)), Pt = He(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_waffle: Ft } = he(), { isThemeValid: It, warnInvalidTheme: Lt } = be(), Rt = Ie(), T = e, zt = Ze(), Bt = u({
|
|
135
|
+
get() {
|
|
136
|
+
return !!T.dataset && T.dataset.length;
|
|
137
|
+
},
|
|
138
|
+
set(e) {
|
|
139
|
+
return e;
|
|
140
|
+
}
|
|
141
|
+
}), E = b(le()), Vt = b(!1), Ht = b(""), D = b(null), Ut = b(0), O = b(null), Wt = b(null), Gt = b(null), Kt = b(null), qt = b(null), Jt = b(0), Yt = b(0), Xt = b(0), Zt = b(!1), Qt = b(null), $t = b(null), k = b(null), en = b({
|
|
142
|
+
x: 0,
|
|
143
|
+
y: 0
|
|
144
|
+
}), tn = b("pointer"), nn = b(!1), A = b(pn()), j = u(() => A.value.userOptions), M = u(() => A.value.style.chart.tooltip), N = u(() => A.value.style.chart.legend), P = u(() => A.value.style.chart.layout.rect), F = u(() => A.value.style.chart.layout.grid), I = u(() => A.value.style.chart.layout), L = u(() => A.value.style.chart), { transitionEnabled: R } = Se({
|
|
145
|
+
config: () => A.value.transitions,
|
|
146
|
+
dataset: () => T.dataset
|
|
147
|
+
});
|
|
148
|
+
pe({
|
|
149
|
+
config: () => A.value,
|
|
150
|
+
dataset: () => T.dataset,
|
|
151
|
+
component: "VueUiWaffle",
|
|
152
|
+
rules: [
|
|
153
|
+
me.singleSeries,
|
|
154
|
+
me.emptyArray,
|
|
155
|
+
{
|
|
156
|
+
test: (e) => e.length > 6,
|
|
157
|
+
message: [
|
|
158
|
+
"👀 The number of series is > 6. Consider:",
|
|
159
|
+
"",
|
|
160
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
161
|
+
"",
|
|
162
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
163
|
+
"",
|
|
164
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
let rn = u(() => A.value.userOptions.useCursorPointer), an = u(() => re({
|
|
170
|
+
defaultConfig: {
|
|
171
|
+
useCustomCells: !1,
|
|
172
|
+
userOptions: { show: !1 },
|
|
173
|
+
table: { show: !1 },
|
|
174
|
+
style: { chart: {
|
|
175
|
+
backgroundColor: "#99999930",
|
|
176
|
+
layout: {
|
|
177
|
+
labels: { captions: { show: !1 } },
|
|
178
|
+
rect: { stroke: "#999999" }
|
|
179
|
+
},
|
|
180
|
+
legend: {
|
|
181
|
+
backgroundColor: "transparent",
|
|
182
|
+
showValue: !1,
|
|
183
|
+
showPercentage: !1
|
|
184
|
+
}
|
|
185
|
+
} }
|
|
186
|
+
},
|
|
187
|
+
userConfig: A.value.skeletonConfig ?? {}
|
|
188
|
+
})), { loading: on, FINAL_DATASET: sn, manualLoading: cn } = _e({
|
|
189
|
+
...Xe(T),
|
|
190
|
+
FINAL_CONFIG: A,
|
|
191
|
+
prepareConfig: pn,
|
|
192
|
+
callback: () => {
|
|
193
|
+
Promise.resolve().then(async () => {
|
|
194
|
+
G.value = kn();
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
skeletonDataset: T.config?.skeletonDataset ?? [
|
|
198
|
+
{
|
|
199
|
+
name: "",
|
|
200
|
+
values: [1],
|
|
201
|
+
color: "#AAAAAA"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "",
|
|
205
|
+
values: [1],
|
|
206
|
+
color: "#BABABA"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "",
|
|
210
|
+
values: [1],
|
|
211
|
+
color: "#CACACA"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
skeletonConfig: re({
|
|
215
|
+
defaultConfig: A.value,
|
|
216
|
+
userConfig: an.value
|
|
217
|
+
})
|
|
218
|
+
}), { userOptionsVisible: ln, setUserOptionsVisibility: un, keepUserOptionState: dn } = Me({ config: A.value }), { svgRef: fn } = Ne({ config: L.value.title });
|
|
219
|
+
function pn() {
|
|
220
|
+
let e = ye({
|
|
221
|
+
userConfig: T.config,
|
|
222
|
+
defaultConfig: Ft
|
|
223
|
+
}), t = e.theme;
|
|
224
|
+
if (!t) return e;
|
|
225
|
+
if (!It.value(e)) return Lt(e), e;
|
|
226
|
+
let n = ye({
|
|
227
|
+
userConfig: Le[t] || T.config,
|
|
228
|
+
defaultConfig: e
|
|
229
|
+
}), r = ye({
|
|
230
|
+
userConfig: T.config,
|
|
231
|
+
defaultConfig: n
|
|
232
|
+
});
|
|
233
|
+
return {
|
|
234
|
+
...r,
|
|
235
|
+
customPalette: r.customPalette.length ? r.customPalette : te[t] || i
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function mn(e) {
|
|
239
|
+
let t = ne(e);
|
|
240
|
+
return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
|
|
241
|
+
}
|
|
242
|
+
let hn = mn(T.config);
|
|
243
|
+
Qe(() => T.config, (e, t) => {
|
|
244
|
+
let n = mn(e), r = n !== hn;
|
|
245
|
+
hn = n;
|
|
246
|
+
let i = pn();
|
|
247
|
+
if (!r) {
|
|
248
|
+
A.value.style.chart.tooltip = i.style.chart.tooltip, B.value.showTooltip = A.value.style.chart.tooltip.show;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
on.value || (A.value = i), ln.value = !A.value.userOptions.showOnChartHover, vn(), Jt.value += 1, Yt.value += 1, Xt.value += 1, B.value.showTable = A.value.table.show, B.value.showTooltip = M.value.show;
|
|
252
|
+
}, { deep: !0 });
|
|
253
|
+
let z = Je(null), gn = Je(null), _n = u(() => A.value.debug);
|
|
254
|
+
function vn() {
|
|
255
|
+
if (a(T.dataset) ? (ce({
|
|
256
|
+
componentName: "VueUiWaffle",
|
|
257
|
+
type: "dataset",
|
|
258
|
+
debug: _n.value
|
|
259
|
+
}), Bt.value = !1, cn.value = !0) : _n.value && T.dataset.forEach((e, t) => {
|
|
260
|
+
ie({
|
|
261
|
+
datasetObject: e,
|
|
262
|
+
requiredAttributes: ["name", "values"]
|
|
263
|
+
}).forEach((e) => {
|
|
264
|
+
ce({
|
|
265
|
+
componentName: "VueUiWaffle",
|
|
266
|
+
type: "datasetSerieAttribute",
|
|
267
|
+
property: e,
|
|
268
|
+
index: t
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}), a(T.dataset) || (cn.value = A.value.loading), A.value.responsive) {
|
|
272
|
+
let e = De(() => {
|
|
273
|
+
let { width: e, height: t } = Oe({
|
|
274
|
+
chart: O.value,
|
|
275
|
+
title: L.value.title.text ? Wt.value : null,
|
|
276
|
+
legend: N.value.show ? Gt.value : null,
|
|
277
|
+
source: Kt.value,
|
|
278
|
+
noTitle: qt.value
|
|
279
|
+
});
|
|
280
|
+
requestAnimationFrame(() => {
|
|
281
|
+
V.value.width = e, V.value.height = t, H.value.width = e, H.value.height = t;
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
z.value && (gn.value && z.value.unobserve(gn.value), z.value.disconnect()), z.value = new ResizeObserver(e), gn.value = O.value.parentNode, z.value.observe(gn.value);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
Ke(() => {
|
|
288
|
+
Zt.value = !0, vn();
|
|
289
|
+
}), Ge(() => {
|
|
290
|
+
z.value && (gn.value && z.value.unobserve(gn.value), z.value.disconnect());
|
|
291
|
+
});
|
|
292
|
+
let { isPrinting: yn, isImaging: bn, generatePdf: xn, generateImage: Sn } = ge({
|
|
293
|
+
elementId: `vue-ui-waffle_${E.value}`,
|
|
294
|
+
fileName: L.value.title.text || "vue-ui-waffle",
|
|
295
|
+
options: A.value.userOptions.print
|
|
296
|
+
}), Cn = u(() => A.value.userOptions.show && !L.value.title.text), wn = u(() => fe(A.value.customPalette)), B = b({
|
|
297
|
+
showTable: A.value.table.show,
|
|
298
|
+
showTooltip: M.value.show
|
|
299
|
+
});
|
|
300
|
+
Qe(A, () => {
|
|
301
|
+
B.value = {
|
|
302
|
+
showTable: A.value.table.show,
|
|
303
|
+
showTooltip: M.value.show
|
|
304
|
+
};
|
|
305
|
+
}, { immediate: !0 });
|
|
306
|
+
let V = b({
|
|
307
|
+
height: 512,
|
|
308
|
+
width: 512
|
|
309
|
+
}), H = b({
|
|
310
|
+
top: 0,
|
|
311
|
+
left: 0,
|
|
312
|
+
height: 512,
|
|
313
|
+
width: 512
|
|
314
|
+
}), U = u(() => (H.value.width - F.value.size * F.value.spaceBetween) / F.value.size), W = u(() => (H.value.height - F.value.size * F.value.spaceBetween) / F.value.size), Tn = u(() => Math.max(1e-4, H.value.width / F.value.size)), En = u(() => Math.max(1e-4, H.value.height / F.value.size));
|
|
315
|
+
function Dn(e) {
|
|
316
|
+
let t = F.value.size * F.value.size, n = e.reduce((e, t) => e + t, 0), r = e.map((e) => e / n * t), i = r.map(Math.floor), a = r.map((e) => e % 1), o = t - i.reduce((e, t) => e + t, 0);
|
|
317
|
+
for (; o > 0;) {
|
|
318
|
+
let e = a.indexOf(Math.max(...a));
|
|
319
|
+
i[e] += 1, a[e] = 0, --o;
|
|
320
|
+
}
|
|
321
|
+
return i;
|
|
322
|
+
}
|
|
323
|
+
let On = b(!1);
|
|
324
|
+
function kn() {
|
|
325
|
+
return On.value = sn.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, sn.value.map((e, t) => ({
|
|
326
|
+
...e,
|
|
327
|
+
color: o(e.color) || wn.value[t] || i[t] || i[t % i.length],
|
|
328
|
+
uid: `serie_${t}`,
|
|
329
|
+
absoluteIndex: t
|
|
330
|
+
}));
|
|
331
|
+
}
|
|
332
|
+
let An = u(() => kn()), G = b(An.value);
|
|
333
|
+
Qe(() => T.dataset, (e) => {
|
|
334
|
+
Array.isArray(e) && e.length > 0 && (cn.value = !1);
|
|
335
|
+
}, { immediate: !0 }), Qe(() => T.dataset, (e) => {
|
|
336
|
+
G.value = kn();
|
|
337
|
+
}, { deep: !0 });
|
|
338
|
+
let jn = u(() => Dn(G.value.filter((e, t) => !Y.value.includes(e.uid)).map((e, t) => On.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), Mn = u(() => Dn(G.value.map((e, t) => On.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), Nn = u(() => F.value.size ** 2), K = u(() => (_n.value && sn.value.forEach((e, t) => {
|
|
339
|
+
[null, void 0].includes(e.values) && ce({
|
|
340
|
+
componentName: "VueUiWaffle",
|
|
341
|
+
type: "datasetSerieAttribute",
|
|
342
|
+
property: "values (number[])",
|
|
343
|
+
index: t
|
|
344
|
+
});
|
|
345
|
+
}), G.value.filter((e, t) => !Y.value.includes(e.uid)).map((e, t) => {
|
|
346
|
+
let n = jn.value[t];
|
|
347
|
+
return {
|
|
348
|
+
absoluteIndex: e.absoluteIndex,
|
|
349
|
+
uid: e.uid,
|
|
350
|
+
name: e.name,
|
|
351
|
+
color: e.color,
|
|
352
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
353
|
+
absoluteValues: e.values || [],
|
|
354
|
+
squareCount: n,
|
|
355
|
+
proportion: n / Nn.value
|
|
356
|
+
};
|
|
357
|
+
}))), Pn = u(() => G.value.map((e, t) => {
|
|
358
|
+
let n = Mn.value[t];
|
|
359
|
+
return {
|
|
360
|
+
absoluteIndex: e.absoluteIndex,
|
|
361
|
+
uid: e.uid,
|
|
362
|
+
name: e.name,
|
|
363
|
+
color: e.color,
|
|
364
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
365
|
+
absoluteValues: e.values || [],
|
|
366
|
+
squareCount: n,
|
|
367
|
+
proportion: n / Nn.value
|
|
368
|
+
};
|
|
369
|
+
}));
|
|
370
|
+
function Fn() {
|
|
371
|
+
return Pn.value.map((e) => ({
|
|
372
|
+
name: e.name,
|
|
373
|
+
color: e.color,
|
|
374
|
+
value: e.value,
|
|
375
|
+
squareCount: e.squareCount,
|
|
376
|
+
proportion: e.proportion
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
let In = u(() => {
|
|
380
|
+
let e = 0;
|
|
381
|
+
return K.value.map((t, n) => {
|
|
382
|
+
let r = e, i = r + t.squareCount, a = [];
|
|
383
|
+
for (let e = Math.floor(r); e < Math.floor(i); e += 1) a.push(e);
|
|
384
|
+
return e = i, {
|
|
385
|
+
...t,
|
|
386
|
+
start: r,
|
|
387
|
+
rects: a
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
}), q = u(() => In.value.flatMap((e, t) => e.rects.map((n, r) => ({
|
|
391
|
+
isFirst: r === 0,
|
|
392
|
+
isLongEnough: n.length > 2,
|
|
393
|
+
name: e.name,
|
|
394
|
+
color: e.color,
|
|
395
|
+
value: e.value,
|
|
396
|
+
serieIndex: t,
|
|
397
|
+
absoluteStartIndex: r < 3,
|
|
398
|
+
serieId: e.uid,
|
|
399
|
+
...e
|
|
400
|
+
}))).map((e, t) => ({
|
|
401
|
+
...e,
|
|
402
|
+
isAbsoluteFirst: t % F.value.size === 0
|
|
403
|
+
}))), J = u(() => {
|
|
404
|
+
let e = [];
|
|
405
|
+
for (let t = 0; t < F.value.size; t += 1) for (let n = 0; n < F.value.size; n += 1) e.push({
|
|
406
|
+
isStartOfLine: n === 0,
|
|
407
|
+
position: F.value.vertical ? t : n,
|
|
408
|
+
x: (F.value.vertical ? t : n) * (U.value + F.value.spaceBetween),
|
|
409
|
+
y: (F.value.vertical ? n : t) * (W.value + F.value.spaceBetween) + H.value.top
|
|
410
|
+
});
|
|
411
|
+
return e;
|
|
412
|
+
}), Y = b([]), Ln = b(!1), Rn = b(Object.create(null)), zn = b(Object.create(null)), X = b(0);
|
|
413
|
+
function Bn(e, t) {
|
|
414
|
+
G.value = G.value.map((n) => n.uid === e ? {
|
|
415
|
+
...n,
|
|
416
|
+
values: [t]
|
|
417
|
+
} : n);
|
|
418
|
+
}
|
|
419
|
+
function Vn(e, t) {
|
|
420
|
+
let n = t.find((t) => t.uid === e);
|
|
421
|
+
return n ? (n.values || []).reduce((e, t) => e + t, 0) : 0;
|
|
422
|
+
}
|
|
423
|
+
function Hn(e) {
|
|
424
|
+
let t = !1;
|
|
425
|
+
Rn.value[e] && (cancelAnimationFrame(Rn.value[e]), delete Rn.value[e], t = !0), zn.value[e] && (cancelAnimationFrame(zn.value[e]), delete zn.value[e], t = !0), t && (X.value = Math.max(0, X.value - 1), Ln.value = X.value > 0);
|
|
426
|
+
}
|
|
427
|
+
function Un({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
|
|
428
|
+
Hn(e), X.value += 1, Ln.value = !0;
|
|
429
|
+
let i = t;
|
|
430
|
+
return new Promise((a) => {
|
|
431
|
+
function o() {
|
|
432
|
+
if (r === "increase") {
|
|
433
|
+
if (i >= n) {
|
|
434
|
+
Bn(e, n), --X.value, X.value <= 0 && (Ln.value = !1), delete Rn.value[e], a();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
i += n * .025, i > n && (i = n), Bn(e, i), Rn.value[e] = requestAnimationFrame(o);
|
|
438
|
+
} else {
|
|
439
|
+
if (i <= t / 100) {
|
|
440
|
+
Bn(e, 0), --X.value, X.value <= 0 && (Ln.value = !1), delete zn.value[e], a();
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
i /= 1.15, Bn(e, i), zn.value[e] = requestAnimationFrame(o);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
o();
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
function Wn() {
|
|
450
|
+
G.value = An.value;
|
|
451
|
+
let e = Y.value.length > 0;
|
|
452
|
+
if (!A.value.useAnimation) {
|
|
453
|
+
e ? Y.value = [] : Y.value = Xn.value.map((e) => e.uid);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
e ? [...Y.value].forEach((e) => {
|
|
457
|
+
Gn(e, !0);
|
|
458
|
+
}) : Xn.value.map((e) => e.uid).forEach((e) => {
|
|
459
|
+
Gn(e, !0);
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function Gn(e, t = !1) {
|
|
463
|
+
if (On.value && !t) return;
|
|
464
|
+
let n = t || Y.value.length < Xn.value.length - 1 && Xn.value.length > 1;
|
|
465
|
+
if (!A.value.useAnimation) {
|
|
466
|
+
Y.value.includes(e) ? Y.value = Y.value.filter((t) => t !== e) : n && Y.value.push(e);
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
let r = Vn(e, An.value), i = Vn(e, G.value);
|
|
470
|
+
if (i !== 0 || r !== 0) {
|
|
471
|
+
if (Y.value.includes(e)) {
|
|
472
|
+
if (Y.value = Y.value.filter((t) => t !== e), Rt.value) {
|
|
473
|
+
Hn(e), Bn(e, r), ar("selectLegend", K.value.map((e) => ({
|
|
474
|
+
name: e.name,
|
|
475
|
+
color: e.color,
|
|
476
|
+
value: e.value,
|
|
477
|
+
proportion: e.proportion
|
|
478
|
+
})));
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
Un({
|
|
482
|
+
seriesId: e,
|
|
483
|
+
fromValue: i,
|
|
484
|
+
toValue: r,
|
|
485
|
+
mode: "increase"
|
|
486
|
+
}).then(() => {
|
|
487
|
+
ar("selectLegend", K.value.map((e) => ({
|
|
488
|
+
name: e.name,
|
|
489
|
+
color: e.color,
|
|
490
|
+
value: e.value,
|
|
491
|
+
proportion: e.proportion
|
|
492
|
+
})));
|
|
493
|
+
});
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
if (n) {
|
|
497
|
+
if (Rt.value) {
|
|
498
|
+
Hn(e), Y.value.includes(e) || Y.value.push(e), Bn(e, 0), ar("selectLegend", K.value.map((e) => ({
|
|
499
|
+
name: e.name,
|
|
500
|
+
color: e.color,
|
|
501
|
+
value: e.value,
|
|
502
|
+
proportion: e.proportion
|
|
503
|
+
})));
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
Un({
|
|
507
|
+
seriesId: e,
|
|
508
|
+
fromValue: i,
|
|
509
|
+
toValue: 0,
|
|
510
|
+
mode: "decrease"
|
|
511
|
+
}).then(() => {
|
|
512
|
+
Y.value.includes(e) || Y.value.push(e), Bn(e, 0), ar("selectLegend", K.value.map((e) => ({
|
|
513
|
+
name: e.name,
|
|
514
|
+
color: e.color,
|
|
515
|
+
value: e.value,
|
|
516
|
+
proportion: e.proportion
|
|
517
|
+
})));
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function Kn(e) {
|
|
523
|
+
return Pn.value.length ? Pn.value.find((t) => t.name === e) || (_n.value && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (_n.value && console.warn("VueUiWaffle - There are no series to show."), null);
|
|
524
|
+
}
|
|
525
|
+
function qn(e) {
|
|
526
|
+
let t = Kn(e);
|
|
527
|
+
t !== null && Y.value.includes(t.uid) && Gn(t.uid);
|
|
528
|
+
}
|
|
529
|
+
function Jn(e) {
|
|
530
|
+
let t = Kn(e);
|
|
531
|
+
t !== null && (Y.value.includes(t.uid) || Gn(t.uid));
|
|
532
|
+
}
|
|
533
|
+
function Yn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
534
|
+
return Pe({
|
|
535
|
+
config: i,
|
|
536
|
+
val: e,
|
|
537
|
+
percentage: t,
|
|
538
|
+
showVal: n,
|
|
539
|
+
showPercentage: r
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
let Xn = u(() => G.value.map((e, t) => {
|
|
543
|
+
let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / G.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
|
|
544
|
+
return {
|
|
545
|
+
name: e.name,
|
|
546
|
+
color: e.color || wn[t] || i[t] || i[t % i.length],
|
|
547
|
+
value: n,
|
|
548
|
+
proportion: r,
|
|
549
|
+
uid: e.uid,
|
|
550
|
+
shape: "square"
|
|
551
|
+
};
|
|
552
|
+
}).map((e, t) => {
|
|
553
|
+
let n = Yn({
|
|
554
|
+
val: ae(I.value.labels.dataLabels.formatter, e.value, c({
|
|
555
|
+
p: I.value.labels.dataLabels.prefix,
|
|
556
|
+
v: e.value,
|
|
557
|
+
s: I.value.labels.dataLabels.suffix,
|
|
558
|
+
r: N.value.roundingValue
|
|
559
|
+
}), {
|
|
560
|
+
datapoint: e,
|
|
561
|
+
index: t
|
|
562
|
+
}),
|
|
563
|
+
percentage: isNaN(e.value / Z.value) ? "-" : c({
|
|
564
|
+
v: e.value / Z.value * 100,
|
|
565
|
+
s: "%",
|
|
566
|
+
r: N.value.roundingPercentage
|
|
567
|
+
}),
|
|
568
|
+
showVal: N.value.showValue,
|
|
569
|
+
showPercentage: N.value.showPercentage,
|
|
570
|
+
config: N.value
|
|
571
|
+
});
|
|
572
|
+
return {
|
|
573
|
+
...e,
|
|
574
|
+
opacity: Y.value.includes(e.uid) ? .5 : 1,
|
|
575
|
+
segregate: () => Gn(e.uid),
|
|
576
|
+
isSegregated: Y.value.includes(e.uid),
|
|
577
|
+
display: `${e.name}${N.value.showPercentage || N.value.showValue ? ": " : ""}${n}`
|
|
578
|
+
};
|
|
579
|
+
})), Zn = u(() => ({
|
|
580
|
+
cy: "waffle-div-legend",
|
|
581
|
+
backgroundColor: N.value.backgroundColor,
|
|
582
|
+
color: N.value.color,
|
|
583
|
+
fontSize: N.value.fontSize,
|
|
584
|
+
paddingBottom: 12,
|
|
585
|
+
fontWeight: N.value.bold ? "bold" : ""
|
|
586
|
+
})), Z = u(() => K.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Qn = b(null), $n = b(null), Q = u(() => {
|
|
587
|
+
let e = /* @__PURE__ */ new Map();
|
|
588
|
+
return q.value.forEach((t, n) => {
|
|
589
|
+
e.has(t.serieIndex) ? e.get(t.serieIndex).rectIndexes.push(n) : e.set(t.serieIndex, {
|
|
590
|
+
serieIndex: t.serieIndex,
|
|
591
|
+
absoluteIndex: t.absoluteIndex,
|
|
592
|
+
serieId: t.serieId,
|
|
593
|
+
name: t.name,
|
|
594
|
+
color: t.color,
|
|
595
|
+
value: t.value,
|
|
596
|
+
proportion: t.proportion,
|
|
597
|
+
rectIndexes: [n]
|
|
598
|
+
});
|
|
599
|
+
}), Array.from(e.values()).sort((e, t) => e.serieIndex - t.serieIndex);
|
|
600
|
+
});
|
|
601
|
+
function er(e) {
|
|
602
|
+
return Q.value.find((t) => t.serieIndex === e) || null;
|
|
603
|
+
}
|
|
604
|
+
function tr(e) {
|
|
605
|
+
let t = er(e);
|
|
606
|
+
return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
|
|
607
|
+
}
|
|
608
|
+
function nr(e) {
|
|
609
|
+
let t = q.value[e];
|
|
610
|
+
A.value.events.datapointClick && A.value.events.datapointClick({
|
|
611
|
+
datapoint: t,
|
|
612
|
+
seriesIndex: t.serieIndex
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
function rr(e) {
|
|
616
|
+
let t = q.value[e];
|
|
617
|
+
A.value.events.datapointLeave && A.value.events.datapointLeave({
|
|
618
|
+
datapoint: t,
|
|
619
|
+
seriesIndex: t.serieIndex
|
|
620
|
+
}), $n.value = null, Vt.value = !1, D.value = null, k.value = null, tn.value = "pointer";
|
|
621
|
+
}
|
|
622
|
+
function ir(e, t = "pointer") {
|
|
623
|
+
if (Y.value.length === T.dataset.length) return;
|
|
624
|
+
let r = q.value[e];
|
|
625
|
+
if (!r) return;
|
|
626
|
+
tn.value = t, k.value = r.serieIndex, Qn.value = {
|
|
627
|
+
datapoint: r,
|
|
628
|
+
seriesIndex: r.absoluteIndex,
|
|
629
|
+
series: G.value,
|
|
630
|
+
config: A.value
|
|
631
|
+
}, A.value.events.datapointEnter && $n.value !== r.serieIndex && A.value.events.datapointEnter({
|
|
632
|
+
datapoint: r,
|
|
633
|
+
seriesIndex: r.serieIndex
|
|
634
|
+
}), $n.value = r.serieIndex, Vt.value = !0, D.value = r.serieIndex;
|
|
635
|
+
let i = M.value.customFormat;
|
|
636
|
+
if (n(i) && oe(() => i({
|
|
637
|
+
seriesIndex: r.absoluteIndex,
|
|
638
|
+
datapoint: r,
|
|
639
|
+
series: G.value,
|
|
640
|
+
config: A.value
|
|
641
|
+
}))) Ht.value = i({
|
|
642
|
+
seriesIndex: r.absoluteIndex,
|
|
643
|
+
datapoint: r,
|
|
644
|
+
series: G.value,
|
|
645
|
+
config: A.value
|
|
646
|
+
});
|
|
647
|
+
else {
|
|
648
|
+
let e = "";
|
|
649
|
+
e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${M.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`, e += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${r.color}" />${zt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${E.value}_${r.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${Yn({
|
|
650
|
+
config: M.value,
|
|
651
|
+
showVal: M.value.showValue,
|
|
652
|
+
showPercentage: M.value.showPercentage,
|
|
653
|
+
val: `<span>${ae(I.value.labels.dataLabels.formatter, r.value, c({
|
|
654
|
+
p: I.value.labels.dataLabels.prefix,
|
|
655
|
+
v: r.value,
|
|
656
|
+
s: I.value.labels.dataLabels.suffix,
|
|
657
|
+
r: M.value.roundingValue
|
|
658
|
+
}), {
|
|
659
|
+
datapoint: r,
|
|
660
|
+
seriesIndex: r.absoluteIndex,
|
|
661
|
+
series: G.value
|
|
662
|
+
})}</span>`,
|
|
663
|
+
percentage: `<span>${c({
|
|
664
|
+
v: On.value ? 1 / sn.value.length * 100 : r.value / Z.value * 100,
|
|
665
|
+
s: "%",
|
|
666
|
+
r: M.value.roundingPercentage
|
|
667
|
+
})}</span>`
|
|
668
|
+
})}</b></div>`, Ht.value = e;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
let ar = $e, $ = u(() => ({
|
|
672
|
+
head: K.value.map((e) => ({
|
|
673
|
+
name: e.name,
|
|
674
|
+
color: e.color
|
|
675
|
+
})),
|
|
676
|
+
body: K.value.map((e) => e.value)
|
|
677
|
+
}));
|
|
678
|
+
function or(e) {
|
|
679
|
+
return A.value.useBlurOnHover && ![null, void 0].includes(D.value) && D.value !== e ? `url(#blur_${E.value})` : "";
|
|
680
|
+
}
|
|
681
|
+
function sr(e) {
|
|
682
|
+
return [null, void 0].includes(D.value) || D.value === e ? { opacity: 1 } : { opacity: P.value.selection.unselectedOpacity };
|
|
683
|
+
}
|
|
684
|
+
function cr(e) {
|
|
685
|
+
return e.length <= 3 ? e : e.filter((t, n) => {
|
|
686
|
+
let r = e[(n - 1 + e.length) % e.length], i = e[(n + 1) % e.length], a = r.x === t.x && t.x === i.x, o = r.y === t.y && t.y === i.y;
|
|
687
|
+
return !a && !o;
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
function lr(e) {
|
|
691
|
+
if (!e.length) return [];
|
|
692
|
+
let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [], r = /* @__PURE__ */ new Set(), i = [
|
|
693
|
+
[-1, 0],
|
|
694
|
+
[0, 1],
|
|
695
|
+
[1, 0],
|
|
696
|
+
[0, -1]
|
|
697
|
+
];
|
|
698
|
+
e.forEach((e) => {
|
|
699
|
+
let a = `${e.row}:${e.col}`;
|
|
700
|
+
if (r.has(a)) return;
|
|
701
|
+
let o = [], s = [e];
|
|
702
|
+
for (r.add(a); s.length;) {
|
|
703
|
+
let e = s.shift();
|
|
704
|
+
o.push(e), i.forEach(([n, i]) => {
|
|
705
|
+
let a = e.row + n, o = e.col + i, ee = `${a}:${o}`;
|
|
706
|
+
!t.has(ee) || r.has(ee) || (r.add(ee), s.push({
|
|
707
|
+
row: a,
|
|
708
|
+
col: o
|
|
709
|
+
}));
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
n.push(o);
|
|
713
|
+
});
|
|
714
|
+
let a = [];
|
|
715
|
+
return n.forEach((e) => {
|
|
716
|
+
let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [];
|
|
717
|
+
e.forEach(({ row: e, col: r }) => {
|
|
718
|
+
t.has(`${e - 1}:${r}`) || n.push({
|
|
719
|
+
start: {
|
|
720
|
+
x: r,
|
|
721
|
+
y: e
|
|
722
|
+
},
|
|
723
|
+
end: {
|
|
724
|
+
x: r + 1,
|
|
725
|
+
y: e
|
|
726
|
+
}
|
|
727
|
+
}), t.has(`${e}:${r + 1}`) || n.push({
|
|
728
|
+
start: {
|
|
729
|
+
x: r + 1,
|
|
730
|
+
y: e
|
|
731
|
+
},
|
|
732
|
+
end: {
|
|
733
|
+
x: r + 1,
|
|
734
|
+
y: e + 1
|
|
735
|
+
}
|
|
736
|
+
}), t.has(`${e + 1}:${r}`) || n.push({
|
|
737
|
+
start: {
|
|
738
|
+
x: r + 1,
|
|
739
|
+
y: e + 1
|
|
740
|
+
},
|
|
741
|
+
end: {
|
|
742
|
+
x: r,
|
|
743
|
+
y: e + 1
|
|
744
|
+
}
|
|
745
|
+
}), t.has(`${e}:${r - 1}`) || n.push({
|
|
746
|
+
start: {
|
|
747
|
+
x: r,
|
|
748
|
+
y: e + 1
|
|
749
|
+
},
|
|
750
|
+
end: {
|
|
751
|
+
x: r,
|
|
752
|
+
y: e
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
let r = /* @__PURE__ */ new Map(), i = (e) => `${e.start.x}:${e.start.y}>${e.end.x}:${e.end.y}`, o = (e) => `${e.x}:${e.y}`, s = new Set(n.map(i));
|
|
757
|
+
for (n.forEach((e) => {
|
|
758
|
+
let t = o(e.start);
|
|
759
|
+
r.has(t) || r.set(t, []), r.get(t).push(e);
|
|
760
|
+
}); s.size;) {
|
|
761
|
+
let e = s.values().next().value, t = n.find((t) => i(t) === e), ee = t.start, c = [ee], te = t;
|
|
762
|
+
for (; te;) {
|
|
763
|
+
s.delete(i(te));
|
|
764
|
+
let e = te.end;
|
|
765
|
+
if (o(e) === o(ee)) break;
|
|
766
|
+
c.push(e), te = (r.get(o(e)) || []).find((e) => s.has(i(e)));
|
|
767
|
+
}
|
|
768
|
+
c.length >= 4 && a.push(cr(c));
|
|
769
|
+
}
|
|
770
|
+
}), a;
|
|
771
|
+
}
|
|
772
|
+
function ur(e) {
|
|
773
|
+
let t = F.value.size, n = F.value.vertical, r = [];
|
|
774
|
+
return q.value.forEach((i, a) => {
|
|
775
|
+
if (i.serieIndex !== e) return;
|
|
776
|
+
let o = Math.floor(a / t), s = a % t;
|
|
777
|
+
r.push({
|
|
778
|
+
row: n ? s : o,
|
|
779
|
+
col: n ? o : s
|
|
780
|
+
});
|
|
781
|
+
}), r;
|
|
782
|
+
}
|
|
783
|
+
function dr(e) {
|
|
784
|
+
let t = Tn.value, n = En.value;
|
|
785
|
+
return lr(ur(e)).map((e) => e.map(({ x: e, y: r }) => ({
|
|
786
|
+
x: e * t,
|
|
787
|
+
y: H.value.top + r * n
|
|
788
|
+
})));
|
|
789
|
+
}
|
|
790
|
+
function fr(e) {
|
|
791
|
+
return e.map(({ x: e, y: t }) => `${e},${t}`).join(" ");
|
|
792
|
+
}
|
|
793
|
+
function pr(e) {
|
|
794
|
+
return e.map((e) => {
|
|
795
|
+
if (!e.length) return "";
|
|
796
|
+
let [t, ...n] = e, r = n.map(({ x: e, y: t }) => `L ${e} ${t}`).join(" ");
|
|
797
|
+
return `M ${t.x} ${t.y} ${r} Z`;
|
|
798
|
+
}).filter(Boolean).join(" ");
|
|
799
|
+
}
|
|
800
|
+
let mr = u(() => !P.value.selection?.wrap?.show || [null, void 0].includes(D.value) ? [] : dr(D.value).map(fr)), hr = u(() => {
|
|
801
|
+
if (!P.value.merged) return [];
|
|
802
|
+
let e = /* @__PURE__ */ new Map();
|
|
803
|
+
return q.value.forEach((t, n) => {
|
|
804
|
+
e.has(t.serieIndex) || e.set(t.serieIndex, {
|
|
805
|
+
serieIndex: t.serieIndex,
|
|
806
|
+
absoluteIndex: t.absoluteIndex,
|
|
807
|
+
color: t.color,
|
|
808
|
+
gradientIndex: n,
|
|
809
|
+
rectIndex: n
|
|
810
|
+
});
|
|
811
|
+
}), Array.from(e.values()).map((e) => ({
|
|
812
|
+
...e,
|
|
813
|
+
d: pr(dr(e.serieIndex))
|
|
814
|
+
})).filter((e) => e.d);
|
|
815
|
+
});
|
|
816
|
+
function gr(e, t) {
|
|
817
|
+
return I.value.labels.captions.show ? q.value.length && !Ln.value && !F.value.vertical && (q.value[e].isFirst && t.position < F.value.size - 2 || q.value[e].isAbsoluteFirst && e % F.value.size === 0 && q.value[e].absoluteStartIndex) : !1;
|
|
818
|
+
}
|
|
819
|
+
function _r(e, t = null) {
|
|
820
|
+
let n = ae(I.value.labels.dataLabels.formatter, q.value[e].value, c({
|
|
821
|
+
p: I.value.labels.dataLabels.prefix,
|
|
822
|
+
v: q.value[e].value,
|
|
823
|
+
s: I.value.labels.dataLabels.suffix,
|
|
824
|
+
r: I.value.labels.captions.roundingValue
|
|
825
|
+
}), {
|
|
826
|
+
datapoint: q.value[e],
|
|
827
|
+
position: t
|
|
828
|
+
}), r = c({
|
|
829
|
+
v: q.value[e].proportion * 100,
|
|
830
|
+
s: "%",
|
|
831
|
+
r: I.value.labels.captions.roundingPercentage
|
|
832
|
+
}), i = (I.value.labels.captions.serieNameAbbreviation ? se({
|
|
833
|
+
source: q.value[e].name,
|
|
834
|
+
length: I.value.labels.captions.serieNameMaxAbbreviationSize
|
|
835
|
+
}) : q.value[e].name) + (I.value.labels.captions.showPercentage || I.value.labels.captions.showValue ? ":" : "");
|
|
836
|
+
return `${I.value.labels.captions.showSerieName ? i : ""} ${Yn({
|
|
837
|
+
val: n,
|
|
838
|
+
percentage: r,
|
|
839
|
+
showVal: I.value.labels.captions.showValue,
|
|
840
|
+
showPercentage: I.value.labels.captions.showPercentage,
|
|
841
|
+
config: I.value.labels.dataLabels
|
|
842
|
+
})}`;
|
|
843
|
+
}
|
|
844
|
+
function vr(e = null) {
|
|
845
|
+
We(() => {
|
|
846
|
+
let n = $.value.head.map((e, t) => [
|
|
847
|
+
[e.name],
|
|
848
|
+
[$.value.body[t]],
|
|
849
|
+
[isNaN($.value.body[t] / Z.value) ? "-" : $.value.body[t] / Z.value * 100]
|
|
850
|
+
]), i = [
|
|
851
|
+
[L.value.title.text],
|
|
852
|
+
[L.value.title.subtitle.text],
|
|
853
|
+
[
|
|
854
|
+
[""],
|
|
855
|
+
["val"],
|
|
856
|
+
["%"]
|
|
857
|
+
]
|
|
858
|
+
].concat(n), a = r(i);
|
|
859
|
+
e ? e(a) : t({
|
|
860
|
+
csvContent: a,
|
|
861
|
+
title: L.value.title.text || "vue-ui-waffle"
|
|
862
|
+
});
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
let yr = u(() => ({
|
|
866
|
+
head: [
|
|
867
|
+
"__SUM__",
|
|
868
|
+
ae(I.value.labels.dataLabels.formatter, Z.value, c({
|
|
869
|
+
p: I.value.labels.dataLabels.prefix,
|
|
870
|
+
v: Z.value,
|
|
871
|
+
s: I.value.labels.dataLabels.suffix,
|
|
872
|
+
r: A.value.table.td.roundingValue
|
|
873
|
+
})),
|
|
874
|
+
"100%"
|
|
875
|
+
],
|
|
876
|
+
body: $.value.head.map((e, t) => [
|
|
877
|
+
{
|
|
878
|
+
color: e.color,
|
|
879
|
+
name: e.name
|
|
880
|
+
},
|
|
881
|
+
ae(I.value.labels.dataLabels.formatter, $.value.body[t], c({
|
|
882
|
+
p: I.value.labels.dataLabels.prefix,
|
|
883
|
+
v: $.value.body[t],
|
|
884
|
+
s: I.value.labels.dataLabels.suffix,
|
|
885
|
+
r: A.value.table.td.roundingValue
|
|
886
|
+
})),
|
|
887
|
+
isNaN($.value.body[t] / Z.value) ? "-" : c({
|
|
888
|
+
v: $.value.body[t] / Z.value * 100,
|
|
889
|
+
s: "%",
|
|
890
|
+
r: A.value.table.td.roundingPercentage
|
|
891
|
+
})
|
|
892
|
+
]),
|
|
893
|
+
config: {
|
|
894
|
+
th: {
|
|
895
|
+
backgroundColor: A.value.table.th.backgroundColor,
|
|
896
|
+
color: A.value.table.th.color,
|
|
897
|
+
outline: A.value.table.th.outline
|
|
898
|
+
},
|
|
899
|
+
td: {
|
|
900
|
+
backgroundColor: A.value.table.td.backgroundColor,
|
|
901
|
+
color: A.value.table.td.color,
|
|
902
|
+
outline: A.value.table.td.outline
|
|
903
|
+
},
|
|
904
|
+
shape: "square",
|
|
905
|
+
breakpoint: A.value.table.responsiveBreakpoint
|
|
906
|
+
},
|
|
907
|
+
colNames: [
|
|
908
|
+
A.value.table.columnNames.series,
|
|
909
|
+
A.value.table.columnNames.value,
|
|
910
|
+
A.value.table.columnNames.percentage
|
|
911
|
+
]
|
|
912
|
+
})), br = b(!1);
|
|
913
|
+
function xr(e) {
|
|
914
|
+
br.value = e, Ut.value += 1;
|
|
915
|
+
}
|
|
916
|
+
function Sr() {
|
|
917
|
+
B.value.showTable = !B.value.showTable;
|
|
918
|
+
}
|
|
919
|
+
function Cr() {
|
|
920
|
+
B.value.showTooltip = !B.value.showTooltip;
|
|
921
|
+
}
|
|
922
|
+
let wr = b(!1);
|
|
923
|
+
function Tr() {
|
|
924
|
+
wr.value = !wr.value;
|
|
925
|
+
}
|
|
926
|
+
async function Er({ scale: e = 2 } = {}) {
|
|
927
|
+
if (!O.value) return;
|
|
928
|
+
let { width: t, height: n } = O.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Ce({
|
|
929
|
+
domElement: O.value,
|
|
930
|
+
base64: !0,
|
|
931
|
+
img: !0,
|
|
932
|
+
scale: e
|
|
933
|
+
});
|
|
934
|
+
return {
|
|
935
|
+
imageUri: i,
|
|
936
|
+
base64: a,
|
|
937
|
+
title: L.value.title.text,
|
|
938
|
+
width: t,
|
|
939
|
+
height: n,
|
|
940
|
+
aspectRatio: r
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
let Dr = u(() => {
|
|
944
|
+
let e = A.value.table.useDialog && !A.value.table.show, t = B.value.showTable;
|
|
945
|
+
return {
|
|
946
|
+
component: e ? Pt : At,
|
|
947
|
+
title: `${L.value.title.text}${L.value.title.subtitle.text ? `: ${L.value.title.subtitle.text}` : ""}`,
|
|
948
|
+
props: e ? {
|
|
949
|
+
backgroundColor: A.value.table.th.backgroundColor,
|
|
950
|
+
color: A.value.table.th.color,
|
|
951
|
+
headerColor: A.value.table.th.color,
|
|
952
|
+
headerBg: A.value.table.th.backgroundColor,
|
|
953
|
+
isFullscreen: br.value,
|
|
954
|
+
fullscreenParent: O.value,
|
|
955
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
956
|
+
isCursorPointer: rn.value
|
|
957
|
+
} : {
|
|
958
|
+
hideDetails: !0,
|
|
959
|
+
config: {
|
|
960
|
+
open: t,
|
|
961
|
+
maxHeight: 1e4,
|
|
962
|
+
body: {
|
|
963
|
+
backgroundColor: L.value.backgroundColor,
|
|
964
|
+
color: L.value.color
|
|
965
|
+
},
|
|
966
|
+
head: {
|
|
967
|
+
backgroundColor: L.value.backgroundColor,
|
|
968
|
+
color: L.value.color
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
});
|
|
974
|
+
Qe(() => B.value.showTable, (e) => {
|
|
975
|
+
A.value.table.show || (e && A.value.table.useDialog && Qt.value ? Qt.value.open() : "close" in Qt.value && Qt.value.close());
|
|
976
|
+
});
|
|
977
|
+
function Or() {
|
|
978
|
+
B.value.showTable = !1, $t.value && $t.value.setTableIconState(!1);
|
|
979
|
+
}
|
|
980
|
+
let kr = u(() => Xn.value.map((e) => ({
|
|
981
|
+
...e,
|
|
982
|
+
name: e.display
|
|
983
|
+
}))), Ar = u(() => L.value.backgroundColor), jr = u(() => L.value.title), { isCallbackImaging: Mr, isCallbackSvg: Nr, generateSvg: Pr, onGenerateImage: Fr } = xe({
|
|
984
|
+
svg: fn,
|
|
985
|
+
title: jr,
|
|
986
|
+
legend: N,
|
|
987
|
+
legendItems: kr,
|
|
988
|
+
backgroundColor: Ar,
|
|
989
|
+
getSvgCallback: () => A.value.userOptions.callbacks.svg,
|
|
990
|
+
generateImage: Sn
|
|
991
|
+
});
|
|
992
|
+
async function Ir() {
|
|
993
|
+
if (ar("copyAlt", {
|
|
994
|
+
config: A.value,
|
|
995
|
+
dataset: Pn.value
|
|
996
|
+
}), !A.value.userOptions.callbacks.altCopy) {
|
|
997
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
await Promise.resolve(A.value.userOptions.callbacks.altCopy({
|
|
1001
|
+
config: A.value,
|
|
1002
|
+
dataset: Pn.value
|
|
1003
|
+
}));
|
|
1004
|
+
}
|
|
1005
|
+
function Lr() {
|
|
1006
|
+
k.value = null, nn.value = !0;
|
|
1007
|
+
}
|
|
1008
|
+
function Rr() {
|
|
1009
|
+
k.value = null, tn.value = "pointer", Vt.value = !1, D.value = null, $n.value = null, nn.value = !1;
|
|
1010
|
+
}
|
|
1011
|
+
function zr(e) {
|
|
1012
|
+
if (!fn.value || wr.value || document.activeElement !== fn.value || !Q.value.length || Y.value.length === T.dataset.length) return;
|
|
1013
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1014
|
+
if (!t && !n && !r && !i) return;
|
|
1015
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1016
|
+
k.value = null, tn.value = "pointer", Vt.value = !1, D.value = null, $n.value = null;
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
if (r) {
|
|
1020
|
+
if (k.value === null) return;
|
|
1021
|
+
let e = tr(k.value);
|
|
1022
|
+
if (e === null) return;
|
|
1023
|
+
nr(e);
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
let a = Q.value.findIndex((e) => e.serieIndex === k.value), o = null;
|
|
1027
|
+
if (o = a === -1 ? n ? Q.value[0] : Q.value[Q.value.length - 1] : n ? Q.value[(a + 1) % Q.value.length] : Q.value[(a - 1 + Q.value.length) % Q.value.length], !o) return;
|
|
1028
|
+
let s = tr(o.serieIndex);
|
|
1029
|
+
s !== null && (Br(o.serieIndex), ir(s, "keyboard"));
|
|
1030
|
+
}
|
|
1031
|
+
function Br(e) {
|
|
1032
|
+
if (!Number.isFinite(e) || !fn.value) return;
|
|
1033
|
+
let t = er(e);
|
|
1034
|
+
if (!t || !t.rectIndexes.length) return;
|
|
1035
|
+
let n = t.rectIndexes.map((e) => {
|
|
1036
|
+
let t = J.value[e];
|
|
1037
|
+
return t ? {
|
|
1038
|
+
x: t.x + F.value.spaceBetween / 2 + Tn.value / 2,
|
|
1039
|
+
y: t.y + F.value.spaceBetween / 2 + En.value / 2
|
|
1040
|
+
} : null;
|
|
1041
|
+
}).filter(Boolean);
|
|
1042
|
+
if (!n.length) return;
|
|
1043
|
+
let r = Math.min(...n.map((e) => e.x)), i = Math.max(...n.map((e) => e.x)), a = Math.min(...n.map((e) => e.y)), o = Math.max(...n.map((e) => e.y)), s = (r + i) / 2, ee = (a + o) / 2, c = fn.value.getBoundingClientRect();
|
|
1044
|
+
en.value = {
|
|
1045
|
+
x: c.left + s / V.value.width * c.width,
|
|
1046
|
+
y: c.top + ee / V.value.height * c.height
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
let Vr = u(() => ({
|
|
1050
|
+
headers: yr.value?.colNames ?? [],
|
|
1051
|
+
rows: yr.value?.body ?? []
|
|
1052
|
+
}));
|
|
1053
|
+
return Ee({
|
|
1054
|
+
getData: Fn,
|
|
1055
|
+
getImage: Er,
|
|
1056
|
+
generatePdf: xn,
|
|
1057
|
+
generateCsv: vr,
|
|
1058
|
+
generateImage: Sn,
|
|
1059
|
+
generateSvg: Pr,
|
|
1060
|
+
hideSeries: Jn,
|
|
1061
|
+
showSeries: qn,
|
|
1062
|
+
toggleTable: Sr,
|
|
1063
|
+
toggleTooltip: Cr,
|
|
1064
|
+
toggleAnnotator: Tr,
|
|
1065
|
+
toggleFullscreen: xr,
|
|
1066
|
+
copyAlt: Ir
|
|
1067
|
+
}), (e, t) => (y(), p("div", {
|
|
1068
|
+
class: g(`vue-data-ui-component vue-ui-waffle ${br.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
1069
|
+
ref_key: "waffleChart",
|
|
1070
|
+
ref: O,
|
|
1071
|
+
id: `vue-ui-waffle_${E.value}`,
|
|
1072
|
+
style: v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${A.value.responsive ? "height: 100%" : ""}`),
|
|
1073
|
+
onMouseenter: t[2] ||= () => C(un)(!0),
|
|
1074
|
+
onMouseleave: t[3] ||= () => C(un)(!1)
|
|
1075
|
+
}, [
|
|
1076
|
+
m("div", {
|
|
1077
|
+
id: `chart-instructions-${E.value}`,
|
|
1078
|
+
class: "sr-only"
|
|
1079
|
+
}, [m("p", null, Ye(A.value.a11y.translations.keyboardNavigation), 1)], 8, tt),
|
|
1080
|
+
Vr.value?.rows?.length ? (y(), d(je, {
|
|
1081
|
+
key: 0,
|
|
1082
|
+
uid: E.value,
|
|
1083
|
+
head: Vr.value.headers,
|
|
1084
|
+
body: Vr.value.rows,
|
|
1085
|
+
notice: A.value.a11y.translations.tableAvailable,
|
|
1086
|
+
caption: A.value.a11y.translations.tableCaption
|
|
1087
|
+
}, null, 8, [
|
|
1088
|
+
"uid",
|
|
1089
|
+
"head",
|
|
1090
|
+
"body",
|
|
1091
|
+
"notice",
|
|
1092
|
+
"caption"
|
|
1093
|
+
])) : f("", !0),
|
|
1094
|
+
j.value.buttons.annotator ? (y(), d(C(Mt), {
|
|
1095
|
+
key: 1,
|
|
1096
|
+
svgRef: C(fn),
|
|
1097
|
+
backgroundColor: L.value.backgroundColor,
|
|
1098
|
+
color: L.value.color,
|
|
1099
|
+
active: wr.value,
|
|
1100
|
+
isCursorPointer: rn.value,
|
|
1101
|
+
palette: j.value.annotatorPalette,
|
|
1102
|
+
onClose: Tr
|
|
1103
|
+
}, {
|
|
1104
|
+
"annotator-action-close": w(() => [S(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1105
|
+
"annotator-action-color": w(({ color: t }) => [S(e.$slots, "annotator-action-color", _(h({ color: t })), void 0, !0)]),
|
|
1106
|
+
"annotator-action-draw": w(({ mode: t }) => [S(e.$slots, "annotator-action-draw", _(h({ mode: t })), void 0, !0)]),
|
|
1107
|
+
"annotator-action-undo": w(({ disabled: t }) => [S(e.$slots, "annotator-action-undo", _(h({ disabled: t })), void 0, !0)]),
|
|
1108
|
+
"annotator-action-redo": w(({ disabled: t }) => [S(e.$slots, "annotator-action-redo", _(h({ disabled: t })), void 0, !0)]),
|
|
1109
|
+
"annotator-action-delete": w(({ disabled: t }) => [S(e.$slots, "annotator-action-delete", _(h({ disabled: t })), void 0, !0)]),
|
|
1110
|
+
_: 3
|
|
1111
|
+
}, 8, [
|
|
1112
|
+
"svgRef",
|
|
1113
|
+
"backgroundColor",
|
|
1114
|
+
"color",
|
|
1115
|
+
"active",
|
|
1116
|
+
"isCursorPointer",
|
|
1117
|
+
"palette"
|
|
1118
|
+
])) : f("", !0),
|
|
1119
|
+
Cn.value ? (y(), p("div", {
|
|
1120
|
+
key: 2,
|
|
1121
|
+
ref_key: "noTitle",
|
|
1122
|
+
ref: qt,
|
|
1123
|
+
class: "vue-data-ui-no-title-space",
|
|
1124
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1125
|
+
}, null, 512)) : f("", !0),
|
|
1126
|
+
L.value.title.text ? (y(), p("div", {
|
|
1127
|
+
key: 3,
|
|
1128
|
+
ref_key: "chartTitle",
|
|
1129
|
+
ref: Wt,
|
|
1130
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
1131
|
+
}, [(y(), d(we, {
|
|
1132
|
+
key: `title_${Jt.value}`,
|
|
1133
|
+
config: {
|
|
1134
|
+
title: {
|
|
1135
|
+
cy: "waffle-title",
|
|
1136
|
+
...L.value.title
|
|
1137
|
+
},
|
|
1138
|
+
subtitle: {
|
|
1139
|
+
cy: "waffle-subtitle",
|
|
1140
|
+
...L.value.title.subtitle
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}, null, 8, ["config"]))], 512)) : f("", !0),
|
|
1144
|
+
m("div", { id: `legend-top-${E.value}` }, null, 8, nt),
|
|
1145
|
+
j.value.show && Bt.value && (C(dn) || C(ln)) ? (y(), d(C(jt), {
|
|
1146
|
+
ref_key: "userOptionsRef",
|
|
1147
|
+
ref: $t,
|
|
1148
|
+
key: `user_options_${Ut.value}`,
|
|
1149
|
+
backgroundColor: L.value.backgroundColor,
|
|
1150
|
+
color: L.value.color,
|
|
1151
|
+
isPrinting: C(yn),
|
|
1152
|
+
isImaging: C(bn),
|
|
1153
|
+
uid: E.value,
|
|
1154
|
+
hasTooltip: j.value.buttons.tooltip && M.value.show,
|
|
1155
|
+
hasPdf: j.value.buttons.pdf,
|
|
1156
|
+
hasImg: j.value.buttons.img,
|
|
1157
|
+
hasSvg: j.value.buttons.svg,
|
|
1158
|
+
hasXls: j.value.buttons.csv,
|
|
1159
|
+
hasTable: j.value.buttons.table,
|
|
1160
|
+
hasFullscreen: j.value.buttons.fullscreen,
|
|
1161
|
+
hasAltCopy: j.value.buttons.altCopy,
|
|
1162
|
+
isFullscreen: br.value,
|
|
1163
|
+
isTooltip: B.value.showTooltip,
|
|
1164
|
+
titles: { ...j.value.buttonTitles },
|
|
1165
|
+
chartElement: O.value,
|
|
1166
|
+
position: j.value.position,
|
|
1167
|
+
hasAnnotator: j.value.buttons.annotator,
|
|
1168
|
+
isAnnotation: wr.value,
|
|
1169
|
+
callbacks: j.value.callbacks,
|
|
1170
|
+
printScale: j.value.print.scale,
|
|
1171
|
+
tableDialog: A.value.table.useDialog,
|
|
1172
|
+
isCursorPointer: rn.value,
|
|
1173
|
+
onToggleFullscreen: xr,
|
|
1174
|
+
onGeneratePdf: C(xn),
|
|
1175
|
+
onGenerateCsv: vr,
|
|
1176
|
+
onGenerateImage: C(Fr),
|
|
1177
|
+
onGenerateSvg: C(Pr),
|
|
1178
|
+
onToggleTable: Sr,
|
|
1179
|
+
onToggleTooltip: Cr,
|
|
1180
|
+
onToggleAnnotator: Tr,
|
|
1181
|
+
onCopyAlt: Ir,
|
|
1182
|
+
style: v({ visibility: C(dn) ? C(ln) ? "visible" : "hidden" : "visible" })
|
|
1183
|
+
}, ze({ _: 2 }, [
|
|
1184
|
+
e.$slots.menuIcon ? {
|
|
1185
|
+
name: "menuIcon",
|
|
1186
|
+
fn: w(({ isOpen: t, color: n }) => [S(e.$slots, "menuIcon", _(h({
|
|
1187
|
+
isOpen: t,
|
|
1188
|
+
color: n
|
|
1189
|
+
})), void 0, !0)]),
|
|
1190
|
+
key: "0"
|
|
1191
|
+
} : void 0,
|
|
1192
|
+
e.$slots.optionTooltip ? {
|
|
1193
|
+
name: "optionTooltip",
|
|
1194
|
+
fn: w(() => [S(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1195
|
+
key: "1"
|
|
1196
|
+
} : void 0,
|
|
1197
|
+
e.$slots.optionPdf ? {
|
|
1198
|
+
name: "optionPdf",
|
|
1199
|
+
fn: w(() => [S(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1200
|
+
key: "2"
|
|
1201
|
+
} : void 0,
|
|
1202
|
+
e.$slots.optionCsv ? {
|
|
1203
|
+
name: "optionCsv",
|
|
1204
|
+
fn: w(() => [S(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1205
|
+
key: "3"
|
|
1206
|
+
} : void 0,
|
|
1207
|
+
e.$slots.optionImg ? {
|
|
1208
|
+
name: "optionImg",
|
|
1209
|
+
fn: w(() => [S(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1210
|
+
key: "4"
|
|
1211
|
+
} : void 0,
|
|
1212
|
+
e.$slots.optionSvg ? {
|
|
1213
|
+
name: "optionSvg",
|
|
1214
|
+
fn: w(() => [S(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1215
|
+
key: "5"
|
|
1216
|
+
} : void 0,
|
|
1217
|
+
e.$slots.optionTable ? {
|
|
1218
|
+
name: "optionTable",
|
|
1219
|
+
fn: w(() => [S(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1220
|
+
key: "6"
|
|
1221
|
+
} : void 0,
|
|
1222
|
+
e.$slots.optionFullscreen ? {
|
|
1223
|
+
name: "optionFullscreen",
|
|
1224
|
+
fn: w(({ toggleFullscreen: t, isFullscreen: n }) => [S(e.$slots, "optionFullscreen", _(h({
|
|
1225
|
+
toggleFullscreen: t,
|
|
1226
|
+
isFullscreen: n
|
|
1227
|
+
})), void 0, !0)]),
|
|
1228
|
+
key: "7"
|
|
1229
|
+
} : void 0,
|
|
1230
|
+
e.$slots.optionAnnotator ? {
|
|
1231
|
+
name: "optionAnnotator",
|
|
1232
|
+
fn: w(({ toggleAnnotator: t, isAnnotator: n }) => [S(e.$slots, "optionAnnotator", _(h({
|
|
1233
|
+
toggleAnnotator: t,
|
|
1234
|
+
isAnnotator: n
|
|
1235
|
+
})), void 0, !0)]),
|
|
1236
|
+
key: "8"
|
|
1237
|
+
} : void 0,
|
|
1238
|
+
e.$slots.optionAltCopy ? {
|
|
1239
|
+
name: "optionAltCopy",
|
|
1240
|
+
fn: w(({ altCopy: t }) => [S(e.$slots, "optionAltCopy", _(h({ altCopy: t })), void 0, !0)]),
|
|
1241
|
+
key: "9"
|
|
1242
|
+
} : void 0,
|
|
1243
|
+
e.$slots["custom-menu-before"] ? {
|
|
1244
|
+
name: "custom-menu-before",
|
|
1245
|
+
fn: w(() => [S(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1246
|
+
key: "10"
|
|
1247
|
+
} : void 0,
|
|
1248
|
+
e.$slots["custom-menu-after"] ? {
|
|
1249
|
+
name: "custom-menu-after",
|
|
1250
|
+
fn: w(() => [S(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1251
|
+
key: "11"
|
|
1252
|
+
} : void 0
|
|
1253
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : f("", !0),
|
|
1254
|
+
m("div", rt, [(y(), p("svg", {
|
|
1255
|
+
ref_key: "svgRef",
|
|
1256
|
+
ref: fn,
|
|
1257
|
+
xmlns: C(de),
|
|
1258
|
+
"aria-describedby": `chart-instructions-${E.value}`,
|
|
1259
|
+
class: g({
|
|
1260
|
+
"vue-data-ui-fullscreen--on": br.value,
|
|
1261
|
+
"vue-data-ui-fulscreen--off": !br.value,
|
|
1262
|
+
"vue-data-ui-no-transition": !C(R)
|
|
1263
|
+
}),
|
|
1264
|
+
tabindex: "0",
|
|
1265
|
+
viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
|
|
1266
|
+
style: v(`max-width:100%;overflow:visible;background:transparent;color:${L.value.color}`),
|
|
1267
|
+
onFocus: Lr,
|
|
1268
|
+
onBlur: Rr,
|
|
1269
|
+
onKeydown: zr
|
|
1270
|
+
}, [
|
|
1271
|
+
Ve(C(Nt)),
|
|
1272
|
+
m("defs", null, [(y(!0), p(l, null, x(q.value, (e, t) => (y(), d(ke, {
|
|
1273
|
+
t: "radial",
|
|
1274
|
+
cx: "50%",
|
|
1275
|
+
cy: "50%",
|
|
1276
|
+
r: "50%",
|
|
1277
|
+
fx: "50%",
|
|
1278
|
+
fy: "50%",
|
|
1279
|
+
id: `gradient_${E.value}_${t}`,
|
|
1280
|
+
key: `gradient_${E.value}_${t}`,
|
|
1281
|
+
stops: [[
|
|
1282
|
+
"0%",
|
|
1283
|
+
C(s)(C(ee)(e.color, .05), 100 - P.value.gradientIntensity),
|
|
1284
|
+
1
|
|
1285
|
+
], [
|
|
1286
|
+
"100%",
|
|
1287
|
+
e.color,
|
|
1288
|
+
1
|
|
1289
|
+
]]
|
|
1290
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1291
|
+
m("defs", null, [m("filter", {
|
|
1292
|
+
id: `blur_${E.value}`,
|
|
1293
|
+
x: "-50%",
|
|
1294
|
+
y: "-50%",
|
|
1295
|
+
width: "200%",
|
|
1296
|
+
height: "200%"
|
|
1297
|
+
}, [...t[4] ||= [m("feGaussianBlur", {
|
|
1298
|
+
in: "SourceGraphic",
|
|
1299
|
+
stdDeviation: 2
|
|
1300
|
+
}, null, -1), m("feColorMatrix", {
|
|
1301
|
+
type: "saturate",
|
|
1302
|
+
values: "0"
|
|
1303
|
+
}, null, -1)]], 8, at)]),
|
|
1304
|
+
A.value.useCustomCells && q.value.length && e.$slots.cell ? (y(!0), p(l, { key: 0 }, x(J.value, (t, n) => (y(), p("foreignObject", {
|
|
1305
|
+
x: t.x,
|
|
1306
|
+
y: t.y,
|
|
1307
|
+
height: W.value <= 0 ? 1e-4 : W.value,
|
|
1308
|
+
width: U.value <= 0 ? 1e-4 : U.value,
|
|
1309
|
+
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
1310
|
+
}, [S(e.$slots, "cell", Ue({ ref_for: !0 }, {
|
|
1311
|
+
cell: {
|
|
1312
|
+
...t,
|
|
1313
|
+
color: q.value[n].color,
|
|
1314
|
+
height: Math.max(0, W.value),
|
|
1315
|
+
width: Math.max(0, U.value),
|
|
1316
|
+
...q.value[n]
|
|
1317
|
+
},
|
|
1318
|
+
isSelected: [null, void 0].includes(D.value) ? !0 : q.value[n].serieIndex === D.value
|
|
1319
|
+
}), void 0, !0)], 8, ot))), 256)) : f("", !0),
|
|
1320
|
+
!q.value.length && !A.value.useCustomCells ? (y(), p("rect", {
|
|
1321
|
+
key: 1,
|
|
1322
|
+
x: 12,
|
|
1323
|
+
y: 12,
|
|
1324
|
+
height: H.value.height - 24,
|
|
1325
|
+
width: H.value.width - 24,
|
|
1326
|
+
rx: 3,
|
|
1327
|
+
fill: "none",
|
|
1328
|
+
stroke: "black"
|
|
1329
|
+
}, null, 8, st)) : q.value.length && !A.value.useCustomCells ? (y(), p(l, { key: 2 }, [e.$slots.pattern ? (y(), p("g", ct, [(y(!0), p(l, null, x(An.value, (t) => (y(), p("defs", null, [S(e.$slots, "pattern", Ue({ ref_for: !0 }, {
|
|
1330
|
+
seriesIndex: t.absoluteIndex,
|
|
1331
|
+
patternId: `pattern_${E.value}_${t.absoluteIndex}`
|
|
1332
|
+
}), void 0, !0)]))), 256))])) : f("", !0), P.value.merged ? (y(), p(l, { key: 1 }, [
|
|
1333
|
+
(y(!0), p(l, null, x(hr.value, (e) => (y(), p("path", {
|
|
1334
|
+
key: `merged-underlayer-${e.serieIndex}`,
|
|
1335
|
+
d: e.d,
|
|
1336
|
+
fill: "white",
|
|
1337
|
+
"fill-rule": "evenodd",
|
|
1338
|
+
stroke: P.value.stroke,
|
|
1339
|
+
"stroke-width": P.value.strokeWidth,
|
|
1340
|
+
"stroke-linejoin": "round",
|
|
1341
|
+
filter: or(e.serieIndex),
|
|
1342
|
+
style: v(sr(e.serieIndex)),
|
|
1343
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1344
|
+
}, null, 14, lt))), 128)),
|
|
1345
|
+
(y(!0), p(l, null, x(hr.value, (e) => (y(), p("path", {
|
|
1346
|
+
key: `merged-serie-${e.serieIndex}`,
|
|
1347
|
+
d: e.d,
|
|
1348
|
+
fill: P.value.useGradient && P.value.gradientIntensity > 0 ? `url(#gradient_${E.value}_${e.gradientIndex})` : e.color,
|
|
1349
|
+
"fill-rule": "evenodd",
|
|
1350
|
+
stroke: P.value.stroke,
|
|
1351
|
+
"stroke-width": P.value.strokeWidth,
|
|
1352
|
+
"stroke-linejoin": "round",
|
|
1353
|
+
filter: or(e.serieIndex),
|
|
1354
|
+
style: v(sr(e.serieIndex)),
|
|
1355
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1356
|
+
}, null, 14, ut))), 128)),
|
|
1357
|
+
e.$slots.pattern ? (y(), p("g", dt, [(y(!0), p(l, null, x(hr.value, (e) => (y(), p("path", {
|
|
1358
|
+
key: `merged-pattern-${e.serieIndex}`,
|
|
1359
|
+
d: e.d,
|
|
1360
|
+
fill: `url(#pattern_${E.value}_${e.absoluteIndex})`,
|
|
1361
|
+
"fill-rule": "evenodd",
|
|
1362
|
+
stroke: "none",
|
|
1363
|
+
filter: or(e.serieIndex),
|
|
1364
|
+
style: v(sr(e.serieIndex)),
|
|
1365
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1366
|
+
}, null, 14, ft))), 128))])) : f("", !0)
|
|
1367
|
+
], 64)) : (y(), p(l, { key: 2 }, [
|
|
1368
|
+
(y(!0), p(l, null, x(J.value, (e, t) => (y(), p("rect", {
|
|
1369
|
+
rx: P.value.rounded ? P.value.rounding : 0,
|
|
1370
|
+
x: e.x + F.value.spaceBetween / 2,
|
|
1371
|
+
y: e.y + F.value.spaceBetween / 2,
|
|
1372
|
+
height: W.value <= 0 ? 1e-4 : W.value,
|
|
1373
|
+
width: U.value <= 0 ? 1e-4 : U.value,
|
|
1374
|
+
fill: "white",
|
|
1375
|
+
stroke: P.value.stroke,
|
|
1376
|
+
"stroke-width": P.value.strokeWidth,
|
|
1377
|
+
filter: or(q.value[t].serieIndex),
|
|
1378
|
+
style: v(sr(q.value[t].serieIndex)),
|
|
1379
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1380
|
+
}, null, 14, pt))), 256)),
|
|
1381
|
+
(y(!0), p(l, null, x(J.value, (e, t) => (y(), p("rect", {
|
|
1382
|
+
rx: P.value.rounded ? P.value.rounding : 0,
|
|
1383
|
+
x: e.x + F.value.spaceBetween / 2,
|
|
1384
|
+
y: e.y + F.value.spaceBetween / 2,
|
|
1385
|
+
height: W.value <= 0 ? 1e-4 : W.value,
|
|
1386
|
+
width: U.value <= 0 ? 1e-4 : U.value,
|
|
1387
|
+
fill: P.value.useGradient && P.value.gradientIntensity > 0 ? `url(#gradient_${E.value}_${t})` : q.value[t].color,
|
|
1388
|
+
stroke: P.value.stroke,
|
|
1389
|
+
"stroke-width": P.value.strokeWidth,
|
|
1390
|
+
filter: or(q.value[t].serieIndex),
|
|
1391
|
+
style: v(sr(q.value[t].serieIndex)),
|
|
1392
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1393
|
+
}, null, 14, mt))), 256)),
|
|
1394
|
+
e.$slots.pattern ? (y(), p("g", ht, [(y(!0), p(l, null, x(J.value, (e, t) => (y(), p("rect", {
|
|
1395
|
+
rx: P.value.rounded ? P.value.rounding : 0,
|
|
1396
|
+
x: e.x + F.value.spaceBetween / 2,
|
|
1397
|
+
y: e.y + F.value.spaceBetween / 2,
|
|
1398
|
+
height: W.value <= 0 ? 1e-4 : W.value,
|
|
1399
|
+
width: U.value <= 0 ? 1e-4 : U.value,
|
|
1400
|
+
fill: `url(#pattern_${E.value}_${q.value[t].absoluteIndex})`,
|
|
1401
|
+
stroke: "none",
|
|
1402
|
+
filter: or(q.value[t].serieIndex),
|
|
1403
|
+
style: v(sr(q.value[t].serieIndex)),
|
|
1404
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1405
|
+
}, null, 14, gt))), 256))])) : f("", !0)
|
|
1406
|
+
], 64))], 64)) : f("", !0),
|
|
1407
|
+
e.$slots.cellSvg ? (y(!0), p(l, { key: 3 }, x(J.value, (t, n) => (y(), p("g", null, [S(e.$slots, "cellSvg", Ue({ ref_for: !0 }, {
|
|
1408
|
+
cell: {
|
|
1409
|
+
...t,
|
|
1410
|
+
color: q.value[n].color,
|
|
1411
|
+
height: Math.max(0, W.value),
|
|
1412
|
+
width: Math.max(0, U.value),
|
|
1413
|
+
...q.value[n]
|
|
1414
|
+
},
|
|
1415
|
+
isSelected: [null, void 0].includes(D.value) ? !0 : q.value[n].serieIndex === D.value
|
|
1416
|
+
}), void 0, !0)]))), 256)) : f("", !0),
|
|
1417
|
+
(y(!0), p(l, null, x(mr.value, (e, t) => (y(), p("polygon", {
|
|
1418
|
+
key: `selected-series-wrap-${t}`,
|
|
1419
|
+
points: e,
|
|
1420
|
+
fill: "none",
|
|
1421
|
+
stroke: P.value.selection.wrap.stroke,
|
|
1422
|
+
"stroke-width": P.value.selection.wrap.strokeWidth,
|
|
1423
|
+
"stroke-linejoin": P.value.selection.wrap.strokeLinejoin,
|
|
1424
|
+
"pointer-events": "none"
|
|
1425
|
+
}, null, 8, _t))), 128)),
|
|
1426
|
+
(y(!0), p(l, null, x(J.value, (e, t) => (y(), p(l, null, [gr(t, e) ? (y(), p("text", {
|
|
1427
|
+
key: `datalabel_${t}`,
|
|
1428
|
+
textContent: Ye(_r(t, e)),
|
|
1429
|
+
x: e.x + I.value.labels.captions.offsetX + F.value.spaceBetween / 2 + 6,
|
|
1430
|
+
y: e.y + I.value.labels.captions.offsetY + F.value.spaceBetween / 2 + En.value / 2 + I.value.labels.captions.fontSize / 3,
|
|
1431
|
+
"font-size": I.value.labels.captions.fontSize,
|
|
1432
|
+
fill: C(ue)(q.value[t].color),
|
|
1433
|
+
filter: or(q.value[t].serieIndex),
|
|
1434
|
+
class: g({ "vue-data-ui-transition": C(R) })
|
|
1435
|
+
}, null, 10, vt)) : f("", !0)], 64))), 256)),
|
|
1436
|
+
P.value.merged && !A.value.useCustomCells ? (y(!0), p(l, { key: 4 }, x(hr.value, (e) => (y(), p("path", {
|
|
1437
|
+
key: `tooltip-trap-${e.serieIndex}`,
|
|
1438
|
+
d: e.d,
|
|
1439
|
+
fill: "transparent",
|
|
1440
|
+
"fill-rule": "evenodd",
|
|
1441
|
+
stroke: "none",
|
|
1442
|
+
"pointer-events": "fill",
|
|
1443
|
+
onMouseover: (t) => ir(e.rectIndex),
|
|
1444
|
+
onMouseleave: (t) => rr(e.rectIndex),
|
|
1445
|
+
onClick: (t) => nr(e.rectIndex)
|
|
1446
|
+
}, null, 40, yt))), 128)) : (y(!0), p(l, { key: 5 }, x(J.value, (e, t) => (y(), p("rect", {
|
|
1447
|
+
key: `tooltip-trap-${t}`,
|
|
1448
|
+
x: e.x + F.value.spaceBetween / 2,
|
|
1449
|
+
y: e.y + F.value.spaceBetween / 2,
|
|
1450
|
+
height: En.value,
|
|
1451
|
+
width: Tn.value,
|
|
1452
|
+
fill: "transparent",
|
|
1453
|
+
stroke: "none",
|
|
1454
|
+
onMouseover: (e) => ir(t),
|
|
1455
|
+
onMouseleave: (e) => rr(t),
|
|
1456
|
+
onClick: (e) => nr(t)
|
|
1457
|
+
}, null, 40, bt))), 128)),
|
|
1458
|
+
S(e.$slots, "svg", { svg: {
|
|
1459
|
+
...V.value,
|
|
1460
|
+
isPrintingImg: C(yn) || C(bn) || C(Mr),
|
|
1461
|
+
isPrintingSvg: C(Nr)
|
|
1462
|
+
} }, void 0, !0)
|
|
1463
|
+
], 46, it)), e.$slots.hint ? (y(), p("div", xt, [S(e.$slots, "hint", _(h({
|
|
1464
|
+
hint: A.value.a11y.translations.keyboardNavigation,
|
|
1465
|
+
isVisible: nn.value
|
|
1466
|
+
})), void 0, !0)])) : f("", !0)]),
|
|
1467
|
+
e.$slots.watermark ? (y(), p("div", St, [S(e.$slots, "watermark", _(h({ isPrinting: C(yn) || C(bn) || C(Mr) || C(Nr) })), void 0, !0)])) : f("", !0),
|
|
1468
|
+
m("div", { id: `legend-bottom-${E.value}` }, null, 8, Ct),
|
|
1469
|
+
Zt.value && (N.value.show || e.$slots.legend) ? (y(), d(Re, {
|
|
1470
|
+
key: 6,
|
|
1471
|
+
to: N.value.position === "top" ? `#legend-top-${E.value}` : `#legend-bottom-${E.value}`
|
|
1472
|
+
}, [m("div", {
|
|
1473
|
+
ref_key: "chartLegend",
|
|
1474
|
+
ref: Gt
|
|
1475
|
+
}, [S(e.$slots, "legend", { legend: Xn.value }, () => [N.value.show ? (y(), d(Fe, {
|
|
1476
|
+
key: `legend_${Xt.value}`,
|
|
1477
|
+
legendSet: Xn.value,
|
|
1478
|
+
config: Zn.value,
|
|
1479
|
+
isCursorPointer: rn.value,
|
|
1480
|
+
onClickMarker: t[0] ||= ({ legend: e }) => Gn(e.uid)
|
|
1481
|
+
}, ze({
|
|
1482
|
+
item: w(({ legend: e }) => [m("div", {
|
|
1483
|
+
onClick: (t) => e.segregate(),
|
|
1484
|
+
style: v(`opacity:${Y.value.includes(e.uid) ? .5 : 1}`)
|
|
1485
|
+
}, Ye(e.display), 13, wt)]),
|
|
1486
|
+
legendToggle: w(() => [Xn.value.length > 2 && N.value.selectAllToggle.show && !C(on) ? (y(), d(Ae, {
|
|
1487
|
+
key: 0,
|
|
1488
|
+
backgroundColor: N.value.selectAllToggle.backgroundColor,
|
|
1489
|
+
color: N.value.selectAllToggle.color,
|
|
1490
|
+
fontSize: N.value.fontSize,
|
|
1491
|
+
checked: Y.value.length > 0,
|
|
1492
|
+
isCursorPointer: rn.value,
|
|
1493
|
+
onToggle: Wn
|
|
1494
|
+
}, null, 8, [
|
|
1495
|
+
"backgroundColor",
|
|
1496
|
+
"color",
|
|
1497
|
+
"fontSize",
|
|
1498
|
+
"checked",
|
|
1499
|
+
"isCursorPointer"
|
|
1500
|
+
])) : f("", !0)]),
|
|
1501
|
+
_: 2
|
|
1502
|
+
}, [e.$slots.pattern ? {
|
|
1503
|
+
name: "legend-pattern",
|
|
1504
|
+
fn: w(({ legend: e, index: t }) => [Ve(Te, {
|
|
1505
|
+
shape: e.shape,
|
|
1506
|
+
radius: 30,
|
|
1507
|
+
stroke: "none",
|
|
1508
|
+
plot: {
|
|
1509
|
+
x: 30,
|
|
1510
|
+
y: 30
|
|
1511
|
+
},
|
|
1512
|
+
fill: `url(#pattern_${E.value}_${t})`
|
|
1513
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1514
|
+
key: "0"
|
|
1515
|
+
} : void 0]), 1032, [
|
|
1516
|
+
"legendSet",
|
|
1517
|
+
"config",
|
|
1518
|
+
"isCursorPointer"
|
|
1519
|
+
])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
|
|
1520
|
+
e.$slots.source ? (y(), p("div", {
|
|
1521
|
+
key: 7,
|
|
1522
|
+
ref_key: "source",
|
|
1523
|
+
ref: Kt,
|
|
1524
|
+
dir: "auto"
|
|
1525
|
+
}, [S(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
|
|
1526
|
+
Ve(C(Dt), {
|
|
1527
|
+
teleportTo: M.value.teleportTo,
|
|
1528
|
+
show: B.value.showTooltip && Vt.value && Y.value.length < T.dataset.length,
|
|
1529
|
+
backgroundColor: M.value.backgroundColor,
|
|
1530
|
+
color: M.value.color,
|
|
1531
|
+
borderRadius: M.value.borderRadius,
|
|
1532
|
+
borderColor: M.value.borderColor,
|
|
1533
|
+
borderWidth: M.value.borderWidth,
|
|
1534
|
+
backgroundOpacity: M.value.backgroundOpacity,
|
|
1535
|
+
position: M.value.position,
|
|
1536
|
+
offsetX: M.value.offsetX,
|
|
1537
|
+
offsetY: M.value.offsetY,
|
|
1538
|
+
parent: O.value,
|
|
1539
|
+
content: Ht.value,
|
|
1540
|
+
isCustom: M.value.customFormat && typeof M.value.customFormat == "function",
|
|
1541
|
+
fontSize: M.value.fontSize,
|
|
1542
|
+
isFullscreen: br.value,
|
|
1543
|
+
smooth: M.value.smooth,
|
|
1544
|
+
backdropFilter: M.value.backdropFilter,
|
|
1545
|
+
smoothForce: M.value.smoothForce,
|
|
1546
|
+
smoothSnapThreshold: M.value.smoothSnapThreshold,
|
|
1547
|
+
isA11yMode: tn.value === "keyboard",
|
|
1548
|
+
a11yPosition: en.value
|
|
1549
|
+
}, {
|
|
1550
|
+
"tooltip-before": w(() => [S(e.$slots, "tooltip-before", _(h({ ...Qn.value })), void 0, !0)]),
|
|
1551
|
+
tooltip: w(() => [S(e.$slots, "tooltip", _(h({ ...Qn.value })), void 0, !0)]),
|
|
1552
|
+
"tooltip-after": w(() => [S(e.$slots, "tooltip-after", _(h({ ...Qn.value })), void 0, !0)]),
|
|
1553
|
+
_: 3
|
|
1554
|
+
}, 8, [
|
|
1555
|
+
"teleportTo",
|
|
1556
|
+
"show",
|
|
1557
|
+
"backgroundColor",
|
|
1558
|
+
"color",
|
|
1559
|
+
"borderRadius",
|
|
1560
|
+
"borderColor",
|
|
1561
|
+
"borderWidth",
|
|
1562
|
+
"backgroundOpacity",
|
|
1563
|
+
"position",
|
|
1564
|
+
"offsetX",
|
|
1565
|
+
"offsetY",
|
|
1566
|
+
"parent",
|
|
1567
|
+
"content",
|
|
1568
|
+
"isCustom",
|
|
1569
|
+
"fontSize",
|
|
1570
|
+
"isFullscreen",
|
|
1571
|
+
"smooth",
|
|
1572
|
+
"backdropFilter",
|
|
1573
|
+
"smoothForce",
|
|
1574
|
+
"smoothSnapThreshold",
|
|
1575
|
+
"isA11yMode",
|
|
1576
|
+
"a11yPosition"
|
|
1577
|
+
]),
|
|
1578
|
+
Bt.value && j.value.buttons.table ? (y(), d(qe(Dr.value.component), Ue({ key: 8 }, Dr.value.props, {
|
|
1579
|
+
ref_key: "tableUnit",
|
|
1580
|
+
ref: Qt,
|
|
1581
|
+
onClose: Or
|
|
1582
|
+
}), ze({
|
|
1583
|
+
content: w(() => [(y(), d(C(kt), {
|
|
1584
|
+
key: `table_${Yt.value}`,
|
|
1585
|
+
colNames: yr.value.colNames,
|
|
1586
|
+
head: yr.value.head,
|
|
1587
|
+
body: yr.value.body,
|
|
1588
|
+
config: yr.value.config,
|
|
1589
|
+
title: A.value.table.useDialog ? "" : Dr.value.title,
|
|
1590
|
+
withCloseButton: !A.value.table.useDialog,
|
|
1591
|
+
isCursorPointer: rn.value,
|
|
1592
|
+
onClose: Or
|
|
1593
|
+
}, {
|
|
1594
|
+
th: w(({ th: e }) => [e === "__SUM__" ? (y(), p("div", Tt, [Ve(C(Ot), {
|
|
1595
|
+
name: "sigma",
|
|
1596
|
+
stroke: yr.value.config.th.color,
|
|
1597
|
+
size: 16
|
|
1598
|
+
}, null, 8, ["stroke"])])) : (y(), p("div", Et, Ye(e), 1))]),
|
|
1599
|
+
td: w(({ td: e }) => [Be(Ye(e.name || e), 1)]),
|
|
1600
|
+
_: 1
|
|
1601
|
+
}, 8, [
|
|
1602
|
+
"colNames",
|
|
1603
|
+
"head",
|
|
1604
|
+
"body",
|
|
1605
|
+
"config",
|
|
1606
|
+
"title",
|
|
1607
|
+
"withCloseButton",
|
|
1608
|
+
"isCursorPointer"
|
|
1609
|
+
]))]),
|
|
1610
|
+
_: 2
|
|
1611
|
+
}, [A.value.table.useDialog ? {
|
|
1612
|
+
name: "title",
|
|
1613
|
+
fn: w(() => [Be(Ye(Dr.value.title), 1)]),
|
|
1614
|
+
key: "0"
|
|
1615
|
+
} : void 0, A.value.table.useDialog ? {
|
|
1616
|
+
name: "actions",
|
|
1617
|
+
fn: w(() => [m("button", {
|
|
1618
|
+
tabindex: "0",
|
|
1619
|
+
class: "vue-ui-user-options-button",
|
|
1620
|
+
onClick: t[1] ||= (e) => vr(j.value.callbacks.csv),
|
|
1621
|
+
style: v({ cursor: rn.value ? "pointer" : "default" })
|
|
1622
|
+
}, [Ve(C(Ot), {
|
|
1623
|
+
name: "fileCsv",
|
|
1624
|
+
stroke: Dr.value.props.color
|
|
1625
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1626
|
+
key: "1"
|
|
1627
|
+
} : void 0]), 1040)) : f("", !0),
|
|
1628
|
+
S(e.$slots, "skeleton", {}, () => [C(on) ? (y(), d(ve, { key: 0 })) : f("", !0)], !0)
|
|
1629
|
+
], 46, et));
|
|
1630
|
+
}
|
|
1631
|
+
}, [["__scopeId", "data-v-3cc0d931"]]);
|
|
1632
|
+
//#endregion
|
|
1633
|
+
export { $e as n, Dt as t };
|