vue-data-ui 3.25.11 → 3.25.13
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-DLn-pcrh.js → Arrow-BhZDUeMp.js} +1 -1
- package/dist/{BaseDraggableDialog-Gm4Q30j0.js → BaseDraggableDialog-Ck6R5Q0K.js} +2 -2
- package/dist/{BaseIcon-D8R6_sKH.js → BaseIcon-Dlz7gfx0.js} +1 -1
- package/dist/{BaseLegendToggle-CXQrLjd-.js → BaseLegendToggle-DGG65LAR.js} +1 -1
- package/dist/{BaseZoomControls-BTzjVDPM.js → BaseZoomControls-BK0PxEa8.js} +2 -2
- package/dist/{ColorPicker-CUy15T72.js → ColorPicker-DMTwxvi_.js} +2 -2
- package/dist/{DataTable-oiM9uWrQ.js → DataTable-BD1eZ0zB.js} +2 -2
- package/dist/{HillActions-Dn8aKOVJ.js → HillActions-CiP2m7Nz.js} +1 -1
- package/dist/{Legend-X4kF4PvW.js → Legend-C0Ln0VNe.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DFXjpRyl.js → NonSvgPenAndPaper-BjrMLISf.js} +3 -3
- package/dist/{PackageVersion-CEvZNFTz.js → PackageVersion-D5QkTJQU.js} +1 -1
- package/dist/{PenAndPaper-Cd3nItcO.js → PenAndPaper-XdUD8uB3.js} +3 -3
- package/dist/{Shape-CIqU-p2F.js → Shape-VCdxvFV9.js} +3 -3
- package/dist/{SlicerPreview-Ccss7Vsq.js → SlicerPreview-BJ4usfYd.js} +21 -21
- package/dist/{SparkTooltip-L3SliZbR.js → SparkTooltip-B1gRxPfb.js} +6 -6
- package/dist/{Title-CPHi-evi.js → Title-DeqmC-vN.js} +1 -1
- package/dist/{Tooltip-hhrkQ3Lk.js → Tooltip-DZ4a3XJQ.js} +1 -1
- package/dist/{UserOptions-qo_Tsqci.js → UserOptions-wFD9vo9g.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-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/{dom-to-png-BR4imuKV.js → dom-to-png-DdqmzDdY.js} +1 -1
- package/dist/exposedLib-BBtjpydc.js +28 -0
- package/dist/{img-BkMKbWsI.js → img-W50sC9SC.js} +1 -1
- package/dist/{labelUtils-BXX2NzRe.js → labelUtils-Dvm-7rse.js} +1 -1
- package/dist/{lib-Dql7cqyA.js → lib-DOpaUOQx.js} +191 -88
- package/dist/{package-B10eQN5L.js → package-Cmcke8zR.js} +1 -1
- package/dist/{pdf-BSOs_GZz.js → pdf-zGbDDpCi.js} +1 -1
- package/dist/{render-common-CZ6-MONw.js → render-common-CG1wuHZY.js} +16 -16
- 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 +6 -0
- package/dist/{useConfig-D32D002m.js → useConfig-C2uy4ltq.js} +2 -0
- package/dist/{useNestedProp-Chvyfpl-.js → useNestedProp-Bux0f4iY.js} +1 -1
- package/dist/{useObjectBindings-Cd_WuYIn.js → useObjectBindings-CEuNiBIT.js} +1 -1
- package/dist/{usePrinter-hohanNCX.js → usePrinter-BBBooAGP.js} +2 -2
- package/dist/utils.js +13 -13
- package/dist/{vue-data-ui-zJ1rNxIN.js → vue-data-ui-BVzA0tEV.js} +70 -70
- package/dist/vue-data-ui.js +75 -75
- package/dist/{vue-ui-3d-bar-CKTAkCAN.js → vue-ui-3d-bar-Ckauu3d4.js} +536 -536
- package/dist/{vue-ui-accordion-DmkL8A59.js → vue-ui-accordion-yHZMJLaY.js} +4 -4
- package/dist/vue-ui-age-pyramid-BczIt1-U.js +1305 -0
- package/dist/{vue-ui-annotator-BLYRy--7.js → vue-ui-annotator-BGB6K6u0.js} +60 -60
- package/dist/{vue-ui-bullet-Ck398xn8.js → vue-ui-bullet-BoTsLccZ.js} +84 -84
- package/dist/{vue-ui-bump-DyA47yse.js → vue-ui-bump-B5ztSSQO.js} +105 -105
- package/dist/{vue-ui-candlestick-DCavjk1j.js → vue-ui-candlestick-BJtdA4Yu.js} +98 -98
- package/dist/vue-ui-carousel-table-D-3KSWok.js +467 -0
- package/dist/vue-ui-chestnut-W2l-W0_e.js +2016 -0
- package/dist/{vue-ui-chord-GgA7QFUH.js → vue-ui-chord-BFPQsMj8.js} +63 -63
- package/dist/{vue-ui-circle-pack-BUXTVdy3.js → vue-ui-circle-pack-BtPc1BR3.js} +50 -50
- package/dist/{vue-ui-cursor-CEejESe_.js → vue-ui-cursor-CpNOiwkt.js} +61 -61
- package/dist/{vue-ui-dag-C1c6scxC.js → vue-ui-dag-i-zPwLcN.js} +44 -44
- package/dist/{vue-ui-dashboard-BZBJM7dN.js → vue-ui-dashboard-DtaW9a2P.js} +70 -70
- package/dist/{vue-ui-digits-CsougDlU.js → vue-ui-digits-BIlec9af.js} +4 -4
- package/dist/{vue-ui-donut-lBgSYKgO.js → vue-ui-donut-Bgf-n95J.js} +551 -551
- package/dist/{vue-ui-donut-Be9jKelz.js → vue-ui-donut-CJlBEyxu.js} +203 -203
- package/dist/vue-ui-donut-evolution-C0BKntfL.js +1552 -0
- package/dist/{vue-ui-dumbbell-CwmA5x9G.js → vue-ui-dumbbell-C112YLkC.js} +87 -87
- package/dist/{vue-ui-flow-CRhh8SSN.js → vue-ui-flow-j4bDg9Zd.js} +99 -99
- package/dist/{vue-ui-funnel-DH1hW8Gw.js → vue-ui-funnel-CVHpfBCW.js} +40 -40
- package/dist/vue-ui-galaxy-ChGpUWh8.js +1097 -0
- package/dist/{vue-ui-gauge-CV4-Rn7K.js → vue-ui-gauge-Cp00vXfG.js} +190 -190
- package/dist/{vue-ui-geo-BocLrguL.js → vue-ui-geo-B4hDk5NO.js} +12 -12
- package/dist/{vue-ui-gizmo-6wKlI5PC.js → vue-ui-gizmo-D6nCCsS4.js} +54 -54
- package/dist/vue-ui-heatmap-scVJc1cw.js +1606 -0
- package/dist/{vue-ui-hill-CeIZZFf5.js → vue-ui-hill-DnYUHGAK.js} +21 -21
- package/dist/vue-ui-history-plot-C5qAMaaW.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-D2aw-8tx.js → vue-ui-horizontal-bar-nEG4uvpv.js} +85 -85
- package/dist/{vue-ui-kpi-BQ967gzv.js → vue-ui-kpi-DOxId6xg.js} +12 -12
- package/dist/{vue-ui-label-Cs4ZlAqr.js → vue-ui-label-BDKY7BI7.js} +4 -4
- package/dist/{vue-ui-mini-loader-wGeACd-Y.js → vue-ui-mini-loader-BknVs9VJ.js} +3 -3
- package/dist/vue-ui-molecule-_x232mMu.js +941 -0
- package/dist/vue-ui-mood-radar-D-F4855V.js +1111 -0
- package/dist/{vue-ui-nested-donuts-DT2zkLx2.js → vue-ui-nested-donuts-0E5IllFW.js} +481 -481
- package/dist/vue-ui-onion-Eip0S1H7.js +1247 -0
- package/dist/vue-ui-parallel-coordinate-plot-DO0sQdJw.js +1444 -0
- package/dist/vue-ui-quadrant-CA0ClWfL.js +1979 -0
- package/dist/{vue-ui-quick-chart-CkPu6GMh.js → vue-ui-quick-chart-D-VuAoll.js} +169 -169
- package/dist/vue-ui-radar-BTD7Y0Ps.js +1386 -0
- package/dist/vue-ui-rating-C_Qj6gnP.js +359 -0
- package/dist/vue-ui-relation-circle-CcxLBVFV.js +905 -0
- package/dist/vue-ui-ridgeline-BZrzbbhb.js +1630 -0
- package/dist/{vue-ui-rings-CBtHZ5Pp.js → vue-ui-rings-CO48GOP2.js} +78 -78
- package/dist/{vue-ui-scatter-DzePsQEe.js → vue-ui-scatter-DrxUgZbQ.js} +136 -136
- package/dist/{vue-ui-skeleton-C347nFnE.js → vue-ui-skeleton-CeKjW4MX.js} +510 -510
- package/dist/{vue-ui-smiley-BIjAIpJ9.js → vue-ui-smiley-BvRwx69s.js} +6 -6
- package/dist/{vue-ui-spark-trend-Di_7Da43.js → vue-ui-spark-trend-DnujGRyt.js} +96 -96
- package/dist/{vue-ui-sparkbar-CbJ-fKc6.js → vue-ui-sparkbar-Cd_uhYGD.js} +113 -113
- package/dist/vue-ui-sparkgauge-hT31YEtt.js +268 -0
- package/dist/vue-ui-sparkhistogram-PKlTYhKA.js +589 -0
- package/dist/vue-ui-sparkline-BSu1uRvP.js +1610 -0
- package/dist/{vue-ui-sparkstackbar-IM_l98X-.js → vue-ui-sparkstackbar-R0ij2vi1.js} +183 -183
- package/dist/vue-ui-stackbar-BrzzkGFk.js +2369 -0
- package/dist/vue-ui-stackline-zEX3gR3y.js +2483 -0
- package/dist/{vue-ui-strip-plot-CVV0t6mb.js → vue-ui-strip-plot-DR3N56rS.js} +253 -253
- package/dist/{vue-ui-table-nAGCIZKg.js → vue-ui-table-Bg6BeLrf.js} +117 -117
- package/dist/{vue-ui-table-heatmap-D5F5bLx5.js → vue-ui-table-heatmap-C1b1Pcp8.js} +95 -95
- package/dist/vue-ui-table-sparkline-CkVXyequ.js +738 -0
- package/dist/{vue-ui-thermometer-Ccr2ZnzI.js → vue-ui-thermometer-CqkaMF7Z.js} +23 -23
- package/dist/{vue-ui-timer-DkW-P6EG.js → vue-ui-timer-CgJvNwBv.js} +13 -13
- package/dist/{vue-ui-tiremarks-Bf2anKLr.js → vue-ui-tiremarks-B078YJ9M.js} +30 -30
- package/dist/{vue-ui-treemap-Wy61KlkN.js → vue-ui-treemap-Cfjf8mDl.js} +77 -77
- package/dist/vue-ui-waffle-BZIcPa0l.js +1633 -0
- package/dist/{vue-ui-wheel-DGhu_B8n.js → vue-ui-wheel-CPTm8AHn.js} +185 -185
- package/dist/{vue-ui-word-cloud-CdRMst8U.js → vue-ui-word-cloud-DnGblUwj.js} +46 -46
- package/dist/{vue-ui-world-Bc4hMzzB.js → vue-ui-world-KkcpeKqp.js} +133 -133
- package/dist/vue-ui-xy-C6lVqZnx.js +5367 -0
- package/dist/{vue-ui-xy-CbgQs7yW.js → vue-ui-xy-ClCV7xA5.js} +169 -169
- package/dist/{vue-ui-xy-canvas-R2xbgDOy.js → vue-ui-xy-canvas-BlpCbXKR.js} +435 -435
- package/package.json +1 -1
- package/dist/exposedLib-CG3aXJ-v.js +0 -28
- package/dist/vue-ui-age-pyramid-SpPactMh.js +0 -1305
- package/dist/vue-ui-carousel-table-DCnVD0BJ.js +0 -467
- package/dist/vue-ui-chestnut-BDBdizBp.js +0 -2016
- package/dist/vue-ui-donut-evolution-vLMhwz4K.js +0 -1552
- package/dist/vue-ui-galaxy-CiqILfxR.js +0 -1097
- package/dist/vue-ui-heatmap-DGXXRsr4.js +0 -1606
- package/dist/vue-ui-history-plot-CporPpg9.js +0 -1710
- package/dist/vue-ui-molecule-CvDC9Ht5.js +0 -941
- package/dist/vue-ui-mood-radar-BK1va5-H.js +0 -1111
- package/dist/vue-ui-onion-DPMikBzZ.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-DMPxUL3p.js +0 -1444
- package/dist/vue-ui-quadrant-DFkIeJXo.js +0 -1979
- package/dist/vue-ui-radar-B3OOLJal.js +0 -1386
- package/dist/vue-ui-rating-Criq0ofQ.js +0 -359
- package/dist/vue-ui-relation-circle-I6e5UxgY.js +0 -905
- package/dist/vue-ui-ridgeline-FmmdCdy9.js +0 -1630
- package/dist/vue-ui-sparkgauge-Bb9-yFTb.js +0 -268
- package/dist/vue-ui-sparkhistogram-kbbbDVul.js +0 -589
- package/dist/vue-ui-sparkline-BF0Fdo6v.js +0 -1587
- package/dist/vue-ui-stackbar-CaEXVeo5.js +0 -2369
- package/dist/vue-ui-stackline-MgvhcBfm.js +0 -2483
- package/dist/vue-ui-table-sparkline-Bf2hjBwq.js +0 -738
- package/dist/vue-ui-waffle-CkIFp-AN.js +0 -1633
- package/dist/vue-ui-xy-DybWfQrI.js +0 -5298
|
@@ -0,0 +1,1633 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, $t as n, D as r, Et as i, Jt as a, Rt as o, S as s, Vt as c, X as l, at as ee, et as te, ft as ne, i as re, n as ie, nt as ae, qt as oe, r as se, t as ce, tn as le, vt as ue, w as de } from "./lib-DOpaUOQx.js";
|
|
3
|
+
import { n as fe, t as pe } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as me } from "./useConfig-C2uy4ltq.js";
|
|
5
|
+
import { t as he } from "./usePrinter-BBBooAGP.js";
|
|
6
|
+
import { n as ge, t as _e } from "./BaseScanner-Dzc8VT3j.js";
|
|
7
|
+
import { t as ve } from "./useNestedProp-Bux0f4iY.js";
|
|
8
|
+
import { t as ye } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as be } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as xe } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as Se } from "./img-W50sC9SC.js";
|
|
12
|
+
import { n as Ce } from "./Title-DeqmC-vN.js";
|
|
13
|
+
import { t as we } from "./Shape-VCdxvFV9.js";
|
|
14
|
+
import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { l as Ee, t as De } from "./useResponsive-ZtArZtUf.js";
|
|
16
|
+
import { t as Oe } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as ke } from "./BaseLegendToggle-DGG65LAR.js";
|
|
18
|
+
import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as je } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as Ne } from "./labelUtils-Dvm-7rse.js";
|
|
22
|
+
import { t as Pe } from "./Legend-C0Ln0VNe.js";
|
|
23
|
+
import { t as Fe } from "./usePrefersMotion-BC-CsqR1.js";
|
|
24
|
+
import { t as Ie } from "./vue_ui_waffle-DE_DiSVP.js";
|
|
25
|
+
import { Fragment as u, Teleport as Le, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as Ve, guardReactiveProps as g, mergeProps as He, nextTick as Ue, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as We, onMounted as Ge, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as Ke, shallowRef as qe, toDisplayString as Je, toRefs as Ye, unref as w, useSlots as Xe, watch as Ze, withCtx as T } from "vue";
|
|
26
|
+
//#region src/components/vue-ui-waffle.vue
|
|
27
|
+
var Qe = /* @__PURE__ */ e({ default: () => Et }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
|
|
28
|
+
"xmlns",
|
|
29
|
+
"aria-describedby",
|
|
30
|
+
"viewBox"
|
|
31
|
+
], it = ["id"], at = [
|
|
32
|
+
"x",
|
|
33
|
+
"y",
|
|
34
|
+
"height",
|
|
35
|
+
"width"
|
|
36
|
+
], ot = ["height", "width"], st = { key: 0 }, ct = [
|
|
37
|
+
"d",
|
|
38
|
+
"stroke",
|
|
39
|
+
"stroke-width",
|
|
40
|
+
"filter"
|
|
41
|
+
], lt = [
|
|
42
|
+
"d",
|
|
43
|
+
"fill",
|
|
44
|
+
"stroke",
|
|
45
|
+
"stroke-width",
|
|
46
|
+
"filter"
|
|
47
|
+
], ut = { key: 0 }, dt = [
|
|
48
|
+
"d",
|
|
49
|
+
"fill",
|
|
50
|
+
"filter"
|
|
51
|
+
], ft = [
|
|
52
|
+
"rx",
|
|
53
|
+
"x",
|
|
54
|
+
"y",
|
|
55
|
+
"height",
|
|
56
|
+
"width",
|
|
57
|
+
"stroke",
|
|
58
|
+
"stroke-width",
|
|
59
|
+
"filter"
|
|
60
|
+
], pt = [
|
|
61
|
+
"rx",
|
|
62
|
+
"x",
|
|
63
|
+
"y",
|
|
64
|
+
"height",
|
|
65
|
+
"width",
|
|
66
|
+
"fill",
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width",
|
|
69
|
+
"filter"
|
|
70
|
+
], mt = { key: 0 }, ht = [
|
|
71
|
+
"rx",
|
|
72
|
+
"x",
|
|
73
|
+
"y",
|
|
74
|
+
"height",
|
|
75
|
+
"width",
|
|
76
|
+
"fill",
|
|
77
|
+
"filter"
|
|
78
|
+
], gt = [
|
|
79
|
+
"points",
|
|
80
|
+
"stroke",
|
|
81
|
+
"stroke-width",
|
|
82
|
+
"stroke-linejoin"
|
|
83
|
+
], _t = [
|
|
84
|
+
"textContent",
|
|
85
|
+
"x",
|
|
86
|
+
"y",
|
|
87
|
+
"font-size",
|
|
88
|
+
"fill",
|
|
89
|
+
"filter"
|
|
90
|
+
], vt = [
|
|
91
|
+
"d",
|
|
92
|
+
"onMouseover",
|
|
93
|
+
"onMouseleave",
|
|
94
|
+
"onClick"
|
|
95
|
+
], yt = [
|
|
96
|
+
"x",
|
|
97
|
+
"y",
|
|
98
|
+
"height",
|
|
99
|
+
"width",
|
|
100
|
+
"onMouseover",
|
|
101
|
+
"onMouseleave",
|
|
102
|
+
"onClick"
|
|
103
|
+
], bt = {
|
|
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
|
+
}, xt = {
|
|
114
|
+
key: 5,
|
|
115
|
+
class: "vue-data-ui-watermark"
|
|
116
|
+
}, St = ["id"], Ct = ["onClick"], wt = { key: 0 }, Tt = { key: 1 }, Et = /*#__PURE__*/ Te({
|
|
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: Te, emit: Qe }) {
|
|
134
|
+
let Et = Ve(() => import("./Tooltip-DZ4a3XJQ.js")), Dt = Ve(() => import("./BaseIcon-Dlz7gfx0.js").then((e) => e.n)), Ot = Ve(() => import("./DataTable-BD1eZ0zB.js")), kt = Ve(() => import("./vue-ui-accordion-yHZMJLaY.js").then((e) => e.n)), At = Ve(() => import("./UserOptions-wFD9vo9g.js").then((e) => e.n)), jt = Ve(() => import("./PenAndPaper-XdUD8uB3.js").then((e) => e.t)), Mt = Ve(() => import("./PackageVersion-D5QkTJQU.js").then((e) => e.t)), Nt = Ve(() => import("./BaseDraggableDialog-Ck6R5Q0K.js").then((e) => e.n)), { vue_ui_waffle: Pt } = me(), { isThemeValid: Ft, warnInvalidTheme: It } = ye(), Lt = Fe(), E = e, Rt = Xe(), zt = d({
|
|
135
|
+
get() {
|
|
136
|
+
return !!E.dataset && E.dataset.length;
|
|
137
|
+
},
|
|
138
|
+
set(e) {
|
|
139
|
+
return e;
|
|
140
|
+
}
|
|
141
|
+
}), D = x(l()), Bt = x(!1), Vt = x(""), O = x(null), Ht = x(0), k = x(null), Ut = x(null), Wt = x(null), Gt = x(null), Kt = x(null), qt = x(0), Jt = x(0), Yt = x(0), Xt = x(!1), Zt = x(null), Qt = x(null), A = x(null), $t = x({
|
|
142
|
+
x: 0,
|
|
143
|
+
y: 0
|
|
144
|
+
}), en = x("pointer"), tn = x(!1), j = x(pn()), M = d(() => j.value.userOptions), N = d(() => j.value.style.chart.tooltip), P = d(() => j.value.style.chart.legend), F = d(() => j.value.style.chart.layout.rect), I = d(() => j.value.style.chart.layout.grid), L = d(() => j.value.style.chart.layout), R = d(() => j.value.style.chart), { transitionEnabled: nn } = xe({
|
|
145
|
+
config: () => j.value.transitions,
|
|
146
|
+
dataset: () => E.dataset
|
|
147
|
+
});
|
|
148
|
+
fe({
|
|
149
|
+
config: () => j.value,
|
|
150
|
+
dataset: () => E.dataset,
|
|
151
|
+
component: "VueUiWaffle",
|
|
152
|
+
rules: [
|
|
153
|
+
pe.singleSeries,
|
|
154
|
+
pe.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 = d(() => j.value.userOptions.useCursorPointer), an = d(() => le({
|
|
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: j.value.skeletonConfig ?? {}
|
|
188
|
+
})), { loading: on, FINAL_DATASET: sn, manualLoading: cn } = ge({
|
|
189
|
+
...Ye(E),
|
|
190
|
+
FINAL_CONFIG: j,
|
|
191
|
+
prepareConfig: pn,
|
|
192
|
+
callback: () => {
|
|
193
|
+
Promise.resolve().then(async () => {
|
|
194
|
+
G.value = kn();
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
skeletonDataset: E.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: le({
|
|
215
|
+
defaultConfig: j.value,
|
|
216
|
+
userConfig: an.value
|
|
217
|
+
})
|
|
218
|
+
}), { userOptionsVisible: ln, setUserOptionsVisibility: un, keepUserOptionState: dn } = je({ config: j.value }), { svgRef: fn } = Me({ config: R.value.title });
|
|
219
|
+
function pn() {
|
|
220
|
+
let e = ve({
|
|
221
|
+
userConfig: E.config,
|
|
222
|
+
defaultConfig: Pt
|
|
223
|
+
}), t = e.theme;
|
|
224
|
+
if (!t) return e;
|
|
225
|
+
if (!Ft.value(e)) return It(e), e;
|
|
226
|
+
let r = ve({
|
|
227
|
+
userConfig: Ie[t] || E.config,
|
|
228
|
+
defaultConfig: e
|
|
229
|
+
}), i = ve({
|
|
230
|
+
userConfig: E.config,
|
|
231
|
+
defaultConfig: r
|
|
232
|
+
});
|
|
233
|
+
return {
|
|
234
|
+
...i,
|
|
235
|
+
customPalette: i.customPalette.length ? i.customPalette : n[t] || c
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function mn(e) {
|
|
239
|
+
let t = te(e);
|
|
240
|
+
return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
|
|
241
|
+
}
|
|
242
|
+
let hn = mn(E.config);
|
|
243
|
+
Ze(() => E.config, (e, t) => {
|
|
244
|
+
let n = mn(e), r = n !== hn;
|
|
245
|
+
hn = n;
|
|
246
|
+
let i = pn();
|
|
247
|
+
if (!r) {
|
|
248
|
+
j.value.style.chart.tooltip = i.style.chart.tooltip, B.value.showTooltip = j.value.style.chart.tooltip.show;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
on.value || (j.value = i), ln.value = !j.value.userOptions.showOnChartHover, vn(), qt.value += 1, Jt.value += 1, Yt.value += 1, B.value.showTable = j.value.table.show, B.value.showTooltip = N.value.show;
|
|
252
|
+
}, { deep: !0 });
|
|
253
|
+
let z = qe(null), gn = qe(null), _n = d(() => j.value.debug);
|
|
254
|
+
function vn() {
|
|
255
|
+
if (o(E.dataset) ? (ee({
|
|
256
|
+
componentName: "VueUiWaffle",
|
|
257
|
+
type: "dataset",
|
|
258
|
+
debug: _n.value
|
|
259
|
+
}), zt.value = !1, cn.value = !0) : _n.value && E.dataset.forEach((e, t) => {
|
|
260
|
+
ue({
|
|
261
|
+
datasetObject: e,
|
|
262
|
+
requiredAttributes: ["name", "values"]
|
|
263
|
+
}).forEach((e) => {
|
|
264
|
+
ee({
|
|
265
|
+
componentName: "VueUiWaffle",
|
|
266
|
+
type: "datasetSerieAttribute",
|
|
267
|
+
property: e,
|
|
268
|
+
index: t
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}), o(E.dataset) || (cn.value = j.value.loading), j.value.responsive) {
|
|
272
|
+
let e = Ee(() => {
|
|
273
|
+
let { width: e, height: t } = De({
|
|
274
|
+
chart: k.value,
|
|
275
|
+
title: R.value.title.text ? Ut.value : null,
|
|
276
|
+
legend: P.value.show ? Wt.value : null,
|
|
277
|
+
source: Gt.value,
|
|
278
|
+
noTitle: Kt.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 = k.value.parentNode, z.value.observe(gn.value);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
Ge(() => {
|
|
288
|
+
Xt.value = !0, vn();
|
|
289
|
+
}), We(() => {
|
|
290
|
+
z.value && (gn.value && z.value.unobserve(gn.value), z.value.disconnect());
|
|
291
|
+
});
|
|
292
|
+
let { isPrinting: yn, isImaging: bn, generatePdf: xn, generateImage: Sn } = he({
|
|
293
|
+
elementId: `vue-ui-waffle_${D.value}`,
|
|
294
|
+
fileName: R.value.title.text || "vue-ui-waffle",
|
|
295
|
+
options: j.value.userOptions.print
|
|
296
|
+
}), Cn = d(() => j.value.userOptions.show && !R.value.title.text), wn = d(() => de(j.value.customPalette)), B = x({
|
|
297
|
+
showTable: j.value.table.show,
|
|
298
|
+
showTooltip: N.value.show
|
|
299
|
+
});
|
|
300
|
+
Ze(j, () => {
|
|
301
|
+
B.value = {
|
|
302
|
+
showTable: j.value.table.show,
|
|
303
|
+
showTooltip: N.value.show
|
|
304
|
+
};
|
|
305
|
+
}, { immediate: !0 });
|
|
306
|
+
let V = x({
|
|
307
|
+
height: 512,
|
|
308
|
+
width: 512
|
|
309
|
+
}), H = x({
|
|
310
|
+
top: 0,
|
|
311
|
+
left: 0,
|
|
312
|
+
height: 512,
|
|
313
|
+
width: 512
|
|
314
|
+
}), U = d(() => (H.value.width - I.value.size * I.value.spaceBetween) / I.value.size), W = d(() => (H.value.height - I.value.size * I.value.spaceBetween) / I.value.size), Tn = d(() => Math.max(1e-4, H.value.width / I.value.size)), En = d(() => Math.max(1e-4, H.value.height / I.value.size));
|
|
315
|
+
function Dn(e) {
|
|
316
|
+
let t = I.value.size * I.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 = x(!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: s(e.color) || wn.value[t] || c[t] || c[t % c.length],
|
|
328
|
+
uid: `serie_${t}`,
|
|
329
|
+
absoluteIndex: t
|
|
330
|
+
}));
|
|
331
|
+
}
|
|
332
|
+
let An = d(() => kn()), G = x(An.value);
|
|
333
|
+
Ze(() => E.dataset, (e) => {
|
|
334
|
+
Array.isArray(e) && e.length > 0 && (cn.value = !1);
|
|
335
|
+
}, { immediate: !0 }), Ze(() => E.dataset, (e) => {
|
|
336
|
+
G.value = kn();
|
|
337
|
+
}, { deep: !0 });
|
|
338
|
+
let jn = d(() => Dn(G.value.filter((e, t) => !J.value.includes(e.uid)).map((e, t) => On.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), Mn = d(() => Dn(G.value.map((e, t) => On.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), Nn = d(() => I.value.size ** 2), Pn = d(() => (_n.value && sn.value.forEach((e, t) => {
|
|
339
|
+
[null, void 0].includes(e.values) && ee({
|
|
340
|
+
componentName: "VueUiWaffle",
|
|
341
|
+
type: "datasetSerieAttribute",
|
|
342
|
+
property: "values (number[])",
|
|
343
|
+
index: t
|
|
344
|
+
});
|
|
345
|
+
}), G.value.filter((e, t) => !J.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
|
+
}))), Fn = d(() => 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 In() {
|
|
371
|
+
return Fn.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 Ln = d(() => {
|
|
380
|
+
let e = 0;
|
|
381
|
+
return Pn.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
|
+
}), K = d(() => Ln.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 % I.value.size === 0
|
|
403
|
+
}))), q = d(() => {
|
|
404
|
+
let e = [];
|
|
405
|
+
for (let t = 0; t < I.value.size; t += 1) for (let n = 0; n < I.value.size; n += 1) e.push({
|
|
406
|
+
isStartOfLine: n === 0,
|
|
407
|
+
position: I.value.vertical ? t : n,
|
|
408
|
+
x: (I.value.vertical ? t : n) * (U.value + I.value.spaceBetween),
|
|
409
|
+
y: (I.value.vertical ? n : t) * (W.value + I.value.spaceBetween) + H.value.top
|
|
410
|
+
});
|
|
411
|
+
return e;
|
|
412
|
+
}), J = x([]), Rn = x(!1), zn = x(Object.create(null)), Bn = x(Object.create(null)), Y = x(0);
|
|
413
|
+
function Vn(e, t) {
|
|
414
|
+
G.value = G.value.map((n) => n.uid === e ? {
|
|
415
|
+
...n,
|
|
416
|
+
values: [t]
|
|
417
|
+
} : n);
|
|
418
|
+
}
|
|
419
|
+
function Hn(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 Un(e) {
|
|
424
|
+
let t = !1;
|
|
425
|
+
zn.value[e] && (cancelAnimationFrame(zn.value[e]), delete zn.value[e], t = !0), Bn.value[e] && (cancelAnimationFrame(Bn.value[e]), delete Bn.value[e], t = !0), t && (Y.value = Math.max(0, Y.value - 1), Rn.value = Y.value > 0);
|
|
426
|
+
}
|
|
427
|
+
function Wn({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
|
|
428
|
+
Un(e), Y.value += 1, Rn.value = !0;
|
|
429
|
+
let i = t;
|
|
430
|
+
return new Promise((a) => {
|
|
431
|
+
function o() {
|
|
432
|
+
if (r === "increase") {
|
|
433
|
+
if (i >= n) {
|
|
434
|
+
Vn(e, n), --Y.value, Y.value <= 0 && (Rn.value = !1), delete zn.value[e], a();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
i += n * .025, i > n && (i = n), Vn(e, i), zn.value[e] = requestAnimationFrame(o);
|
|
438
|
+
} else {
|
|
439
|
+
if (i <= t / 100) {
|
|
440
|
+
Vn(e, 0), --Y.value, Y.value <= 0 && (Rn.value = !1), delete Bn.value[e], a();
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
i /= 1.15, Vn(e, i), Bn.value[e] = requestAnimationFrame(o);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
o();
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
function Gn() {
|
|
450
|
+
G.value = An.value;
|
|
451
|
+
let e = J.value.length > 0;
|
|
452
|
+
if (!j.value.useAnimation) {
|
|
453
|
+
e ? J.value = [] : J.value = X.value.map((e) => e.uid);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
e ? [...J.value].forEach((e) => {
|
|
457
|
+
Kn(e, !0);
|
|
458
|
+
}) : X.value.map((e) => e.uid).forEach((e) => {
|
|
459
|
+
Kn(e, !0);
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function Kn(e, t = !1) {
|
|
463
|
+
if (On.value && !t) return;
|
|
464
|
+
let n = t || J.value.length < X.value.length - 1 && X.value.length > 1;
|
|
465
|
+
if (!j.value.useAnimation) {
|
|
466
|
+
J.value.includes(e) ? J.value = J.value.filter((t) => t !== e) : n && J.value.push(e);
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
let r = Hn(e, An.value), i = Hn(e, G.value);
|
|
470
|
+
if (i !== 0 || r !== 0) {
|
|
471
|
+
if (J.value.includes(e)) {
|
|
472
|
+
if (J.value = J.value.filter((t) => t !== e), Lt.value) {
|
|
473
|
+
Un(e), Vn(e, r), ar("selectLegend", Pn.value.map((e) => ({
|
|
474
|
+
name: e.name,
|
|
475
|
+
color: e.color,
|
|
476
|
+
value: e.value,
|
|
477
|
+
proportion: e.proportion
|
|
478
|
+
})));
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
Wn({
|
|
482
|
+
seriesId: e,
|
|
483
|
+
fromValue: i,
|
|
484
|
+
toValue: r,
|
|
485
|
+
mode: "increase"
|
|
486
|
+
}).then(() => {
|
|
487
|
+
ar("selectLegend", Pn.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 (Lt.value) {
|
|
498
|
+
Un(e), J.value.includes(e) || J.value.push(e), Vn(e, 0), ar("selectLegend", Pn.value.map((e) => ({
|
|
499
|
+
name: e.name,
|
|
500
|
+
color: e.color,
|
|
501
|
+
value: e.value,
|
|
502
|
+
proportion: e.proportion
|
|
503
|
+
})));
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
Wn({
|
|
507
|
+
seriesId: e,
|
|
508
|
+
fromValue: i,
|
|
509
|
+
toValue: 0,
|
|
510
|
+
mode: "decrease"
|
|
511
|
+
}).then(() => {
|
|
512
|
+
J.value.includes(e) || J.value.push(e), Vn(e, 0), ar("selectLegend", Pn.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 qn(e) {
|
|
523
|
+
return Fn.value.length ? Fn.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 Jn(e) {
|
|
526
|
+
let t = qn(e);
|
|
527
|
+
t !== null && J.value.includes(t.uid) && Kn(t.uid);
|
|
528
|
+
}
|
|
529
|
+
function Yn(e) {
|
|
530
|
+
let t = qn(e);
|
|
531
|
+
t !== null && (J.value.includes(t.uid) || Kn(t.uid));
|
|
532
|
+
}
|
|
533
|
+
function Xn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
534
|
+
return Ne({
|
|
535
|
+
config: i,
|
|
536
|
+
val: e,
|
|
537
|
+
percentage: t,
|
|
538
|
+
showVal: n,
|
|
539
|
+
showPercentage: r
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
let X = d(() => 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] || c[t] || c[t % c.length],
|
|
547
|
+
value: n,
|
|
548
|
+
proportion: r,
|
|
549
|
+
uid: e.uid,
|
|
550
|
+
shape: "square"
|
|
551
|
+
};
|
|
552
|
+
}).map((e, n) => {
|
|
553
|
+
let r = Xn({
|
|
554
|
+
val: re(L.value.labels.dataLabels.formatter, e.value, t({
|
|
555
|
+
p: L.value.labels.dataLabels.prefix,
|
|
556
|
+
v: e.value,
|
|
557
|
+
s: L.value.labels.dataLabels.suffix,
|
|
558
|
+
r: P.value.roundingValue
|
|
559
|
+
}), {
|
|
560
|
+
datapoint: e,
|
|
561
|
+
index: n
|
|
562
|
+
}),
|
|
563
|
+
percentage: isNaN(e.value / Z.value) ? "-" : t({
|
|
564
|
+
v: e.value / Z.value * 100,
|
|
565
|
+
s: "%",
|
|
566
|
+
r: P.value.roundingPercentage
|
|
567
|
+
}),
|
|
568
|
+
showVal: P.value.showValue,
|
|
569
|
+
showPercentage: P.value.showPercentage,
|
|
570
|
+
config: P.value
|
|
571
|
+
});
|
|
572
|
+
return {
|
|
573
|
+
...e,
|
|
574
|
+
opacity: J.value.includes(e.uid) ? .5 : 1,
|
|
575
|
+
segregate: () => Kn(e.uid),
|
|
576
|
+
isSegregated: J.value.includes(e.uid),
|
|
577
|
+
display: `${e.name}${P.value.showPercentage || P.value.showValue ? ": " : ""}${r}`
|
|
578
|
+
};
|
|
579
|
+
})), Zn = d(() => ({
|
|
580
|
+
cy: "waffle-div-legend",
|
|
581
|
+
backgroundColor: P.value.backgroundColor,
|
|
582
|
+
color: P.value.color,
|
|
583
|
+
fontSize: P.value.fontSize,
|
|
584
|
+
paddingBottom: 12,
|
|
585
|
+
fontWeight: P.value.bold ? "bold" : ""
|
|
586
|
+
})), Z = d(() => Pn.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Qn = x(null), $n = x(null), Q = d(() => {
|
|
587
|
+
let e = /* @__PURE__ */ new Map();
|
|
588
|
+
return K.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 = K.value[e];
|
|
610
|
+
j.value.events.datapointClick && j.value.events.datapointClick({
|
|
611
|
+
datapoint: t,
|
|
612
|
+
seriesIndex: t.serieIndex
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
function rr(e) {
|
|
616
|
+
let t = K.value[e];
|
|
617
|
+
j.value.events.datapointLeave && j.value.events.datapointLeave({
|
|
618
|
+
datapoint: t,
|
|
619
|
+
seriesIndex: t.serieIndex
|
|
620
|
+
}), $n.value = null, Bt.value = !1, O.value = null, A.value = null, en.value = "pointer";
|
|
621
|
+
}
|
|
622
|
+
function ir(e, n = "pointer") {
|
|
623
|
+
if (J.value.length === E.dataset.length) return;
|
|
624
|
+
let r = K.value[e];
|
|
625
|
+
if (!r) return;
|
|
626
|
+
en.value = n, A.value = r.serieIndex, Qn.value = {
|
|
627
|
+
datapoint: r,
|
|
628
|
+
seriesIndex: r.absoluteIndex,
|
|
629
|
+
series: G.value,
|
|
630
|
+
config: j.value
|
|
631
|
+
}, j.value.events.datapointEnter && $n.value !== r.serieIndex && j.value.events.datapointEnter({
|
|
632
|
+
datapoint: r,
|
|
633
|
+
seriesIndex: r.serieIndex
|
|
634
|
+
}), $n.value = r.serieIndex, Bt.value = !0, O.value = r.serieIndex;
|
|
635
|
+
let a = N.value.customFormat;
|
|
636
|
+
if (i(a) && ne(() => a({
|
|
637
|
+
seriesIndex: r.absoluteIndex,
|
|
638
|
+
datapoint: r,
|
|
639
|
+
series: G.value,
|
|
640
|
+
config: j.value
|
|
641
|
+
}))) Vt.value = a({
|
|
642
|
+
seriesIndex: r.absoluteIndex,
|
|
643
|
+
datapoint: r,
|
|
644
|
+
series: G.value,
|
|
645
|
+
config: j.value
|
|
646
|
+
});
|
|
647
|
+
else {
|
|
648
|
+
let e = "";
|
|
649
|
+
e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${N.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}" />${Rt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${D.value}_${r.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${Xn({
|
|
650
|
+
config: N.value,
|
|
651
|
+
showVal: N.value.showValue,
|
|
652
|
+
showPercentage: N.value.showPercentage,
|
|
653
|
+
val: `<span>${re(L.value.labels.dataLabels.formatter, r.value, t({
|
|
654
|
+
p: L.value.labels.dataLabels.prefix,
|
|
655
|
+
v: r.value,
|
|
656
|
+
s: L.value.labels.dataLabels.suffix,
|
|
657
|
+
r: N.value.roundingValue
|
|
658
|
+
}), {
|
|
659
|
+
datapoint: r,
|
|
660
|
+
seriesIndex: r.absoluteIndex,
|
|
661
|
+
series: G.value
|
|
662
|
+
})}</span>`,
|
|
663
|
+
percentage: `<span>${t({
|
|
664
|
+
v: On.value ? 1 / sn.value.length * 100 : r.value / Z.value * 100,
|
|
665
|
+
s: "%",
|
|
666
|
+
r: N.value.roundingPercentage
|
|
667
|
+
})}</span>`
|
|
668
|
+
})}</b></div>`, Vt.value = e;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
let ar = Qe, $ = d(() => ({
|
|
672
|
+
head: Pn.value.map((e) => ({
|
|
673
|
+
name: e.name,
|
|
674
|
+
color: e.color
|
|
675
|
+
})),
|
|
676
|
+
body: Pn.value.map((e) => e.value)
|
|
677
|
+
}));
|
|
678
|
+
function or(e) {
|
|
679
|
+
return j.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== e ? `url(#blur_${D.value})` : "";
|
|
680
|
+
}
|
|
681
|
+
function sr(e) {
|
|
682
|
+
return [null, void 0].includes(O.value) || O.value === e ? { opacity: 1 } : { opacity: F.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, c = `${a}:${o}`;
|
|
706
|
+
t.has(c) && !r.has(c) && (r.add(c), 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), c = t.start, l = [c], ee = t;
|
|
762
|
+
for (; ee;) {
|
|
763
|
+
s.delete(i(ee));
|
|
764
|
+
let e = ee.end;
|
|
765
|
+
if (o(e) === o(c)) break;
|
|
766
|
+
l.push(e), ee = (r.get(o(e)) || []).find((e) => s.has(i(e)));
|
|
767
|
+
}
|
|
768
|
+
l.length >= 4 && a.push(cr(l));
|
|
769
|
+
}
|
|
770
|
+
}), a;
|
|
771
|
+
}
|
|
772
|
+
function ur(e) {
|
|
773
|
+
let t = I.value.size, n = I.value.vertical, r = [];
|
|
774
|
+
return K.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 = d(() => !F.value.selection?.wrap?.show || [null, void 0].includes(O.value) ? [] : dr(O.value).map(fr)), hr = d(() => {
|
|
801
|
+
if (!F.value.merged) return [];
|
|
802
|
+
let e = /* @__PURE__ */ new Map();
|
|
803
|
+
return K.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 L.value.labels.captions.show ? K.value.length && !Rn.value && !I.value.vertical && (K.value[e].isFirst && t.position < I.value.size - 2 || K.value[e].isAbsoluteFirst && e % I.value.size === 0 && K.value[e].absoluteStartIndex) : !1;
|
|
818
|
+
}
|
|
819
|
+
function _r(e, n = null) {
|
|
820
|
+
let r = re(L.value.labels.dataLabels.formatter, K.value[e].value, t({
|
|
821
|
+
p: L.value.labels.dataLabels.prefix,
|
|
822
|
+
v: K.value[e].value,
|
|
823
|
+
s: L.value.labels.dataLabels.suffix,
|
|
824
|
+
r: L.value.labels.captions.roundingValue
|
|
825
|
+
}), {
|
|
826
|
+
datapoint: K.value[e],
|
|
827
|
+
position: n
|
|
828
|
+
}), i = t({
|
|
829
|
+
v: K.value[e].proportion * 100,
|
|
830
|
+
s: "%",
|
|
831
|
+
r: L.value.labels.captions.roundingPercentage
|
|
832
|
+
}), a = (L.value.labels.captions.serieNameAbbreviation ? ie({
|
|
833
|
+
source: K.value[e].name,
|
|
834
|
+
length: L.value.labels.captions.serieNameMaxAbbreviationSize
|
|
835
|
+
}) : K.value[e].name) + (L.value.labels.captions.showPercentage || L.value.labels.captions.showValue ? ":" : "");
|
|
836
|
+
return `${L.value.labels.captions.showSerieName ? a : ""} ${Xn({
|
|
837
|
+
val: r,
|
|
838
|
+
percentage: i,
|
|
839
|
+
showVal: L.value.labels.captions.showValue,
|
|
840
|
+
showPercentage: L.value.labels.captions.showPercentage,
|
|
841
|
+
config: L.value.labels.dataLabels
|
|
842
|
+
})}`;
|
|
843
|
+
}
|
|
844
|
+
function vr(e = null) {
|
|
845
|
+
Ue(() => {
|
|
846
|
+
let t = $.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
|
+
]), n = [
|
|
851
|
+
[R.value.title.text],
|
|
852
|
+
[R.value.title.subtitle.text],
|
|
853
|
+
[
|
|
854
|
+
[""],
|
|
855
|
+
["val"],
|
|
856
|
+
["%"]
|
|
857
|
+
]
|
|
858
|
+
].concat(t), i = r(n);
|
|
859
|
+
e ? e(i) : ae({
|
|
860
|
+
csvContent: i,
|
|
861
|
+
title: R.value.title.text || "vue-ui-waffle"
|
|
862
|
+
});
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
let yr = d(() => ({
|
|
866
|
+
head: [
|
|
867
|
+
"__SUM__",
|
|
868
|
+
re(L.value.labels.dataLabels.formatter, Z.value, t({
|
|
869
|
+
p: L.value.labels.dataLabels.prefix,
|
|
870
|
+
v: Z.value,
|
|
871
|
+
s: L.value.labels.dataLabels.suffix,
|
|
872
|
+
r: j.value.table.td.roundingValue
|
|
873
|
+
})),
|
|
874
|
+
"100%"
|
|
875
|
+
],
|
|
876
|
+
body: $.value.head.map((e, n) => [
|
|
877
|
+
{
|
|
878
|
+
color: e.color,
|
|
879
|
+
name: e.name
|
|
880
|
+
},
|
|
881
|
+
re(L.value.labels.dataLabels.formatter, $.value.body[n], t({
|
|
882
|
+
p: L.value.labels.dataLabels.prefix,
|
|
883
|
+
v: $.value.body[n],
|
|
884
|
+
s: L.value.labels.dataLabels.suffix,
|
|
885
|
+
r: j.value.table.td.roundingValue
|
|
886
|
+
})),
|
|
887
|
+
isNaN($.value.body[n] / Z.value) ? "-" : t({
|
|
888
|
+
v: $.value.body[n] / Z.value * 100,
|
|
889
|
+
s: "%",
|
|
890
|
+
r: j.value.table.td.roundingPercentage
|
|
891
|
+
})
|
|
892
|
+
]),
|
|
893
|
+
config: {
|
|
894
|
+
th: {
|
|
895
|
+
backgroundColor: j.value.table.th.backgroundColor,
|
|
896
|
+
color: j.value.table.th.color,
|
|
897
|
+
outline: j.value.table.th.outline
|
|
898
|
+
},
|
|
899
|
+
td: {
|
|
900
|
+
backgroundColor: j.value.table.td.backgroundColor,
|
|
901
|
+
color: j.value.table.td.color,
|
|
902
|
+
outline: j.value.table.td.outline
|
|
903
|
+
},
|
|
904
|
+
shape: "square",
|
|
905
|
+
breakpoint: j.value.table.responsiveBreakpoint
|
|
906
|
+
},
|
|
907
|
+
colNames: [
|
|
908
|
+
j.value.table.columnNames.series,
|
|
909
|
+
j.value.table.columnNames.value,
|
|
910
|
+
j.value.table.columnNames.percentage
|
|
911
|
+
]
|
|
912
|
+
})), br = x(!1);
|
|
913
|
+
function xr(e) {
|
|
914
|
+
br.value = e, Ht.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 = x(!1);
|
|
923
|
+
function Tr() {
|
|
924
|
+
wr.value = !wr.value;
|
|
925
|
+
}
|
|
926
|
+
async function Er({ scale: e = 2 } = {}) {
|
|
927
|
+
if (!k.value) return;
|
|
928
|
+
let { width: t, height: n } = k.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Se({
|
|
929
|
+
domElement: k.value,
|
|
930
|
+
base64: !0,
|
|
931
|
+
img: !0,
|
|
932
|
+
scale: e
|
|
933
|
+
});
|
|
934
|
+
return {
|
|
935
|
+
imageUri: i,
|
|
936
|
+
base64: a,
|
|
937
|
+
title: R.value.title.text,
|
|
938
|
+
width: t,
|
|
939
|
+
height: n,
|
|
940
|
+
aspectRatio: r
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
let Dr = d(() => {
|
|
944
|
+
let e = j.value.table.useDialog && !j.value.table.show, t = B.value.showTable;
|
|
945
|
+
return {
|
|
946
|
+
component: e ? Nt : kt,
|
|
947
|
+
title: `${R.value.title.text}${R.value.title.subtitle.text ? `: ${R.value.title.subtitle.text}` : ""}`,
|
|
948
|
+
props: e ? {
|
|
949
|
+
backgroundColor: j.value.table.th.backgroundColor,
|
|
950
|
+
color: j.value.table.th.color,
|
|
951
|
+
headerColor: j.value.table.th.color,
|
|
952
|
+
headerBg: j.value.table.th.backgroundColor,
|
|
953
|
+
isFullscreen: br.value,
|
|
954
|
+
fullscreenParent: k.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: R.value.backgroundColor,
|
|
964
|
+
color: R.value.color
|
|
965
|
+
},
|
|
966
|
+
head: {
|
|
967
|
+
backgroundColor: R.value.backgroundColor,
|
|
968
|
+
color: R.value.color
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
});
|
|
974
|
+
Ze(() => B.value.showTable, (e) => {
|
|
975
|
+
j.value.table.show || (e && j.value.table.useDialog && Zt.value ? Zt.value.open() : "close" in Zt.value && Zt.value.close());
|
|
976
|
+
});
|
|
977
|
+
function Or() {
|
|
978
|
+
B.value.showTable = !1, Qt.value && Qt.value.setTableIconState(!1);
|
|
979
|
+
}
|
|
980
|
+
let kr = d(() => X.value.map((e) => ({
|
|
981
|
+
...e,
|
|
982
|
+
name: e.display
|
|
983
|
+
}))), Ar = d(() => R.value.backgroundColor), jr = d(() => R.value.title), { isCallbackImaging: Mr, isCallbackSvg: Nr, generateSvg: Pr, onGenerateImage: Fr } = be({
|
|
984
|
+
svg: fn,
|
|
985
|
+
title: jr,
|
|
986
|
+
legend: P,
|
|
987
|
+
legendItems: kr,
|
|
988
|
+
backgroundColor: Ar,
|
|
989
|
+
getSvgCallback: () => j.value.userOptions.callbacks.svg,
|
|
990
|
+
generateImage: Sn
|
|
991
|
+
});
|
|
992
|
+
async function Ir() {
|
|
993
|
+
if (ar("copyAlt", {
|
|
994
|
+
config: j.value,
|
|
995
|
+
dataset: Fn.value
|
|
996
|
+
}), !j.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(j.value.userOptions.callbacks.altCopy({
|
|
1001
|
+
config: j.value,
|
|
1002
|
+
dataset: Fn.value
|
|
1003
|
+
}));
|
|
1004
|
+
}
|
|
1005
|
+
function Lr() {
|
|
1006
|
+
A.value = null, tn.value = !0;
|
|
1007
|
+
}
|
|
1008
|
+
function Rr() {
|
|
1009
|
+
A.value = null, en.value = "pointer", Bt.value = !1, O.value = null, $n.value = null, tn.value = !1;
|
|
1010
|
+
}
|
|
1011
|
+
function zr(e) {
|
|
1012
|
+
if (!fn.value || wr.value || document.activeElement !== fn.value || !Q.value.length || J.value.length === E.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
|
+
A.value = null, en.value = "pointer", Bt.value = !1, O.value = null, $n.value = null;
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
if (r) {
|
|
1020
|
+
if (A.value === null) return;
|
|
1021
|
+
let e = tr(A.value);
|
|
1022
|
+
if (e === null) return;
|
|
1023
|
+
nr(e);
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
let a = Q.value.findIndex((e) => e.serieIndex === A.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 = q.value[e];
|
|
1037
|
+
return t ? {
|
|
1038
|
+
x: t.x + I.value.spaceBetween / 2 + Tn.value / 2,
|
|
1039
|
+
y: t.y + I.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, c = (a + o) / 2, l = fn.value.getBoundingClientRect();
|
|
1044
|
+
$t.value = {
|
|
1045
|
+
x: l.left + s / V.value.width * l.width,
|
|
1046
|
+
y: l.top + c / V.value.height * l.height
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
let Vr = d(() => ({
|
|
1050
|
+
headers: yr.value?.colNames ?? [],
|
|
1051
|
+
rows: yr.value?.body ?? []
|
|
1052
|
+
}));
|
|
1053
|
+
return Te({
|
|
1054
|
+
getData: In,
|
|
1055
|
+
getImage: Er,
|
|
1056
|
+
generatePdf: xn,
|
|
1057
|
+
generateCsv: vr,
|
|
1058
|
+
generateImage: Sn,
|
|
1059
|
+
generateSvg: Pr,
|
|
1060
|
+
hideSeries: Yn,
|
|
1061
|
+
showSeries: Jn,
|
|
1062
|
+
toggleTable: Sr,
|
|
1063
|
+
toggleTooltip: Cr,
|
|
1064
|
+
toggleAnnotator: Tr,
|
|
1065
|
+
toggleFullscreen: xr,
|
|
1066
|
+
copyAlt: Ir
|
|
1067
|
+
}), (e, t) => (b(), m("div", {
|
|
1068
|
+
class: _(`vue-data-ui-component vue-ui-waffle ${br.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
1069
|
+
ref_key: "waffleChart",
|
|
1070
|
+
ref: k,
|
|
1071
|
+
id: `vue-ui-waffle_${D.value}`,
|
|
1072
|
+
style: y(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${R.value.backgroundColor};${j.value.responsive ? "height: 100%" : ""}`),
|
|
1073
|
+
onMouseenter: t[2] ||= () => w(un)(!0),
|
|
1074
|
+
onMouseleave: t[3] ||= () => w(un)(!1)
|
|
1075
|
+
}, [
|
|
1076
|
+
h("div", {
|
|
1077
|
+
id: `chart-instructions-${D.value}`,
|
|
1078
|
+
class: "sr-only"
|
|
1079
|
+
}, [h("p", null, Je(j.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
1080
|
+
Vr.value?.rows?.length ? (b(), f(Ae, {
|
|
1081
|
+
key: 0,
|
|
1082
|
+
uid: D.value,
|
|
1083
|
+
head: Vr.value.headers,
|
|
1084
|
+
body: Vr.value.rows,
|
|
1085
|
+
notice: j.value.a11y.translations.tableAvailable,
|
|
1086
|
+
caption: j.value.a11y.translations.tableCaption
|
|
1087
|
+
}, null, 8, [
|
|
1088
|
+
"uid",
|
|
1089
|
+
"head",
|
|
1090
|
+
"body",
|
|
1091
|
+
"notice",
|
|
1092
|
+
"caption"
|
|
1093
|
+
])) : p("", !0),
|
|
1094
|
+
M.value.buttons.annotator ? (b(), f(w(jt), {
|
|
1095
|
+
key: 1,
|
|
1096
|
+
svgRef: w(fn),
|
|
1097
|
+
backgroundColor: R.value.backgroundColor,
|
|
1098
|
+
color: R.value.color,
|
|
1099
|
+
active: wr.value,
|
|
1100
|
+
isCursorPointer: rn.value,
|
|
1101
|
+
palette: M.value.annotatorPalette,
|
|
1102
|
+
onClose: Tr
|
|
1103
|
+
}, {
|
|
1104
|
+
"annotator-action-close": T(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1105
|
+
"annotator-action-color": T(({ color: t }) => [C(e.$slots, "annotator-action-color", v(g({ color: t })), void 0, !0)]),
|
|
1106
|
+
"annotator-action-draw": T(({ mode: t }) => [C(e.$slots, "annotator-action-draw", v(g({ mode: t })), void 0, !0)]),
|
|
1107
|
+
"annotator-action-undo": T(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", v(g({ disabled: t })), void 0, !0)]),
|
|
1108
|
+
"annotator-action-redo": T(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", v(g({ disabled: t })), void 0, !0)]),
|
|
1109
|
+
"annotator-action-delete": T(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", v(g({ disabled: t })), void 0, !0)]),
|
|
1110
|
+
_: 3
|
|
1111
|
+
}, 8, [
|
|
1112
|
+
"svgRef",
|
|
1113
|
+
"backgroundColor",
|
|
1114
|
+
"color",
|
|
1115
|
+
"active",
|
|
1116
|
+
"isCursorPointer",
|
|
1117
|
+
"palette"
|
|
1118
|
+
])) : p("", !0),
|
|
1119
|
+
Cn.value ? (b(), m("div", {
|
|
1120
|
+
key: 2,
|
|
1121
|
+
ref_key: "noTitle",
|
|
1122
|
+
ref: Kt,
|
|
1123
|
+
class: "vue-data-ui-no-title-space",
|
|
1124
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1125
|
+
}, null, 512)) : p("", !0),
|
|
1126
|
+
R.value.title.text ? (b(), m("div", {
|
|
1127
|
+
key: 3,
|
|
1128
|
+
ref_key: "chartTitle",
|
|
1129
|
+
ref: Ut,
|
|
1130
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
1131
|
+
}, [(b(), f(Ce, {
|
|
1132
|
+
key: `title_${qt.value}`,
|
|
1133
|
+
config: {
|
|
1134
|
+
title: {
|
|
1135
|
+
cy: "waffle-title",
|
|
1136
|
+
...R.value.title
|
|
1137
|
+
},
|
|
1138
|
+
subtitle: {
|
|
1139
|
+
cy: "waffle-subtitle",
|
|
1140
|
+
...R.value.title.subtitle
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}, null, 8, ["config"]))], 512)) : p("", !0),
|
|
1144
|
+
h("div", { id: `legend-top-${D.value}` }, null, 8, tt),
|
|
1145
|
+
M.value.show && zt.value && (w(dn) || w(ln)) ? (b(), f(w(At), {
|
|
1146
|
+
ref_key: "userOptionsRef",
|
|
1147
|
+
ref: Qt,
|
|
1148
|
+
key: `user_options_${Ht.value}`,
|
|
1149
|
+
backgroundColor: R.value.backgroundColor,
|
|
1150
|
+
color: R.value.color,
|
|
1151
|
+
isPrinting: w(yn),
|
|
1152
|
+
isImaging: w(bn),
|
|
1153
|
+
uid: D.value,
|
|
1154
|
+
hasTooltip: M.value.buttons.tooltip && N.value.show,
|
|
1155
|
+
hasPdf: M.value.buttons.pdf,
|
|
1156
|
+
hasImg: M.value.buttons.img,
|
|
1157
|
+
hasSvg: M.value.buttons.svg,
|
|
1158
|
+
hasXls: M.value.buttons.csv,
|
|
1159
|
+
hasTable: M.value.buttons.table,
|
|
1160
|
+
hasFullscreen: M.value.buttons.fullscreen,
|
|
1161
|
+
hasAltCopy: M.value.buttons.altCopy,
|
|
1162
|
+
isFullscreen: br.value,
|
|
1163
|
+
isTooltip: B.value.showTooltip,
|
|
1164
|
+
titles: { ...M.value.buttonTitles },
|
|
1165
|
+
chartElement: k.value,
|
|
1166
|
+
position: M.value.position,
|
|
1167
|
+
hasAnnotator: M.value.buttons.annotator,
|
|
1168
|
+
isAnnotation: wr.value,
|
|
1169
|
+
callbacks: M.value.callbacks,
|
|
1170
|
+
printScale: M.value.print.scale,
|
|
1171
|
+
tableDialog: j.value.table.useDialog,
|
|
1172
|
+
isCursorPointer: rn.value,
|
|
1173
|
+
onToggleFullscreen: xr,
|
|
1174
|
+
onGeneratePdf: w(xn),
|
|
1175
|
+
onGenerateCsv: vr,
|
|
1176
|
+
onGenerateImage: w(Fr),
|
|
1177
|
+
onGenerateSvg: w(Pr),
|
|
1178
|
+
onToggleTable: Sr,
|
|
1179
|
+
onToggleTooltip: Cr,
|
|
1180
|
+
onToggleAnnotator: Tr,
|
|
1181
|
+
onCopyAlt: Ir,
|
|
1182
|
+
style: y({ visibility: w(dn) ? w(ln) ? "visible" : "hidden" : "visible" })
|
|
1183
|
+
}, Re({ _: 2 }, [
|
|
1184
|
+
e.$slots.menuIcon ? {
|
|
1185
|
+
name: "menuIcon",
|
|
1186
|
+
fn: T(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", v(g({
|
|
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: T(() => [C(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1195
|
+
key: "1"
|
|
1196
|
+
} : void 0,
|
|
1197
|
+
e.$slots.optionPdf ? {
|
|
1198
|
+
name: "optionPdf",
|
|
1199
|
+
fn: T(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1200
|
+
key: "2"
|
|
1201
|
+
} : void 0,
|
|
1202
|
+
e.$slots.optionCsv ? {
|
|
1203
|
+
name: "optionCsv",
|
|
1204
|
+
fn: T(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1205
|
+
key: "3"
|
|
1206
|
+
} : void 0,
|
|
1207
|
+
e.$slots.optionImg ? {
|
|
1208
|
+
name: "optionImg",
|
|
1209
|
+
fn: T(() => [C(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1210
|
+
key: "4"
|
|
1211
|
+
} : void 0,
|
|
1212
|
+
e.$slots.optionSvg ? {
|
|
1213
|
+
name: "optionSvg",
|
|
1214
|
+
fn: T(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1215
|
+
key: "5"
|
|
1216
|
+
} : void 0,
|
|
1217
|
+
e.$slots.optionTable ? {
|
|
1218
|
+
name: "optionTable",
|
|
1219
|
+
fn: T(() => [C(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1220
|
+
key: "6"
|
|
1221
|
+
} : void 0,
|
|
1222
|
+
e.$slots.optionFullscreen ? {
|
|
1223
|
+
name: "optionFullscreen",
|
|
1224
|
+
fn: T(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", v(g({
|
|
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: T(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", v(g({
|
|
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: T(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", v(g({ altCopy: t })), void 0, !0)]),
|
|
1241
|
+
key: "9"
|
|
1242
|
+
} : void 0,
|
|
1243
|
+
e.$slots["custom-menu-before"] ? {
|
|
1244
|
+
name: "custom-menu-before",
|
|
1245
|
+
fn: T(() => [C(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: T(() => [C(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("."))) : p("", !0),
|
|
1254
|
+
h("div", nt, [(b(), m("svg", {
|
|
1255
|
+
ref_key: "svgRef",
|
|
1256
|
+
ref: fn,
|
|
1257
|
+
xmlns: w(ce),
|
|
1258
|
+
"aria-describedby": `chart-instructions-${D.value}`,
|
|
1259
|
+
class: _({
|
|
1260
|
+
"vue-data-ui-fullscreen--on": br.value,
|
|
1261
|
+
"vue-data-ui-fulscreen--off": !br.value,
|
|
1262
|
+
"vue-data-ui-no-transition": !w(nn)
|
|
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: y(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color}`),
|
|
1267
|
+
onFocus: Lr,
|
|
1268
|
+
onBlur: Rr,
|
|
1269
|
+
onKeydown: zr
|
|
1270
|
+
}, [
|
|
1271
|
+
Be(w(Mt)),
|
|
1272
|
+
h("defs", null, [(b(!0), m(u, null, S(K.value, (e, t) => (b(), f(Oe, {
|
|
1273
|
+
t: "radial",
|
|
1274
|
+
cx: "50%",
|
|
1275
|
+
cy: "50%",
|
|
1276
|
+
r: "50%",
|
|
1277
|
+
fx: "50%",
|
|
1278
|
+
fy: "50%",
|
|
1279
|
+
id: `gradient_${D.value}_${t}`,
|
|
1280
|
+
key: `gradient_${D.value}_${t}`,
|
|
1281
|
+
stops: [[
|
|
1282
|
+
"0%",
|
|
1283
|
+
w(oe)(w(a)(e.color, .05), 100 - F.value.gradientIntensity),
|
|
1284
|
+
1
|
|
1285
|
+
], [
|
|
1286
|
+
"100%",
|
|
1287
|
+
e.color,
|
|
1288
|
+
1
|
|
1289
|
+
]]
|
|
1290
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1291
|
+
h("defs", null, [h("filter", {
|
|
1292
|
+
id: `blur_${D.value}`,
|
|
1293
|
+
x: "-50%",
|
|
1294
|
+
y: "-50%",
|
|
1295
|
+
width: "200%",
|
|
1296
|
+
height: "200%"
|
|
1297
|
+
}, [...t[4] ||= [h("feGaussianBlur", {
|
|
1298
|
+
in: "SourceGraphic",
|
|
1299
|
+
stdDeviation: 2
|
|
1300
|
+
}, null, -1), h("feColorMatrix", {
|
|
1301
|
+
type: "saturate",
|
|
1302
|
+
values: "0"
|
|
1303
|
+
}, null, -1)]], 8, it)]),
|
|
1304
|
+
j.value.useCustomCells && K.value.length && e.$slots.cell ? (b(!0), m(u, { key: 0 }, S(q.value, (t, n) => (b(), m("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
|
+
}, [C(e.$slots, "cell", He({ ref_for: !0 }, {
|
|
1311
|
+
cell: {
|
|
1312
|
+
...t,
|
|
1313
|
+
color: K.value[n].color,
|
|
1314
|
+
height: Math.max(0, W.value),
|
|
1315
|
+
width: Math.max(0, U.value),
|
|
1316
|
+
...K.value[n]
|
|
1317
|
+
},
|
|
1318
|
+
isSelected: [null, void 0].includes(O.value) ? !0 : K.value[n].serieIndex === O.value
|
|
1319
|
+
}), void 0, !0)], 8, at))), 256)) : p("", !0),
|
|
1320
|
+
!K.value.length && !j.value.useCustomCells ? (b(), m("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, ot)) : K.value.length && !j.value.useCustomCells ? (b(), m(u, { key: 2 }, [e.$slots.pattern ? (b(), m("g", st, [(b(!0), m(u, null, S(An.value, (t) => (b(), m("defs", null, [C(e.$slots, "pattern", He({ ref_for: !0 }, {
|
|
1330
|
+
seriesIndex: t.absoluteIndex,
|
|
1331
|
+
patternId: `pattern_${D.value}_${t.absoluteIndex}`
|
|
1332
|
+
}), void 0, !0)]))), 256))])) : p("", !0), F.value.merged ? (b(), m(u, { key: 1 }, [
|
|
1333
|
+
(b(!0), m(u, null, S(hr.value, (e) => (b(), m("path", {
|
|
1334
|
+
key: `merged-underlayer-${e.serieIndex}`,
|
|
1335
|
+
d: e.d,
|
|
1336
|
+
fill: "white",
|
|
1337
|
+
"fill-rule": "evenodd",
|
|
1338
|
+
stroke: F.value.stroke,
|
|
1339
|
+
"stroke-width": F.value.strokeWidth,
|
|
1340
|
+
"stroke-linejoin": "round",
|
|
1341
|
+
filter: or(e.serieIndex),
|
|
1342
|
+
style: y(sr(e.serieIndex)),
|
|
1343
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1344
|
+
}, null, 14, ct))), 128)),
|
|
1345
|
+
(b(!0), m(u, null, S(hr.value, (e) => (b(), m("path", {
|
|
1346
|
+
key: `merged-serie-${e.serieIndex}`,
|
|
1347
|
+
d: e.d,
|
|
1348
|
+
fill: F.value.useGradient && F.value.gradientIntensity > 0 ? `url(#gradient_${D.value}_${e.gradientIndex})` : e.color,
|
|
1349
|
+
"fill-rule": "evenodd",
|
|
1350
|
+
stroke: F.value.stroke,
|
|
1351
|
+
"stroke-width": F.value.strokeWidth,
|
|
1352
|
+
"stroke-linejoin": "round",
|
|
1353
|
+
filter: or(e.serieIndex),
|
|
1354
|
+
style: y(sr(e.serieIndex)),
|
|
1355
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1356
|
+
}, null, 14, lt))), 128)),
|
|
1357
|
+
e.$slots.pattern ? (b(), m("g", ut, [(b(!0), m(u, null, S(hr.value, (e) => (b(), m("path", {
|
|
1358
|
+
key: `merged-pattern-${e.serieIndex}`,
|
|
1359
|
+
d: e.d,
|
|
1360
|
+
fill: `url(#pattern_${D.value}_${e.absoluteIndex})`,
|
|
1361
|
+
"fill-rule": "evenodd",
|
|
1362
|
+
stroke: "none",
|
|
1363
|
+
filter: or(e.serieIndex),
|
|
1364
|
+
style: y(sr(e.serieIndex)),
|
|
1365
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1366
|
+
}, null, 14, dt))), 128))])) : p("", !0)
|
|
1367
|
+
], 64)) : (b(), m(u, { key: 2 }, [
|
|
1368
|
+
(b(!0), m(u, null, S(q.value, (e, t) => (b(), m("rect", {
|
|
1369
|
+
rx: F.value.rounded ? F.value.rounding : 0,
|
|
1370
|
+
x: e.x + I.value.spaceBetween / 2,
|
|
1371
|
+
y: e.y + I.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: F.value.stroke,
|
|
1376
|
+
"stroke-width": F.value.strokeWidth,
|
|
1377
|
+
filter: or(K.value[t].serieIndex),
|
|
1378
|
+
style: y(sr(K.value[t].serieIndex)),
|
|
1379
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1380
|
+
}, null, 14, ft))), 256)),
|
|
1381
|
+
(b(!0), m(u, null, S(q.value, (e, t) => (b(), m("rect", {
|
|
1382
|
+
rx: F.value.rounded ? F.value.rounding : 0,
|
|
1383
|
+
x: e.x + I.value.spaceBetween / 2,
|
|
1384
|
+
y: e.y + I.value.spaceBetween / 2,
|
|
1385
|
+
height: W.value <= 0 ? 1e-4 : W.value,
|
|
1386
|
+
width: U.value <= 0 ? 1e-4 : U.value,
|
|
1387
|
+
fill: F.value.useGradient && F.value.gradientIntensity > 0 ? `url(#gradient_${D.value}_${t})` : K.value[t].color,
|
|
1388
|
+
stroke: F.value.stroke,
|
|
1389
|
+
"stroke-width": F.value.strokeWidth,
|
|
1390
|
+
filter: or(K.value[t].serieIndex),
|
|
1391
|
+
style: y(sr(K.value[t].serieIndex)),
|
|
1392
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1393
|
+
}, null, 14, pt))), 256)),
|
|
1394
|
+
e.$slots.pattern ? (b(), m("g", mt, [(b(!0), m(u, null, S(q.value, (e, t) => (b(), m("rect", {
|
|
1395
|
+
rx: F.value.rounded ? F.value.rounding : 0,
|
|
1396
|
+
x: e.x + I.value.spaceBetween / 2,
|
|
1397
|
+
y: e.y + I.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_${D.value}_${K.value[t].absoluteIndex})`,
|
|
1401
|
+
stroke: "none",
|
|
1402
|
+
filter: or(K.value[t].serieIndex),
|
|
1403
|
+
style: y(sr(K.value[t].serieIndex)),
|
|
1404
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1405
|
+
}, null, 14, ht))), 256))])) : p("", !0)
|
|
1406
|
+
], 64))], 64)) : p("", !0),
|
|
1407
|
+
e.$slots.cellSvg ? (b(!0), m(u, { key: 3 }, S(q.value, (t, n) => (b(), m("g", null, [C(e.$slots, "cellSvg", He({ ref_for: !0 }, {
|
|
1408
|
+
cell: {
|
|
1409
|
+
...t,
|
|
1410
|
+
color: K.value[n].color,
|
|
1411
|
+
height: Math.max(0, W.value),
|
|
1412
|
+
width: Math.max(0, U.value),
|
|
1413
|
+
...K.value[n]
|
|
1414
|
+
},
|
|
1415
|
+
isSelected: [null, void 0].includes(O.value) ? !0 : K.value[n].serieIndex === O.value
|
|
1416
|
+
}), void 0, !0)]))), 256)) : p("", !0),
|
|
1417
|
+
(b(!0), m(u, null, S(mr.value, (e, t) => (b(), m("polygon", {
|
|
1418
|
+
key: `selected-series-wrap-${t}`,
|
|
1419
|
+
points: e,
|
|
1420
|
+
fill: "none",
|
|
1421
|
+
stroke: F.value.selection.wrap.stroke,
|
|
1422
|
+
"stroke-width": F.value.selection.wrap.strokeWidth,
|
|
1423
|
+
"stroke-linejoin": F.value.selection.wrap.strokeLinejoin,
|
|
1424
|
+
"pointer-events": "none"
|
|
1425
|
+
}, null, 8, gt))), 128)),
|
|
1426
|
+
(b(!0), m(u, null, S(q.value, (e, t) => (b(), m(u, null, [gr(t, e) ? (b(), m("text", {
|
|
1427
|
+
key: `datalabel_${t}`,
|
|
1428
|
+
textContent: Je(_r(t, e)),
|
|
1429
|
+
x: e.x + L.value.labels.captions.offsetX + I.value.spaceBetween / 2 + 6,
|
|
1430
|
+
y: e.y + L.value.labels.captions.offsetY + I.value.spaceBetween / 2 + En.value / 2 + L.value.labels.captions.fontSize / 3,
|
|
1431
|
+
"font-size": L.value.labels.captions.fontSize,
|
|
1432
|
+
fill: w(se)(K.value[t].color),
|
|
1433
|
+
filter: or(K.value[t].serieIndex),
|
|
1434
|
+
class: _({ "vue-data-ui-transition": w(nn) })
|
|
1435
|
+
}, null, 10, _t)) : p("", !0)], 64))), 256)),
|
|
1436
|
+
F.value.merged && !j.value.useCustomCells ? (b(!0), m(u, { key: 4 }, S(hr.value, (e) => (b(), m("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, vt))), 128)) : (b(!0), m(u, { key: 5 }, S(q.value, (e, t) => (b(), m("rect", {
|
|
1447
|
+
key: `tooltip-trap-${t}`,
|
|
1448
|
+
x: e.x + I.value.spaceBetween / 2,
|
|
1449
|
+
y: e.y + I.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, yt))), 128)),
|
|
1458
|
+
C(e.$slots, "svg", { svg: {
|
|
1459
|
+
...V.value,
|
|
1460
|
+
isPrintingImg: w(yn) || w(bn) || w(Mr),
|
|
1461
|
+
isPrintingSvg: w(Nr)
|
|
1462
|
+
} }, void 0, !0)
|
|
1463
|
+
], 46, rt)), e.$slots.hint ? (b(), m("div", bt, [C(e.$slots, "hint", v(g({
|
|
1464
|
+
hint: j.value.a11y.translations.keyboardNavigation,
|
|
1465
|
+
isVisible: tn.value
|
|
1466
|
+
})), void 0, !0)])) : p("", !0)]),
|
|
1467
|
+
e.$slots.watermark ? (b(), m("div", xt, [C(e.$slots, "watermark", v(g({ isPrinting: w(yn) || w(bn) || w(Mr) || w(Nr) })), void 0, !0)])) : p("", !0),
|
|
1468
|
+
h("div", { id: `legend-bottom-${D.value}` }, null, 8, St),
|
|
1469
|
+
Xt.value && (P.value.show || e.$slots.legend) ? (b(), f(Le, {
|
|
1470
|
+
key: 6,
|
|
1471
|
+
to: P.value.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
|
|
1472
|
+
}, [h("div", {
|
|
1473
|
+
ref_key: "chartLegend",
|
|
1474
|
+
ref: Wt
|
|
1475
|
+
}, [C(e.$slots, "legend", { legend: X.value }, () => [P.value.show ? (b(), f(Pe, {
|
|
1476
|
+
key: `legend_${Yt.value}`,
|
|
1477
|
+
legendSet: X.value,
|
|
1478
|
+
config: Zn.value,
|
|
1479
|
+
isCursorPointer: rn.value,
|
|
1480
|
+
onClickMarker: t[0] ||= ({ legend: e }) => Kn(e.uid)
|
|
1481
|
+
}, Re({
|
|
1482
|
+
item: T(({ legend: e }) => [h("div", {
|
|
1483
|
+
onClick: (t) => e.segregate(),
|
|
1484
|
+
style: y(`opacity:${J.value.includes(e.uid) ? .5 : 1}`)
|
|
1485
|
+
}, Je(e.display), 13, Ct)]),
|
|
1486
|
+
legendToggle: T(() => [X.value.length > 2 && P.value.selectAllToggle.show && !w(on) ? (b(), f(ke, {
|
|
1487
|
+
key: 0,
|
|
1488
|
+
backgroundColor: P.value.selectAllToggle.backgroundColor,
|
|
1489
|
+
color: P.value.selectAllToggle.color,
|
|
1490
|
+
fontSize: P.value.fontSize,
|
|
1491
|
+
checked: J.value.length > 0,
|
|
1492
|
+
isCursorPointer: rn.value,
|
|
1493
|
+
onToggle: Gn
|
|
1494
|
+
}, null, 8, [
|
|
1495
|
+
"backgroundColor",
|
|
1496
|
+
"color",
|
|
1497
|
+
"fontSize",
|
|
1498
|
+
"checked",
|
|
1499
|
+
"isCursorPointer"
|
|
1500
|
+
])) : p("", !0)]),
|
|
1501
|
+
_: 2
|
|
1502
|
+
}, [e.$slots.pattern ? {
|
|
1503
|
+
name: "legend-pattern",
|
|
1504
|
+
fn: T(({ legend: e, index: t }) => [Be(we, {
|
|
1505
|
+
shape: e.shape,
|
|
1506
|
+
radius: 30,
|
|
1507
|
+
stroke: "none",
|
|
1508
|
+
plot: {
|
|
1509
|
+
x: 30,
|
|
1510
|
+
y: 30
|
|
1511
|
+
},
|
|
1512
|
+
fill: `url(#pattern_${D.value}_${t})`
|
|
1513
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1514
|
+
key: "0"
|
|
1515
|
+
} : void 0]), 1032, [
|
|
1516
|
+
"legendSet",
|
|
1517
|
+
"config",
|
|
1518
|
+
"isCursorPointer"
|
|
1519
|
+
])) : p("", !0)], !0)], 512)], 8, ["to"])) : p("", !0),
|
|
1520
|
+
e.$slots.source ? (b(), m("div", {
|
|
1521
|
+
key: 7,
|
|
1522
|
+
ref_key: "source",
|
|
1523
|
+
ref: Gt,
|
|
1524
|
+
dir: "auto"
|
|
1525
|
+
}, [C(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
|
|
1526
|
+
Be(w(Et), {
|
|
1527
|
+
teleportTo: N.value.teleportTo,
|
|
1528
|
+
show: B.value.showTooltip && Bt.value && J.value.length < E.dataset.length,
|
|
1529
|
+
backgroundColor: N.value.backgroundColor,
|
|
1530
|
+
color: N.value.color,
|
|
1531
|
+
borderRadius: N.value.borderRadius,
|
|
1532
|
+
borderColor: N.value.borderColor,
|
|
1533
|
+
borderWidth: N.value.borderWidth,
|
|
1534
|
+
backgroundOpacity: N.value.backgroundOpacity,
|
|
1535
|
+
position: N.value.position,
|
|
1536
|
+
offsetX: N.value.offsetX,
|
|
1537
|
+
offsetY: N.value.offsetY,
|
|
1538
|
+
parent: k.value,
|
|
1539
|
+
content: Vt.value,
|
|
1540
|
+
isCustom: N.value.customFormat && typeof N.value.customFormat == "function",
|
|
1541
|
+
fontSize: N.value.fontSize,
|
|
1542
|
+
isFullscreen: br.value,
|
|
1543
|
+
smooth: N.value.smooth,
|
|
1544
|
+
backdropFilter: N.value.backdropFilter,
|
|
1545
|
+
smoothForce: N.value.smoothForce,
|
|
1546
|
+
smoothSnapThreshold: N.value.smoothSnapThreshold,
|
|
1547
|
+
isA11yMode: en.value === "keyboard",
|
|
1548
|
+
a11yPosition: $t.value
|
|
1549
|
+
}, {
|
|
1550
|
+
"tooltip-before": T(() => [C(e.$slots, "tooltip-before", v(g({ ...Qn.value })), void 0, !0)]),
|
|
1551
|
+
tooltip: T(() => [C(e.$slots, "tooltip", v(g({ ...Qn.value })), void 0, !0)]),
|
|
1552
|
+
"tooltip-after": T(() => [C(e.$slots, "tooltip-after", v(g({ ...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
|
+
zt.value && M.value.buttons.table ? (b(), f(Ke(Dr.value.component), He({ key: 8 }, Dr.value.props, {
|
|
1579
|
+
ref_key: "tableUnit",
|
|
1580
|
+
ref: Zt,
|
|
1581
|
+
onClose: Or
|
|
1582
|
+
}), Re({
|
|
1583
|
+
content: T(() => [(b(), f(w(Ot), {
|
|
1584
|
+
key: `table_${Jt.value}`,
|
|
1585
|
+
colNames: yr.value.colNames,
|
|
1586
|
+
head: yr.value.head,
|
|
1587
|
+
body: yr.value.body,
|
|
1588
|
+
config: yr.value.config,
|
|
1589
|
+
title: j.value.table.useDialog ? "" : Dr.value.title,
|
|
1590
|
+
withCloseButton: !j.value.table.useDialog,
|
|
1591
|
+
isCursorPointer: rn.value,
|
|
1592
|
+
onClose: Or
|
|
1593
|
+
}, {
|
|
1594
|
+
th: T(({ th: e }) => [e === "__SUM__" ? (b(), m("div", wt, [Be(w(Dt), {
|
|
1595
|
+
name: "sigma",
|
|
1596
|
+
stroke: yr.value.config.th.color,
|
|
1597
|
+
size: 16
|
|
1598
|
+
}, null, 8, ["stroke"])])) : (b(), m("div", Tt, Je(e), 1))]),
|
|
1599
|
+
td: T(({ td: e }) => [ze(Je(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
|
+
}, [j.value.table.useDialog ? {
|
|
1612
|
+
name: "title",
|
|
1613
|
+
fn: T(() => [ze(Je(Dr.value.title), 1)]),
|
|
1614
|
+
key: "0"
|
|
1615
|
+
} : void 0, j.value.table.useDialog ? {
|
|
1616
|
+
name: "actions",
|
|
1617
|
+
fn: T(() => [h("button", {
|
|
1618
|
+
tabindex: "0",
|
|
1619
|
+
class: "vue-ui-user-options-button",
|
|
1620
|
+
onClick: t[1] ||= (e) => vr(M.value.callbacks.csv),
|
|
1621
|
+
style: y({ cursor: rn.value ? "pointer" : "default" })
|
|
1622
|
+
}, [Be(w(Dt), {
|
|
1623
|
+
name: "fileCsv",
|
|
1624
|
+
stroke: Dr.value.props.color
|
|
1625
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1626
|
+
key: "1"
|
|
1627
|
+
} : void 0]), 1040)) : p("", !0),
|
|
1628
|
+
C(e.$slots, "skeleton", {}, () => [w(on) ? (b(), f(_e, { key: 0 })) : p("", !0)], !0)
|
|
1629
|
+
], 46, $e));
|
|
1630
|
+
}
|
|
1631
|
+
}, [["__scopeId", "data-v-3cc0d931"]]);
|
|
1632
|
+
//#endregion
|
|
1633
|
+
export { Qe as n, Et as t };
|