vue-data-ui 3.0.0-next.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-BRtNjitS.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CO9ok1PR.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-BuOIF6t5.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-FH6oc0mS.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable-D36ZRtpU.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-DInM-hku.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B60MxEaz.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-CGQlqnmq.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-B5slIHlh.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-BGr3dQKt.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-BWA23VgJ.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-BSlAPr_H.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-lPcsweXz.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Dn5TCQxg.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Br-eVhJZ.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-CgMUOQnb.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-Cfm5-hMQ.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-BMVHBLq5.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-B1Hgs47c.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-CD674-M3.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-CEDGlyKI.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-CosgP-Fl.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-BG1ItsAb.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-6uKesZW9.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-CkVnNEGn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-D07ivGS7.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-Doidl3Lz.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-CWvzqAAa.js → vue-ui-donut-BtnIwS_E.js} +433 -424
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-D1pFzjJa.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DTeZbrJk.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-itpDcfZU.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-0milmSNS.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-C3QUdrMw.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-P-1SRvsT.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-Cd1bhDuU.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-B1tjuVi0.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap-BI8eIQG7.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CqBD7xhZ.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-sgO_Z6ja.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BPay31_q.js → vue-ui-vertical-bar-C-i2dRnU.js} +107 -105
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-DWskeHfE.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-Dkmsguo1.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-O07lQwRC.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-Hh7nGEjp.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-DWtJoryQ.js +0 -1227
- package/dist/vue-ui-age-pyramid-DbrA1G0r.js +0 -746
- package/dist/vue-ui-bullet-9IB3mGon.js +0 -513
- package/dist/vue-ui-candlestick-CWqPF_zW.js +0 -873
- package/dist/vue-ui-chord-Crd3l1b6.js +0 -949
- package/dist/vue-ui-circle-pack-CAm2gxBi.js +0 -673
- package/dist/vue-ui-donut-evolution-Djp_eBqw.js +0 -903
- package/dist/vue-ui-dumbbell-B7GySnYf.js +0 -753
- package/dist/vue-ui-flow-XDpZAYWI.js +0 -765
- package/dist/vue-ui-galaxy-DBQy21se.js +0 -617
- package/dist/vue-ui-gauge-FBZaUrBD.js +0 -738
- package/dist/vue-ui-gizmo-CDbPxUzE.js +0 -192
- package/dist/vue-ui-heatmap-DsDWxYOS.js +0 -877
- package/dist/vue-ui-history-plot-CzO1Z1FH.js +0 -924
- package/dist/vue-ui-molecule-Ddd3FgID.js +0 -597
- package/dist/vue-ui-mood-radar-24XAq8mg.js +0 -670
- package/dist/vue-ui-nested-donuts-DjWASp62.js +0 -1212
- package/dist/vue-ui-onion-B9thdF_c.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-DT-GhOaA.js +0 -807
- package/dist/vue-ui-quick-chart-D0DukVN6.js +0 -1612
- package/dist/vue-ui-radar-DY8y6oRc.js +0 -741
- package/dist/vue-ui-relation-circle-8Gd7_fxt.js +0 -542
- package/dist/vue-ui-ridgeline-iPtG1McW.js +0 -969
- package/dist/vue-ui-rings-BXPo4MMo.js +0 -685
- package/dist/vue-ui-scatter-26d0eebx.js +0 -1045
- package/dist/vue-ui-spark-trend-Dt3ctzpl.js +0 -291
- package/dist/vue-ui-sparkbar-RrxErqrU.js +0 -301
- package/dist/vue-ui-sparkgauge-CyNi1b0O.js +0 -201
- package/dist/vue-ui-sparkhistogram-DPpZCPuE.js +0 -313
- package/dist/vue-ui-sparkline-BMjQ_uYx.js +0 -459
- package/dist/vue-ui-sparkstackbar-CjO8pfE-.js +0 -381
- package/dist/vue-ui-stackbar-wgyvMlE6.js +0 -1207
- package/dist/vue-ui-strip-plot-BF1o8lvY.js +0 -761
- package/dist/vue-ui-thermometer-CtuxuYVt.js +0 -495
- package/dist/vue-ui-tiremarks-DOwj4ZE-.js +0 -358
- package/dist/vue-ui-treemap-C4LtyFug.js +0 -965
- package/dist/vue-ui-waffle-D8mzGTeo.js +0 -863
- package/dist/vue-ui-wheel-C6uAotal.js +0 -352
- package/dist/vue-ui-word-cloud-Bge2211V.js +0 -659
- package/dist/vue-ui-xy-UzQacbnA.js +0 -2982
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { useCssVars as Oe, computed as v, ref as i, onMounted as he, onBeforeUnmount as te, watch as T, nextTick as le, onUpdated as Ze, createElementBlock as c, openBlock as m, createElementVNode as d, createCommentVNode as w, renderSlot as je, normalizeStyle as M, createVNode as Ge, withDirectives as ge, unref as U, Fragment as be, renderList as xe, normalizeClass as B, vModelText as ye, toDisplayString as ae } from "vue";
|
|
2
|
+
import qe from "./BaseIcon-CXtL10fo.js";
|
|
3
|
+
import { t as we, u as Je } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { c as Ke, V as pe, U as Se, X as Qe, F as ne } from "./index-BtNwOUja.js";
|
|
5
|
+
import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const _e = {
|
|
7
|
+
class: "vue-data-ui-slicer-labels",
|
|
8
|
+
style: { position: "relative", "z-index": "1", "pointer-events": "none" }
|
|
9
|
+
}, et = {
|
|
10
|
+
key: 0,
|
|
11
|
+
style: { width: "100%", position: "relative" }
|
|
12
|
+
}, tt = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "minimap",
|
|
15
|
+
style: { width: "100%" }
|
|
16
|
+
}, lt = ["xmlns", "viewBox"], at = ["id"], nt = ["stop-color"], it = ["d", "stroke"], ut = ["x", "width", "height", "fill", "rx"], ot = ["d", "fill"], rt = ["x", "width", "height", "rx", "fill"], st = ["x", "width", "height", "fill", "rx"], vt = ["d", "fill"], dt = ["d", "stroke"], ct = ["cx", "cy", "stroke", "fill"], mt = ["cx", "cy", "stroke", "fill"], ft = ["x1", "x2", "y2", "stroke"], ht = ["x", "height", "width", "onMouseenter"], gt = ["min", "max"], bt = ["min", "max"], xt = {
|
|
17
|
+
__name: "Slicer",
|
|
18
|
+
props: {
|
|
19
|
+
background: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "#FFFFFF"
|
|
22
|
+
},
|
|
23
|
+
borderColor: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "#FFFFFF"
|
|
26
|
+
},
|
|
27
|
+
fontSize: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 14
|
|
30
|
+
},
|
|
31
|
+
labelLeft: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
labelRight: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
textColor: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "#1A1A1A"
|
|
42
|
+
},
|
|
43
|
+
inputColor: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "#1A1A1A"
|
|
46
|
+
},
|
|
47
|
+
max: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0
|
|
50
|
+
},
|
|
51
|
+
min: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 0
|
|
54
|
+
},
|
|
55
|
+
selectColor: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "#4A4A4A"
|
|
58
|
+
},
|
|
59
|
+
useResetSlot: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
valueStart: {
|
|
64
|
+
type: [Number, String],
|
|
65
|
+
default: 0
|
|
66
|
+
},
|
|
67
|
+
valueEnd: {
|
|
68
|
+
type: [Number, String],
|
|
69
|
+
default: 0
|
|
70
|
+
},
|
|
71
|
+
minimap: {
|
|
72
|
+
type: Array,
|
|
73
|
+
default: []
|
|
74
|
+
},
|
|
75
|
+
smoothMinimap: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1
|
|
78
|
+
},
|
|
79
|
+
minimapSelectedColor: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: "#1f77b4"
|
|
82
|
+
},
|
|
83
|
+
minimapSelectionRadius: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 12
|
|
86
|
+
},
|
|
87
|
+
minimapLineColor: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: "#2D353C"
|
|
90
|
+
},
|
|
91
|
+
minimapSelectedColorOpacity: {
|
|
92
|
+
type: Number,
|
|
93
|
+
default: 0.2
|
|
94
|
+
},
|
|
95
|
+
minimapSelectedIndex: {
|
|
96
|
+
type: Number,
|
|
97
|
+
default: null
|
|
98
|
+
},
|
|
99
|
+
minimapIndicatorColor: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: "#2D353C"
|
|
102
|
+
},
|
|
103
|
+
refreshStartPoint: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 0
|
|
106
|
+
},
|
|
107
|
+
refreshEndPoint: {
|
|
108
|
+
type: Number,
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
enableRangeHandles: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !1
|
|
114
|
+
},
|
|
115
|
+
enableSelectionDrag: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !0
|
|
118
|
+
},
|
|
119
|
+
verticalHandles: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: !1
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
emits: ["update:start", "update:end", "reset", "trapMouse"],
|
|
125
|
+
setup(l, { expose: Ce, emit: ke }) {
|
|
126
|
+
Oe((t) => ({
|
|
127
|
+
"612d7222": Le.value,
|
|
128
|
+
"0dba0ad4": p.value,
|
|
129
|
+
"038e80f2": Me.value,
|
|
130
|
+
"4d4f8874": l.selectColor,
|
|
131
|
+
a2455958: Re.value
|
|
132
|
+
}));
|
|
133
|
+
const a = l, h = i(null), r = i(a.min), s = i(a.max), D = v(() => !!a.minimap.length), O = i(Ke()), V = i(0);
|
|
134
|
+
he(() => {
|
|
135
|
+
const t = () => {
|
|
136
|
+
h.value && (V.value = h.value.getBoundingClientRect().width);
|
|
137
|
+
};
|
|
138
|
+
t();
|
|
139
|
+
const e = we(t, 50);
|
|
140
|
+
window.addEventListener("resize", e), te(() => {
|
|
141
|
+
window.removeEventListener("resize", e);
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
const $e = v(() => a.refreshEndPoint === null ? a.max : a.refreshEndPoint), L = ke, g = v(() => {
|
|
145
|
+
const t = a.max - a.min, e = (r.value - a.min) / t * 100, n = (s.value - a.min) / t * 100, o = (e + n) / 2, x = j.value ? `calc(${o}% - ${H.value.width}px)` : Z.value ? `calc(${o}%)` : `calc(${o}% - ${H.value.width / 2}px)`;
|
|
146
|
+
return {
|
|
147
|
+
left: `${e}%`,
|
|
148
|
+
width: `${n - e}%`,
|
|
149
|
+
background: a.selectColor,
|
|
150
|
+
tooltipLeft: `calc(${e}% - ${Z.value ? 0 : ee.value / 2}px)`,
|
|
151
|
+
tooltipRight: `calc(${n}% - ${j.value ? X.value : X.value / 2}px)`,
|
|
152
|
+
tooltipCenter: x,
|
|
153
|
+
arrowLeft: !Z.value,
|
|
154
|
+
arrowRight: !j.value
|
|
155
|
+
};
|
|
156
|
+
}), Z = v(() => h.value ? h.value.getBoundingClientRect().width * ((r.value - a.min) / (a.max - a.min)) - ee.value / 2 < 0 : !1), j = v(() => h.value ? h.value.getBoundingClientRect().width * ((s.value - a.min) / (a.max - a.min)) + X.value / 2 > h.value.getBoundingClientRect().width : !1), Le = v(() => a.inputColor), Re = v(() => a.background), Me = v(() => `${a.selectColor}33`), p = v(() => a.borderColor), ie = v(() => {
|
|
157
|
+
const t = [];
|
|
158
|
+
for (let e = 0; e < a.minimap.length; e += 1)
|
|
159
|
+
t.push(e);
|
|
160
|
+
return t;
|
|
161
|
+
});
|
|
162
|
+
function ue() {
|
|
163
|
+
L("reset");
|
|
164
|
+
}
|
|
165
|
+
function Ne() {
|
|
166
|
+
Number(r.value) > Number(s.value) - 1 && (r.value = Number(s.value) - 1), L("update:start", Number(r.value));
|
|
167
|
+
}
|
|
168
|
+
function Ee() {
|
|
169
|
+
Number(s.value) < Number(r.value) + 1 && (s.value = Number(r.value) + 1), L("update:end", Number(s.value));
|
|
170
|
+
}
|
|
171
|
+
T(
|
|
172
|
+
() => a.min,
|
|
173
|
+
(t) => {
|
|
174
|
+
Number(r.value) < Number(t) && (r.value = Number(t)), Number(s.value) < Number(t) && (s.value = Number(t));
|
|
175
|
+
}
|
|
176
|
+
), T(
|
|
177
|
+
() => a.max,
|
|
178
|
+
(t) => {
|
|
179
|
+
Number(r.value) > Number(t) && (r.value = Number(t)), Number(s.value) > Number(t) && (s.value = Number(t));
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
const G = i(null), u = i({
|
|
183
|
+
width: 1,
|
|
184
|
+
height: 1
|
|
185
|
+
}), N = i(null);
|
|
186
|
+
he(() => {
|
|
187
|
+
if (D.value) {
|
|
188
|
+
const t = we(() => {
|
|
189
|
+
const { width: e, height: n } = Je({
|
|
190
|
+
chart: G.value
|
|
191
|
+
});
|
|
192
|
+
u.value.width = e, u.value.height = n - 47;
|
|
193
|
+
});
|
|
194
|
+
N.value = new ResizeObserver(t), N.value.observe(G.value);
|
|
195
|
+
}
|
|
196
|
+
}), te(() => {
|
|
197
|
+
N.value && N.value.disconnect();
|
|
198
|
+
});
|
|
199
|
+
const f = v(() => a.minimap.length ? u.value.width / a.minimap.length : 0), b = v(() => {
|
|
200
|
+
if (!a.minimap.length) return [];
|
|
201
|
+
const t = Math.max(...a.minimap), e = Math.min(...a.minimap) - 10, n = t - (e > 0 ? 0 : e), o = a.minimap.map((Ve, Xe) => {
|
|
202
|
+
const Ue = Ve - e;
|
|
203
|
+
return {
|
|
204
|
+
x: u.value.width / a.minimap.length * Xe + f.value / 2,
|
|
205
|
+
y: u.value.height - Ue / n * (u.value.height * 0.9)
|
|
206
|
+
};
|
|
207
|
+
}), x = a.smoothMinimap ? pe(o) : Se(o), W = [...o].slice(a.valueStart, a.valueEnd), We = a.smoothMinimap ? pe(W) : Se(W);
|
|
208
|
+
return {
|
|
209
|
+
fullSet: x,
|
|
210
|
+
selectionSet: We,
|
|
211
|
+
sliced: W,
|
|
212
|
+
firstPlot: o[a.valueStart],
|
|
213
|
+
lastPlot: o[a.valueEnd - 1]
|
|
214
|
+
};
|
|
215
|
+
}), y = v(() => ({
|
|
216
|
+
x: f.value * r.value + f.value / 2,
|
|
217
|
+
width: u.value.width * ((s.value - r.value) / a.max) - f.value
|
|
218
|
+
})), z = i(a.minimapSelectedIndex);
|
|
219
|
+
T(
|
|
220
|
+
() => a.minimapSelectedIndex,
|
|
221
|
+
(t) => {
|
|
222
|
+
z.value = t + a.valueStart;
|
|
223
|
+
},
|
|
224
|
+
{ immediate: !0 }
|
|
225
|
+
);
|
|
226
|
+
function Te(t) {
|
|
227
|
+
z.value = t, t >= a.valueStart && t < a.valueEnd && L("trapMouse", t - a.valueStart);
|
|
228
|
+
}
|
|
229
|
+
const Be = i(0), q = i(null), J = i(null);
|
|
230
|
+
function K(t) {
|
|
231
|
+
r.value = t, q.value && (q.value.value = t), L("update:start", Number(r.value));
|
|
232
|
+
}
|
|
233
|
+
function Q(t) {
|
|
234
|
+
s.value = t, J.value && (J.value.value = t), L("update:end", Number(s.value));
|
|
235
|
+
}
|
|
236
|
+
const Y = v(() => a.valueEnd - a.valueStart), I = i(!1);
|
|
237
|
+
let _ = i(null);
|
|
238
|
+
const De = v(() => (V.value - 48) / (a.max - a.min)), ze = v(() => (V.value - 48) / (a.max - a.min) * Y.value), Ie = i(2.5), oe = v(() => {
|
|
239
|
+
const t = V.value - 48;
|
|
240
|
+
return Math.ceil((a.max - a.min) / ((t - ze.value) / Ie.value));
|
|
241
|
+
});
|
|
242
|
+
let S = null, C = null, k = null, $ = null;
|
|
243
|
+
const re = (t) => {
|
|
244
|
+
if (R.value = !0, !a.enableSelectionDrag) return;
|
|
245
|
+
const e = t.type === "touchstart", n = e && t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null, o = e ? n ? n.target : null : t.target;
|
|
246
|
+
!o || !(o instanceof Element) || o.classList && o.classList.contains("range-handle") || (I.value = !0, _.value = e ? n ? n.clientX : 0 : t.clientX, S = e ? "touchmove" : "mousemove", C = e ? "touchend" : "mouseup", k = e ? Ae : Pe, $ = e ? He : Fe, window.addEventListener(S, k, { passive: !1 }), window.addEventListener(C, $));
|
|
247
|
+
};
|
|
248
|
+
function Pe(t) {
|
|
249
|
+
I.value && se(t.clientX);
|
|
250
|
+
}
|
|
251
|
+
function Ae(t) {
|
|
252
|
+
if (!I.value || !h.value) return;
|
|
253
|
+
const e = t.target;
|
|
254
|
+
if (!(e instanceof Element) || !h.value.contains(e) || e.classList && e.classList.contains("range-handle")) return;
|
|
255
|
+
t.preventDefault();
|
|
256
|
+
const n = t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null;
|
|
257
|
+
n && se(n.clientX);
|
|
258
|
+
}
|
|
259
|
+
function se(t) {
|
|
260
|
+
if (!I.value) return;
|
|
261
|
+
const e = t - _.value;
|
|
262
|
+
if (Math.abs(e) > De.value) {
|
|
263
|
+
if (e > 0) {
|
|
264
|
+
if (Number(s.value) + 1 <= a.max) {
|
|
265
|
+
const n = Math.min(a.max, Number(s.value) + oe.value);
|
|
266
|
+
Q(n), K(n - Y.value);
|
|
267
|
+
}
|
|
268
|
+
} else if (Number(r.value) - 1 >= a.min) {
|
|
269
|
+
const n = Math.max(a.min, Number(r.value) - oe.value);
|
|
270
|
+
K(n), Q(n + Y.value);
|
|
271
|
+
}
|
|
272
|
+
_.value = t;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function Fe() {
|
|
276
|
+
ve();
|
|
277
|
+
}
|
|
278
|
+
function He() {
|
|
279
|
+
ve();
|
|
280
|
+
}
|
|
281
|
+
function ve() {
|
|
282
|
+
I.value = !1, S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
|
|
283
|
+
}
|
|
284
|
+
const E = i(!1), P = i(null), A = i(null), ee = i(1), X = i(1), R = i(!1);
|
|
285
|
+
function de() {
|
|
286
|
+
P.value && (ee.value = P.value.getBoundingClientRect().width);
|
|
287
|
+
}
|
|
288
|
+
function ce() {
|
|
289
|
+
A.value && (X.value = A.value.getBoundingClientRect().width);
|
|
290
|
+
}
|
|
291
|
+
const me = i(0);
|
|
292
|
+
function fe(t) {
|
|
293
|
+
me.value = t === "start" ? 1 : 0;
|
|
294
|
+
}
|
|
295
|
+
const F = i(!1), H = i({
|
|
296
|
+
width: 0,
|
|
297
|
+
left: 0
|
|
298
|
+
});
|
|
299
|
+
return T([r, s], async () => {
|
|
300
|
+
if (await le(), !P.value || !A.value) {
|
|
301
|
+
F.value = !1, H.value = { width: 0, left: 0 };
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const t = P.value.getBoundingClientRect(), e = A.value.getBoundingClientRect();
|
|
305
|
+
F.value = t.x + t.width > e.x;
|
|
306
|
+
const n = t.x + t.width / 2, o = e.x + e.width / 2, x = t.width + e.width, W = (n + o) / 2;
|
|
307
|
+
H.value = {
|
|
308
|
+
width: x,
|
|
309
|
+
left: W - x / 2
|
|
310
|
+
};
|
|
311
|
+
}), Ze(() => {
|
|
312
|
+
de(), ce();
|
|
313
|
+
}), T(
|
|
314
|
+
() => a.labelLeft,
|
|
315
|
+
() => {
|
|
316
|
+
le(de);
|
|
317
|
+
},
|
|
318
|
+
{ deep: !0 }
|
|
319
|
+
), T(
|
|
320
|
+
() => a.labelRight,
|
|
321
|
+
() => {
|
|
322
|
+
le(ce);
|
|
323
|
+
},
|
|
324
|
+
{ deep: !0 }
|
|
325
|
+
), Ce({
|
|
326
|
+
setStartValue: K,
|
|
327
|
+
setEndValue: Q
|
|
328
|
+
}), te(() => {
|
|
329
|
+
N.value && N.value.disconnect(), S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
|
|
330
|
+
}), (t, e) => (m(), c("div", {
|
|
331
|
+
"data-dom-to-png-ignore": "",
|
|
332
|
+
style: { padding: "0 24px" },
|
|
333
|
+
class: "vue-data-ui-zoom",
|
|
334
|
+
ref_key: "zoomWrapper",
|
|
335
|
+
ref: h,
|
|
336
|
+
onMousedown: re,
|
|
337
|
+
onTouchstart: re,
|
|
338
|
+
onTouchend: e[11] || (e[11] = (n) => R.value = !1)
|
|
339
|
+
}, [
|
|
340
|
+
d("div", _e, [
|
|
341
|
+
l.valueStart !== l.refreshStartPoint || l.valueEnd !== $e.value ? (m(), c("div", et, [
|
|
342
|
+
l.useResetSlot ? je(t.$slots, "reset-action", {
|
|
343
|
+
key: 1,
|
|
344
|
+
reset: ue
|
|
345
|
+
}, void 0, !0) : (m(), c("button", {
|
|
346
|
+
key: 0,
|
|
347
|
+
tabindex: "0",
|
|
348
|
+
role: "button",
|
|
349
|
+
class: "vue-data-ui-refresh-button",
|
|
350
|
+
style: M({
|
|
351
|
+
top: D.value ? "36px" : "-16px",
|
|
352
|
+
pointerEvents: "all !important"
|
|
353
|
+
}),
|
|
354
|
+
onClick: ue
|
|
355
|
+
}, [
|
|
356
|
+
Ge(qe, {
|
|
357
|
+
name: "refresh",
|
|
358
|
+
stroke: l.textColor
|
|
359
|
+
}, null, 8, ["stroke"])
|
|
360
|
+
], 4))
|
|
361
|
+
])) : w("", !0)
|
|
362
|
+
]),
|
|
363
|
+
d("div", {
|
|
364
|
+
class: "double-range-slider",
|
|
365
|
+
ref_key: "minimapWrapper",
|
|
366
|
+
ref: G,
|
|
367
|
+
style: { "z-index": "0" },
|
|
368
|
+
onMouseenter: e[9] || (e[9] = (n) => R.value = !0),
|
|
369
|
+
onMouseleave: e[10] || (e[10] = (n) => R.value = !1)
|
|
370
|
+
}, [
|
|
371
|
+
D.value ? (m(), c("div", tt, [
|
|
372
|
+
(m(), c("svg", {
|
|
373
|
+
xmlns: U(Qe),
|
|
374
|
+
viewBox: `0 0 ${u.value.width < 0 ? 0 : u.value.width} ${u.value.height < 0 ? 0 : u.value.height}`
|
|
375
|
+
}, [
|
|
376
|
+
d("defs", null, [
|
|
377
|
+
d("linearGradient", {
|
|
378
|
+
id: O.value,
|
|
379
|
+
x1: "0%",
|
|
380
|
+
y1: "0%",
|
|
381
|
+
x2: "0%",
|
|
382
|
+
y2: "100%"
|
|
383
|
+
}, [
|
|
384
|
+
d("stop", {
|
|
385
|
+
offset: "0%",
|
|
386
|
+
"stop-color": `${l.minimapLineColor}50`
|
|
387
|
+
}, null, 8, nt),
|
|
388
|
+
e[12] || (e[12] = d("stop", {
|
|
389
|
+
offset: "100%",
|
|
390
|
+
"stop-color": "transparent"
|
|
391
|
+
}, null, -1))
|
|
392
|
+
], 8, at)
|
|
393
|
+
]),
|
|
394
|
+
d("path", {
|
|
395
|
+
d: `M${b.value.fullSet}`,
|
|
396
|
+
stroke: `${l.minimapLineColor}`,
|
|
397
|
+
fill: "none",
|
|
398
|
+
"stroke-width": "1",
|
|
399
|
+
"stroke-linecap": "round",
|
|
400
|
+
"stroke-linejoin": "round",
|
|
401
|
+
style: { opacity: "1" }
|
|
402
|
+
}, null, 8, it),
|
|
403
|
+
d("rect", {
|
|
404
|
+
x: y.value.x,
|
|
405
|
+
width: y.value.width < 0 ? 0 : y.value.width,
|
|
406
|
+
height: Math.max(u.value.height, 0),
|
|
407
|
+
y: 0,
|
|
408
|
+
fill: p.value,
|
|
409
|
+
rx: l.minimapSelectionRadius,
|
|
410
|
+
stroke: "none"
|
|
411
|
+
}, null, 8, ut),
|
|
412
|
+
d("path", {
|
|
413
|
+
d: `M${f.value / 2},${Math.max(u.value.height, 0)} ${b.value.fullSet} L${u.value.width - f.value / 2},${Math.max(u.value.height, 0)}Z`,
|
|
414
|
+
fill: `url(#${O.value})`,
|
|
415
|
+
stroke: "none",
|
|
416
|
+
style: { opacity: "1" }
|
|
417
|
+
}, null, 8, ot),
|
|
418
|
+
d("rect", {
|
|
419
|
+
x: y.value.x,
|
|
420
|
+
width: y.value.width < 0 ? 0 : y.value.width,
|
|
421
|
+
height: Math.max(u.value.height, 0),
|
|
422
|
+
y: 0,
|
|
423
|
+
rx: l.minimapSelectionRadius,
|
|
424
|
+
fill: p.value
|
|
425
|
+
}, null, 8, rt),
|
|
426
|
+
d("rect", {
|
|
427
|
+
x: y.value.x,
|
|
428
|
+
width: y.value.width < 0 ? 0 : y.value.width,
|
|
429
|
+
height: Math.max(u.value.height, 0),
|
|
430
|
+
y: 0,
|
|
431
|
+
fill: l.minimapSelectedColor,
|
|
432
|
+
rx: l.minimapSelectionRadius,
|
|
433
|
+
style: M({
|
|
434
|
+
opacity: l.minimapSelectedColorOpacity
|
|
435
|
+
})
|
|
436
|
+
}, null, 12, st),
|
|
437
|
+
d("path", {
|
|
438
|
+
d: `M${b.value.sliced[0].x},${Math.max(u.value.height, 0)} ${b.value.selectionSet} L${b.value.sliced.at(-1).x},${Math.max(u.value.height, 0)}Z`,
|
|
439
|
+
fill: `url(#${O.value})`,
|
|
440
|
+
stroke: "none",
|
|
441
|
+
style: { opacity: "1" }
|
|
442
|
+
}, null, 8, vt),
|
|
443
|
+
d("path", {
|
|
444
|
+
d: `M ${b.value.selectionSet}`,
|
|
445
|
+
stroke: `${l.minimapLineColor}`,
|
|
446
|
+
fill: "transparent",
|
|
447
|
+
"stroke-width": "2",
|
|
448
|
+
"stroke-linecap": "round",
|
|
449
|
+
"stroke-linejoin": "round"
|
|
450
|
+
}, null, 8, dt),
|
|
451
|
+
d("circle", {
|
|
452
|
+
cx: b.value.firstPlot.x,
|
|
453
|
+
cy: b.value.firstPlot.y,
|
|
454
|
+
"stroke-width": "0.5",
|
|
455
|
+
stroke: p.value,
|
|
456
|
+
r: "3",
|
|
457
|
+
fill: l.minimapLineColor
|
|
458
|
+
}, null, 8, ct),
|
|
459
|
+
d("circle", {
|
|
460
|
+
cx: b.value.lastPlot.x,
|
|
461
|
+
cy: b.value.lastPlot.y,
|
|
462
|
+
"stroke-width": "0.5",
|
|
463
|
+
stroke: p.value,
|
|
464
|
+
r: "3",
|
|
465
|
+
fill: l.minimapLineColor
|
|
466
|
+
}, null, 8, mt),
|
|
467
|
+
z.value !== null ? (m(!0), c(be, { key: 0 }, xe(ie.value, (n, o) => (m(), c("g", null, [
|
|
468
|
+
z.value === n && n >= l.valueStart && n < l.valueEnd ? (m(), c("line", {
|
|
469
|
+
key: 0,
|
|
470
|
+
x1: f.value * o + f.value / 2,
|
|
471
|
+
x2: f.value * o + f.value / 2,
|
|
472
|
+
y1: 0,
|
|
473
|
+
y2: Math.max(u.value.height, 0),
|
|
474
|
+
stroke: l.minimapIndicatorColor,
|
|
475
|
+
"stroke-linecap": "round",
|
|
476
|
+
"stroke-dasharray": "2",
|
|
477
|
+
"stroke-width": "1"
|
|
478
|
+
}, null, 8, ft)) : w("", !0)
|
|
479
|
+
]))), 256)) : w("", !0),
|
|
480
|
+
(m(!0), c(be, null, xe(ie.value, (n, o) => (m(), c("rect", {
|
|
481
|
+
x: f.value * o,
|
|
482
|
+
y: 0,
|
|
483
|
+
height: Math.max(u.value.height, 0),
|
|
484
|
+
width: f.value < 0 ? 0 : f.value,
|
|
485
|
+
fill: "transparent",
|
|
486
|
+
style: M([{ "pointer-events": "all !important" }, {
|
|
487
|
+
cursor: n >= l.valueStart && n < l.valueEnd && l.enableSelectionDrag ? E.value ? "grabbing" : "grab" : "default"
|
|
488
|
+
}]),
|
|
489
|
+
onMousedown: e[0] || (e[0] = (x) => E.value = !0),
|
|
490
|
+
onMouseup: e[1] || (e[1] = (x) => E.value = !1),
|
|
491
|
+
onMouseenter: (x) => Te(n),
|
|
492
|
+
onMouseleave: e[2] || (e[2] = (x) => {
|
|
493
|
+
z.value = null, L("trapMouse", null);
|
|
494
|
+
})
|
|
495
|
+
}, null, 44, ht))), 256))
|
|
496
|
+
], 8, lt))
|
|
497
|
+
])) : w("", !0),
|
|
498
|
+
e[13] || (e[13] = d("div", { class: "slider-track" }, null, -1)),
|
|
499
|
+
d("div", {
|
|
500
|
+
class: B({
|
|
501
|
+
"range-highlight": !0,
|
|
502
|
+
move: l.enableSelectionDrag
|
|
503
|
+
}),
|
|
504
|
+
onMousedown: e[3] || (e[3] = (n) => E.value = !0),
|
|
505
|
+
onMouseup: e[4] || (e[4] = (n) => E.value = !1),
|
|
506
|
+
style: M({
|
|
507
|
+
...g.value,
|
|
508
|
+
cursor: E.value ? "grabbing" : "grab"
|
|
509
|
+
})
|
|
510
|
+
}, null, 38),
|
|
511
|
+
l.enableRangeHandles ? ge((m(), c("input", {
|
|
512
|
+
ref_key: "rangeStart",
|
|
513
|
+
ref: q,
|
|
514
|
+
key: `range-min${Be.value}`,
|
|
515
|
+
type: "range",
|
|
516
|
+
class: B({ "range-left": !0, "range-handle": !0, "range-minimap": D.value && l.verticalHandles }),
|
|
517
|
+
min: l.min,
|
|
518
|
+
max: l.max,
|
|
519
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => r.value = n),
|
|
520
|
+
onInput: Ne,
|
|
521
|
+
onMouseenter: e[6] || (e[6] = (n) => fe("start"))
|
|
522
|
+
}, null, 42, gt)), [
|
|
523
|
+
[ye, r.value]
|
|
524
|
+
]) : w("", !0),
|
|
525
|
+
l.enableRangeHandles ? ge((m(), c("input", {
|
|
526
|
+
key: 2,
|
|
527
|
+
ref_key: "rangeEnd",
|
|
528
|
+
ref: J,
|
|
529
|
+
type: "range",
|
|
530
|
+
class: B({ "range-right": !0, "range-handle": !0, "range-minimap": D.value && l.verticalHandles }),
|
|
531
|
+
min: l.min,
|
|
532
|
+
max: l.max,
|
|
533
|
+
"onUpdate:modelValue": e[7] || (e[7] = (n) => s.value = n),
|
|
534
|
+
onInput: Ee,
|
|
535
|
+
onMouseenter: e[8] || (e[8] = (n) => fe("end"))
|
|
536
|
+
}, null, 42, bt)), [
|
|
537
|
+
[ye, s.value]
|
|
538
|
+
]) : w("", !0),
|
|
539
|
+
l.labelLeft ? (m(), c("div", {
|
|
540
|
+
key: 3,
|
|
541
|
+
ref_key: "tooltipLeft",
|
|
542
|
+
ref: P,
|
|
543
|
+
class: B({
|
|
544
|
+
"range-tooltip": !0,
|
|
545
|
+
"range-tooltip-visible": R.value,
|
|
546
|
+
"range-tooltip-arrow": g.value.arrowLeft && !l.verticalHandles,
|
|
547
|
+
"range-tooltip-arrow-left": !g.value.arrowLeft && !l.verticalHandles
|
|
548
|
+
}),
|
|
549
|
+
style: M({
|
|
550
|
+
left: g.value.tooltipLeft,
|
|
551
|
+
color: U(ne)(l.selectColor),
|
|
552
|
+
backgroundColor: l.selectColor,
|
|
553
|
+
border: `1px solid ${p.value}`,
|
|
554
|
+
zIndex: `${me.value + 4}`,
|
|
555
|
+
visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
|
|
556
|
+
})
|
|
557
|
+
}, ae(l.labelLeft), 7)) : w("", !0),
|
|
558
|
+
(F.value || l.labelLeft === l.labelRight) && (l.labelLeft || l.labelRight) ? (m(), c("div", {
|
|
559
|
+
key: 4,
|
|
560
|
+
ref: "tooltipMerge",
|
|
561
|
+
class: B({
|
|
562
|
+
"range-tooltip": !0,
|
|
563
|
+
"range-tooltip-visible": R.value,
|
|
564
|
+
"range-tooltip-arrow": !0,
|
|
565
|
+
"range-tooltip-arrow-left": !g.value.arrowLeft && !l.verticalHandles,
|
|
566
|
+
"range-tooltip-arrow-right": !g.value.arrowRight && !l.verticalHandles
|
|
567
|
+
}),
|
|
568
|
+
style: M({
|
|
569
|
+
left: g.value.tooltipCenter,
|
|
570
|
+
width: H.value.width + "px",
|
|
571
|
+
color: U(ne)(l.selectColor),
|
|
572
|
+
backgroundColor: l.selectColor,
|
|
573
|
+
border: `1px solid ${p.value}`,
|
|
574
|
+
zIndex: "4"
|
|
575
|
+
})
|
|
576
|
+
}, ae(l.labelLeft === l.labelRight ? l.labelLeft : `${l.labelLeft} - ${l.labelRight}`), 7)) : w("", !0),
|
|
577
|
+
l.labelRight ? (m(), c("div", {
|
|
578
|
+
key: 5,
|
|
579
|
+
ref_key: "tooltipRight",
|
|
580
|
+
ref: A,
|
|
581
|
+
class: B({
|
|
582
|
+
"range-tooltip": !0,
|
|
583
|
+
"range-tooltip-visible": R.value,
|
|
584
|
+
"range-tooltip-arrow": g.value.arrowRight && !l.verticalHandles,
|
|
585
|
+
"range-tooltip-arrow-right": !g.value.arrowRight && !l.verticalHandles
|
|
586
|
+
}),
|
|
587
|
+
style: M({
|
|
588
|
+
left: g.value.tooltipRight,
|
|
589
|
+
color: U(ne)(l.selectColor),
|
|
590
|
+
backgroundColor: l.selectColor,
|
|
591
|
+
border: `1px solid ${p.value}`,
|
|
592
|
+
zIndex: "4",
|
|
593
|
+
visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
|
|
594
|
+
})
|
|
595
|
+
}, ae(l.labelRight), 7)) : w("", !0)
|
|
596
|
+
], 544)
|
|
597
|
+
], 544));
|
|
598
|
+
}
|
|
599
|
+
}, kt = /* @__PURE__ */ Ye(xt, [["__scopeId", "data-v-b6997053"]]);
|
|
600
|
+
export {
|
|
601
|
+
kt as S
|
|
602
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toRef as c, ref as a, computed as v, onMounted as m, watch as y, createElementBlock as b, openBlock as g, normalizeStyle as x, renderSlot as k, nextTick as S } from "vue";
|
|
2
|
-
import { s as _,
|
|
2
|
+
import { s as _, ap as i } from "./index-BtNwOUja.js";
|
|
3
3
|
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const R = {
|
|
5
5
|
__name: "SparkTooltip",
|
|
@@ -19,7 +19,7 @@ const R = {
|
|
|
19
19
|
fontSize: { type: Number }
|
|
20
20
|
},
|
|
21
21
|
setup(d) {
|
|
22
|
-
const e = d, u = c(e.svgRef), o = a(null), n = a(0), l = a(0),
|
|
22
|
+
const e = d, u = c(e.svgRef), o = a(null), n = a(0), l = a(0), p = a(!1), f = v(() => _(e.background, e.backgroundOpacity)), s = async () => {
|
|
23
23
|
if (!u.value || !o.value) return;
|
|
24
24
|
const t = i({
|
|
25
25
|
svgElement: u.value,
|
|
@@ -34,13 +34,13 @@ const R = {
|
|
|
34
34
|
y: e.prevY,
|
|
35
35
|
offsetY: e.offsetY
|
|
36
36
|
});
|
|
37
|
-
!t || !r || (
|
|
38
|
-
|
|
37
|
+
!t || !r || (p.value = !1, n.value = r.top, l.value = r.left, await S(), setTimeout(() => {
|
|
38
|
+
p.value = !0, n.value = t.top, l.value = t.left;
|
|
39
39
|
}, 50));
|
|
40
40
|
};
|
|
41
|
-
return m(
|
|
41
|
+
return m(s), y(
|
|
42
42
|
() => [e.x, e.y, e.prevX, e.prevY],
|
|
43
|
-
() =>
|
|
43
|
+
() => s(),
|
|
44
44
|
{ immediate: !0 }
|
|
45
45
|
), (t, r) => (g(), b("div", {
|
|
46
46
|
ref_key: "tooltipRef",
|
|
@@ -56,7 +56,7 @@ const R = {
|
|
|
56
56
|
fontSize: `${e.fontSize}px`,
|
|
57
57
|
borderRadius: `${e.borderRadius}px`,
|
|
58
58
|
border: `${e.borderWidth}px solid ${e.borderColor}`,
|
|
59
|
-
transition:
|
|
59
|
+
transition: p.value ? "top 0.3s ease-out, left 0.3s ease-out" : "none"
|
|
60
60
|
})
|
|
61
61
|
}, [
|
|
62
62
|
k(t.$slots, "default", {}, void 0, !0)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as l, openBlock as n, Fragment as f, createElementVNode as p, createCommentVNode as o, normalizeStyle as d, unref as e, toDisplayString as g, renderSlot as r } from "vue";
|
|
2
|
-
import { u as c } from "./useNestedProp-
|
|
2
|
+
import { u as c } from "./useNestedProp-f2H3m6Yj.js";
|
|
3
3
|
const x = {
|
|
4
4
|
__name: "Title",
|
|
5
5
|
props: {
|