vue-data-ui 3.23.0 → 3.23.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/dist/{Arrow-o2qHNvrC.js → Arrow-CF0VFcBH.js} +1 -1
- package/dist/{BaseDraggableDialog-qTnfhLBz.js → BaseDraggableDialog-LoqqwRtV.js} +2 -2
- package/dist/{BaseIcon-91MZoczJ.js → BaseIcon-BfndwIWE.js} +1 -1
- package/dist/{BaseLegendToggle-CtAPwzr2.js → BaseLegendToggle-DZVucLnv.js} +1 -1
- package/dist/{BaseZoomControls-rdzlicuz.js → BaseZoomControls-BZvCnZEi.js} +2 -2
- package/dist/{ColorPicker-CIAkdPrj.js → ColorPicker--ayG2YHf.js} +2 -2
- package/dist/{DataTable-D4tM9s5Y.js → DataTable-BbKgJ5UI.js} +2 -2
- package/dist/{HillActions-BWhxHlrj.js → HillActions-BD9j_sOU.js} +1 -1
- package/dist/{Legend-CQTRlzK-.js → Legend-CQxUgOd-.js} +2 -2
- package/dist/{NonSvgPenAndPaper-Cawacw1W.js → NonSvgPenAndPaper-4ypecDg1.js} +6 -6
- package/dist/{PackageVersion--QCMh5k_.js → PackageVersion-DXU7nRr9.js} +1 -1
- package/dist/{PenAndPaper-cE4J8-rA.js → PenAndPaper-DAE-tnEQ.js} +6 -6
- package/dist/{Shape-BPMV94Ij.js → Shape-C21CMlWS.js} +1 -1
- package/dist/SlicerPreview-wUw1hFwe.js +1703 -0
- package/dist/{SparkTooltip-BaYtEKS6.js → SparkTooltip-CjsbIhzi.js} +1 -1
- package/dist/{Title-BODtwViI.js → Title-BE3qg9xl.js} +1 -1
- package/dist/{Tooltip-CMTGxeYO.js → Tooltip-DhjyfHwz.js} +2 -2
- package/dist/{UserOptions-3ujTo3LD.js → UserOptions-Dt98of5H.js} +2 -2
- package/dist/components/arrow.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-icon.js +1 -1
- package/dist/components/vue-ui-kpi.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/composables.js +1 -1
- package/dist/{dom-to-png-4tdMNGPX.js → dom-to-png-BYIvdTe8.js} +1 -1
- package/dist/{exposedLib-DWLRqRhv.js → exposedLib-C0DPCgFj.js} +7 -4
- package/dist/{geoProjections-BCP_PoiB.js → geoProjections-CEo3dVaL.js} +1 -1
- package/dist/{img-DIQG5q8T.js → img-Bnokohej.js} +1 -1
- package/dist/{labelUtils-C5lnc_xc.js → labelUtils-BeVpDvTJ.js} +1 -1
- package/dist/{lib-BuMGJ_a0.js → lib-Bttd6u5E.js} +21 -11
- package/dist/{package-BMc_ZieJ.js → package-bsfpO6y3.js} +1 -1
- package/dist/{pdf-Cnz4NKM9.js → pdf-CVIDfCrS.js} +1 -1
- package/dist/{render-common-Ktg2LZFG.js → render-common-C0PEe9so.js} +2 -2
- 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 +9 -0
- package/dist/{useSvgExport-Ba9qBr9M.js → useChartExport-DNiwdPmb.js} +48 -2
- package/dist/{useConfig-BilxnBNr.js → useConfig-DlNpz6P8.js} +13 -1
- package/dist/{useNestedProp--NSEmhOH.js → useNestedProp-vPNvh7rV.js} +5 -3
- package/dist/{useObjectBindings-Cwq7NcQz.js → useObjectBindings-BeWS5v0i.js} +1 -1
- package/dist/{usePrinter-BFvi4jVy.js → usePrinter-DN5bYhTG.js} +2 -2
- package/dist/{useTimeLabels-B9CEuiLZ.js → useTimeLabels-d2f-W1L4.js} +2 -4
- package/dist/{useTooltipPosition-BsRysTrw.js → useTooltipPosition-DifeoeQW.js} +13 -13
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-EsawKe_W.js → vue-data-ui-BNxtW8pK.js} +69 -69
- package/dist/vue-data-ui.js +74 -74
- package/dist/{vue-ui-3d-bar-RSUS2xpL.js → vue-ui-3d-bar-BYumVxZG.js} +147 -165
- package/dist/{vue-ui-accordion-61MlW-Ge.js → vue-ui-accordion-DegI2lzR.js} +4 -4
- package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
- package/dist/{vue-ui-annotator-DBRT85HG.js → vue-ui-annotator-DfG79D4r.js} +41 -68
- package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
- package/dist/{vue-ui-bump-Dvv3iSKr.js → vue-ui-bump-mKysp0KO.js} +222 -272
- package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
- package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
- package/dist/{vue-ui-chestnut-ArloORzP.js → vue-ui-chestnut-Dpklo-VE.js} +311 -365
- package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
- package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
- package/dist/{vue-ui-cursor-CxgE6Phh.js → vue-ui-cursor-DIt7vOwc.js} +4 -4
- package/dist/{vue-ui-dag-C9Sf9vH7.js → vue-ui-dag-Cl0WdSLb.js} +812 -840
- package/dist/{vue-ui-dashboard-bGmaglAj.js → vue-ui-dashboard-BwxRLR4E.js} +70 -70
- package/dist/{vue-ui-digits-DgDE-_Fn.js → vue-ui-digits-Bp1OH_t1.js} +5 -5
- package/dist/{vue-ui-donut-B_n6wF6B.js → vue-ui-donut-BZUT7QYt.js} +352 -377
- package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
- package/dist/{vue-ui-donut-Bmo149AR.js → vue-ui-donut-y6tOAVyY.js} +18 -17
- package/dist/{vue-ui-dumbbell-BX4Ao_wR.js → vue-ui-dumbbell-BtKZcAOV.js} +370 -420
- package/dist/{vue-ui-flow-Bshw8pT_.js → vue-ui-flow-BF_cndsv.js} +191 -216
- package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
- package/dist/{vue-ui-galaxy-CvXgy-dy.js → vue-ui-galaxy-ClWaSOmM.js} +276 -302
- package/dist/vue-ui-gauge-CJstpakj.js +932 -0
- package/dist/{vue-ui-geo-C-gSZL2q.js → vue-ui-geo-B1tOD3HC.js} +398 -449
- package/dist/{vue-ui-gizmo-CJdxyPID.js → vue-ui-gizmo-foatosAv.js} +4 -4
- package/dist/{vue-ui-heatmap-DEEKv8ip.js → vue-ui-heatmap-By33A9dZ.js} +479 -502
- package/dist/{vue-ui-hill-D7LYAgAL.js → vue-ui-hill-ewqkK9s5.js} +570 -593
- package/dist/vue-ui-history-plot-FEIwXlsz.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-CfFye5tL.js → vue-ui-horizontal-bar-D51sAeVu.js} +307 -332
- package/dist/{vue-ui-kpi-DCBnNfTb.js → vue-ui-kpi-y3EkgqJQ.js} +4 -4
- package/dist/{vue-ui-mini-loader-CtWpqnLW.js → vue-ui-mini-loader-CtTewZJG.js} +3 -3
- package/dist/vue-ui-molecule-paWHp18h.js +935 -0
- package/dist/{vue-ui-mood-radar-sl6DMxqR.js → vue-ui-mood-radar-wBRTZI5k.js} +341 -390
- package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
- package/dist/vue-ui-onion-B2Q2n55x.js +1233 -0
- package/dist/{vue-ui-parallel-coordinate-plot-DE9wTmQQ.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +189 -214
- package/dist/{vue-ui-quadrant-SaY_RPSE.js → vue-ui-quadrant-DOPuejDE.js} +254 -284
- package/dist/{vue-ui-quick-chart-CJ9rejnj.js → vue-ui-quick-chart-CgHX9njq.js} +108 -109
- package/dist/{vue-ui-radar-CaNen5Fj.js → vue-ui-radar-BLvG-_zE.js} +407 -434
- package/dist/{vue-ui-rating--K7rX2an.js → vue-ui-rating-BDVSVFA0.js} +10 -11
- package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
- package/dist/vue-ui-ridgeline-BbrnXvBo.js +1614 -0
- package/dist/{vue-ui-rings-BevKD8P-.js → vue-ui-rings-B3cKfMWy.js} +419 -444
- package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
- package/dist/{vue-ui-skeleton-B9ZP1w-i.js → vue-ui-skeleton-DwKxd7fk.js} +4 -4
- package/dist/{vue-ui-smiley-DYnqqk6u.js → vue-ui-smiley-5iHJeTPc.js} +64 -65
- package/dist/{vue-ui-spark-trend-R0ebpg-G.js → vue-ui-spark-trend-MpvrV5Wd.js} +11 -11
- package/dist/{vue-ui-sparkbar-DYC3By0v.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
- package/dist/{vue-ui-sparkgauge-Bw6no-In.js → vue-ui-sparkgauge-B-BYVv4p.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DvRKy8rq.js → vue-ui-sparkhistogram-D7D4NHdi.js} +18 -19
- package/dist/{vue-ui-sparkline-Dz1uzBos.js → vue-ui-sparkline-RbeYtLWp.js} +11 -11
- package/dist/{vue-ui-sparkstackbar-DlnPdZih.js → vue-ui-sparkstackbar-ohN7mtbg.js} +194 -198
- package/dist/{vue-ui-stackbar-B-THcavY.js → vue-ui-stackbar-D2bpvQYt.js} +530 -552
- package/dist/{vue-ui-stackline-3dBPoI0h.js → vue-ui-stackline-Bo1oE8yq.js} +592 -614
- package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
- package/dist/vue-ui-table-3PPiJPV6.js +1352 -0
- package/dist/{vue-ui-table-heatmap-DVwMqzje.js → vue-ui-table-heatmap-D1bbPXKG.js} +56 -57
- package/dist/{vue-ui-table-sparkline-CABJzK8p.js → vue-ui-table-sparkline-l1cUX3ny.js} +13 -15
- package/dist/{vue-ui-thermometer-CVQ-H69Q.js → vue-ui-thermometer-DltAELO7.js} +240 -261
- package/dist/{vue-ui-timer-Bm8LpsnI.js → vue-ui-timer-DWNdx47q.js} +6 -6
- package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
- package/dist/{vue-ui-treemap-DP0Sx8Y8.js → vue-ui-treemap-DjNlnOG5.js} +521 -547
- package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
- package/dist/vue-ui-wheel-DrefGLos.js +871 -0
- package/dist/{vue-ui-word-cloud-B2sxtel9.js → vue-ui-word-cloud-CQZ8AyOi.js} +382 -405
- package/dist/{vue-ui-world-BBQZLnzm.js → vue-ui-world-Y7a3VEjq.js} +426 -451
- package/dist/{vue-ui-xy-DZj5DT-q.js → vue-ui-xy-CJcdttNL.js} +879 -905
- package/dist/{vue-ui-xy-ChZg7AtI.js → vue-ui-xy-DPxtkYGc.js} +329 -326
- package/dist/{vue-ui-xy-canvas-BN2u0bOJ.js → vue-ui-xy-canvas-1rbwMA1m.js} +30 -27
- package/package.json +4 -4
- package/dist/Slicer-5yIrdoJv.js +0 -1149
- package/dist/SlicerPreview-DvjLV2TW.js +0 -1689
- package/dist/vue-ui-age-pyramid-CgnPWA93.js +0 -1263
- package/dist/vue-ui-bullet-Bc3-WaN1.js +0 -724
- package/dist/vue-ui-candlestick-DvvsrIdp.js +0 -1864
- package/dist/vue-ui-carousel-table-DtsNVim8.js +0 -463
- package/dist/vue-ui-chord-xX5gWZy8.js +0 -1396
- package/dist/vue-ui-circle-pack-D8wykmqg.js +0 -1638
- package/dist/vue-ui-donut-evolution-D6vH_hfx.js +0 -1598
- package/dist/vue-ui-funnel-CjYosIik.js +0 -797
- package/dist/vue-ui-gauge-CByT0_vF.js +0 -953
- package/dist/vue-ui-history-plot-BhcU94Pt.js +0 -1722
- package/dist/vue-ui-molecule-D3igGyOy.js +0 -958
- package/dist/vue-ui-nested-donuts-aS4YzaB3.js +0 -1528
- package/dist/vue-ui-onion-EhPTZpW_.js +0 -1258
- package/dist/vue-ui-relation-circle-FLs8vOxQ.js +0 -925
- package/dist/vue-ui-ridgeline-Beg5hshN.js +0 -1663
- package/dist/vue-ui-scatter-CNA7jF-o.js +0 -2428
- package/dist/vue-ui-strip-plot-ACeYOoHj.js +0 -1757
- package/dist/vue-ui-table-rFy16bp0.js +0 -1347
- package/dist/vue-ui-tiremarks-DB3f5qiz.js +0 -559
- package/dist/vue-ui-waffle-iPpdk1Bm.js +0 -1412
- package/dist/vue-ui-wheel-BJkEYfLj.js +0 -892
|
@@ -0,0 +1,1386 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Bt as n, D as r, Jt as i, Kt as a, Pt as o, S as ee, Vt as te, X as s, ct as ne, i as re, jt as ie, n as ae, pt as oe, q as se, r as ce, t as le, tt as ue, w as de, xt as fe } from "./lib-Bttd6u5E.js";
|
|
3
|
+
import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as he } from "./useConfig-DlNpz6P8.js";
|
|
5
|
+
import { t as ge } from "./usePrinter-DN5bYhTG.js";
|
|
6
|
+
import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as ye } from "./useNestedProp-vPNvh7rV.js";
|
|
8
|
+
import { t as be } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as xe } from "./useChartExport-DNiwdPmb.js";
|
|
10
|
+
import { t as Se } from "./img-Bnokohej.js";
|
|
11
|
+
import { n as Ce } from "./Title-BE3qg9xl.js";
|
|
12
|
+
import { t as we } from "./Shape-C21CMlWS.js";
|
|
13
|
+
import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import { l as Ee, t as De } from "./useResponsive-ZtArZtUf.js";
|
|
15
|
+
import { t as Oe } from "./DefGrad-DVBqDjhO.js";
|
|
16
|
+
import { t as ke } from "./BaseLegendToggle-DZVucLnv.js";
|
|
17
|
+
import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
|
|
18
|
+
import { t as je } from "./useUserOptionState-DK-_1ddE.js";
|
|
19
|
+
import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
|
|
20
|
+
import { t as Ne } from "./labelUtils-BeVpDvTJ.js";
|
|
21
|
+
import { t as Pe } from "./Legend-CQxUgOd-.js";
|
|
22
|
+
import { t as Fe } from "./usePrefersMotion-BC-CsqR1.js";
|
|
23
|
+
import { t as Ie } from "./vue_ui_waffle-DIARFc7g.js";
|
|
24
|
+
import { Fragment as c, Teleport as Le, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as m, guardReactiveProps as h, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as g, normalizeStyle as We, onBeforeUnmount as Ge, onMounted as Ke, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as Ye, toRefs as Xe, unref as x, useSlots as Ze, watch as S, withCtx as C } from "vue";
|
|
25
|
+
//#region src/components/vue-ui-waffle.vue
|
|
26
|
+
var Qe = /* @__PURE__ */ e({ default: () => yt }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
|
|
27
|
+
"xmlns",
|
|
28
|
+
"aria-describedby",
|
|
29
|
+
"viewBox"
|
|
30
|
+
], it = ["id"], at = [
|
|
31
|
+
"x",
|
|
32
|
+
"y",
|
|
33
|
+
"height",
|
|
34
|
+
"width"
|
|
35
|
+
], ot = ["height", "width"], st = { key: 0 }, ct = [
|
|
36
|
+
"rx",
|
|
37
|
+
"x",
|
|
38
|
+
"y",
|
|
39
|
+
"height",
|
|
40
|
+
"width",
|
|
41
|
+
"stroke",
|
|
42
|
+
"stroke-width",
|
|
43
|
+
"filter"
|
|
44
|
+
], lt = [
|
|
45
|
+
"rx",
|
|
46
|
+
"x",
|
|
47
|
+
"y",
|
|
48
|
+
"height",
|
|
49
|
+
"width",
|
|
50
|
+
"fill",
|
|
51
|
+
"stroke",
|
|
52
|
+
"stroke-width",
|
|
53
|
+
"filter"
|
|
54
|
+
], ut = { key: 1 }, dt = [
|
|
55
|
+
"rx",
|
|
56
|
+
"x",
|
|
57
|
+
"y",
|
|
58
|
+
"height",
|
|
59
|
+
"width",
|
|
60
|
+
"fill",
|
|
61
|
+
"filter"
|
|
62
|
+
], ft = [
|
|
63
|
+
"textContent",
|
|
64
|
+
"x",
|
|
65
|
+
"y",
|
|
66
|
+
"font-size",
|
|
67
|
+
"fill",
|
|
68
|
+
"filter"
|
|
69
|
+
], pt = [
|
|
70
|
+
"x",
|
|
71
|
+
"y",
|
|
72
|
+
"height",
|
|
73
|
+
"width",
|
|
74
|
+
"onMouseover",
|
|
75
|
+
"onMouseleave",
|
|
76
|
+
"onClick"
|
|
77
|
+
], mt = {
|
|
78
|
+
key: 0,
|
|
79
|
+
style: {
|
|
80
|
+
position: "absolute",
|
|
81
|
+
top: "100%",
|
|
82
|
+
left: "0",
|
|
83
|
+
width: "100%"
|
|
84
|
+
},
|
|
85
|
+
"data-dom-to-png-ignore": "",
|
|
86
|
+
"aria-hidden": "true"
|
|
87
|
+
}, ht = {
|
|
88
|
+
key: 5,
|
|
89
|
+
class: "vue-data-ui-watermark"
|
|
90
|
+
}, gt = ["id"], _t = ["onClick"], vt = ["innerHTML"], yt = /*#__PURE__*/ Te({
|
|
91
|
+
__name: "vue-ui-waffle",
|
|
92
|
+
props: {
|
|
93
|
+
config: {
|
|
94
|
+
type: Object,
|
|
95
|
+
default() {
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
dataset: {
|
|
100
|
+
type: Array,
|
|
101
|
+
default() {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
emits: ["selectLegend", "copyAlt"],
|
|
107
|
+
setup(e, { expose: Te, emit: Qe }) {
|
|
108
|
+
let yt = m(() => import("./Tooltip-DhjyfHwz.js")), bt = m(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), xt = m(() => import("./DataTable-BbKgJ5UI.js")), St = m(() => import("./vue-ui-accordion-DegI2lzR.js").then((e) => e.n)), Ct = m(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), wt = m(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Tt = m(() => import("./PackageVersion-DXU7nRr9.js").then((e) => e.t)), Et = m(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_waffle: Dt } = he(), { isThemeValid: Ot, warnInvalidTheme: kt } = be(), At = Fe(), w = e, jt = Ze(), Mt = l({
|
|
109
|
+
get() {
|
|
110
|
+
return !!w.dataset && w.dataset.length;
|
|
111
|
+
},
|
|
112
|
+
set(e) {
|
|
113
|
+
return e;
|
|
114
|
+
}
|
|
115
|
+
}), T = v(se()), Nt = v(!1), Pt = v(""), E = v(null), Ft = v(0), D = v(null), It = v(null), Lt = v(null), Rt = v(null), zt = v(null), Bt = v(0), Vt = v(0), Ht = v(0), Ut = v(!1), Wt = v(null), Gt = v(null), O = v(null), Kt = v({
|
|
116
|
+
x: 0,
|
|
117
|
+
y: 0
|
|
118
|
+
}), qt = v("pointer"), Jt = v(!1), k = v(nn());
|
|
119
|
+
pe({
|
|
120
|
+
config: () => k.value,
|
|
121
|
+
dataset: () => w.dataset,
|
|
122
|
+
component: "VueUiWaffle",
|
|
123
|
+
rules: [
|
|
124
|
+
me.singleSeries,
|
|
125
|
+
me.emptyArray,
|
|
126
|
+
{
|
|
127
|
+
test: (e) => e.length > 6,
|
|
128
|
+
message: [
|
|
129
|
+
"👀 The number of series is > 6. Consider:",
|
|
130
|
+
"",
|
|
131
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
132
|
+
"",
|
|
133
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
134
|
+
"",
|
|
135
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
});
|
|
140
|
+
let A = l(() => k.value.userOptions.useCursorPointer), Yt = l(() => i({
|
|
141
|
+
defaultConfig: {
|
|
142
|
+
useCustomCells: !1,
|
|
143
|
+
userOptions: { show: !1 },
|
|
144
|
+
table: { show: !1 },
|
|
145
|
+
style: { chart: {
|
|
146
|
+
backgroundColor: "#99999930",
|
|
147
|
+
layout: {
|
|
148
|
+
labels: { captions: { show: !1 } },
|
|
149
|
+
rect: { stroke: "#999999" }
|
|
150
|
+
},
|
|
151
|
+
legend: {
|
|
152
|
+
backgroundColor: "transparent",
|
|
153
|
+
showValue: !1,
|
|
154
|
+
showPercentage: !1
|
|
155
|
+
}
|
|
156
|
+
} }
|
|
157
|
+
},
|
|
158
|
+
userConfig: k.value.skeletonConfig ?? {}
|
|
159
|
+
})), { loading: Xt, FINAL_DATASET: Zt, manualLoading: Qt } = _e({
|
|
160
|
+
...Xe(w),
|
|
161
|
+
FINAL_CONFIG: k,
|
|
162
|
+
prepareConfig: nn,
|
|
163
|
+
callback: () => {
|
|
164
|
+
Promise.resolve().then(async () => {
|
|
165
|
+
z.value = gn();
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
skeletonDataset: w.config?.skeletonDataset ?? [
|
|
169
|
+
{
|
|
170
|
+
name: "",
|
|
171
|
+
values: [1],
|
|
172
|
+
color: "#AAAAAA"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "",
|
|
176
|
+
values: [1],
|
|
177
|
+
color: "#BABABA"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "",
|
|
181
|
+
values: [1],
|
|
182
|
+
color: "#CACACA"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
skeletonConfig: i({
|
|
186
|
+
defaultConfig: k.value,
|
|
187
|
+
userConfig: Yt.value
|
|
188
|
+
})
|
|
189
|
+
}), { userOptionsVisible: $t, setUserOptionsVisibility: en, keepUserOptionState: tn } = je({ config: k.value }), { svgRef: j } = Me({ config: k.value.style.chart.title });
|
|
190
|
+
function nn() {
|
|
191
|
+
let e = ye({
|
|
192
|
+
userConfig: w.config,
|
|
193
|
+
defaultConfig: Dt
|
|
194
|
+
}), t = e.theme;
|
|
195
|
+
if (!t) return e;
|
|
196
|
+
if (!Ot.value(e)) return kt(e), e;
|
|
197
|
+
let n = ye({
|
|
198
|
+
userConfig: Ie[t] || w.config,
|
|
199
|
+
defaultConfig: e
|
|
200
|
+
}), r = ye({
|
|
201
|
+
userConfig: w.config,
|
|
202
|
+
defaultConfig: n
|
|
203
|
+
});
|
|
204
|
+
return {
|
|
205
|
+
...r,
|
|
206
|
+
customPalette: r.customPalette.length ? r.customPalette : a[t] || o
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
S(() => w.config, (e) => {
|
|
210
|
+
Xt.value || (k.value = nn()), $t.value = !k.value.userOptions.showOnChartHover, an(), Bt.value += 1, Vt.value += 1, Ht.value += 1, P.value.showTable = k.value.table.show, P.value.showTooltip = k.value.style.chart.tooltip.show;
|
|
211
|
+
}, { deep: !0 });
|
|
212
|
+
let M = Je(null), N = Je(null), rn = l(() => k.value.debug);
|
|
213
|
+
function an() {
|
|
214
|
+
if (ie(w.dataset) ? (ue({
|
|
215
|
+
componentName: "VueUiWaffle",
|
|
216
|
+
type: "dataset",
|
|
217
|
+
debug: rn.value
|
|
218
|
+
}), Mt.value = !1, Qt.value = !0) : rn.value && w.dataset.forEach((e, t) => {
|
|
219
|
+
oe({
|
|
220
|
+
datasetObject: e,
|
|
221
|
+
requiredAttributes: ["name", "values"]
|
|
222
|
+
}).forEach((e) => {
|
|
223
|
+
ue({
|
|
224
|
+
componentName: "VueUiWaffle",
|
|
225
|
+
type: "datasetSerieAttribute",
|
|
226
|
+
property: e,
|
|
227
|
+
index: t
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
}), ie(w.dataset) || (Qt.value = k.value.loading), k.value.responsive) {
|
|
231
|
+
let e = Ee(() => {
|
|
232
|
+
let { width: e, height: t } = De({
|
|
233
|
+
chart: D.value,
|
|
234
|
+
title: k.value.style.chart.title.text ? It.value : null,
|
|
235
|
+
legend: k.value.style.chart.legend.show ? Lt.value : null,
|
|
236
|
+
source: Rt.value,
|
|
237
|
+
noTitle: zt.value
|
|
238
|
+
});
|
|
239
|
+
requestAnimationFrame(() => {
|
|
240
|
+
F.value.width = e, F.value.height = t, I.value.width = e, I.value.height = t;
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
M.value && (N.value && M.value.unobserve(N.value), M.value.disconnect()), M.value = new ResizeObserver(e), N.value = D.value.parentNode, M.value.observe(N.value);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
Ke(() => {
|
|
247
|
+
Ut.value = !0, an();
|
|
248
|
+
}), Ge(() => {
|
|
249
|
+
M.value && (N.value && M.value.unobserve(N.value), M.value.disconnect());
|
|
250
|
+
});
|
|
251
|
+
let { isPrinting: on, isImaging: sn, generatePdf: cn, generateImage: ln } = ge({
|
|
252
|
+
elementId: `vue-ui-waffle_${T.value}`,
|
|
253
|
+
fileName: k.value.style.chart.title.text || "vue-ui-waffle",
|
|
254
|
+
options: k.value.userOptions.print
|
|
255
|
+
}), un = l(() => k.value.userOptions.show && !k.value.style.chart.title.text), dn = l(() => de(k.value.customPalette)), P = v({
|
|
256
|
+
showTable: k.value.table.show,
|
|
257
|
+
showTooltip: k.value.style.chart.tooltip.show
|
|
258
|
+
});
|
|
259
|
+
S(k, () => {
|
|
260
|
+
P.value = {
|
|
261
|
+
showTable: k.value.table.show,
|
|
262
|
+
showTooltip: k.value.style.chart.tooltip.show
|
|
263
|
+
};
|
|
264
|
+
}, { immediate: !0 });
|
|
265
|
+
let F = v({
|
|
266
|
+
height: 512,
|
|
267
|
+
width: 512
|
|
268
|
+
}), I = v({
|
|
269
|
+
top: 0,
|
|
270
|
+
left: 0,
|
|
271
|
+
height: 512,
|
|
272
|
+
width: 512
|
|
273
|
+
}), L = l(() => (I.value.width - k.value.style.chart.layout.grid.size * k.value.style.chart.layout.grid.spaceBetween) / k.value.style.chart.layout.grid.size), R = l(() => (I.value.height - k.value.style.chart.layout.grid.size * k.value.style.chart.layout.grid.spaceBetween) / k.value.style.chart.layout.grid.size), fn = l(() => Math.max(1e-4, I.value.width / k.value.style.chart.layout.grid.size)), pn = l(() => Math.max(1e-4, I.value.height / k.value.style.chart.layout.grid.size));
|
|
274
|
+
function mn(e) {
|
|
275
|
+
let t = k.value.style.chart.layout.grid.size * k.value.style.chart.layout.grid.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);
|
|
276
|
+
for (; o > 0;) {
|
|
277
|
+
let e = a.indexOf(Math.max(...a));
|
|
278
|
+
i[e] += 1, a[e] = 0, --o;
|
|
279
|
+
}
|
|
280
|
+
return i;
|
|
281
|
+
}
|
|
282
|
+
let hn = v(!1);
|
|
283
|
+
function gn() {
|
|
284
|
+
return hn.value = Zt.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, Zt.value.map((e, t) => ({
|
|
285
|
+
...e,
|
|
286
|
+
color: ee(e.color) || dn.value[t] || o[t] || o[t % o.length],
|
|
287
|
+
uid: `serie_${t}`,
|
|
288
|
+
absoluteIndex: t
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
let _n = l(() => gn()), z = v(_n.value);
|
|
292
|
+
S(() => w.dataset, (e) => {
|
|
293
|
+
Array.isArray(e) && e.length > 0 && (Qt.value = !1);
|
|
294
|
+
}, { immediate: !0 }), S(() => w.dataset, (e) => {
|
|
295
|
+
z.value = gn();
|
|
296
|
+
}, { deep: !0 });
|
|
297
|
+
let vn = l(() => mn(z.value.filter((e, t) => !U.value.includes(e.uid)).map((e, t) => hn.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), yn = l(() => mn(z.value.map((e, t) => hn.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), B = l(() => (rn.value && Zt.value.forEach((e, t) => {
|
|
298
|
+
[null, void 0].includes(e.values) && ue({
|
|
299
|
+
componentName: "VueUiWaffle",
|
|
300
|
+
type: "datasetSerieAttribute",
|
|
301
|
+
property: "values (number[])",
|
|
302
|
+
index: t
|
|
303
|
+
});
|
|
304
|
+
}), z.value.filter((e, t) => !U.value.includes(e.uid)).map((e, t) => ({
|
|
305
|
+
absoluteIndex: e.absoluteIndex,
|
|
306
|
+
uid: e.uid,
|
|
307
|
+
name: e.name,
|
|
308
|
+
color: e.color,
|
|
309
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
310
|
+
absoluteValues: e.values || [],
|
|
311
|
+
proportion: vn.value[t]
|
|
312
|
+
})))), bn = l(() => z.value.map((e, t) => ({
|
|
313
|
+
absoluteIndex: e.absoluteIndex,
|
|
314
|
+
uid: e.uid,
|
|
315
|
+
name: e.name,
|
|
316
|
+
color: e.color,
|
|
317
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
318
|
+
absoluteValues: e.values || [],
|
|
319
|
+
proportion: yn.value[t]
|
|
320
|
+
})));
|
|
321
|
+
function xn() {
|
|
322
|
+
return bn.value.map((e) => ({
|
|
323
|
+
name: e.name,
|
|
324
|
+
color: e.color,
|
|
325
|
+
value: e.value,
|
|
326
|
+
proportion: e.proportion
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
let Sn = l(() => {
|
|
330
|
+
let e = 0;
|
|
331
|
+
return B.value.map((t, n) => {
|
|
332
|
+
let r = e, i = r + t.proportion, a = [];
|
|
333
|
+
for (let e = Math.floor(r); e < Math.floor(i); e += 1) a.push(e);
|
|
334
|
+
return e = i, {
|
|
335
|
+
...t,
|
|
336
|
+
start: r,
|
|
337
|
+
rects: a
|
|
338
|
+
};
|
|
339
|
+
});
|
|
340
|
+
}), V = l(() => Sn.value.flatMap((e, t) => e.rects.map((n, r) => ({
|
|
341
|
+
isFirst: r === 0,
|
|
342
|
+
isLongEnough: n.length > 2,
|
|
343
|
+
name: e.name,
|
|
344
|
+
color: e.color,
|
|
345
|
+
value: e.value,
|
|
346
|
+
serieIndex: t,
|
|
347
|
+
absoluteStartIndex: r < 3,
|
|
348
|
+
serieId: e.uid,
|
|
349
|
+
...e
|
|
350
|
+
}))).map((e, t) => ({
|
|
351
|
+
...e,
|
|
352
|
+
isAbsoluteFirst: t % k.value.style.chart.layout.grid.size === 0
|
|
353
|
+
}))), H = l(() => {
|
|
354
|
+
let e = [];
|
|
355
|
+
for (let t = 0; t < k.value.style.chart.layout.grid.size; t += 1) for (let n = 0; n < k.value.style.chart.layout.grid.size; n += 1) e.push({
|
|
356
|
+
isStartOfLine: n === 0,
|
|
357
|
+
position: k.value.style.chart.layout.grid.vertical ? t : n,
|
|
358
|
+
x: (k.value.style.chart.layout.grid.vertical ? t : n) * (L.value + k.value.style.chart.layout.grid.spaceBetween),
|
|
359
|
+
y: (k.value.style.chart.layout.grid.vertical ? n : t) * (R.value + k.value.style.chart.layout.grid.spaceBetween) + I.value.top
|
|
360
|
+
});
|
|
361
|
+
return e;
|
|
362
|
+
}), U = v([]), Cn = v(!1), wn = v(Object.create(null)), Tn = v(Object.create(null)), W = v(0);
|
|
363
|
+
function G(e, t) {
|
|
364
|
+
z.value = z.value.map((n) => n.uid === e ? {
|
|
365
|
+
...n,
|
|
366
|
+
values: [t]
|
|
367
|
+
} : n);
|
|
368
|
+
}
|
|
369
|
+
function En(e, t) {
|
|
370
|
+
let n = t.find((t) => t.uid === e);
|
|
371
|
+
return n ? (n.values || []).reduce((e, t) => e + t, 0) : 0;
|
|
372
|
+
}
|
|
373
|
+
function Dn(e) {
|
|
374
|
+
let t = !1;
|
|
375
|
+
wn.value[e] && (cancelAnimationFrame(wn.value[e]), delete wn.value[e], t = !0), Tn.value[e] && (cancelAnimationFrame(Tn.value[e]), delete Tn.value[e], t = !0), t && (W.value = Math.max(0, W.value - 1), Cn.value = W.value > 0);
|
|
376
|
+
}
|
|
377
|
+
function On({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
|
|
378
|
+
Dn(e), W.value += 1, Cn.value = !0;
|
|
379
|
+
let i = t;
|
|
380
|
+
return new Promise((a) => {
|
|
381
|
+
function o() {
|
|
382
|
+
if (r === "increase") {
|
|
383
|
+
if (i >= n) {
|
|
384
|
+
G(e, n), --W.value, W.value <= 0 && (Cn.value = !1), delete wn.value[e], a();
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
i += n * .025, i > n && (i = n), G(e, i), wn.value[e] = requestAnimationFrame(o);
|
|
388
|
+
} else {
|
|
389
|
+
if (i <= t / 100) {
|
|
390
|
+
G(e, 0), --W.value, W.value <= 0 && (Cn.value = !1), delete Tn.value[e], a();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
i /= 1.15, G(e, i), Tn.value[e] = requestAnimationFrame(o);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
o();
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
function kn() {
|
|
400
|
+
z.value = _n.value;
|
|
401
|
+
let e = U.value.length > 0;
|
|
402
|
+
if (!k.value.useAnimation) {
|
|
403
|
+
e ? U.value = [] : U.value = q.value.map((e) => e.uid);
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
e ? [...U.value].forEach((e) => {
|
|
407
|
+
K(e, !0);
|
|
408
|
+
}) : q.value.map((e) => e.uid).forEach((e) => {
|
|
409
|
+
K(e, !0);
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
function K(e, t = !1) {
|
|
413
|
+
if (hn.value && !t) return;
|
|
414
|
+
let n = t || U.value.length < q.value.length - 1 && q.value.length > 1;
|
|
415
|
+
if (!k.value.useAnimation) {
|
|
416
|
+
U.value.includes(e) ? U.value = U.value.filter((t) => t !== e) : n && U.value.push(e);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
let r = En(e, _n.value), i = En(e, z.value);
|
|
420
|
+
if (i !== 0 || r !== 0) {
|
|
421
|
+
if (U.value.includes(e)) {
|
|
422
|
+
if (U.value = U.value.filter((t) => t !== e), At.value) {
|
|
423
|
+
Dn(e), G(e, r), Hn("selectLegend", B.value.map((e) => ({
|
|
424
|
+
name: e.name,
|
|
425
|
+
color: e.color,
|
|
426
|
+
value: e.value,
|
|
427
|
+
proportion: e.proportion / k.value.style.chart.layout.grid.size ** 2
|
|
428
|
+
})));
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
On({
|
|
432
|
+
seriesId: e,
|
|
433
|
+
fromValue: i,
|
|
434
|
+
toValue: r,
|
|
435
|
+
mode: "increase"
|
|
436
|
+
}).then(() => {
|
|
437
|
+
Hn("selectLegend", B.value.map((e) => ({
|
|
438
|
+
name: e.name,
|
|
439
|
+
color: e.color,
|
|
440
|
+
value: e.value,
|
|
441
|
+
proportion: e.proportion / k.value.style.chart.layout.grid.size ** 2
|
|
442
|
+
})));
|
|
443
|
+
});
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
if (n) {
|
|
447
|
+
if (At.value) {
|
|
448
|
+
Dn(e), U.value.includes(e) || U.value.push(e), G(e, 0), Hn("selectLegend", B.value.map((e) => ({
|
|
449
|
+
name: e.name,
|
|
450
|
+
color: e.color,
|
|
451
|
+
value: e.value,
|
|
452
|
+
proportion: e.proportion / k.value.style.chart.layout.grid.size ** 2
|
|
453
|
+
})));
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
On({
|
|
457
|
+
seriesId: e,
|
|
458
|
+
fromValue: i,
|
|
459
|
+
toValue: 0,
|
|
460
|
+
mode: "decrease"
|
|
461
|
+
}).then(() => {
|
|
462
|
+
U.value.includes(e) || U.value.push(e), G(e, 0), Hn("selectLegend", B.value.map((e) => ({
|
|
463
|
+
name: e.name,
|
|
464
|
+
color: e.color,
|
|
465
|
+
value: e.value,
|
|
466
|
+
proportion: e.proportion / k.value.style.chart.layout.grid.size ** 2
|
|
467
|
+
})));
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function An(e) {
|
|
473
|
+
return bn.value.length ? bn.value.find((t) => t.name === e) || (rn.value && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (rn.value && console.warn("VueUiWaffle - There are no series to show."), null);
|
|
474
|
+
}
|
|
475
|
+
function jn(e) {
|
|
476
|
+
let t = An(e);
|
|
477
|
+
t !== null && U.value.includes(t.uid) && K(t.uid);
|
|
478
|
+
}
|
|
479
|
+
function Mn(e) {
|
|
480
|
+
let t = An(e);
|
|
481
|
+
t !== null && (U.value.includes(t.uid) || K(t.uid));
|
|
482
|
+
}
|
|
483
|
+
function Nn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
484
|
+
return Ne({
|
|
485
|
+
config: i,
|
|
486
|
+
val: e,
|
|
487
|
+
percentage: t,
|
|
488
|
+
showVal: n,
|
|
489
|
+
showPercentage: r
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
let q = l(() => z.value.map((e, t) => {
|
|
493
|
+
let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / z.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
|
|
494
|
+
return {
|
|
495
|
+
name: e.name,
|
|
496
|
+
color: e.color || dn[t] || o[t] || o[t % o.length],
|
|
497
|
+
value: n,
|
|
498
|
+
proportion: r,
|
|
499
|
+
uid: e.uid,
|
|
500
|
+
shape: "square"
|
|
501
|
+
};
|
|
502
|
+
}).map((e, t) => {
|
|
503
|
+
let n = Nn({
|
|
504
|
+
val: re(k.value.style.chart.layout.labels.dataLabels.formatter, e.value, s({
|
|
505
|
+
p: k.value.style.chart.layout.labels.dataLabels.prefix,
|
|
506
|
+
v: e.value,
|
|
507
|
+
s: k.value.style.chart.layout.labels.dataLabels.suffix,
|
|
508
|
+
r: k.value.style.chart.legend.roundingValue
|
|
509
|
+
}), {
|
|
510
|
+
datapoint: e,
|
|
511
|
+
index: t
|
|
512
|
+
}),
|
|
513
|
+
percentage: isNaN(e.value / J.value) ? "-" : s({
|
|
514
|
+
v: e.value / J.value * 100,
|
|
515
|
+
s: "%",
|
|
516
|
+
r: k.value.style.chart.legend.roundingPercentage
|
|
517
|
+
}),
|
|
518
|
+
showVal: k.value.style.chart.legend.showValue,
|
|
519
|
+
showPercentage: k.value.style.chart.legend.showPercentage,
|
|
520
|
+
config: k.value.style.chart.legend
|
|
521
|
+
});
|
|
522
|
+
return {
|
|
523
|
+
...e,
|
|
524
|
+
opacity: U.value.includes(e.uid) ? .5 : 1,
|
|
525
|
+
segregate: () => K(e.uid),
|
|
526
|
+
isSegregated: U.value.includes(e.uid),
|
|
527
|
+
display: `${e.name}${k.value.style.chart.legend.showPercentage || k.value.style.chart.legend.showValue ? ": " : ""}${n}`
|
|
528
|
+
};
|
|
529
|
+
})), Pn = l(() => ({
|
|
530
|
+
cy: "waffle-div-legend",
|
|
531
|
+
backgroundColor: k.value.style.chart.legend.backgroundColor,
|
|
532
|
+
color: k.value.style.chart.legend.color,
|
|
533
|
+
fontSize: k.value.style.chart.legend.fontSize,
|
|
534
|
+
paddingBottom: 12,
|
|
535
|
+
fontWeight: k.value.style.chart.legend.bold ? "bold" : ""
|
|
536
|
+
})), J = l(() => B.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Fn = v(null), In = v(null), Y = l(() => {
|
|
537
|
+
let e = /* @__PURE__ */ new Map();
|
|
538
|
+
return V.value.forEach((t, n) => {
|
|
539
|
+
e.has(t.serieIndex) ? e.get(t.serieIndex).rectIndexes.push(n) : e.set(t.serieIndex, {
|
|
540
|
+
serieIndex: t.serieIndex,
|
|
541
|
+
absoluteIndex: t.absoluteIndex,
|
|
542
|
+
serieId: t.serieId,
|
|
543
|
+
name: t.name,
|
|
544
|
+
color: t.color,
|
|
545
|
+
value: t.value,
|
|
546
|
+
proportion: t.proportion,
|
|
547
|
+
rectIndexes: [n]
|
|
548
|
+
});
|
|
549
|
+
}), Array.from(e.values()).sort((e, t) => e.serieIndex - t.serieIndex);
|
|
550
|
+
});
|
|
551
|
+
function Ln(e) {
|
|
552
|
+
return Y.value.find((t) => t.serieIndex === e) || null;
|
|
553
|
+
}
|
|
554
|
+
function Rn(e) {
|
|
555
|
+
let t = Ln(e);
|
|
556
|
+
return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
|
|
557
|
+
}
|
|
558
|
+
function zn(e) {
|
|
559
|
+
let t = V.value[e];
|
|
560
|
+
k.value.events.datapointClick && k.value.events.datapointClick({
|
|
561
|
+
datapoint: t,
|
|
562
|
+
seriesIndex: t.serieIndex
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
function Bn(e) {
|
|
566
|
+
let t = V.value[e];
|
|
567
|
+
k.value.events.datapointLeave && k.value.events.datapointLeave({
|
|
568
|
+
datapoint: t,
|
|
569
|
+
seriesIndex: t.serieIndex
|
|
570
|
+
}), In.value = null, Nt.value = !1, E.value = null, O.value = null, qt.value = "pointer";
|
|
571
|
+
}
|
|
572
|
+
function Vn(e, t = "pointer") {
|
|
573
|
+
if (U.value.length === w.dataset.length) return;
|
|
574
|
+
let n = V.value[e];
|
|
575
|
+
if (!n) return;
|
|
576
|
+
qt.value = t, O.value = n.serieIndex, Fn.value = {
|
|
577
|
+
datapoint: n,
|
|
578
|
+
seriesIndex: n.absoluteIndex,
|
|
579
|
+
series: z.value,
|
|
580
|
+
config: k.value
|
|
581
|
+
}, k.value.events.datapointEnter && In.value !== n.serieIndex && k.value.events.datapointEnter({
|
|
582
|
+
datapoint: n,
|
|
583
|
+
seriesIndex: n.serieIndex
|
|
584
|
+
}), In.value = n.serieIndex, Nt.value = !0, E.value = n.serieIndex;
|
|
585
|
+
let r = k.value.style.chart.tooltip.customFormat;
|
|
586
|
+
if (fe(r) && ne(() => r({
|
|
587
|
+
seriesIndex: n.absoluteIndex,
|
|
588
|
+
datapoint: n,
|
|
589
|
+
series: z.value,
|
|
590
|
+
config: k.value
|
|
591
|
+
}))) Pt.value = r({
|
|
592
|
+
seriesIndex: n.absoluteIndex,
|
|
593
|
+
datapoint: n,
|
|
594
|
+
series: z.value,
|
|
595
|
+
config: k.value
|
|
596
|
+
});
|
|
597
|
+
else {
|
|
598
|
+
let e = "";
|
|
599
|
+
e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${k.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${n.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="${n.color}" />${jt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${T.value}_${n.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${Nn({
|
|
600
|
+
config: k.value.style.chart.tooltip,
|
|
601
|
+
showVal: k.value.style.chart.tooltip.showValue,
|
|
602
|
+
showPercentage: k.value.style.chart.tooltip.showPercentage,
|
|
603
|
+
val: `<span>${re(k.value.style.chart.layout.labels.dataLabels.formatter, n.value, s({
|
|
604
|
+
p: k.value.style.chart.layout.labels.dataLabels.prefix,
|
|
605
|
+
v: n.value,
|
|
606
|
+
s: k.value.style.chart.layout.labels.dataLabels.suffix,
|
|
607
|
+
r: k.value.style.chart.tooltip.roundingValue
|
|
608
|
+
}), {
|
|
609
|
+
datapoint: n,
|
|
610
|
+
seriesIndex: n.absoluteIndex,
|
|
611
|
+
series: z.value
|
|
612
|
+
})}</span>`,
|
|
613
|
+
percentage: `<span>${s({
|
|
614
|
+
v: hn.value ? 1 / Zt.value.length * 100 : n.value / J.value * 100,
|
|
615
|
+
s: "%",
|
|
616
|
+
r: k.value.style.chart.tooltip.roundingPercentage
|
|
617
|
+
})}</span>`
|
|
618
|
+
})}</b></div>`, Pt.value = e;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
let Hn = Qe, X = l(() => ({
|
|
622
|
+
head: B.value.map((e) => ({
|
|
623
|
+
name: e.name,
|
|
624
|
+
color: e.color
|
|
625
|
+
})),
|
|
626
|
+
body: B.value.map((e) => e.value)
|
|
627
|
+
}));
|
|
628
|
+
function Un(e) {
|
|
629
|
+
return k.value.useBlurOnHover && ![null, void 0].includes(E.value) && E.value !== e ? `url(#blur_${T.value})` : "";
|
|
630
|
+
}
|
|
631
|
+
function Wn(e, t) {
|
|
632
|
+
return k.value.style.chart.layout.labels.captions.show ? V.value.length && !Cn.value && !k.value.style.chart.layout.grid.vertical && (V.value[e].isFirst && t.position < k.value.style.chart.layout.grid.size - 2 || V.value[e].isAbsoluteFirst && e % k.value.style.chart.layout.grid.size === 0 && V.value[e].absoluteStartIndex) : !1;
|
|
633
|
+
}
|
|
634
|
+
function Gn(e, t = null) {
|
|
635
|
+
let n = re(k.value.style.chart.layout.labels.dataLabels.formatter, V.value[e].value, s({
|
|
636
|
+
p: k.value.style.chart.layout.labels.dataLabels.prefix,
|
|
637
|
+
v: V.value[e].value,
|
|
638
|
+
s: k.value.style.chart.layout.labels.dataLabels.suffix,
|
|
639
|
+
r: k.value.style.chart.layout.labels.captions.roundingValue
|
|
640
|
+
}), {
|
|
641
|
+
datapoint: V.value[e],
|
|
642
|
+
position: t
|
|
643
|
+
}), r = s({
|
|
644
|
+
v: V.value[e].proportion,
|
|
645
|
+
s: "%",
|
|
646
|
+
r: k.value.style.chart.layout.labels.captions.roundingPercentage
|
|
647
|
+
}), i = (k.value.style.chart.layout.labels.captions.serieNameAbbreviation ? ae({
|
|
648
|
+
source: V.value[e].name,
|
|
649
|
+
length: k.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize
|
|
650
|
+
}) : V.value[e].name) + (k.value.style.chart.layout.labels.captions.showPercentage || k.value.style.chart.layout.labels.captions.showValue ? ":" : "");
|
|
651
|
+
return `${k.value.style.chart.layout.labels.captions.showSerieName ? i : ""} ${Nn({
|
|
652
|
+
val: n,
|
|
653
|
+
percentage: r,
|
|
654
|
+
showVal: k.value.style.chart.layout.labels.captions.showValue,
|
|
655
|
+
showPercentage: k.value.style.chart.layout.labels.captions.showPercentage,
|
|
656
|
+
config: k.value.style.chart.layout.labels.dataLabels
|
|
657
|
+
})}`;
|
|
658
|
+
}
|
|
659
|
+
function Kn(e = null) {
|
|
660
|
+
He(() => {
|
|
661
|
+
let n = X.value.head.map((e, t) => [
|
|
662
|
+
[e.name],
|
|
663
|
+
[X.value.body[t]],
|
|
664
|
+
[isNaN(X.value.body[t] / J.value) ? "-" : X.value.body[t] / J.value * 100]
|
|
665
|
+
]), i = [
|
|
666
|
+
[k.value.style.chart.title.text],
|
|
667
|
+
[k.value.style.chart.title.subtitle.text],
|
|
668
|
+
[
|
|
669
|
+
[""],
|
|
670
|
+
["val"],
|
|
671
|
+
["%"]
|
|
672
|
+
]
|
|
673
|
+
].concat(n), a = r(i);
|
|
674
|
+
e ? e(a) : t({
|
|
675
|
+
csvContent: a,
|
|
676
|
+
title: k.value.style.chart.title.text || "vue-ui-waffle"
|
|
677
|
+
});
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
let Z = l(() => ({
|
|
681
|
+
head: [
|
|
682
|
+
" <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>",
|
|
683
|
+
re(k.value.style.chart.layout.labels.dataLabels.formatter, J.value, s({
|
|
684
|
+
p: k.value.style.chart.layout.labels.dataLabels.prefix,
|
|
685
|
+
v: J.value,
|
|
686
|
+
s: k.value.style.chart.layout.labels.dataLabels.suffix,
|
|
687
|
+
r: k.value.table.td.roundingValue
|
|
688
|
+
})),
|
|
689
|
+
"100%"
|
|
690
|
+
],
|
|
691
|
+
body: X.value.head.map((e, t) => [
|
|
692
|
+
{
|
|
693
|
+
color: e.color,
|
|
694
|
+
name: e.name
|
|
695
|
+
},
|
|
696
|
+
re(k.value.style.chart.layout.labels.dataLabels.formatter, X.value.body[t], s({
|
|
697
|
+
p: k.value.style.chart.layout.labels.dataLabels.prefix,
|
|
698
|
+
v: X.value.body[t],
|
|
699
|
+
s: k.value.style.chart.layout.labels.dataLabels.suffix,
|
|
700
|
+
r: k.value.table.td.roundingValue
|
|
701
|
+
})),
|
|
702
|
+
isNaN(X.value.body[t] / J.value) ? "-" : s({
|
|
703
|
+
v: X.value.body[t] / J.value * 100,
|
|
704
|
+
s: "%",
|
|
705
|
+
r: k.value.table.td.roundingPercentage
|
|
706
|
+
})
|
|
707
|
+
]),
|
|
708
|
+
config: {
|
|
709
|
+
th: {
|
|
710
|
+
backgroundColor: k.value.table.th.backgroundColor,
|
|
711
|
+
color: k.value.table.th.color,
|
|
712
|
+
outline: k.value.table.th.outline
|
|
713
|
+
},
|
|
714
|
+
td: {
|
|
715
|
+
backgroundColor: k.value.table.td.backgroundColor,
|
|
716
|
+
color: k.value.table.td.color,
|
|
717
|
+
outline: k.value.table.td.outline
|
|
718
|
+
},
|
|
719
|
+
shape: "square",
|
|
720
|
+
breakpoint: k.value.table.responsiveBreakpoint
|
|
721
|
+
},
|
|
722
|
+
colNames: [
|
|
723
|
+
k.value.table.columnNames.series,
|
|
724
|
+
k.value.table.columnNames.value,
|
|
725
|
+
k.value.table.columnNames.percentage
|
|
726
|
+
]
|
|
727
|
+
})), Q = v(!1);
|
|
728
|
+
function qn(e) {
|
|
729
|
+
Q.value = e, Ft.value += 1;
|
|
730
|
+
}
|
|
731
|
+
function Jn() {
|
|
732
|
+
P.value.showTable = !P.value.showTable;
|
|
733
|
+
}
|
|
734
|
+
function Yn() {
|
|
735
|
+
P.value.showTooltip = !P.value.showTooltip;
|
|
736
|
+
}
|
|
737
|
+
let Xn = v(!1);
|
|
738
|
+
function Zn() {
|
|
739
|
+
Xn.value = !Xn.value;
|
|
740
|
+
}
|
|
741
|
+
async function Qn({ scale: e = 2 } = {}) {
|
|
742
|
+
if (!D.value) return;
|
|
743
|
+
let { width: t, height: n } = D.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Se({
|
|
744
|
+
domElement: D.value,
|
|
745
|
+
base64: !0,
|
|
746
|
+
img: !0,
|
|
747
|
+
scale: e
|
|
748
|
+
});
|
|
749
|
+
return {
|
|
750
|
+
imageUri: i,
|
|
751
|
+
base64: a,
|
|
752
|
+
title: k.value.style.chart.title.text,
|
|
753
|
+
width: t,
|
|
754
|
+
height: n,
|
|
755
|
+
aspectRatio: r
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
let $ = l(() => {
|
|
759
|
+
let e = k.value.table.useDialog && !k.value.table.show, t = P.value.showTable;
|
|
760
|
+
return {
|
|
761
|
+
component: e ? Et : St,
|
|
762
|
+
title: `${k.value.style.chart.title.text}${k.value.style.chart.title.subtitle.text ? `: ${k.value.style.chart.title.subtitle.text}` : ""}`,
|
|
763
|
+
props: e ? {
|
|
764
|
+
backgroundColor: k.value.table.th.backgroundColor,
|
|
765
|
+
color: k.value.table.th.color,
|
|
766
|
+
headerColor: k.value.table.th.color,
|
|
767
|
+
headerBg: k.value.table.th.backgroundColor,
|
|
768
|
+
isFullscreen: Q.value,
|
|
769
|
+
fullscreenParent: D.value,
|
|
770
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
771
|
+
isCursorPointer: A.value
|
|
772
|
+
} : {
|
|
773
|
+
hideDetails: !0,
|
|
774
|
+
config: {
|
|
775
|
+
open: t,
|
|
776
|
+
maxHeight: 1e4,
|
|
777
|
+
body: {
|
|
778
|
+
backgroundColor: k.value.style.chart.backgroundColor,
|
|
779
|
+
color: k.value.style.chart.color
|
|
780
|
+
},
|
|
781
|
+
head: {
|
|
782
|
+
backgroundColor: k.value.style.chart.backgroundColor,
|
|
783
|
+
color: k.value.style.chart.color
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
});
|
|
789
|
+
S(() => P.value.showTable, (e) => {
|
|
790
|
+
k.value.table.show || (e && k.value.table.useDialog && Wt.value ? Wt.value.open() : "close" in Wt.value && Wt.value.close());
|
|
791
|
+
});
|
|
792
|
+
function $n() {
|
|
793
|
+
P.value.showTable = !1, Gt.value && Gt.value.setTableIconState(!1);
|
|
794
|
+
}
|
|
795
|
+
let er = l(() => q.value.map((e) => ({
|
|
796
|
+
...e,
|
|
797
|
+
name: e.display
|
|
798
|
+
}))), tr = l(() => k.value.style.chart.backgroundColor), nr = l(() => k.value.style.chart.legend), rr = l(() => k.value.style.chart.title), { isCallbackImaging: ir, isCallbackSvg: ar, generateSvg: or, onGenerateImage: sr } = xe({
|
|
799
|
+
svg: j,
|
|
800
|
+
title: rr,
|
|
801
|
+
legend: nr,
|
|
802
|
+
legendItems: er,
|
|
803
|
+
backgroundColor: tr,
|
|
804
|
+
getSvgCallback: () => k.value.userOptions.callbacks.svg,
|
|
805
|
+
generateImage: ln
|
|
806
|
+
});
|
|
807
|
+
async function cr() {
|
|
808
|
+
if (Hn("copyAlt", {
|
|
809
|
+
config: k.value,
|
|
810
|
+
dataset: bn.value
|
|
811
|
+
}), !k.value.userOptions.callbacks.altCopy) {
|
|
812
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
await Promise.resolve(k.value.userOptions.callbacks.altCopy({
|
|
816
|
+
config: k.value,
|
|
817
|
+
dataset: bn.value
|
|
818
|
+
}));
|
|
819
|
+
}
|
|
820
|
+
function lr() {
|
|
821
|
+
O.value = null, Jt.value = !0;
|
|
822
|
+
}
|
|
823
|
+
function ur() {
|
|
824
|
+
O.value = null, qt.value = "pointer", Nt.value = !1, E.value = null, In.value = null, Jt.value = !1;
|
|
825
|
+
}
|
|
826
|
+
function dr(e) {
|
|
827
|
+
if (!j.value || Xn.value || document.activeElement !== j.value || !Y.value.length || U.value.length === w.dataset.length) return;
|
|
828
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
829
|
+
if (!t && !n && !r && !i) return;
|
|
830
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
831
|
+
O.value = null, qt.value = "pointer", Nt.value = !1, E.value = null, In.value = null;
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
if (r) {
|
|
835
|
+
if (O.value === null) return;
|
|
836
|
+
let e = Rn(O.value);
|
|
837
|
+
if (e === null) return;
|
|
838
|
+
zn(e);
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
let a = Y.value.findIndex((e) => e.serieIndex === O.value), o = null;
|
|
842
|
+
if (o = a === -1 ? n ? Y.value[0] : Y.value[Y.value.length - 1] : n ? Y.value[(a + 1) % Y.value.length] : Y.value[(a - 1 + Y.value.length) % Y.value.length], !o) return;
|
|
843
|
+
let ee = Rn(o.serieIndex);
|
|
844
|
+
ee !== null && (fr(o.serieIndex), Vn(ee, "keyboard"));
|
|
845
|
+
}
|
|
846
|
+
function fr(e) {
|
|
847
|
+
if (!Number.isFinite(e) || !j.value) return;
|
|
848
|
+
let t = Ln(e);
|
|
849
|
+
if (!t || !t.rectIndexes.length) return;
|
|
850
|
+
let n = t.rectIndexes.map((e) => {
|
|
851
|
+
let t = H.value[e];
|
|
852
|
+
return t ? {
|
|
853
|
+
x: t.x + k.value.style.chart.layout.grid.spaceBetween / 2 + fn.value / 2,
|
|
854
|
+
y: t.y + k.value.style.chart.layout.grid.spaceBetween / 2 + pn.value / 2
|
|
855
|
+
} : null;
|
|
856
|
+
}).filter(Boolean);
|
|
857
|
+
if (!n.length) return;
|
|
858
|
+
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)), ee = (r + i) / 2, te = (a + o) / 2, s = j.value.getBoundingClientRect();
|
|
859
|
+
Kt.value = {
|
|
860
|
+
x: s.left + ee / F.value.width * s.width,
|
|
861
|
+
y: s.top + te / F.value.height * s.height
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
let pr = l(() => ({
|
|
865
|
+
headers: Z.value?.colNames ?? [],
|
|
866
|
+
rows: Z.value?.body ?? []
|
|
867
|
+
}));
|
|
868
|
+
return Te({
|
|
869
|
+
getData: xn,
|
|
870
|
+
getImage: Qn,
|
|
871
|
+
generatePdf: cn,
|
|
872
|
+
generateCsv: Kn,
|
|
873
|
+
generateImage: ln,
|
|
874
|
+
generateSvg: or,
|
|
875
|
+
hideSeries: Mn,
|
|
876
|
+
showSeries: jn,
|
|
877
|
+
toggleTable: Jn,
|
|
878
|
+
toggleTooltip: Yn,
|
|
879
|
+
toggleAnnotator: Zn,
|
|
880
|
+
toggleFullscreen: qn,
|
|
881
|
+
copyAlt: cr
|
|
882
|
+
}), (e, t) => (_(), f("div", {
|
|
883
|
+
class: Ue(`vue-data-ui-component vue-ui-waffle ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
884
|
+
ref_key: "waffleChart",
|
|
885
|
+
ref: D,
|
|
886
|
+
id: `vue-ui-waffle_${T.value}`,
|
|
887
|
+
style: We(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${k.value.style.chart.backgroundColor};${k.value.responsive ? "height: 100%" : ""}`),
|
|
888
|
+
onMouseenter: t[2] ||= () => x(en)(!0),
|
|
889
|
+
onMouseleave: t[3] ||= () => x(en)(!1)
|
|
890
|
+
}, [
|
|
891
|
+
p("div", {
|
|
892
|
+
id: `chart-instructions-${T.value}`,
|
|
893
|
+
class: "sr-only"
|
|
894
|
+
}, [p("p", null, Ye(k.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
895
|
+
pr.value?.rows?.length ? (_(), u(Ae, {
|
|
896
|
+
key: 0,
|
|
897
|
+
uid: T.value,
|
|
898
|
+
head: pr.value.headers,
|
|
899
|
+
body: pr.value.rows,
|
|
900
|
+
notice: k.value.a11y.translations.tableAvailable,
|
|
901
|
+
caption: k.value.a11y.translations.tableCaption
|
|
902
|
+
}, null, 8, [
|
|
903
|
+
"uid",
|
|
904
|
+
"head",
|
|
905
|
+
"body",
|
|
906
|
+
"notice",
|
|
907
|
+
"caption"
|
|
908
|
+
])) : d("", !0),
|
|
909
|
+
k.value.userOptions.buttons.annotator ? (_(), u(x(wt), {
|
|
910
|
+
key: 1,
|
|
911
|
+
svgRef: x(j),
|
|
912
|
+
backgroundColor: k.value.style.chart.backgroundColor,
|
|
913
|
+
color: k.value.style.chart.color,
|
|
914
|
+
active: Xn.value,
|
|
915
|
+
isCursorPointer: A.value,
|
|
916
|
+
onClose: Zn
|
|
917
|
+
}, {
|
|
918
|
+
"annotator-action-close": C(() => [b(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
919
|
+
"annotator-action-color": C(({ color: t }) => [b(e.$slots, "annotator-action-color", g(h({ color: t })), void 0, !0)]),
|
|
920
|
+
"annotator-action-draw": C(({ mode: t }) => [b(e.$slots, "annotator-action-draw", g(h({ mode: t })), void 0, !0)]),
|
|
921
|
+
"annotator-action-undo": C(({ disabled: t }) => [b(e.$slots, "annotator-action-undo", g(h({ disabled: t })), void 0, !0)]),
|
|
922
|
+
"annotator-action-redo": C(({ disabled: t }) => [b(e.$slots, "annotator-action-redo", g(h({ disabled: t })), void 0, !0)]),
|
|
923
|
+
"annotator-action-delete": C(({ disabled: t }) => [b(e.$slots, "annotator-action-delete", g(h({ disabled: t })), void 0, !0)]),
|
|
924
|
+
_: 3
|
|
925
|
+
}, 8, [
|
|
926
|
+
"svgRef",
|
|
927
|
+
"backgroundColor",
|
|
928
|
+
"color",
|
|
929
|
+
"active",
|
|
930
|
+
"isCursorPointer"
|
|
931
|
+
])) : d("", !0),
|
|
932
|
+
un.value ? (_(), f("div", {
|
|
933
|
+
key: 2,
|
|
934
|
+
ref_key: "noTitle",
|
|
935
|
+
ref: zt,
|
|
936
|
+
class: "vue-data-ui-no-title-space",
|
|
937
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
938
|
+
}, null, 512)) : d("", !0),
|
|
939
|
+
k.value.style.chart.title.text ? (_(), f("div", {
|
|
940
|
+
key: 3,
|
|
941
|
+
ref_key: "chartTitle",
|
|
942
|
+
ref: It,
|
|
943
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
944
|
+
}, [(_(), u(Ce, {
|
|
945
|
+
key: `title_${Bt.value}`,
|
|
946
|
+
config: {
|
|
947
|
+
title: {
|
|
948
|
+
cy: "waffle-title",
|
|
949
|
+
...k.value.style.chart.title
|
|
950
|
+
},
|
|
951
|
+
subtitle: {
|
|
952
|
+
cy: "waffle-subtitle",
|
|
953
|
+
...k.value.style.chart.title.subtitle
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}, null, 8, ["config"]))], 512)) : d("", !0),
|
|
957
|
+
p("div", { id: `legend-top-${T.value}` }, null, 8, tt),
|
|
958
|
+
k.value.userOptions.show && Mt.value && (x(tn) || x($t)) ? (_(), u(x(Ct), {
|
|
959
|
+
ref_key: "userOptionsRef",
|
|
960
|
+
ref: Gt,
|
|
961
|
+
key: `user_options_${Ft.value}`,
|
|
962
|
+
backgroundColor: k.value.style.chart.backgroundColor,
|
|
963
|
+
color: k.value.style.chart.color,
|
|
964
|
+
isPrinting: x(on),
|
|
965
|
+
isImaging: x(sn),
|
|
966
|
+
uid: T.value,
|
|
967
|
+
hasTooltip: k.value.userOptions.buttons.tooltip && k.value.style.chart.tooltip.show,
|
|
968
|
+
hasPdf: k.value.userOptions.buttons.pdf,
|
|
969
|
+
hasImg: k.value.userOptions.buttons.img,
|
|
970
|
+
hasSvg: k.value.userOptions.buttons.svg,
|
|
971
|
+
hasXls: k.value.userOptions.buttons.csv,
|
|
972
|
+
hasTable: k.value.userOptions.buttons.table,
|
|
973
|
+
hasFullscreen: k.value.userOptions.buttons.fullscreen,
|
|
974
|
+
hasAltCopy: k.value.userOptions.buttons.altCopy,
|
|
975
|
+
isFullscreen: Q.value,
|
|
976
|
+
isTooltip: P.value.showTooltip,
|
|
977
|
+
titles: { ...k.value.userOptions.buttonTitles },
|
|
978
|
+
chartElement: D.value,
|
|
979
|
+
position: k.value.userOptions.position,
|
|
980
|
+
hasAnnotator: k.value.userOptions.buttons.annotator,
|
|
981
|
+
isAnnotation: Xn.value,
|
|
982
|
+
callbacks: k.value.userOptions.callbacks,
|
|
983
|
+
printScale: k.value.userOptions.print.scale,
|
|
984
|
+
tableDialog: k.value.table.useDialog,
|
|
985
|
+
isCursorPointer: A.value,
|
|
986
|
+
onToggleFullscreen: qn,
|
|
987
|
+
onGeneratePdf: x(cn),
|
|
988
|
+
onGenerateCsv: Kn,
|
|
989
|
+
onGenerateImage: x(sr),
|
|
990
|
+
onGenerateSvg: x(or),
|
|
991
|
+
onToggleTable: Jn,
|
|
992
|
+
onToggleTooltip: Yn,
|
|
993
|
+
onToggleAnnotator: Zn,
|
|
994
|
+
onCopyAlt: cr,
|
|
995
|
+
style: We({ visibility: x(tn) ? x($t) ? "visible" : "hidden" : "visible" })
|
|
996
|
+
}, Re({ _: 2 }, [
|
|
997
|
+
e.$slots.menuIcon ? {
|
|
998
|
+
name: "menuIcon",
|
|
999
|
+
fn: C(({ isOpen: t, color: n }) => [b(e.$slots, "menuIcon", g(h({
|
|
1000
|
+
isOpen: t,
|
|
1001
|
+
color: n
|
|
1002
|
+
})), void 0, !0)]),
|
|
1003
|
+
key: "0"
|
|
1004
|
+
} : void 0,
|
|
1005
|
+
e.$slots.optionTooltip ? {
|
|
1006
|
+
name: "optionTooltip",
|
|
1007
|
+
fn: C(() => [b(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1008
|
+
key: "1"
|
|
1009
|
+
} : void 0,
|
|
1010
|
+
e.$slots.optionPdf ? {
|
|
1011
|
+
name: "optionPdf",
|
|
1012
|
+
fn: C(() => [b(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1013
|
+
key: "2"
|
|
1014
|
+
} : void 0,
|
|
1015
|
+
e.$slots.optionCsv ? {
|
|
1016
|
+
name: "optionCsv",
|
|
1017
|
+
fn: C(() => [b(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1018
|
+
key: "3"
|
|
1019
|
+
} : void 0,
|
|
1020
|
+
e.$slots.optionImg ? {
|
|
1021
|
+
name: "optionImg",
|
|
1022
|
+
fn: C(() => [b(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1023
|
+
key: "4"
|
|
1024
|
+
} : void 0,
|
|
1025
|
+
e.$slots.optionSvg ? {
|
|
1026
|
+
name: "optionSvg",
|
|
1027
|
+
fn: C(() => [b(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1028
|
+
key: "5"
|
|
1029
|
+
} : void 0,
|
|
1030
|
+
e.$slots.optionTable ? {
|
|
1031
|
+
name: "optionTable",
|
|
1032
|
+
fn: C(() => [b(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1033
|
+
key: "6"
|
|
1034
|
+
} : void 0,
|
|
1035
|
+
e.$slots.optionFullscreen ? {
|
|
1036
|
+
name: "optionFullscreen",
|
|
1037
|
+
fn: C(({ toggleFullscreen: t, isFullscreen: n }) => [b(e.$slots, "optionFullscreen", g(h({
|
|
1038
|
+
toggleFullscreen: t,
|
|
1039
|
+
isFullscreen: n
|
|
1040
|
+
})), void 0, !0)]),
|
|
1041
|
+
key: "7"
|
|
1042
|
+
} : void 0,
|
|
1043
|
+
e.$slots.optionAnnotator ? {
|
|
1044
|
+
name: "optionAnnotator",
|
|
1045
|
+
fn: C(({ toggleAnnotator: t, isAnnotator: n }) => [b(e.$slots, "optionAnnotator", g(h({
|
|
1046
|
+
toggleAnnotator: t,
|
|
1047
|
+
isAnnotator: n
|
|
1048
|
+
})), void 0, !0)]),
|
|
1049
|
+
key: "8"
|
|
1050
|
+
} : void 0,
|
|
1051
|
+
e.$slots.optionAltCopy ? {
|
|
1052
|
+
name: "optionAltCopy",
|
|
1053
|
+
fn: C(({ altCopy: t }) => [b(e.$slots, "optionAltCopy", g(h({ altCopy: t })), void 0, !0)]),
|
|
1054
|
+
key: "9"
|
|
1055
|
+
} : void 0,
|
|
1056
|
+
e.$slots["custom-menu-before"] ? {
|
|
1057
|
+
name: "custom-menu-before",
|
|
1058
|
+
fn: C(() => [b(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1059
|
+
key: "10"
|
|
1060
|
+
} : void 0,
|
|
1061
|
+
e.$slots["custom-menu-after"] ? {
|
|
1062
|
+
name: "custom-menu-after",
|
|
1063
|
+
fn: C(() => [b(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1064
|
+
key: "11"
|
|
1065
|
+
} : void 0
|
|
1066
|
+
]), 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("."))) : d("", !0),
|
|
1067
|
+
p("div", nt, [(_(), f("svg", {
|
|
1068
|
+
ref_key: "svgRef",
|
|
1069
|
+
ref: j,
|
|
1070
|
+
xmlns: x(le),
|
|
1071
|
+
"aria-describedby": `chart-instructions-${T.value}`,
|
|
1072
|
+
class: Ue({
|
|
1073
|
+
"vue-data-ui-fullscreen--on": Q.value,
|
|
1074
|
+
"vue-data-ui-fulscreen--off": !Q.value
|
|
1075
|
+
}),
|
|
1076
|
+
tabindex: "0",
|
|
1077
|
+
viewBox: `0 0 ${F.value.width <= 0 ? 10 : F.value.width} ${F.value.height <= 0 ? 10 : F.value.height}`,
|
|
1078
|
+
style: We(`max-width:100%;overflow:visible;background:transparent;color:${k.value.style.chart.color}`),
|
|
1079
|
+
onFocus: lr,
|
|
1080
|
+
onBlur: ur,
|
|
1081
|
+
onKeydown: dr
|
|
1082
|
+
}, [
|
|
1083
|
+
Be(x(Tt)),
|
|
1084
|
+
p("defs", null, [(_(!0), f(c, null, y(V.value, (e, t) => (_(), u(Oe, {
|
|
1085
|
+
t: "radial",
|
|
1086
|
+
cx: "50%",
|
|
1087
|
+
cy: "50%",
|
|
1088
|
+
r: "50%",
|
|
1089
|
+
fx: "50%",
|
|
1090
|
+
fy: "50%",
|
|
1091
|
+
id: `gradient_${T.value}_${t}`,
|
|
1092
|
+
key: `gradient_${T.value}_${t}`,
|
|
1093
|
+
stops: [[
|
|
1094
|
+
"0%",
|
|
1095
|
+
x(n)(x(te)(e.color, .05), 100 - k.value.style.chart.layout.rect.gradientIntensity),
|
|
1096
|
+
1
|
|
1097
|
+
], [
|
|
1098
|
+
"100%",
|
|
1099
|
+
e.color,
|
|
1100
|
+
1
|
|
1101
|
+
]]
|
|
1102
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1103
|
+
p("defs", null, [p("filter", {
|
|
1104
|
+
id: `blur_${T.value}`,
|
|
1105
|
+
x: "-50%",
|
|
1106
|
+
y: "-50%",
|
|
1107
|
+
width: "200%",
|
|
1108
|
+
height: "200%"
|
|
1109
|
+
}, [...t[4] ||= [p("feGaussianBlur", {
|
|
1110
|
+
in: "SourceGraphic",
|
|
1111
|
+
stdDeviation: 2
|
|
1112
|
+
}, null, -1), p("feColorMatrix", {
|
|
1113
|
+
type: "saturate",
|
|
1114
|
+
values: "0"
|
|
1115
|
+
}, null, -1)]], 8, it)]),
|
|
1116
|
+
k.value.useCustomCells && V.value.length && e.$slots.cell ? (_(!0), f(c, { key: 0 }, y(H.value, (t, n) => (_(), f("foreignObject", {
|
|
1117
|
+
x: t.x,
|
|
1118
|
+
y: t.y,
|
|
1119
|
+
height: R.value <= 0 ? 1e-4 : R.value,
|
|
1120
|
+
width: L.value <= 0 ? 1e-4 : L.value,
|
|
1121
|
+
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
1122
|
+
}, [b(e.$slots, "cell", Ve({ ref_for: !0 }, {
|
|
1123
|
+
cell: {
|
|
1124
|
+
...t,
|
|
1125
|
+
color: V.value[n].color,
|
|
1126
|
+
height: Math.max(0, R.value),
|
|
1127
|
+
width: Math.max(0, L.value),
|
|
1128
|
+
...V.value[n]
|
|
1129
|
+
},
|
|
1130
|
+
isSelected: [null, void 0].includes(E.value) ? !0 : V.value[n].serieIndex === E.value
|
|
1131
|
+
}), void 0, !0)], 8, at))), 256)) : d("", !0),
|
|
1132
|
+
!V.value.length && !k.value.useCustomCells ? (_(), f("rect", {
|
|
1133
|
+
key: 1,
|
|
1134
|
+
x: 12,
|
|
1135
|
+
y: 12,
|
|
1136
|
+
height: I.value.height - 24,
|
|
1137
|
+
width: I.value.width - 24,
|
|
1138
|
+
rx: 3,
|
|
1139
|
+
fill: "none",
|
|
1140
|
+
stroke: "black"
|
|
1141
|
+
}, null, 8, ot)) : V.value.length && !k.value.useCustomCells ? (_(), f(c, { key: 2 }, [
|
|
1142
|
+
e.$slots.pattern ? (_(), f("g", st, [(_(!0), f(c, null, y(_n.value, (t) => (_(), f("defs", null, [b(e.$slots, "pattern", Ve({ ref_for: !0 }, {
|
|
1143
|
+
seriesIndex: t.absoluteIndex,
|
|
1144
|
+
patternId: `pattern_${T.value}_${t.absoluteIndex}`
|
|
1145
|
+
}), void 0, !0)]))), 256))])) : d("", !0),
|
|
1146
|
+
(_(!0), f(c, null, y(H.value, (e, t) => (_(), f("rect", {
|
|
1147
|
+
rx: k.value.style.chart.layout.rect.rounded ? k.value.style.chart.layout.rect.rounding : 0,
|
|
1148
|
+
x: e.x + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1149
|
+
y: e.y + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1150
|
+
height: R.value <= 0 ? 1e-4 : R.value,
|
|
1151
|
+
width: L.value <= 0 ? 1e-4 : L.value,
|
|
1152
|
+
fill: "white",
|
|
1153
|
+
stroke: k.value.style.chart.layout.rect.stroke,
|
|
1154
|
+
"stroke-width": k.value.style.chart.layout.rect.strokeWidth,
|
|
1155
|
+
filter: Un(V.value[t].serieIndex)
|
|
1156
|
+
}, null, 8, ct))), 256)),
|
|
1157
|
+
(_(!0), f(c, null, y(H.value, (e, t) => (_(), f("rect", {
|
|
1158
|
+
rx: k.value.style.chart.layout.rect.rounded ? k.value.style.chart.layout.rect.rounding : 0,
|
|
1159
|
+
x: e.x + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1160
|
+
y: e.y + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1161
|
+
height: R.value <= 0 ? 1e-4 : R.value,
|
|
1162
|
+
width: L.value <= 0 ? 1e-4 : L.value,
|
|
1163
|
+
fill: k.value.style.chart.layout.rect.useGradient && k.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${T.value}_${t})` : V.value[t].color,
|
|
1164
|
+
stroke: k.value.style.chart.layout.rect.stroke,
|
|
1165
|
+
"stroke-width": k.value.style.chart.layout.rect.strokeWidth,
|
|
1166
|
+
filter: Un(V.value[t].serieIndex)
|
|
1167
|
+
}, null, 8, lt))), 256)),
|
|
1168
|
+
e.$slots.pattern ? (_(), f("g", ut, [(_(!0), f(c, null, y(H.value, (e, t) => (_(), f("rect", {
|
|
1169
|
+
rx: k.value.style.chart.layout.rect.rounded ? k.value.style.chart.layout.rect.rounding : 0,
|
|
1170
|
+
x: e.x + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1171
|
+
y: e.y + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1172
|
+
height: R.value <= 0 ? 1e-4 : R.value,
|
|
1173
|
+
width: L.value <= 0 ? 1e-4 : L.value,
|
|
1174
|
+
fill: `url(#pattern_${T.value}_${V.value[t].absoluteIndex})`,
|
|
1175
|
+
stroke: "none",
|
|
1176
|
+
filter: Un(V.value[t].serieIndex)
|
|
1177
|
+
}, null, 8, dt))), 256))])) : d("", !0)
|
|
1178
|
+
], 64)) : d("", !0),
|
|
1179
|
+
e.$slots.cellSvg ? (_(!0), f(c, { key: 3 }, y(H.value, (t, n) => (_(), f("g", null, [b(e.$slots, "cellSvg", Ve({ ref_for: !0 }, {
|
|
1180
|
+
cell: {
|
|
1181
|
+
...t,
|
|
1182
|
+
color: V.value[n].color,
|
|
1183
|
+
height: Math.max(0, R.value),
|
|
1184
|
+
width: Math.max(0, L.value),
|
|
1185
|
+
...V.value[n]
|
|
1186
|
+
},
|
|
1187
|
+
isSelected: [null, void 0].includes(E.value) ? !0 : V.value[n].serieIndex === E.value
|
|
1188
|
+
}), void 0, !0)]))), 256)) : d("", !0),
|
|
1189
|
+
(_(!0), f(c, null, y(H.value, (e, t) => (_(), f(c, null, [Wn(t, e) ? (_(), f("text", {
|
|
1190
|
+
key: `datalabel_${t}`,
|
|
1191
|
+
textContent: Ye(Gn(t, e)),
|
|
1192
|
+
x: e.x + k.value.style.chart.layout.labels.captions.offsetX + k.value.style.chart.layout.grid.spaceBetween / 2 + 6,
|
|
1193
|
+
y: e.y + k.value.style.chart.layout.labels.captions.offsetY + k.value.style.chart.layout.grid.spaceBetween / 2 + pn.value / 2 + k.value.style.chart.layout.labels.captions.fontSize / 3,
|
|
1194
|
+
"font-size": k.value.style.chart.layout.labels.captions.fontSize,
|
|
1195
|
+
fill: x(ce)(V.value[t].color),
|
|
1196
|
+
filter: Un(V.value[t].serieIndex)
|
|
1197
|
+
}, null, 8, ft)) : d("", !0)], 64))), 256)),
|
|
1198
|
+
(_(!0), f(c, null, y(H.value, (e, t) => (_(), f("rect", {
|
|
1199
|
+
x: e.x + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1200
|
+
y: e.y + k.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1201
|
+
height: pn.value,
|
|
1202
|
+
width: fn.value,
|
|
1203
|
+
fill: "transparent",
|
|
1204
|
+
stroke: "none",
|
|
1205
|
+
onMouseover: (e) => Vn(t),
|
|
1206
|
+
onMouseleave: (e) => Bn(t),
|
|
1207
|
+
onClick: (e) => zn(t)
|
|
1208
|
+
}, null, 40, pt))), 256)),
|
|
1209
|
+
b(e.$slots, "svg", { svg: {
|
|
1210
|
+
...F.value,
|
|
1211
|
+
isPrintingImg: x(on) || x(sn) || x(ir),
|
|
1212
|
+
isPrintingSvg: x(ar)
|
|
1213
|
+
} }, void 0, !0)
|
|
1214
|
+
], 46, rt)), e.$slots.hint ? (_(), f("div", mt, [b(e.$slots, "hint", g(h({
|
|
1215
|
+
hint: k.value.a11y.translations.keyboardNavigation,
|
|
1216
|
+
isVisible: Jt.value
|
|
1217
|
+
})), void 0, !0)])) : d("", !0)]),
|
|
1218
|
+
e.$slots.watermark ? (_(), f("div", ht, [b(e.$slots, "watermark", g(h({ isPrinting: x(on) || x(sn) || x(ir) || x(ar) })), void 0, !0)])) : d("", !0),
|
|
1219
|
+
p("div", { id: `legend-bottom-${T.value}` }, null, 8, gt),
|
|
1220
|
+
Ut.value && (k.value.style.chart.legend.show || e.$slots.legend) ? (_(), u(Le, {
|
|
1221
|
+
key: 6,
|
|
1222
|
+
to: k.value.style.chart.legend.position === "top" ? `#legend-top-${T.value}` : `#legend-bottom-${T.value}`
|
|
1223
|
+
}, [p("div", {
|
|
1224
|
+
ref_key: "chartLegend",
|
|
1225
|
+
ref: Lt
|
|
1226
|
+
}, [b(e.$slots, "legend", { legend: q.value }, () => [k.value.style.chart.legend.show ? (_(), u(Pe, {
|
|
1227
|
+
key: `legend_${Ht.value}`,
|
|
1228
|
+
legendSet: q.value,
|
|
1229
|
+
config: Pn.value,
|
|
1230
|
+
isCursorPointer: A.value,
|
|
1231
|
+
onClickMarker: t[0] ||= ({ legend: e }) => K(e.uid)
|
|
1232
|
+
}, Re({
|
|
1233
|
+
item: C(({ legend: e }) => [p("div", {
|
|
1234
|
+
onClick: (t) => e.segregate(),
|
|
1235
|
+
style: We(`opacity:${U.value.includes(e.uid) ? .5 : 1}`)
|
|
1236
|
+
}, Ye(e.display), 13, _t)]),
|
|
1237
|
+
legendToggle: C(() => [q.value.length > 2 && k.value.style.chart.legend.selectAllToggle.show && !x(Xt) ? (_(), u(ke, {
|
|
1238
|
+
key: 0,
|
|
1239
|
+
backgroundColor: k.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1240
|
+
color: k.value.style.chart.legend.selectAllToggle.color,
|
|
1241
|
+
fontSize: k.value.style.chart.legend.fontSize,
|
|
1242
|
+
checked: U.value.length > 0,
|
|
1243
|
+
isCursorPointer: A.value,
|
|
1244
|
+
onToggle: kn
|
|
1245
|
+
}, null, 8, [
|
|
1246
|
+
"backgroundColor",
|
|
1247
|
+
"color",
|
|
1248
|
+
"fontSize",
|
|
1249
|
+
"checked",
|
|
1250
|
+
"isCursorPointer"
|
|
1251
|
+
])) : d("", !0)]),
|
|
1252
|
+
_: 2
|
|
1253
|
+
}, [e.$slots.pattern ? {
|
|
1254
|
+
name: "legend-pattern",
|
|
1255
|
+
fn: C(({ legend: e, index: t }) => [Be(we, {
|
|
1256
|
+
shape: e.shape,
|
|
1257
|
+
radius: 30,
|
|
1258
|
+
stroke: "none",
|
|
1259
|
+
plot: {
|
|
1260
|
+
x: 30,
|
|
1261
|
+
y: 30
|
|
1262
|
+
},
|
|
1263
|
+
fill: `url(#pattern_${T.value}_${t})`
|
|
1264
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1265
|
+
key: "0"
|
|
1266
|
+
} : void 0]), 1032, [
|
|
1267
|
+
"legendSet",
|
|
1268
|
+
"config",
|
|
1269
|
+
"isCursorPointer"
|
|
1270
|
+
])) : d("", !0)], !0)], 512)], 8, ["to"])) : d("", !0),
|
|
1271
|
+
e.$slots.source ? (_(), f("div", {
|
|
1272
|
+
key: 7,
|
|
1273
|
+
ref_key: "source",
|
|
1274
|
+
ref: Rt,
|
|
1275
|
+
dir: "auto"
|
|
1276
|
+
}, [b(e.$slots, "source", {}, void 0, !0)], 512)) : d("", !0),
|
|
1277
|
+
Be(x(yt), {
|
|
1278
|
+
teleportTo: k.value.style.chart.tooltip.teleportTo,
|
|
1279
|
+
show: P.value.showTooltip && Nt.value && U.value.length < w.dataset.length,
|
|
1280
|
+
backgroundColor: k.value.style.chart.tooltip.backgroundColor,
|
|
1281
|
+
color: k.value.style.chart.tooltip.color,
|
|
1282
|
+
borderRadius: k.value.style.chart.tooltip.borderRadius,
|
|
1283
|
+
borderColor: k.value.style.chart.tooltip.borderColor,
|
|
1284
|
+
borderWidth: k.value.style.chart.tooltip.borderWidth,
|
|
1285
|
+
backgroundOpacity: k.value.style.chart.tooltip.backgroundOpacity,
|
|
1286
|
+
position: k.value.style.chart.tooltip.position,
|
|
1287
|
+
offsetX: k.value.style.chart.tooltip.offsetX,
|
|
1288
|
+
offsetY: k.value.style.chart.tooltip.offsetY,
|
|
1289
|
+
parent: D.value,
|
|
1290
|
+
content: Pt.value,
|
|
1291
|
+
isCustom: k.value.style.chart.tooltip.customFormat && typeof k.value.style.chart.tooltip.customFormat == "function",
|
|
1292
|
+
fontSize: k.value.style.chart.tooltip.fontSize,
|
|
1293
|
+
isFullscreen: Q.value,
|
|
1294
|
+
smooth: k.value.style.chart.tooltip.smooth,
|
|
1295
|
+
backdropFilter: k.value.style.chart.tooltip.backdropFilter,
|
|
1296
|
+
smoothForce: k.value.style.chart.tooltip.smoothForce,
|
|
1297
|
+
smoothSnapThreshold: k.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1298
|
+
isA11yMode: qt.value === "keyboard",
|
|
1299
|
+
a11yPosition: Kt.value
|
|
1300
|
+
}, {
|
|
1301
|
+
"tooltip-before": C(() => [b(e.$slots, "tooltip-before", g(h({ ...Fn.value })), void 0, !0)]),
|
|
1302
|
+
tooltip: C(() => [b(e.$slots, "tooltip", g(h({ ...Fn.value })), void 0, !0)]),
|
|
1303
|
+
"tooltip-after": C(() => [b(e.$slots, "tooltip-after", g(h({ ...Fn.value })), void 0, !0)]),
|
|
1304
|
+
_: 3
|
|
1305
|
+
}, 8, [
|
|
1306
|
+
"teleportTo",
|
|
1307
|
+
"show",
|
|
1308
|
+
"backgroundColor",
|
|
1309
|
+
"color",
|
|
1310
|
+
"borderRadius",
|
|
1311
|
+
"borderColor",
|
|
1312
|
+
"borderWidth",
|
|
1313
|
+
"backgroundOpacity",
|
|
1314
|
+
"position",
|
|
1315
|
+
"offsetX",
|
|
1316
|
+
"offsetY",
|
|
1317
|
+
"parent",
|
|
1318
|
+
"content",
|
|
1319
|
+
"isCustom",
|
|
1320
|
+
"fontSize",
|
|
1321
|
+
"isFullscreen",
|
|
1322
|
+
"smooth",
|
|
1323
|
+
"backdropFilter",
|
|
1324
|
+
"smoothForce",
|
|
1325
|
+
"smoothSnapThreshold",
|
|
1326
|
+
"isA11yMode",
|
|
1327
|
+
"a11yPosition"
|
|
1328
|
+
]),
|
|
1329
|
+
Mt.value && k.value.userOptions.buttons.table ? (_(), u(qe($.value.component), Ve({ key: 8 }, $.value.props, {
|
|
1330
|
+
ref_key: "tableUnit",
|
|
1331
|
+
ref: Wt,
|
|
1332
|
+
onClose: $n
|
|
1333
|
+
}), Re({
|
|
1334
|
+
content: C(() => [(_(), u(x(xt), {
|
|
1335
|
+
key: `table_${Vt.value}`,
|
|
1336
|
+
colNames: Z.value.colNames,
|
|
1337
|
+
head: Z.value.head,
|
|
1338
|
+
body: Z.value.body,
|
|
1339
|
+
config: Z.value.config,
|
|
1340
|
+
title: k.value.table.useDialog ? "" : $.value.title,
|
|
1341
|
+
withCloseButton: !k.value.table.useDialog,
|
|
1342
|
+
isCursorPointer: A.value,
|
|
1343
|
+
onClose: $n
|
|
1344
|
+
}, {
|
|
1345
|
+
th: C(({ th: e }) => [p("div", {
|
|
1346
|
+
innerHTML: e,
|
|
1347
|
+
style: {
|
|
1348
|
+
display: "flex",
|
|
1349
|
+
"align-items": "center"
|
|
1350
|
+
}
|
|
1351
|
+
}, null, 8, vt)]),
|
|
1352
|
+
td: C(({ td: e }) => [ze(Ye(e.name || e), 1)]),
|
|
1353
|
+
_: 1
|
|
1354
|
+
}, 8, [
|
|
1355
|
+
"colNames",
|
|
1356
|
+
"head",
|
|
1357
|
+
"body",
|
|
1358
|
+
"config",
|
|
1359
|
+
"title",
|
|
1360
|
+
"withCloseButton",
|
|
1361
|
+
"isCursorPointer"
|
|
1362
|
+
]))]),
|
|
1363
|
+
_: 2
|
|
1364
|
+
}, [k.value.table.useDialog ? {
|
|
1365
|
+
name: "title",
|
|
1366
|
+
fn: C(() => [ze(Ye($.value.title), 1)]),
|
|
1367
|
+
key: "0"
|
|
1368
|
+
} : void 0, k.value.table.useDialog ? {
|
|
1369
|
+
name: "actions",
|
|
1370
|
+
fn: C(() => [p("button", {
|
|
1371
|
+
tabindex: "0",
|
|
1372
|
+
class: "vue-ui-user-options-button",
|
|
1373
|
+
onClick: t[1] ||= (e) => Kn(k.value.userOptions.callbacks.csv),
|
|
1374
|
+
style: We({ cursor: A.value ? "pointer" : "default" })
|
|
1375
|
+
}, [Be(x(bt), {
|
|
1376
|
+
name: "fileCsv",
|
|
1377
|
+
stroke: $.value.props.color
|
|
1378
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1379
|
+
key: "1"
|
|
1380
|
+
} : void 0]), 1040)) : d("", !0),
|
|
1381
|
+
b(e.$slots, "skeleton", {}, () => [x(Xt) ? (_(), u(ve, { key: 0 })) : d("", !0)], !0)
|
|
1382
|
+
], 46, $e));
|
|
1383
|
+
}
|
|
1384
|
+
}, [["__scopeId", "data-v-1d448c79"]]);
|
|
1385
|
+
//#endregion
|
|
1386
|
+
export { Qe as n, yt as t };
|