vue-data-ui 3.1.3 → 3.1.5
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-DBaAWGvq.js → Arrow-BFbcF5Sq.js} +1 -1
- package/dist/{BaseDraggableDialog-BmN9jTP8.js → BaseDraggableDialog-BO4B1Kwa.js} +2 -2
- package/dist/{BaseIcon-BcOSijbz.js → BaseIcon-BQQGRQ2U.js} +1 -1
- package/dist/{ColorPicker-D1yNPt76.js → ColorPicker-d1kmGapq.js} +2 -2
- package/dist/{DataTable-Cm8Tt9PQ.js → DataTable-D6voeZvO.js} +2 -2
- package/dist/{Legend-5qvgVkrY.js → Legend-nPGcCxG_.js} +2 -2
- package/dist/{NonSvgPenAndPaper-D3QGd7vP.js → NonSvgPenAndPaper-xRGRe41H.js} +3 -3
- package/dist/{PackageVersion-0XlRFsI_.js → PackageVersion-BeStrsPr.js} +1 -1
- package/dist/{PenAndPaper-CyH7Ip2i.js → PenAndPaper-C6tiapdo.js} +3 -3
- package/dist/{Shape-DiplSMFy.js → Shape-DBVq0fdK.js} +1 -1
- package/dist/Slicer-Duqm7KZK.js +597 -0
- package/dist/{SparkTooltip-VveQSwlw.js → SparkTooltip-wNGmXZSx.js} +1 -1
- package/dist/{Title-CqYBs02Y.js → Title-ydtId0LC.js} +1 -1
- package/dist/Tooltip-oeu9knGI.js +200 -0
- package/dist/{UserOptions-ZmwlARCV.js → UserOptions-CnJxN2Vo.js} +29 -29
- package/dist/{dom-to-png-DGA4a3xT.js → dom-to-png-CMCYtLrX.js} +1 -1
- package/dist/{img-DSrvx9J6.js → img-Neec0VVb.js} +1 -1
- package/dist/{index-CaxArMHL.js → index-BkfuZCRT.js} +7 -2
- package/dist/{pdf-BG8PiGFH.js → pdf-CpQ-dqJh.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +12 -0
- package/dist/types/vue-data-ui.d.ts +12 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DmtFf4bt.js → useAutoSizeLabelsInsideViewbox-DR2HExYc.js} +1 -1
- package/dist/{useNestedProp-tWT02_6S.js → useNestedProp-BMzw9VUz.js} +1 -1
- package/dist/{usePrinter-BYtPmEo8.js → usePrinter-CEdg3j8S.js} +2 -2
- package/dist/{vue-data-ui-DVb8r5z7.js → vue-data-ui-D5B7a84o.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BLKyWpz7.js → vue-ui-3d-bar-C8_Qu1rf.js} +6 -6
- package/dist/{vue-ui-accordion-DUlNpLir.js → vue-ui-accordion-DFxAHGEZ.js} +3 -3
- package/dist/{vue-ui-age-pyramid-LLqbXP1m.js → vue-ui-age-pyramid-D_kTImtX.js} +43 -41
- package/dist/{vue-ui-annotator-CcYIlcKF.js → vue-ui-annotator-B1vSlzfu.js} +2 -2
- package/dist/{vue-ui-bullet-BKmts_u4.js → vue-ui-bullet-VPchh2r2.js} +7 -7
- package/dist/{vue-ui-candlestick-C9l_NpXu.js → vue-ui-candlestick-CB3bj7_-.js} +42 -40
- package/dist/{vue-ui-carousel-table-H7xS6aBC.js → vue-ui-carousel-table-CUiSyrTY.js} +4 -4
- package/dist/{vue-ui-chestnut-CAW0IOdY.js → vue-ui-chestnut-BE5ZEt1N.js} +5 -5
- package/dist/{vue-ui-chord-CK5YhCqM.js → vue-ui-chord-DVSBY9ou.js} +8 -8
- package/dist/{vue-ui-circle-pack-NLyZgTGF.js → vue-ui-circle-pack-BfDjZFaF.js} +6 -6
- package/dist/{vue-ui-cursor-CyGUrKWU.js → vue-ui-cursor-BIuc6nds.js} +2 -2
- package/dist/{vue-ui-dashboard-Cf5pvEzD.js → vue-ui-dashboard-C7xIcrvD.js} +79 -80
- package/dist/{vue-ui-digits-BZWwwp7c.js → vue-ui-digits-C3mI-0Fg.js} +2 -2
- package/dist/{vue-ui-donut-g1WHrj6G.js → vue-ui-donut-BApz1ho5.js} +52 -50
- package/dist/{vue-ui-donut-evolution-CaEYMVZj.js → vue-ui-donut-evolution-B2PJiYY9.js} +8 -8
- package/dist/{vue-ui-dumbbell-BArS1nXS.js → vue-ui-dumbbell-DQjVvBH_.js} +7 -7
- package/dist/{vue-ui-flow-BR0CB5qt.js → vue-ui-flow-COtJRNLE.js} +40 -38
- package/dist/{vue-ui-funnel-D2OCItvq.js → vue-ui-funnel-BY2qeg-m.js} +6 -6
- package/dist/{vue-ui-galaxy-qgGF1AAf.js → vue-ui-galaxy-3zec_QLi.js} +58 -56
- package/dist/{vue-ui-gauge-BIXmGyQL.js → vue-ui-gauge-CFUA5ORH.js} +8 -8
- package/dist/{vue-ui-gizmo-DHEoS051.js → vue-ui-gizmo-CUPFU8GE.js} +3 -3
- package/dist/{vue-ui-heatmap-tRzq9BnI.js → vue-ui-heatmap-DakytdCv.js} +68 -66
- package/dist/{vue-ui-history-plot-DmwHhrDk.js → vue-ui-history-plot-DnSB7au4.js} +85 -83
- package/dist/{vue-ui-kpi-C2b2R5i1.js → vue-ui-kpi-UmcKQftv.js} +3 -3
- package/dist/{vue-ui-mini-loader-Bs1Mi1tD.js → vue-ui-mini-loader-Bl8GHasa.js} +2 -2
- package/dist/{vue-ui-molecule-BsUvf2v7.js → vue-ui-molecule-BZrmSVps.js} +63 -61
- package/dist/{vue-ui-mood-radar-D3JIpVvX.js → vue-ui-mood-radar-CVM8vl5N.js} +7 -7
- package/dist/{vue-ui-nested-donuts-dJEgQXTH.js → vue-ui-nested-donuts-LTzijeVK.js} +70 -68
- package/dist/{vue-ui-onion-D8dF1DdA.js → vue-ui-onion-aHCc3r7L.js} +38 -36
- package/dist/{vue-ui-parallel-coordinate-plot-LmFsg7UA.js → vue-ui-parallel-coordinate-plot-0xXe6A-6.js} +54 -52
- package/dist/{vue-ui-quadrant-C4O8ki4N.js → vue-ui-quadrant-BlM9WNN7.js} +203 -201
- package/dist/{vue-ui-quick-chart-6bEtTQBG.js → vue-ui-quick-chart-CJ2Wdln9.js} +152 -150
- package/dist/{vue-ui-radar-CfjGWGk3.js → vue-ui-radar-Cgnooz7-.js} +121 -119
- package/dist/{vue-ui-rating-D3WSs2OD.js → vue-ui-rating-DF71ymNG.js} +2 -2
- package/dist/{vue-ui-relation-circle-DzTfi7Tf.js → vue-ui-relation-circle-DsuEL1gY.js} +7 -7
- package/dist/{vue-ui-ridgeline-NtYOJvDy.js → vue-ui-ridgeline-DxP8uxgx.js} +8 -8
- package/dist/{vue-ui-rings-CYQ4i71V.js → vue-ui-rings-C4hKgrft.js} +162 -160
- package/dist/{vue-ui-scatter-meJEHdAD.js → vue-ui-scatter-B_SzTSE5.js} +157 -155
- package/dist/{vue-ui-skeleton-BtILTxx-.js → vue-ui-skeleton-DCAlHSMV.js} +3 -3
- package/dist/{vue-ui-smiley-B5bELpYD.js → vue-ui-smiley-B_JFtrl6.js} +2 -2
- package/dist/{vue-ui-spark-trend-lixdWq_N.js → vue-ui-spark-trend-CC7q1UbE.js} +3 -3
- package/dist/{vue-ui-sparkbar-CaGPav-J.js → vue-ui-sparkbar-C2YRX4mJ.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BZBGYDjs.js → vue-ui-sparkgauge-BO4c3j-8.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Bp6KxpjH.js → vue-ui-sparkhistogram-BuGOHT9h.js} +4 -4
- package/dist/{vue-ui-sparkline-CF-EAZa6.js → vue-ui-sparkline-hOyPCIt8.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-Cj1LAYC8.js → vue-ui-sparkstackbar-DhSc-U8u.js} +36 -34
- package/dist/{vue-ui-stackbar-BrzKhqAK.js → vue-ui-stackbar-VdBWv1wm.js} +14 -12
- package/dist/{vue-ui-strip-plot-BfVVaSFn.js → vue-ui-strip-plot-CBj5ntWM.js} +58 -56
- package/dist/{vue-ui-table-CBzNgzVP.js → vue-ui-table-BItmKbvF.js} +156 -121
- package/dist/{vue-ui-table-heatmap-CKz5bA7N.js → vue-ui-table-heatmap-DziHVKba.js} +5 -5
- package/dist/{vue-ui-table-sparkline-O-Z0YH6u.js → vue-ui-table-sparkline-CpWDqm7q.js} +4 -4
- package/dist/{vue-ui-thermometer-DpNyTGNH.js → vue-ui-thermometer-CWt0q_Tu.js} +7 -7
- package/dist/{vue-ui-timer-uvshaRMI.js → vue-ui-timer-BIv2sfQA.js} +5 -5
- package/dist/{vue-ui-tiremarks-A8Akuz-q.js → vue-ui-tiremarks-BE_VWjK-.js} +6 -6
- package/dist/{vue-ui-treemap-Dvmuo3tM.js → vue-ui-treemap-2AIbDpTo.js} +41 -39
- package/dist/{vue-ui-vertical-bar-eMgRMSKN.js → vue-ui-vertical-bar-CP-XFVV5.js} +53 -51
- package/dist/{vue-ui-waffle-Cm8VfnG8.js → vue-ui-waffle-CewP8k-W.js} +67 -65
- package/dist/{vue-ui-wheel-Bhsklf_m.js → vue-ui-wheel-Ik8FoLfz.js} +6 -6
- package/dist/{vue-ui-word-cloud-C9HGLsG4.js → vue-ui-word-cloud-CEEc5ep_.js} +83 -80
- package/dist/{vue-ui-world-B_MrjwGJ.js → vue-ui-world-CuwXMI3D.js} +11 -9
- package/dist/{vue-ui-xy-DnYJw2aS.js → vue-ui-xy-Bsh2OBHp.js} +1326 -1329
- package/dist/{vue-ui-xy-canvas-C0Snw0Dz.js → vue-ui-xy-canvas-CKzjhhNg.js} +46 -44
- package/package.json +1 -1
- package/dist/Slicer-DG99wPTy.js +0 -604
- package/dist/Tooltip-CP0tVHAf.js +0 -161
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { useCssVars as qe, computed as s, ref as i, onMounted as ge, onBeforeUnmount as Y, watch as P, nextTick as _, onUpdated as Ke, createElementBlock as m, openBlock as f, createElementVNode as d, createCommentVNode as y, renderSlot as Je, normalizeStyle as M, createVNode as Qe, withDirectives as be, unref as O, Fragment as xe, renderList as we, normalizeClass as T, vModelText as ye, toDisplayString as ee } from "vue";
|
|
2
|
+
import { c as Ye, V as pe, U as Se, X as _e, F as te } from "./index-BkfuZCRT.js";
|
|
3
|
+
import { t as Ce, u as et } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import tt from "./BaseIcon-BQQGRQ2U.js";
|
|
5
|
+
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const at = {
|
|
7
|
+
class: "vue-data-ui-slicer-labels",
|
|
8
|
+
style: { position: "relative", "z-index": "1", "pointer-events": "none" }
|
|
9
|
+
}, nt = {
|
|
10
|
+
key: 0,
|
|
11
|
+
style: { width: "100%", position: "relative" }
|
|
12
|
+
}, it = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "minimap",
|
|
15
|
+
style: { width: "100%" }
|
|
16
|
+
}, ut = ["xmlns", "viewBox"], ot = ["id"], rt = ["stop-color"], st = ["d", "stroke"], vt = ["x", "width", "height", "fill", "rx"], dt = ["d", "fill"], ct = ["x", "width", "height", "rx", "fill"], mt = ["x", "width", "height", "fill", "rx"], ft = ["d", "fill"], ht = ["d", "stroke"], gt = ["cx", "cy", "stroke", "fill"], bt = ["cx", "cy", "stroke", "fill"], xt = ["x1", "x2", "y2", "stroke"], wt = ["x", "height", "width", "onMouseenter"], yt = ["min", "max"], pt = ["min", "max"], St = 48, Ct = {
|
|
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: ke, emit: $e }) {
|
|
126
|
+
qe((t) => ({
|
|
127
|
+
a3aa5f5c: Re.value,
|
|
128
|
+
"462058c6": p.value,
|
|
129
|
+
"4e62b9b7": Ne.value,
|
|
130
|
+
"265599f6": l.selectColor,
|
|
131
|
+
"64a01984": Me.value
|
|
132
|
+
}));
|
|
133
|
+
const a = l, g = i(null), r = i(a.min), v = i(a.max), B = s(() => !!a.minimap.length), Z = i(Ye()), W = i(0);
|
|
134
|
+
ge(() => {
|
|
135
|
+
const t = () => {
|
|
136
|
+
g.value && (W.value = g.value.getBoundingClientRect().width);
|
|
137
|
+
};
|
|
138
|
+
t();
|
|
139
|
+
const e = Ce(t, 50);
|
|
140
|
+
window.addEventListener("resize", e), Y(() => {
|
|
141
|
+
window.removeEventListener("resize", e);
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
const Le = s(() => a.refreshEndPoint === null ? a.max : a.refreshEndPoint), L = $e, b = s(() => {
|
|
145
|
+
const t = a.max - a.min, e = (r.value - a.min) / t * 100, n = (v.value - a.min) / t * 100, u = (e + n) / 2, c = G.value ? `calc(${u}% - ${H.value.width}px)` : j.value ? `calc(${u}%)` : `calc(${u}% - ${H.value.width / 2}px)`;
|
|
146
|
+
return {
|
|
147
|
+
left: `${e}%`,
|
|
148
|
+
width: `${n - e}%`,
|
|
149
|
+
background: a.selectColor,
|
|
150
|
+
tooltipLeft: `calc(${e}% - ${j.value ? 0 : Q.value / 2}px)`,
|
|
151
|
+
tooltipRight: `calc(${n}% - ${G.value ? U.value : U.value / 2}px)`,
|
|
152
|
+
tooltipCenter: c,
|
|
153
|
+
arrowLeft: !j.value,
|
|
154
|
+
arrowRight: !G.value
|
|
155
|
+
};
|
|
156
|
+
}), j = s(() => g.value ? g.value.getBoundingClientRect().width * ((r.value - a.min) / (a.max - a.min)) - Q.value / 2 < 0 : !1), G = s(() => g.value ? g.value.getBoundingClientRect().width * ((v.value - a.min) / (a.max - a.min)) + U.value / 2 > g.value.getBoundingClientRect().width : !1), Re = s(() => a.inputColor), Me = s(() => a.background), Ne = s(() => `${a.selectColor}33`), p = s(() => a.borderColor), le = s(() => {
|
|
157
|
+
const t = [];
|
|
158
|
+
for (let e = 0; e < a.minimap.length; e += 1)
|
|
159
|
+
t.push(e);
|
|
160
|
+
return t;
|
|
161
|
+
});
|
|
162
|
+
function ae() {
|
|
163
|
+
L("reset");
|
|
164
|
+
}
|
|
165
|
+
function Ee() {
|
|
166
|
+
Number(r.value) > Number(v.value) - 1 && (r.value = Number(v.value) - 1), L("update:start", Number(r.value));
|
|
167
|
+
}
|
|
168
|
+
function Pe() {
|
|
169
|
+
Number(v.value) < Number(r.value) + 1 && (v.value = Number(r.value) + 1), L("update:end", Number(v.value));
|
|
170
|
+
}
|
|
171
|
+
P(
|
|
172
|
+
() => a.min,
|
|
173
|
+
(t) => {
|
|
174
|
+
Number(r.value) < Number(t) && (r.value = Number(t)), Number(v.value) < Number(t) && (v.value = Number(t));
|
|
175
|
+
}
|
|
176
|
+
), P(
|
|
177
|
+
() => a.max,
|
|
178
|
+
(t) => {
|
|
179
|
+
Number(r.value) > Number(t) && (r.value = Number(t)), Number(v.value) > Number(t) && (v.value = Number(t));
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
const q = i(null), o = i({
|
|
183
|
+
width: 1,
|
|
184
|
+
height: 1
|
|
185
|
+
}), N = i(null);
|
|
186
|
+
ge(() => {
|
|
187
|
+
if (B.value) {
|
|
188
|
+
const t = Ce(() => {
|
|
189
|
+
const { width: e, height: n } = et({
|
|
190
|
+
chart: q.value
|
|
191
|
+
});
|
|
192
|
+
o.value.width = e, o.value.height = n - 47;
|
|
193
|
+
});
|
|
194
|
+
N.value = new ResizeObserver(t), N.value.observe(q.value);
|
|
195
|
+
}
|
|
196
|
+
}), Y(() => {
|
|
197
|
+
N.value && N.value.disconnect();
|
|
198
|
+
});
|
|
199
|
+
const h = s(() => a.minimap.length ? o.value.width / a.minimap.length : 0), x = s(() => {
|
|
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), u = a.minimap.map((Ze, je) => {
|
|
202
|
+
const Ge = Ze - e;
|
|
203
|
+
return {
|
|
204
|
+
x: o.value.width / a.minimap.length * je + h.value / 2,
|
|
205
|
+
y: o.value.height - Ge / n * (o.value.height * 0.9)
|
|
206
|
+
};
|
|
207
|
+
}), c = a.smoothMinimap ? pe(u) : Se(u), V = [...u].slice(a.valueStart, a.valueEnd), Oe = a.smoothMinimap ? pe(V) : Se(V);
|
|
208
|
+
return {
|
|
209
|
+
fullSet: c,
|
|
210
|
+
selectionSet: Oe,
|
|
211
|
+
sliced: V,
|
|
212
|
+
firstPlot: u[a.valueStart],
|
|
213
|
+
lastPlot: u[a.valueEnd - 1]
|
|
214
|
+
};
|
|
215
|
+
}), w = s(() => ({
|
|
216
|
+
x: h.value * r.value + h.value / 2,
|
|
217
|
+
width: o.value.width * ((v.value - r.value) / a.max) - h.value
|
|
218
|
+
})), D = i(a.minimapSelectedIndex);
|
|
219
|
+
P(
|
|
220
|
+
() => a.minimapSelectedIndex,
|
|
221
|
+
(t) => {
|
|
222
|
+
D.value = t + a.valueStart;
|
|
223
|
+
},
|
|
224
|
+
{ immediate: !0 }
|
|
225
|
+
);
|
|
226
|
+
function Te(t) {
|
|
227
|
+
D.value = t, t >= a.valueStart && t < a.valueEnd && L("trapMouse", t - a.valueStart);
|
|
228
|
+
}
|
|
229
|
+
const Be = i(0), K = i(null), J = i(null);
|
|
230
|
+
function ne(t) {
|
|
231
|
+
r.value = t, K.value && (K.value.value = t), L("update:start", Number(r.value));
|
|
232
|
+
}
|
|
233
|
+
function ie(t) {
|
|
234
|
+
v.value = t, J.value && (J.value.value = t), L("update:end", Number(v.value));
|
|
235
|
+
}
|
|
236
|
+
const X = s(() => a.valueEnd - a.valueStart), z = i(!1);
|
|
237
|
+
let De = i(null);
|
|
238
|
+
s(() => (W.value - 48) / (a.max - a.min));
|
|
239
|
+
const ze = s(() => (W.value - 48) / (a.max - a.min) * X.value), Ie = s(() => Math.max(1, W.value - St - ze.value)), Ae = s(() => Math.max(1, a.max - a.min - X.value)), Fe = s(() => Ae.value / Ie.value), ue = i(0), oe = i(0), He = i(0), re = i(0);
|
|
240
|
+
let S = null, C = null, k = null, $ = null;
|
|
241
|
+
const se = (t) => {
|
|
242
|
+
if (R.value = !0, !a.enableSelectionDrag) return;
|
|
243
|
+
const e = t.type === "touchstart";
|
|
244
|
+
e || t.stopPropagation();
|
|
245
|
+
const n = e && t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null, u = e ? n ? n.target : null : t.target;
|
|
246
|
+
if (!u || !(u instanceof Element) || u.classList && u.classList.contains("range-handle")) return;
|
|
247
|
+
z.value = !0;
|
|
248
|
+
const c = e ? n ? n.clientX : 0 : t.clientX;
|
|
249
|
+
De.value = c, ue.value = c, oe.value = Number(r.value), He.value = Number(v.value), re.value = Fe.value, S = e ? "touchmove" : "mousemove", C = e ? "touchend" : "mouseup", k = e ? We : Ve, $ = e ? Ue : Xe, window.addEventListener(S, k, { passive: !1 }), window.addEventListener(C, $);
|
|
250
|
+
};
|
|
251
|
+
function Ve(t) {
|
|
252
|
+
z.value && ve(t.clientX);
|
|
253
|
+
}
|
|
254
|
+
function We(t) {
|
|
255
|
+
if (!z.value || !g.value) return;
|
|
256
|
+
const e = t.target;
|
|
257
|
+
if (!(e instanceof Element) || !g.value.contains(e) || e.classList && e.classList.contains("range-handle")) return;
|
|
258
|
+
t.preventDefault();
|
|
259
|
+
const n = t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null;
|
|
260
|
+
n && ve(n.clientX);
|
|
261
|
+
}
|
|
262
|
+
function ve(t) {
|
|
263
|
+
if (!z.value) return;
|
|
264
|
+
const n = (t - ue.value) * re.value;
|
|
265
|
+
let u = Math.round(oe.value + n);
|
|
266
|
+
u = Math.max(a.min, Math.min(u, a.max - X.value));
|
|
267
|
+
const c = u + X.value;
|
|
268
|
+
ne(u), ie(c);
|
|
269
|
+
}
|
|
270
|
+
function Xe() {
|
|
271
|
+
de();
|
|
272
|
+
}
|
|
273
|
+
function Ue() {
|
|
274
|
+
de();
|
|
275
|
+
}
|
|
276
|
+
function de() {
|
|
277
|
+
z.value = !1, S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
|
|
278
|
+
}
|
|
279
|
+
const E = i(!1), I = i(null), A = i(null), Q = i(1), U = i(1), R = i(!1);
|
|
280
|
+
function ce() {
|
|
281
|
+
I.value && (Q.value = I.value.getBoundingClientRect().width);
|
|
282
|
+
}
|
|
283
|
+
function me() {
|
|
284
|
+
A.value && (U.value = A.value.getBoundingClientRect().width);
|
|
285
|
+
}
|
|
286
|
+
const fe = i(0);
|
|
287
|
+
function he(t) {
|
|
288
|
+
fe.value = t === "start" ? 1 : 0;
|
|
289
|
+
}
|
|
290
|
+
const F = i(!1), H = i({
|
|
291
|
+
width: 0,
|
|
292
|
+
left: 0
|
|
293
|
+
});
|
|
294
|
+
return P([r, v], async () => {
|
|
295
|
+
if (await _(), !I.value || !A.value) {
|
|
296
|
+
F.value = !1, H.value = { width: 0, left: 0 };
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
const t = I.value.getBoundingClientRect(), e = A.value.getBoundingClientRect();
|
|
300
|
+
F.value = t.x + t.width > e.x;
|
|
301
|
+
const n = t.x + t.width / 2, u = e.x + e.width / 2, c = t.width + e.width, V = (n + u) / 2;
|
|
302
|
+
H.value = {
|
|
303
|
+
width: c,
|
|
304
|
+
left: V - c / 2
|
|
305
|
+
};
|
|
306
|
+
}), Ke(() => {
|
|
307
|
+
ce(), me();
|
|
308
|
+
}), P(
|
|
309
|
+
() => a.labelLeft,
|
|
310
|
+
() => {
|
|
311
|
+
_(ce);
|
|
312
|
+
},
|
|
313
|
+
{ deep: !0 }
|
|
314
|
+
), P(
|
|
315
|
+
() => a.labelRight,
|
|
316
|
+
() => {
|
|
317
|
+
_(me);
|
|
318
|
+
},
|
|
319
|
+
{ deep: !0 }
|
|
320
|
+
), ke({
|
|
321
|
+
setStartValue: ne,
|
|
322
|
+
setEndValue: ie
|
|
323
|
+
}), Y(() => {
|
|
324
|
+
N.value && N.value.disconnect(), S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
|
|
325
|
+
}), (t, e) => (f(), m("div", {
|
|
326
|
+
"data-dom-to-png-ignore": "",
|
|
327
|
+
style: { padding: "0 24px" },
|
|
328
|
+
class: "vue-data-ui-zoom",
|
|
329
|
+
ref_key: "zoomWrapper",
|
|
330
|
+
ref: g,
|
|
331
|
+
onMousedown: se,
|
|
332
|
+
onTouchstart: se,
|
|
333
|
+
onTouchend: e[11] || (e[11] = (n) => R.value = !1)
|
|
334
|
+
}, [
|
|
335
|
+
d("div", at, [
|
|
336
|
+
l.valueStart !== l.refreshStartPoint || l.valueEnd !== Le.value ? (f(), m("div", nt, [
|
|
337
|
+
l.useResetSlot ? Je(t.$slots, "reset-action", {
|
|
338
|
+
key: 1,
|
|
339
|
+
reset: ae
|
|
340
|
+
}, void 0, !0) : (f(), m("button", {
|
|
341
|
+
key: 0,
|
|
342
|
+
tabindex: "0",
|
|
343
|
+
role: "button",
|
|
344
|
+
class: "vue-data-ui-refresh-button",
|
|
345
|
+
style: M({
|
|
346
|
+
top: B.value ? "36px" : "-16px",
|
|
347
|
+
pointerEvents: "all !important"
|
|
348
|
+
}),
|
|
349
|
+
onClick: ae
|
|
350
|
+
}, [
|
|
351
|
+
Qe(tt, {
|
|
352
|
+
name: "refresh",
|
|
353
|
+
stroke: l.textColor
|
|
354
|
+
}, null, 8, ["stroke"])
|
|
355
|
+
], 4))
|
|
356
|
+
])) : y("", !0)
|
|
357
|
+
]),
|
|
358
|
+
d("div", {
|
|
359
|
+
class: "double-range-slider",
|
|
360
|
+
ref_key: "minimapWrapper",
|
|
361
|
+
ref: q,
|
|
362
|
+
style: { "z-index": "0" },
|
|
363
|
+
onMouseenter: e[9] || (e[9] = (n) => R.value = !0),
|
|
364
|
+
onMouseleave: e[10] || (e[10] = (n) => R.value = !1)
|
|
365
|
+
}, [
|
|
366
|
+
B.value ? (f(), m("div", it, [
|
|
367
|
+
(f(), m("svg", {
|
|
368
|
+
xmlns: O(_e),
|
|
369
|
+
viewBox: `0 0 ${o.value.width < 0 ? 0 : o.value.width} ${o.value.height < 0 ? 0 : o.value.height}`
|
|
370
|
+
}, [
|
|
371
|
+
d("defs", null, [
|
|
372
|
+
d("linearGradient", {
|
|
373
|
+
id: Z.value,
|
|
374
|
+
x1: "0%",
|
|
375
|
+
y1: "0%",
|
|
376
|
+
x2: "0%",
|
|
377
|
+
y2: "100%"
|
|
378
|
+
}, [
|
|
379
|
+
d("stop", {
|
|
380
|
+
offset: "0%",
|
|
381
|
+
"stop-color": `${l.minimapLineColor}50`
|
|
382
|
+
}, null, 8, rt),
|
|
383
|
+
e[12] || (e[12] = d("stop", {
|
|
384
|
+
offset: "100%",
|
|
385
|
+
"stop-color": "transparent"
|
|
386
|
+
}, null, -1))
|
|
387
|
+
], 8, ot)
|
|
388
|
+
]),
|
|
389
|
+
d("path", {
|
|
390
|
+
d: `M${x.value.fullSet}`,
|
|
391
|
+
stroke: `${l.minimapLineColor}`,
|
|
392
|
+
fill: "none",
|
|
393
|
+
"stroke-width": "1",
|
|
394
|
+
"stroke-linecap": "round",
|
|
395
|
+
"stroke-linejoin": "round",
|
|
396
|
+
style: { opacity: "1" }
|
|
397
|
+
}, null, 8, st),
|
|
398
|
+
d("rect", {
|
|
399
|
+
x: w.value.x,
|
|
400
|
+
width: w.value.width < 0 ? 0 : w.value.width,
|
|
401
|
+
height: Math.max(o.value.height, 0),
|
|
402
|
+
y: 0,
|
|
403
|
+
fill: p.value,
|
|
404
|
+
rx: l.minimapSelectionRadius,
|
|
405
|
+
stroke: "none"
|
|
406
|
+
}, null, 8, vt),
|
|
407
|
+
d("path", {
|
|
408
|
+
d: `M${h.value / 2},${Math.max(o.value.height, 0)} ${x.value.fullSet} L${o.value.width - h.value / 2},${Math.max(o.value.height, 0)}Z`,
|
|
409
|
+
fill: `url(#${Z.value})`,
|
|
410
|
+
stroke: "none",
|
|
411
|
+
style: { opacity: "1" }
|
|
412
|
+
}, null, 8, dt),
|
|
413
|
+
d("rect", {
|
|
414
|
+
x: w.value.x,
|
|
415
|
+
width: w.value.width < 0 ? 0 : w.value.width,
|
|
416
|
+
height: Math.max(o.value.height, 0),
|
|
417
|
+
y: 0,
|
|
418
|
+
rx: l.minimapSelectionRadius,
|
|
419
|
+
fill: p.value
|
|
420
|
+
}, null, 8, ct),
|
|
421
|
+
d("rect", {
|
|
422
|
+
x: w.value.x,
|
|
423
|
+
width: w.value.width < 0 ? 0 : w.value.width,
|
|
424
|
+
height: Math.max(o.value.height, 0),
|
|
425
|
+
y: 0,
|
|
426
|
+
fill: l.minimapSelectedColor,
|
|
427
|
+
rx: l.minimapSelectionRadius,
|
|
428
|
+
style: M({
|
|
429
|
+
opacity: l.minimapSelectedColorOpacity
|
|
430
|
+
})
|
|
431
|
+
}, null, 12, mt),
|
|
432
|
+
d("path", {
|
|
433
|
+
d: `M${x.value.sliced[0].x},${Math.max(o.value.height, 0)} ${x.value.selectionSet} L${x.value.sliced.at(-1).x},${Math.max(o.value.height, 0)}Z`,
|
|
434
|
+
fill: `url(#${Z.value})`,
|
|
435
|
+
stroke: "none",
|
|
436
|
+
style: { opacity: "1" }
|
|
437
|
+
}, null, 8, ft),
|
|
438
|
+
d("path", {
|
|
439
|
+
d: `M ${x.value.selectionSet}`,
|
|
440
|
+
stroke: `${l.minimapLineColor}`,
|
|
441
|
+
fill: "transparent",
|
|
442
|
+
"stroke-width": "2",
|
|
443
|
+
"stroke-linecap": "round",
|
|
444
|
+
"stroke-linejoin": "round"
|
|
445
|
+
}, null, 8, ht),
|
|
446
|
+
d("circle", {
|
|
447
|
+
cx: x.value.firstPlot.x,
|
|
448
|
+
cy: x.value.firstPlot.y,
|
|
449
|
+
"stroke-width": "0.5",
|
|
450
|
+
stroke: p.value,
|
|
451
|
+
r: "3",
|
|
452
|
+
fill: l.minimapLineColor
|
|
453
|
+
}, null, 8, gt),
|
|
454
|
+
d("circle", {
|
|
455
|
+
cx: x.value.lastPlot.x,
|
|
456
|
+
cy: x.value.lastPlot.y,
|
|
457
|
+
"stroke-width": "0.5",
|
|
458
|
+
stroke: p.value,
|
|
459
|
+
r: "3",
|
|
460
|
+
fill: l.minimapLineColor
|
|
461
|
+
}, null, 8, bt),
|
|
462
|
+
D.value !== null ? (f(!0), m(xe, { key: 0 }, we(le.value, (n, u) => (f(), m("g", null, [
|
|
463
|
+
D.value === n && n >= l.valueStart && n < l.valueEnd ? (f(), m("line", {
|
|
464
|
+
key: 0,
|
|
465
|
+
x1: h.value * u + h.value / 2,
|
|
466
|
+
x2: h.value * u + h.value / 2,
|
|
467
|
+
y1: 0,
|
|
468
|
+
y2: Math.max(o.value.height, 0),
|
|
469
|
+
stroke: l.minimapIndicatorColor,
|
|
470
|
+
"stroke-linecap": "round",
|
|
471
|
+
"stroke-dasharray": "2",
|
|
472
|
+
"stroke-width": "1"
|
|
473
|
+
}, null, 8, xt)) : y("", !0)
|
|
474
|
+
]))), 256)) : y("", !0),
|
|
475
|
+
(f(!0), m(xe, null, we(le.value, (n, u) => (f(), m("rect", {
|
|
476
|
+
x: h.value * u,
|
|
477
|
+
y: 0,
|
|
478
|
+
height: Math.max(o.value.height, 0),
|
|
479
|
+
width: h.value < 0 ? 0 : h.value,
|
|
480
|
+
fill: "transparent",
|
|
481
|
+
style: M([{ "pointer-events": "all !important" }, {
|
|
482
|
+
cursor: n >= l.valueStart && n < l.valueEnd && l.enableSelectionDrag ? E.value ? "grabbing" : "grab" : "default"
|
|
483
|
+
}]),
|
|
484
|
+
onMousedown: e[0] || (e[0] = (c) => E.value = !0),
|
|
485
|
+
onMouseup: e[1] || (e[1] = (c) => E.value = !1),
|
|
486
|
+
onMouseenter: (c) => Te(n),
|
|
487
|
+
onMouseleave: e[2] || (e[2] = (c) => {
|
|
488
|
+
D.value = null, L("trapMouse", null);
|
|
489
|
+
})
|
|
490
|
+
}, null, 44, wt))), 256))
|
|
491
|
+
], 8, ut))
|
|
492
|
+
])) : y("", !0),
|
|
493
|
+
e[13] || (e[13] = d("div", { class: "slider-track" }, null, -1)),
|
|
494
|
+
d("div", {
|
|
495
|
+
class: T({
|
|
496
|
+
"range-highlight": !0,
|
|
497
|
+
move: l.enableSelectionDrag
|
|
498
|
+
}),
|
|
499
|
+
onMousedown: e[3] || (e[3] = (n) => E.value = !0),
|
|
500
|
+
onMouseup: e[4] || (e[4] = (n) => E.value = !1),
|
|
501
|
+
style: M({
|
|
502
|
+
...b.value,
|
|
503
|
+
cursor: E.value ? "grabbing" : "grab"
|
|
504
|
+
})
|
|
505
|
+
}, null, 38),
|
|
506
|
+
l.enableRangeHandles ? be((f(), m("input", {
|
|
507
|
+
ref_key: "rangeStart",
|
|
508
|
+
ref: K,
|
|
509
|
+
key: `range-min${Be.value}`,
|
|
510
|
+
type: "range",
|
|
511
|
+
class: T({ "range-left": !0, "range-handle": !0, "range-minimap": B.value && l.verticalHandles }),
|
|
512
|
+
min: l.min,
|
|
513
|
+
max: l.max,
|
|
514
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => r.value = n),
|
|
515
|
+
onInput: Ee,
|
|
516
|
+
onMouseenter: e[6] || (e[6] = (n) => he("start"))
|
|
517
|
+
}, null, 42, yt)), [
|
|
518
|
+
[ye, r.value]
|
|
519
|
+
]) : y("", !0),
|
|
520
|
+
l.enableRangeHandles ? be((f(), m("input", {
|
|
521
|
+
key: 2,
|
|
522
|
+
ref_key: "rangeEnd",
|
|
523
|
+
ref: J,
|
|
524
|
+
type: "range",
|
|
525
|
+
class: T({ "range-right": !0, "range-handle": !0, "range-minimap": B.value && l.verticalHandles }),
|
|
526
|
+
min: l.min,
|
|
527
|
+
max: l.max,
|
|
528
|
+
"onUpdate:modelValue": e[7] || (e[7] = (n) => v.value = n),
|
|
529
|
+
onInput: Pe,
|
|
530
|
+
onMouseenter: e[8] || (e[8] = (n) => he("end"))
|
|
531
|
+
}, null, 42, pt)), [
|
|
532
|
+
[ye, v.value]
|
|
533
|
+
]) : y("", !0),
|
|
534
|
+
l.labelLeft ? (f(), m("div", {
|
|
535
|
+
key: 3,
|
|
536
|
+
ref_key: "tooltipLeft",
|
|
537
|
+
ref: I,
|
|
538
|
+
class: T({
|
|
539
|
+
"range-tooltip": !0,
|
|
540
|
+
"range-tooltip-visible": R.value,
|
|
541
|
+
"range-tooltip-arrow": b.value.arrowLeft && !l.verticalHandles,
|
|
542
|
+
"range-tooltip-arrow-left": !b.value.arrowLeft && !l.verticalHandles
|
|
543
|
+
}),
|
|
544
|
+
style: M({
|
|
545
|
+
left: b.value.tooltipLeft,
|
|
546
|
+
color: O(te)(l.selectColor),
|
|
547
|
+
backgroundColor: l.selectColor,
|
|
548
|
+
border: `1px solid ${p.value}`,
|
|
549
|
+
zIndex: `${fe.value + 4}`,
|
|
550
|
+
visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
|
|
551
|
+
})
|
|
552
|
+
}, ee(l.labelLeft), 7)) : y("", !0),
|
|
553
|
+
(F.value || l.labelLeft === l.labelRight) && (l.labelLeft || l.labelRight) ? (f(), m("div", {
|
|
554
|
+
key: 4,
|
|
555
|
+
ref: "tooltipMerge",
|
|
556
|
+
class: T({
|
|
557
|
+
"range-tooltip": !0,
|
|
558
|
+
"range-tooltip-visible": R.value,
|
|
559
|
+
"range-tooltip-arrow": !0,
|
|
560
|
+
"range-tooltip-arrow-left": !b.value.arrowLeft && !l.verticalHandles,
|
|
561
|
+
"range-tooltip-arrow-right": !b.value.arrowRight && !l.verticalHandles
|
|
562
|
+
}),
|
|
563
|
+
style: M({
|
|
564
|
+
left: b.value.tooltipCenter,
|
|
565
|
+
width: H.value.width + "px",
|
|
566
|
+
color: O(te)(l.selectColor),
|
|
567
|
+
backgroundColor: l.selectColor,
|
|
568
|
+
border: `1px solid ${p.value}`,
|
|
569
|
+
zIndex: "4"
|
|
570
|
+
})
|
|
571
|
+
}, ee(l.labelLeft === l.labelRight ? l.labelLeft : `${l.labelLeft} - ${l.labelRight}`), 7)) : y("", !0),
|
|
572
|
+
l.labelRight ? (f(), m("div", {
|
|
573
|
+
key: 5,
|
|
574
|
+
ref_key: "tooltipRight",
|
|
575
|
+
ref: A,
|
|
576
|
+
class: T({
|
|
577
|
+
"range-tooltip": !0,
|
|
578
|
+
"range-tooltip-visible": R.value,
|
|
579
|
+
"range-tooltip-arrow": b.value.arrowRight && !l.verticalHandles,
|
|
580
|
+
"range-tooltip-arrow-right": !b.value.arrowRight && !l.verticalHandles
|
|
581
|
+
}),
|
|
582
|
+
style: M({
|
|
583
|
+
left: b.value.tooltipRight,
|
|
584
|
+
color: O(te)(l.selectColor),
|
|
585
|
+
backgroundColor: l.selectColor,
|
|
586
|
+
border: `1px solid ${p.value}`,
|
|
587
|
+
zIndex: "4",
|
|
588
|
+
visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
|
|
589
|
+
})
|
|
590
|
+
}, ee(l.labelRight), 7)) : y("", !0)
|
|
591
|
+
], 544)
|
|
592
|
+
], 544));
|
|
593
|
+
}
|
|
594
|
+
}, Nt = /* @__PURE__ */ lt(Ct, [["__scopeId", "data-v-f497b0de"]]);
|
|
595
|
+
export {
|
|
596
|
+
Nt as S
|
|
597
|
+
};
|
|
@@ -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 _, aq as i } from "./index-
|
|
2
|
+
import { s as _, aq as i } from "./index-BkfuZCRT.js";
|
|
3
3
|
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const R = {
|
|
5
5
|
__name: "SparkTooltip",
|
|
@@ -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 s } from "./useNestedProp-
|
|
2
|
+
import { u as s } from "./useNestedProp-BMzw9VUz.js";
|
|
3
3
|
const b = {
|
|
4
4
|
__name: "Title",
|
|
5
5
|
props: {
|