waveform-analysis 0.1.29 → 0.1.30
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/index.cjs +1 -1
- package/dist/index.js +312 -303
- package/dist/types/components/WaveformChart.vue.d.ts +1 -0
- package/dist/types/components/core/constants.d.ts +2 -0
- package/dist/types/components/core/useWaveformChartController.d.ts +6 -1
- package/dist/types/components/core/useWaveformLayout.d.ts +0 -1
- package/dist/types/components/core/useWaveformPresentation.d.ts +5 -0
- package/dist/types/components/core/waveformChartTypes.d.ts +3 -2
- package/dist/types/components/data/types.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/waveform.d.ts +1 -1
- package/dist/types/demo/types.d.ts +4 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/chart.d.ts +7 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/App.vue +10 -0
- package/src/components/WaveformChart.vue +1 -0
- package/src/components/WaveformChartView.vue +13 -10
- package/src/components/core/constants.ts +3 -0
- package/src/components/core/useWaveformLayout.ts +0 -3
- package/src/components/core/useWaveformPresentation.ts +17 -2
- package/src/components/core/waveformChartTypes.ts +3 -0
- package/src/components/data/types.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/components/waveform.ts +1 -0
- package/src/components/waveformChartCases/sizingAndTitles.test.ts +59 -0
- package/src/demo/DemoChartHost.vue +1 -0
- package/src/demo/DemoGridFrameControls.vue +29 -0
- package/src/demo/plotMarginControls.test.ts +29 -0
- package/src/demo/types.ts +4 -0
- package/src/index.ts +1 -0
- package/src/styles.css +1 -0
- package/src/types/chart.ts +8 -0
- package/src/types/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, getCurrentInstance as l, markRaw as u, nextTick as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, shallowReactive as b, shallowRef as x, toDisplayString as S, toRefs as C, unref as w, vModelText as T, watch as E, watchEffect as D, withDirectives as O, withModifiers as k } from "vue";
|
|
2
|
-
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as
|
|
3
|
-
import { Pagination as
|
|
4
|
-
import { ColorPicker as
|
|
2
|
+
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as U, symbolDiamond as ee, symbolSquare as te, symbolTriangle as ne, zoom as re, zoomIdentity as W, zoomTransform as G } from "d3";
|
|
3
|
+
import { Pagination as ie } from "ant-design-vue";
|
|
4
|
+
import { ColorPicker as K } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var ae = 0;
|
|
8
|
+
function oe(e = "waveform") {
|
|
9
9
|
let t = l();
|
|
10
|
-
return `${e}-${t ? `v${t.uid}` : `f${++
|
|
10
|
+
return `${e}-${t ? `v${t.uid}` : `f${++ae}`}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/annotation/annotationLayout.ts
|
|
14
|
-
function
|
|
14
|
+
function q(e, t) {
|
|
15
15
|
return e >= Math.min(t[0], t[1]) && e <= Math.max(t[0], t[1]);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function se(e, t, n) {
|
|
18
18
|
let r = Math.max(0, Math.min(e.x, Math.max(0, t - e.width))), i = Math.max(0, Math.min(e.y, Math.max(0, n - e.height)));
|
|
19
19
|
return {
|
|
20
20
|
...e,
|
|
@@ -24,11 +24,11 @@ function ue(e, t, n) {
|
|
|
24
24
|
lineEndY: Math.max(i, Math.min(e.lineEndY, i + e.height))
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let s =
|
|
27
|
+
function ce(e, t, n, r, i, a, o) {
|
|
28
|
+
let s = de(e, t, n, r, i);
|
|
29
29
|
return s.x >= 0 && s.y >= 0 && s.x + n <= a && s.y + r <= o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function le(e, t, n, r, i, a) {
|
|
32
32
|
for (let o of [
|
|
33
33
|
"top",
|
|
34
34
|
"bottom",
|
|
@@ -38,10 +38,10 @@ function fe(e, t, n, r, i, a) {
|
|
|
38
38
|
"top-left",
|
|
39
39
|
"bottom-right",
|
|
40
40
|
"bottom-left"
|
|
41
|
-
]) if (
|
|
41
|
+
]) if (ce(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ue(e, t, n) {
|
|
45
45
|
let r = e.x + e.width / 2, i = e.y + e.height / 2, a = t - r, o = n - i;
|
|
46
46
|
if (Math.abs(a) * e.height > Math.abs(o) * e.width) {
|
|
47
47
|
let t = a >= 0 ? e.x + e.width : e.x, n = a === 0 ? 0 : (t - r) / a;
|
|
@@ -56,7 +56,7 @@ function G(e, t, n) {
|
|
|
56
56
|
y: s
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function de(e, t, n, r, i) {
|
|
60
60
|
let a = e - n / 2, o = t - r / 2, s = e + 32, c = e - n - 32, l = t - r - 32, u = t + 32;
|
|
61
61
|
switch (i) {
|
|
62
62
|
case "top": return {
|
|
@@ -93,36 +93,36 @@ function pe(e, t, n, r, i) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function fe(e, t, n) {
|
|
97
97
|
return {
|
|
98
|
-
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(
|
|
98
|
+
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(be), 0)) + 16))),
|
|
99
99
|
height: Math.min(n, Math.max(26, (e.length - 1) * 16 + 14 + 16))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let { width: c, height: l } =
|
|
102
|
+
function pe(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
+
let { width: c, height: l } = fe(n, r, i), u = de(e, t, c, l, a), d = se({
|
|
104
104
|
x: u.x + o,
|
|
105
105
|
y: u.y + s,
|
|
106
106
|
width: c,
|
|
107
107
|
height: l,
|
|
108
108
|
lineEndX: e,
|
|
109
109
|
lineEndY: t
|
|
110
|
-
}, r, i), f =
|
|
110
|
+
}, r, i), f = ue(d, e, t);
|
|
111
111
|
return {
|
|
112
112
|
...d,
|
|
113
113
|
lineEndX: f.x,
|
|
114
114
|
lineEndY: f.y
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function me(e, t, n, r) {
|
|
118
118
|
let i = [];
|
|
119
119
|
return e.forEach((e) => {
|
|
120
|
-
if (!
|
|
120
|
+
if (!Se(e)) return;
|
|
121
121
|
let a = t.find((t) => t.series.id === e.seriesId);
|
|
122
122
|
if (!a) return;
|
|
123
123
|
let o = a.xScale.domain(), s = a.yScale.domain();
|
|
124
|
-
if (!
|
|
125
|
-
let c =
|
|
124
|
+
if (!q(e.x, o) || !q(e.y, s)) return;
|
|
125
|
+
let c = Ce(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } = fe(c, u, m), y = g ? "top" : le(d, h, _, v, u, m), b = pe(d, h, c, u, m, y, Number.isFinite(e.labelOffsetX) ? e.labelOffsetX : 0, Number.isFinite(e.labelOffsetY) ? e.labelOffsetY : 0), x = {
|
|
126
126
|
...b,
|
|
127
127
|
x: b.x + l,
|
|
128
128
|
y: b.y + a.top,
|
|
@@ -137,28 +137,28 @@ function ge(e, t, n, r) {
|
|
|
137
137
|
placement: y,
|
|
138
138
|
lines: c,
|
|
139
139
|
box: { ...x },
|
|
140
|
-
style:
|
|
140
|
+
style: xe(e.style)
|
|
141
141
|
});
|
|
142
142
|
}), i;
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var he = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
151
|
-
function
|
|
150
|
+
}, ge = "12px Arial, sans-serif", J = N((e) => e.x);
|
|
151
|
+
function _e(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = J.center(e, t), r = e[Math.min(n, e.length - 1)], i = e[Math.max(0, n - 1)];
|
|
154
154
|
return Math.abs(t - i.x) < Math.abs(r.x - t) ? i : r;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ve(e, t, n = "linear") {
|
|
157
157
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
158
158
|
let r = e[0], i = e[e.length - 1];
|
|
159
159
|
if (t < r.x || t > i.x) return null;
|
|
160
160
|
if (e.length === 1) return t === r.x ? { ...r } : null;
|
|
161
|
-
let a =
|
|
161
|
+
let a = J.left(e, t), o = e[Math.min(a, e.length - 1)];
|
|
162
162
|
if (o.x === t || a === 0) return {
|
|
163
163
|
x: t,
|
|
164
164
|
y: o.y
|
|
@@ -188,18 +188,18 @@ function be(e, t, n = "linear") {
|
|
|
188
188
|
y: s.y + (o.y - s.y) * l
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Y(e, t, n, r) {
|
|
192
192
|
return e.flatMap((e) => {
|
|
193
|
-
let i =
|
|
193
|
+
let i = ve(e.series.points, t, e.series.lineType);
|
|
194
194
|
if (!i) return [];
|
|
195
|
-
let a =
|
|
195
|
+
let a = _e(e.series.points, t);
|
|
196
196
|
if (!a) return [];
|
|
197
197
|
let o = e.xScale(i.x), s = e.top + e.yScale(i.y), c = e.xScale(a.x), l = e.top + e.yScale(a.y);
|
|
198
198
|
return [{
|
|
199
199
|
trackIndex: e.index,
|
|
200
200
|
seriesId: e.series.id,
|
|
201
201
|
name: e.series.name?.trim() || e.series.id,
|
|
202
|
-
color: e.series.color ||
|
|
202
|
+
color: e.series.color || he.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -208,24 +208,24 @@ function q(e, t, n, r) {
|
|
|
208
208
|
}];
|
|
209
209
|
}).sort((e, t) => e.distance - t.distance || e.trackIndex - t.trackIndex);
|
|
210
210
|
}
|
|
211
|
-
var
|
|
212
|
-
function
|
|
211
|
+
var X;
|
|
212
|
+
function ye(e) {
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
215
|
+
function be(e) {
|
|
216
|
+
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font = ge))), X?.measureText(e).width ?? ye(e);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function xe(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || he.borderColor,
|
|
221
|
+
textColor: e?.textColor || he.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || he.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Se(e) {
|
|
226
226
|
return !!(e.id && e.seriesId) && Number.isFinite(e.x) && Number.isFinite(e.y) && typeof e.text == "string" && e.text.trim().length > 0;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Ce(e, t = 10) {
|
|
229
229
|
let n = [];
|
|
230
230
|
return e.split(/\r?\n/).forEach((e) => {
|
|
231
231
|
let r = Array.from(e);
|
|
@@ -238,30 +238,30 @@ function we(e, t = 10) {
|
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/components/annotation/WaveformAnnotationLayer.vue?vue&type=script&setup=true&lang.ts
|
|
241
|
-
var
|
|
241
|
+
var we = [
|
|
242
242
|
"data-annotation-id",
|
|
243
243
|
"data-placement",
|
|
244
244
|
"onPointerdown",
|
|
245
245
|
"onContextmenu"
|
|
246
|
-
],
|
|
246
|
+
], Te = ["id"], Ee = ["fill"], De = [
|
|
247
247
|
"x1",
|
|
248
248
|
"y1",
|
|
249
249
|
"x2",
|
|
250
250
|
"y2",
|
|
251
251
|
"stroke",
|
|
252
252
|
"marker-end"
|
|
253
|
-
],
|
|
253
|
+
], Oe = [
|
|
254
254
|
"x",
|
|
255
255
|
"y",
|
|
256
256
|
"width",
|
|
257
257
|
"height",
|
|
258
258
|
"fill",
|
|
259
259
|
"stroke"
|
|
260
|
-
],
|
|
260
|
+
], ke = [
|
|
261
261
|
"x",
|
|
262
262
|
"y",
|
|
263
263
|
"fill"
|
|
264
|
-
],
|
|
264
|
+
], Ae = ["x", "dy"], je = /*@__PURE__*/ c({
|
|
265
265
|
__name: "WaveformAnnotationLayer",
|
|
266
266
|
props: {
|
|
267
267
|
annotations: {},
|
|
@@ -401,7 +401,7 @@ var Te = [
|
|
|
401
401
|
}, [a("path", {
|
|
402
402
|
d: "M0,0 L8,4 L0,8 Z",
|
|
403
403
|
fill: t.style.borderColor
|
|
404
|
-
}, null, 8,
|
|
404
|
+
}, null, 8, Ee)], 8, Te)]),
|
|
405
405
|
a("line", {
|
|
406
406
|
class: "waveform-annotation__arrow",
|
|
407
407
|
x1: b(t).lineEndX,
|
|
@@ -410,7 +410,7 @@ var Te = [
|
|
|
410
410
|
y2: t.anchorY,
|
|
411
411
|
stroke: t.style.borderColor,
|
|
412
412
|
"marker-end": `url(#${M(t.annotation.id)})`
|
|
413
|
-
}, null, 8,
|
|
413
|
+
}, null, 8, De),
|
|
414
414
|
a("rect", {
|
|
415
415
|
class: "waveform-annotation__box",
|
|
416
416
|
x: b(t).x,
|
|
@@ -419,27 +419,27 @@ var Te = [
|
|
|
419
419
|
height: b(t).height,
|
|
420
420
|
fill: t.style.backgroundColor,
|
|
421
421
|
stroke: t.style.borderColor
|
|
422
|
-
}, null, 8,
|
|
422
|
+
}, null, 8, Oe),
|
|
423
423
|
a("text", {
|
|
424
424
|
class: "waveform-annotation__text",
|
|
425
425
|
x: b(t).x + b(t).width / 2,
|
|
426
426
|
y: b(t).y + b(t).height / 2 - (t.lines.length - 1) * w(16) / 2,
|
|
427
427
|
fill: t.style.textColor,
|
|
428
|
-
style: p({ font: w(
|
|
428
|
+
style: p({ font: w(ge) }),
|
|
429
429
|
"text-anchor": "middle",
|
|
430
430
|
"dominant-baseline": "central"
|
|
431
431
|
}, [(g(!0), i(e, null, y(t.lines, (e, n) => (g(), i("tspan", {
|
|
432
432
|
key: `${t.annotation.id}-${n}`,
|
|
433
433
|
x: b(t).x + b(t).width / 2,
|
|
434
434
|
dy: n === 0 ? 0 : w(16)
|
|
435
|
-
}, S(e), 9,
|
|
436
|
-
], 40,
|
|
435
|
+
}, S(e), 9, Ae))), 128))], 12, ke)
|
|
436
|
+
], 40, we))), 128))], 2)) : r("", !0);
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), Z = (e, t) => {
|
|
439
439
|
let n = e.__vccOpts || e;
|
|
440
440
|
for (let [e, r] of t) n[e] = r;
|
|
441
441
|
return n;
|
|
442
|
-
},
|
|
442
|
+
}, Me = /*#__PURE__*/ Z(je, [["__scopeId", "data-v-7254383e"]]), Ne = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
443
443
|
__name: "WaveformAnnotationContextMenu",
|
|
444
444
|
props: {
|
|
445
445
|
visible: { type: Boolean },
|
|
@@ -481,33 +481,33 @@ var Te = [
|
|
|
481
481
|
}, "取消")
|
|
482
482
|
], 36)) : r("", !0);
|
|
483
483
|
}
|
|
484
|
-
}), [["__scopeId", "data-v-c70c98a1"]]),
|
|
485
|
-
function
|
|
484
|
+
}), [["__scopeId", "data-v-c70c98a1"]]), Pe = 1;
|
|
485
|
+
function Q(e) {
|
|
486
486
|
throw TypeError(`Invalid waveform annotation file: ${e}`);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Fe(e) {
|
|
489
489
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Ie(e, t, n) {
|
|
492
492
|
let r = e[t];
|
|
493
|
-
return (typeof r != "string" || r.trim().length === 0) &&
|
|
493
|
+
return (typeof r != "string" || r.trim().length === 0) && Q(`${n}.${t} must be a non-empty string`), r;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Le(e, t, n) {
|
|
496
496
|
let r = e[t];
|
|
497
|
-
if (r !== void 0) return typeof r != "string" &&
|
|
497
|
+
if (r !== void 0) return typeof r != "string" && Q(`${n}.${t} must be a string`), r;
|
|
498
498
|
}
|
|
499
499
|
function Re(e, t, n) {
|
|
500
500
|
let r = e[t];
|
|
501
|
-
return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
501
|
+
return (typeof r != "number" || !Number.isFinite(r)) && Q(`${n}.${t} must be a finite number`), r;
|
|
502
502
|
}
|
|
503
503
|
function ze(e, t, n) {
|
|
504
504
|
let r = e[t];
|
|
505
|
-
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
505
|
+
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) && Q(`${n}.${t} must be a finite number`), r;
|
|
506
506
|
}
|
|
507
507
|
function Be(e, t) {
|
|
508
508
|
if (e === void 0) return;
|
|
509
|
-
|
|
510
|
-
let n =
|
|
509
|
+
Fe(e) || Q(`${t} must be an object`);
|
|
510
|
+
let n = Le(e, "borderColor", t), r = Le(e, "textColor", t), i = Le(e, "backgroundColor", t);
|
|
511
511
|
return {
|
|
512
512
|
...n !== void 0 && { borderColor: n },
|
|
513
513
|
...r !== void 0 && { textColor: r },
|
|
@@ -516,13 +516,13 @@ function Be(e, t) {
|
|
|
516
516
|
}
|
|
517
517
|
function Ve(e, t) {
|
|
518
518
|
let n = `annotations[${t}]`;
|
|
519
|
-
|
|
520
|
-
let r =
|
|
521
|
-
r.length > 40 &&
|
|
522
|
-
let i = ze(e, "labelOffsetX", n), a = ze(e, "labelOffsetY", n), o =
|
|
519
|
+
Fe(e) || Q(`${n} must be an object`);
|
|
520
|
+
let r = Ie(e, "text", n);
|
|
521
|
+
r.length > 40 && Q(`${n}.text must not exceed 40 characters`);
|
|
522
|
+
let i = ze(e, "labelOffsetX", n), a = ze(e, "labelOffsetY", n), o = Le(e, "createdAt", n), s = Be(e.style, `${n}.style`);
|
|
523
523
|
return {
|
|
524
|
-
id:
|
|
525
|
-
seriesId:
|
|
524
|
+
id: Ie(e, "id", n),
|
|
525
|
+
seriesId: Ie(e, "seriesId", n),
|
|
526
526
|
x: Re(e, "x", n),
|
|
527
527
|
y: Re(e, "y", n),
|
|
528
528
|
text: r,
|
|
@@ -535,24 +535,24 @@ function Ve(e, t) {
|
|
|
535
535
|
function He(e) {
|
|
536
536
|
let t = e.map(Ve), n = /* @__PURE__ */ new Set();
|
|
537
537
|
return t.forEach((e, t) => {
|
|
538
|
-
n.has(e.id) &&
|
|
538
|
+
n.has(e.id) && Q(`annotations[${t}].id must be unique`), n.add(e.id);
|
|
539
539
|
}), t;
|
|
540
540
|
}
|
|
541
541
|
function Ue(e) {
|
|
542
542
|
return JSON.stringify({
|
|
543
|
-
version:
|
|
543
|
+
version: Pe,
|
|
544
544
|
annotations: He(e)
|
|
545
545
|
}, null, 2);
|
|
546
546
|
}
|
|
547
547
|
function We(e) {
|
|
548
|
-
typeof e != "string" &&
|
|
548
|
+
typeof e != "string" && Q("input must be a JSON string");
|
|
549
549
|
let t;
|
|
550
550
|
try {
|
|
551
551
|
t = JSON.parse(e);
|
|
552
552
|
} catch {
|
|
553
|
-
|
|
553
|
+
Q("input is not valid JSON");
|
|
554
554
|
}
|
|
555
|
-
return
|
|
555
|
+
return Fe(t) || Q("root must be an object"), t.version !== Pe && Q(`version must be ${Pe}`), Array.isArray(t.annotations) || Q("annotations must be an array"), He(t.annotations);
|
|
556
556
|
}
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/components/annotation/useWaveformAnnotationInteraction.ts
|
|
@@ -1078,7 +1078,7 @@ function $t(e) {
|
|
|
1078
1078
|
visibleSeries: [a],
|
|
1079
1079
|
xDomain: a.xDomain,
|
|
1080
1080
|
yDomain: a.yDomain
|
|
1081
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(e.initialXDomains?.[o.id] ?? e.initialXDomains?.[c.id] ?? e.initialXDomain ?? o.xDomain, [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ??
|
|
1081
|
+
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(e.initialXDomains?.[o.id] ?? e.initialXDomains?.[c.id] ?? e.initialXDomain ?? o.xDomain, [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? W : W).rescaleX(l), d = e.yDomains?.[o.id], f = ln(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1082
1082
|
...e,
|
|
1083
1083
|
domain: d
|
|
1084
1084
|
} : e), p = {
|
|
@@ -1306,7 +1306,7 @@ function _n(e) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
function w(e) {
|
|
1308
1308
|
if (y.value) return;
|
|
1309
|
-
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ?
|
|
1309
|
+
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ? ve(i.points, t.annotation.x, i.lineType) : null;
|
|
1310
1310
|
!t || !n || !r || !a || (t.annotation = {
|
|
1311
1311
|
...t.annotation,
|
|
1312
1312
|
seriesId: e,
|
|
@@ -1334,7 +1334,7 @@ function _n(e) {
|
|
|
1334
1334
|
if (!o) return null;
|
|
1335
1335
|
let s = Math.max(0, Math.min(m.value, r)), c = Math.max(0, Math.min(o.width, s - o.left)), d = o.xScale.invert(c);
|
|
1336
1336
|
return {
|
|
1337
|
-
candidates:
|
|
1337
|
+
candidates: Y(u(o), d, c, a),
|
|
1338
1338
|
editorAnchor: x(e, t)
|
|
1339
1339
|
};
|
|
1340
1340
|
}
|
|
@@ -1384,7 +1384,7 @@ function _n(e) {
|
|
|
1384
1384
|
let e = s.contextMenu.value, n = t.annotations.find((t) => t.id === e?.annotationId);
|
|
1385
1385
|
if (!n) return;
|
|
1386
1386
|
let r = l.value.find((e) => e.seriesList.some((e) => e.id === n.seriesId));
|
|
1387
|
-
c.value = r ?
|
|
1387
|
+
c.value = r ? Y(u(r), n.x, r.xScale(n.x), r.top + d(r, n.seriesId)(n.y)) : [], s.openEdit(n, e?.editorAnchor ?? S(n));
|
|
1388
1388
|
}
|
|
1389
1389
|
function F() {
|
|
1390
1390
|
if (y.value) return;
|
|
@@ -1503,9 +1503,9 @@ function bn(e) {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
}), O = (e, t, n) => {
|
|
1505
1505
|
let r = t[1] - t[0], i = e[1] - e[0];
|
|
1506
|
-
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return
|
|
1506
|
+
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return W;
|
|
1507
1507
|
let a = r / i, o = B(t, [0, n]);
|
|
1508
|
-
return
|
|
1508
|
+
return W.translate(-a * o(e[0]), 0).scale(a);
|
|
1509
1509
|
}, k = (e) => {
|
|
1510
1510
|
let t = Math.abs(e[1] - e[0]);
|
|
1511
1511
|
if (!Number.isFinite(t) || t <= 0) return 0;
|
|
@@ -1621,10 +1621,10 @@ function bn(e) {
|
|
|
1621
1621
|
}, H = (e) => {
|
|
1622
1622
|
if (w(), L(), n.displayMode === "independent" && e !== void 0) {
|
|
1623
1623
|
let t = [...m.value];
|
|
1624
|
-
t[e] =
|
|
1624
|
+
t[e] = W, m.value = t;
|
|
1625
1625
|
let n = { ...g.value };
|
|
1626
1626
|
delete n[e], g.value = n;
|
|
1627
|
-
} else p.value =
|
|
1627
|
+
} else p.value = W, m.value = s.value.map(() => W), h.value = {}, g.value = {};
|
|
1628
1628
|
T(), y.value = [], d(C);
|
|
1629
1629
|
};
|
|
1630
1630
|
return {
|
|
@@ -1768,7 +1768,7 @@ function Sn(e) {
|
|
|
1768
1768
|
}, H = (e, t) => {
|
|
1769
1769
|
if (e.type !== "wheel") return !1;
|
|
1770
1770
|
let n = e.deltaY;
|
|
1771
|
-
return n < 0 ? t : n > 0 &&
|
|
1771
|
+
return n < 0 ? t : n > 0 && G(e.currentTarget).k > mt.MIN_SCALE;
|
|
1772
1772
|
};
|
|
1773
1773
|
return {
|
|
1774
1774
|
cancelPendingZoom: F,
|
|
@@ -1781,10 +1781,10 @@ function Sn(e) {
|
|
|
1781
1781
|
s.value.forEach((e) => {
|
|
1782
1782
|
let t = r.value?.querySelector(`[data-independent-overlay-index="${e.index}"]`);
|
|
1783
1783
|
if (!t) return;
|
|
1784
|
-
let n = h(e), i =
|
|
1784
|
+
let n = h(e), i = re().filter((t) => H(t, R(e))).scaleExtent([1, L(n)]).extent([[0, 0], [e.width, e.height]]).translateExtent([[0, 0], [e.width, e.height]]).on("zoom", (t) => A(t, e.index)).on("end", N);
|
|
1785
1785
|
_.set(e.index, i), y = !0;
|
|
1786
1786
|
try {
|
|
1787
|
-
V(t).call(i).on("dblclick.zoom", null).call(i.transform, o.value[e.index] ??
|
|
1787
|
+
V(t).call(i).on("dblclick.zoom", null).call(i.transform, o.value[e.index] ?? W);
|
|
1788
1788
|
} finally {
|
|
1789
1789
|
y = !1;
|
|
1790
1790
|
}
|
|
@@ -1793,7 +1793,7 @@ function Sn(e) {
|
|
|
1793
1793
|
}
|
|
1794
1794
|
let e = i.value;
|
|
1795
1795
|
if (!e) return;
|
|
1796
|
-
let n =
|
|
1796
|
+
let n = re().filter((e) => H(e, z())).scaleExtent([1, L(c.value)]).extent([[0, 0], [u.value, d.value]]).translateExtent([[0, 0], [u.value, d.value]]).on("zoom", k).on("end", N);
|
|
1797
1797
|
_.set("shared", n), y = !0;
|
|
1798
1798
|
try {
|
|
1799
1799
|
V(e).call(n).on("dblclick.zoom", null).call(n.transform, a.value);
|
|
@@ -1813,17 +1813,17 @@ function wn(e) {
|
|
|
1813
1813
|
function H(e) {
|
|
1814
1814
|
P.value || e.code !== "Space" || !t.pannable || !_.value || Cn(e.target) || (g.value = !0, e.preventDefault());
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function U(e) {
|
|
1817
1817
|
e.code === "Space" && (g.value = !1);
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function ee(e) {
|
|
1820
1820
|
let r = Math.min(y.value, Math.max(1, Math.floor(e)));
|
|
1821
|
-
r !== v.value && (v.value = r, F(), M.closeContextMenu(), I(), t.displayMode === "independent" && (A.value = b.value.map(() =>
|
|
1821
|
+
r !== v.value && (v.value = r, F(), M.closeContextMenu(), I(), t.displayMode === "independent" && (A.value = b.value.map(() => W), j.value = {}), d(L), n("page-change", r, y.value));
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function te() {
|
|
1824
1824
|
if (t.displayMode === "independent") {
|
|
1825
1825
|
let e = A.value;
|
|
1826
|
-
A.value = C.value.map((t, n) => e[n] ??
|
|
1826
|
+
A.value = C.value.map((t, n) => e[n] ?? W);
|
|
1827
1827
|
}
|
|
1828
1828
|
F(), N.value = [], d(L);
|
|
1829
1829
|
}
|
|
@@ -1875,7 +1875,7 @@ function wn(e) {
|
|
|
1875
1875
|
let n = M.editorDraft.value;
|
|
1876
1876
|
n?.mode === "edit" && !e.some((e) => e.id === n.annotation.id) && M.closeEditor();
|
|
1877
1877
|
}, { deep: !0 });
|
|
1878
|
-
function
|
|
1878
|
+
function ne() {
|
|
1879
1879
|
if (!f.value || !i.value) {
|
|
1880
1880
|
c.value = 0, l.value = 0;
|
|
1881
1881
|
return;
|
|
@@ -1888,16 +1888,16 @@ function wn(e) {
|
|
|
1888
1888
|
f,
|
|
1889
1889
|
p
|
|
1890
1890
|
], async () => {
|
|
1891
|
-
c.value = 0, l.value = 0, await d(),
|
|
1891
|
+
c.value = 0, l.value = 0, await d(), ne();
|
|
1892
1892
|
}, { immediate: !0 }), h(() => {
|
|
1893
|
-
window.addEventListener("keydown", H), window.addEventListener("keyup",
|
|
1894
|
-
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(
|
|
1893
|
+
window.addEventListener("keydown", H), window.addEventListener("keyup", U), r.value && (a.value = new ResizeObserver(([e]) => {
|
|
1894
|
+
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(ne);
|
|
1895
1895
|
}), a.value.observe(r.value));
|
|
1896
1896
|
}), m(() => {
|
|
1897
|
-
window.removeEventListener("keydown", H), window.removeEventListener("keyup",
|
|
1897
|
+
window.removeEventListener("keydown", H), window.removeEventListener("keyup", U), B(), a.value?.disconnect(), V(), N.value = [];
|
|
1898
1898
|
}), {
|
|
1899
|
-
goToPage:
|
|
1900
|
-
handleDataReferenceChange:
|
|
1899
|
+
goToPage: ee,
|
|
1900
|
+
handleDataReferenceChange: te
|
|
1901
1901
|
};
|
|
1902
1902
|
}
|
|
1903
1903
|
//#endregion
|
|
@@ -2013,7 +2013,7 @@ function On(e) {
|
|
|
2013
2013
|
...e,
|
|
2014
2014
|
series: t,
|
|
2015
2015
|
yScale: e.seriesPaths.find((e) => e.series.id === t.id)?.yScale ?? e.yScale
|
|
2016
|
-
})), H = (e, t) => e.seriesPaths.find((e) => e.series.id === t)?.yScale ?? e.yScale,
|
|
2016
|
+
})), H = (e, t) => e.seriesPaths.find((e) => e.series.id === t)?.yScale ?? e.yScale, U = t(() => z.value.flatMap(V));
|
|
2017
2017
|
return {
|
|
2018
2018
|
chartSeries: m,
|
|
2019
2019
|
chartTracks: h,
|
|
@@ -2035,9 +2035,8 @@ function On(e) {
|
|
|
2035
2035
|
trackLayouts: z,
|
|
2036
2036
|
annotationLayoutsForTrack: V,
|
|
2037
2037
|
resolveSeriesYScale: H,
|
|
2038
|
-
annotationTrackLayouts:
|
|
2039
|
-
renderedAnnotations: t(() => n.annotationsVisible ?
|
|
2040
|
-
xAxisTitleY: t(() => s.value + 30 + 10),
|
|
2038
|
+
annotationTrackLayouts: U,
|
|
2039
|
+
renderedAnnotations: t(() => n.annotationsVisible ? me(n.annotations, U.value, D.value, s.value) : []),
|
|
2041
2040
|
editorSeries: t(() => {
|
|
2042
2041
|
let e = p.editorDraft.value?.annotation.seriesId, t = m.value.find((t) => t.id === e);
|
|
2043
2042
|
return t ? {
|
|
@@ -2133,7 +2132,10 @@ function Mn(e) {
|
|
|
2133
2132
|
naturalHeight: o.value || E.value * 1.2,
|
|
2134
2133
|
availableWidth: j.value,
|
|
2135
2134
|
rotation: D.value
|
|
2136
|
-
})), P = t(() => w.value ? N.value.areaHeight : 0), F = t
|
|
2135
|
+
})), P = t(() => w.value ? N.value.areaHeight : 0), F = (e, t) => typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : t, I = t(() => ({
|
|
2136
|
+
top: F(n.plotMargin.top, pt.top),
|
|
2137
|
+
bottom: F(n.plotMargin.bottom, pt.bottom)
|
|
2138
|
+
})), L = t(() => I.value.top), R = t(() => Math.max(0, f.value - P.value - c.value));
|
|
2137
2139
|
return {
|
|
2138
2140
|
fixedWidth: l,
|
|
2139
2141
|
fixedHeight: u,
|
|
@@ -2155,9 +2157,11 @@ function Mn(e) {
|
|
|
2155
2157
|
titleMeasureStyle: M,
|
|
2156
2158
|
titleLayout: N,
|
|
2157
2159
|
titleAreaHeight: P,
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2160
|
+
resolvedPlotMargin: I,
|
|
2161
|
+
chartTopMargin: L,
|
|
2162
|
+
drawingHeight: R,
|
|
2163
|
+
xAxisTitleY: t(() => Math.max(0, R.value - 12)),
|
|
2164
|
+
innerHeight: t(() => Math.max(0, R.value - I.value.top - I.value.bottom)),
|
|
2161
2165
|
titleAreaStyle: t(() => ({
|
|
2162
2166
|
height: `${P.value}px`,
|
|
2163
2167
|
justifyContent: n.title?.align === "left" ? "flex-start" : n.title?.align === "right" ? "flex-end" : "center"
|
|
@@ -2183,14 +2187,14 @@ function Nn(e, t) {
|
|
|
2183
2187
|
e.value = t instanceof Element ? t : void 0;
|
|
2184
2188
|
}
|
|
2185
2189
|
function Pn(e, t) {
|
|
2186
|
-
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(
|
|
2190
|
+
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(W), p = x([]), m = v({}), h = v({}), g = b({
|
|
2187
2191
|
points: [],
|
|
2188
2192
|
trackIndex: null,
|
|
2189
2193
|
position: {
|
|
2190
2194
|
x: 0,
|
|
2191
2195
|
y: 0
|
|
2192
2196
|
}
|
|
2193
|
-
}), y = v(!1), S = v(1), w = x(), T =
|
|
2197
|
+
}), y = v(!1), S = v(1), w = x(), T = oe("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = xn();
|
|
2194
2198
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2195
2199
|
m.value = {}, h.value = {};
|
|
2196
2200
|
}, { deep: !0 });
|
|
@@ -2202,101 +2206,101 @@ function Pn(e, t) {
|
|
|
2202
2206
|
measuredTitleHeight: l,
|
|
2203
2207
|
internalHiddenSeriesIds: O,
|
|
2204
2208
|
paginationBandHeight: d
|
|
2205
|
-
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText:
|
|
2209
|
+
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText: U, titleAreaReserved: ee, titleMeasureStyle: te, titleAreaHeight: ne, chartTopMargin: re, innerHeight: G } = L, ie = On({
|
|
2206
2210
|
props: e,
|
|
2207
2211
|
preparedSeries: I,
|
|
2208
2212
|
currentPage: S,
|
|
2209
2213
|
hiddenSeriesIdSet: H,
|
|
2210
2214
|
chartWidth: R,
|
|
2211
|
-
innerHeight:
|
|
2215
|
+
innerHeight: G,
|
|
2212
2216
|
isCleanView: B,
|
|
2213
2217
|
sharedTransform: f,
|
|
2214
2218
|
independentTransforms: p,
|
|
2215
2219
|
sharedYDomains: m,
|
|
2216
2220
|
independentYDomains: h,
|
|
2217
2221
|
annotationInteraction: u(k)
|
|
2218
|
-
}), { chartSeries:
|
|
2222
|
+
}), { chartSeries: K, chartTracks: ae, gridOptions: q, pageCount: se, pagedTracks: ce, resolvedChartLeftMargin: le, innerWidth: ue, hasChartArea: de, activeInteractionMode: fe, isZoomMode: pe, initialXDomain: me, sharedZoomDomain: he, resolveInitialTrackDomain: ge, trackLayouts: J, annotationLayoutsForTrack: _e, resolveSeriesYScale: ve } = ie;
|
|
2219
2223
|
D(() => {
|
|
2220
|
-
d.value =
|
|
2224
|
+
d.value = q.value.showPagination && se.value > 1 && R.value <= 520 ? 40 : 0;
|
|
2221
2225
|
});
|
|
2222
|
-
let
|
|
2226
|
+
let Y = Sn({
|
|
2223
2227
|
props: e,
|
|
2224
2228
|
emit: t,
|
|
2225
2229
|
svgElement: r,
|
|
2226
2230
|
sharedOverlayElement: a,
|
|
2227
2231
|
sharedTransform: f,
|
|
2228
2232
|
independentTransforms: p,
|
|
2229
|
-
trackLayouts:
|
|
2230
|
-
initialXDomain:
|
|
2231
|
-
sharedZoomDomain:
|
|
2232
|
-
innerWidth:
|
|
2233
|
-
innerHeight:
|
|
2234
|
-
hasChartArea:
|
|
2235
|
-
isZoomMode:
|
|
2233
|
+
trackLayouts: J,
|
|
2234
|
+
initialXDomain: me,
|
|
2235
|
+
sharedZoomDomain: he,
|
|
2236
|
+
innerWidth: ue,
|
|
2237
|
+
innerHeight: G,
|
|
2238
|
+
hasChartArea: de,
|
|
2239
|
+
isZoomMode: pe,
|
|
2236
2240
|
isPresentationMode: V,
|
|
2237
|
-
resolveInitialTrackDomain:
|
|
2238
|
-
cancelPendingHover: () =>
|
|
2239
|
-
}),
|
|
2241
|
+
resolveInitialTrackDomain: ge,
|
|
2242
|
+
cancelPendingHover: () => be.cancelPendingHover()
|
|
2243
|
+
}), X = _n({
|
|
2240
2244
|
props: e,
|
|
2241
2245
|
emit: t,
|
|
2242
2246
|
container: n,
|
|
2243
|
-
chartSeries:
|
|
2247
|
+
chartSeries: K,
|
|
2244
2248
|
hiddenSeriesIdSet: H,
|
|
2245
2249
|
internalHiddenSeriesIds: O,
|
|
2246
2250
|
annotationInteraction: k,
|
|
2247
2251
|
editorSeriesOptions: A,
|
|
2248
|
-
trackLayouts:
|
|
2249
|
-
annotationLayoutsForTrack:
|
|
2250
|
-
resolveSeriesYScale:
|
|
2252
|
+
trackLayouts: J,
|
|
2253
|
+
annotationLayoutsForTrack: _e,
|
|
2254
|
+
resolveSeriesYScale: ve,
|
|
2251
2255
|
chartWidth: R,
|
|
2252
2256
|
chartHeight: z,
|
|
2253
|
-
innerWidth:
|
|
2254
|
-
resolvedChartLeftMargin:
|
|
2255
|
-
titleAreaHeight:
|
|
2256
|
-
chartTopMargin:
|
|
2257
|
-
activeInteractionMode:
|
|
2257
|
+
innerWidth: ue,
|
|
2258
|
+
resolvedChartLeftMargin: le,
|
|
2259
|
+
titleAreaHeight: ne,
|
|
2260
|
+
chartTopMargin: re,
|
|
2261
|
+
activeInteractionMode: fe,
|
|
2258
2262
|
isPresentationMode: V
|
|
2259
|
-
}),
|
|
2263
|
+
}), ye = bn({
|
|
2260
2264
|
props: e,
|
|
2261
2265
|
emit: t,
|
|
2262
2266
|
selection: M,
|
|
2263
2267
|
spacePressed: N,
|
|
2264
|
-
trackLayouts:
|
|
2265
|
-
chartTracks:
|
|
2266
|
-
initialXDomain:
|
|
2267
|
-
innerWidth:
|
|
2268
|
-
innerHeight:
|
|
2268
|
+
trackLayouts: J,
|
|
2269
|
+
chartTracks: ae,
|
|
2270
|
+
initialXDomain: me,
|
|
2271
|
+
innerWidth: ue,
|
|
2272
|
+
innerHeight: G,
|
|
2269
2273
|
sharedOverlayElement: a,
|
|
2270
2274
|
sharedTransform: f,
|
|
2271
2275
|
independentTransforms: p,
|
|
2272
2276
|
sharedYDomains: m,
|
|
2273
2277
|
independentYDomains: h,
|
|
2274
|
-
isZoomMode:
|
|
2278
|
+
isZoomMode: pe,
|
|
2275
2279
|
isPresentationMode: V,
|
|
2276
2280
|
editorSeriesOptions: A,
|
|
2277
|
-
resolveInitialTrackDomain:
|
|
2278
|
-
canZoomTrack:
|
|
2279
|
-
canZoomSharedTracks:
|
|
2280
|
-
configureZoom:
|
|
2281
|
-
cancelPendingZoom:
|
|
2282
|
-
clearHover: () =>
|
|
2283
|
-
resolveTrackAtPointer:
|
|
2284
|
-
}),
|
|
2281
|
+
resolveInitialTrackDomain: ge,
|
|
2282
|
+
canZoomTrack: Y.canZoomTrack,
|
|
2283
|
+
canZoomSharedTracks: Y.canZoomSharedTracks,
|
|
2284
|
+
configureZoom: Y.configureZoom,
|
|
2285
|
+
cancelPendingZoom: Y.cancelPendingZoom,
|
|
2286
|
+
clearHover: () => be.clearHover(),
|
|
2287
|
+
resolveTrackAtPointer: X.resolveTrackAtPointer
|
|
2288
|
+
}), be = yn({
|
|
2285
2289
|
emit: t,
|
|
2286
2290
|
hoverState: g,
|
|
2287
2291
|
suppressHoverUntilMove: y,
|
|
2288
2292
|
hoverThrottle: j,
|
|
2289
2293
|
selection: M,
|
|
2290
|
-
trackLayouts:
|
|
2291
|
-
innerWidth:
|
|
2292
|
-
resolvedChartLeftMargin:
|
|
2293
|
-
titleAreaHeight:
|
|
2294
|
-
chartTopMargin:
|
|
2294
|
+
trackLayouts: J,
|
|
2295
|
+
innerWidth: ue,
|
|
2296
|
+
resolvedChartLeftMargin: le,
|
|
2297
|
+
titleAreaHeight: ne,
|
|
2298
|
+
chartTopMargin: re,
|
|
2295
2299
|
sharedOverlayElement: a,
|
|
2296
2300
|
isPresentationMode: V,
|
|
2297
|
-
updateViewportDrag:
|
|
2298
|
-
resolveTrackAtPointer:
|
|
2299
|
-
}),
|
|
2301
|
+
updateViewportDrag: ye.updateViewportDrag,
|
|
2302
|
+
resolveTrackAtPointer: X.resolveTrackAtPointer
|
|
2303
|
+
}), xe = wn({
|
|
2300
2304
|
props: e,
|
|
2301
2305
|
emit: t,
|
|
2302
2306
|
container: n,
|
|
@@ -2306,20 +2310,20 @@ function Pn(e, t) {
|
|
|
2306
2310
|
observedHeight: s,
|
|
2307
2311
|
measuredTitleWidth: c,
|
|
2308
2312
|
measuredTitleHeight: l,
|
|
2309
|
-
resolvedTitleText:
|
|
2310
|
-
titleAreaReserved:
|
|
2311
|
-
titleMeasureStyle:
|
|
2313
|
+
resolvedTitleText: U,
|
|
2314
|
+
titleAreaReserved: ee,
|
|
2315
|
+
titleMeasureStyle: te,
|
|
2312
2316
|
spacePressed: N,
|
|
2313
2317
|
pointerInsideChart: P,
|
|
2314
2318
|
currentPage: S,
|
|
2315
|
-
pageCount:
|
|
2316
|
-
pagedTracks:
|
|
2317
|
-
gridOptions:
|
|
2318
|
-
chartSeries:
|
|
2319
|
-
chartTracks:
|
|
2320
|
-
innerWidth:
|
|
2321
|
-
innerHeight:
|
|
2322
|
-
activeInteractionMode:
|
|
2319
|
+
pageCount: se,
|
|
2320
|
+
pagedTracks: ce,
|
|
2321
|
+
gridOptions: q,
|
|
2322
|
+
chartSeries: K,
|
|
2323
|
+
chartTracks: ae,
|
|
2324
|
+
innerWidth: ue,
|
|
2325
|
+
innerHeight: G,
|
|
2326
|
+
activeInteractionMode: fe,
|
|
2323
2327
|
hiddenSeriesIdSet: H,
|
|
2324
2328
|
internalHiddenSeriesIds: O,
|
|
2325
2329
|
independentTransforms: p,
|
|
@@ -2327,21 +2331,21 @@ function Pn(e, t) {
|
|
|
2327
2331
|
annotationInteraction: k,
|
|
2328
2332
|
editorSeriesOptions: A,
|
|
2329
2333
|
isPresentationMode: V,
|
|
2330
|
-
clearHover:
|
|
2331
|
-
cancelAnnotation:
|
|
2332
|
-
configureZoom:
|
|
2333
|
-
resetViewport:
|
|
2334
|
-
cancelViewportDrag:
|
|
2335
|
-
cancelPendingHover:
|
|
2336
|
-
clearZoomBindings:
|
|
2334
|
+
clearHover: be.clearHover,
|
|
2335
|
+
cancelAnnotation: X.cancelAnnotation,
|
|
2336
|
+
configureZoom: Y.configureZoom,
|
|
2337
|
+
resetViewport: ye.resetViewport,
|
|
2338
|
+
cancelViewportDrag: ye.cancelViewportDrag,
|
|
2339
|
+
cancelPendingHover: be.cancelPendingHover,
|
|
2340
|
+
clearZoomBindings: Y.clearZoomBindings
|
|
2337
2341
|
});
|
|
2338
|
-
return F =
|
|
2342
|
+
return F = xe.handleDataReferenceChange, _({
|
|
2339
2343
|
...C(e),
|
|
2340
2344
|
...L,
|
|
2341
|
-
...
|
|
2342
|
-
...
|
|
2343
|
-
...
|
|
2344
|
-
...
|
|
2345
|
+
...ie,
|
|
2346
|
+
...X,
|
|
2347
|
+
...ye,
|
|
2348
|
+
...be,
|
|
2345
2349
|
margin: pt,
|
|
2346
2350
|
getPageSize: qt,
|
|
2347
2351
|
currentPage: S,
|
|
@@ -2353,7 +2357,7 @@ function Pn(e, t) {
|
|
|
2353
2357
|
contextMenu: k.contextMenu,
|
|
2354
2358
|
editorSeriesOptions: A,
|
|
2355
2359
|
clipPathId: T,
|
|
2356
|
-
goToPage:
|
|
2360
|
+
goToPage: xe.goToPage,
|
|
2357
2361
|
setContainer: (e) => Nn(n, e),
|
|
2358
2362
|
setSvgElement: (e) => Nn(r, e),
|
|
2359
2363
|
setTitleMeasureElement: (e) => Nn(i, e),
|
|
@@ -2378,7 +2382,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2378
2382
|
}, Zn = {
|
|
2379
2383
|
class: "waveform-annotation-editor__color-field",
|
|
2380
2384
|
title: "调整标注背景色和透明度"
|
|
2381
|
-
}, Qn = { class: "waveform-annotation-editor__actions" }, $n = ["disabled"], er = /*#__PURE__*/
|
|
2385
|
+
}, Qn = { class: "waveform-annotation-editor__actions" }, $n = ["disabled"], er = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2382
2386
|
__name: "WaveformAnnotationEditor",
|
|
2383
2387
|
props: {
|
|
2384
2388
|
annotation: {},
|
|
@@ -2393,7 +2397,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2393
2397
|
"series-change"
|
|
2394
2398
|
],
|
|
2395
2399
|
setup(n, { emit: o }) {
|
|
2396
|
-
let c = n, l = o, u = v(), f =
|
|
2400
|
+
let c = n, l = o, u = v(), f = oe("waveform-annotation-editor-title"), m = v(""), h = v(""), _ = v(""), b = v(""), x = t(() => m.value.trim().length > 0), C = t(() => m.value.length), D = t(() => {
|
|
2397
2401
|
let e = c.seriesOptions?.find((e) => e.seriesId === c.annotation.seriesId);
|
|
2398
2402
|
return e ? {
|
|
2399
2403
|
id: e.seriesId,
|
|
@@ -2403,7 +2407,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2403
2407
|
} : c.series;
|
|
2404
2408
|
});
|
|
2405
2409
|
function A() {
|
|
2406
|
-
let e =
|
|
2410
|
+
let e = xe(c.annotation.style);
|
|
2407
2411
|
m.value = c.annotation.text, h.value = e.borderColor, _.value = e.textColor, b.value = e.backgroundColor, d(() => u.value?.focus());
|
|
2408
2412
|
}
|
|
2409
2413
|
E(() => c.annotation, A, { immediate: !0 });
|
|
@@ -2468,7 +2472,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2468
2472
|
}, null, 40, qn), [[T, m.value]])]),
|
|
2469
2473
|
a("fieldset", Jn, [
|
|
2470
2474
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2471
|
-
a("label", Yn, [n[10] ||= a("span", null, "边框色", -1), s(w(
|
|
2475
|
+
a("label", Yn, [n[10] ||= a("span", null, "边框色", -1), s(w(K), {
|
|
2472
2476
|
"pure-color": h.value,
|
|
2473
2477
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2474
2478
|
"aria-label": "标注边框色",
|
|
@@ -2478,7 +2482,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2478
2482
|
"disable-alpha": !1,
|
|
2479
2483
|
"blur-close": !0
|
|
2480
2484
|
}, null, 8, ["pure-color"])]),
|
|
2481
|
-
a("label", Xn, [n[11] ||= a("span", null, "文字色", -1), s(w(
|
|
2485
|
+
a("label", Xn, [n[11] ||= a("span", null, "文字色", -1), s(w(K), {
|
|
2482
2486
|
"pure-color": _.value,
|
|
2483
2487
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2484
2488
|
"aria-label": "标注文字色",
|
|
@@ -2488,7 +2492,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2488
2492
|
"disable-alpha": !1,
|
|
2489
2493
|
"blur-close": !0
|
|
2490
2494
|
}, null, 8, ["pure-color"])]),
|
|
2491
|
-
a("label", Zn, [n[12] ||= a("span", null, "背景色", -1), s(w(
|
|
2495
|
+
a("label", Zn, [n[12] ||= a("span", null, "背景色", -1), s(w(K), {
|
|
2492
2496
|
"pure-color": b.value,
|
|
2493
2497
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2494
2498
|
"aria-label": "标注背景色",
|
|
@@ -2510,7 +2514,7 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2510
2514
|
}, " 保存标注 ", 8, $n)])
|
|
2511
2515
|
])], 8, Fn));
|
|
2512
2516
|
}
|
|
2513
|
-
}), [["__scopeId", "data-v-52818b45"]]), tr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, nr = { key: 0 }, rr = { class: "waveform-tooltip__value" }, ir = { key: 0 }, ar = 12, or = 8, sr = 238, cr = /*#__PURE__*/
|
|
2517
|
+
}), [["__scopeId", "data-v-52818b45"]]), tr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, nr = { key: 0 }, rr = { class: "waveform-tooltip__value" }, ir = { key: 0 }, ar = 12, or = 8, sr = 238, cr = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2514
2518
|
__name: "WaveformTooltip",
|
|
2515
2519
|
props: {
|
|
2516
2520
|
visible: { type: Boolean },
|
|
@@ -2577,10 +2581,10 @@ var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel"
|
|
|
2577
2581
|
]));
|
|
2578
2582
|
}
|
|
2579
2583
|
}), ur = 13, dr = 2, fr = 14, pr = 8, mr = 24, hr = {
|
|
2580
|
-
circle:
|
|
2581
|
-
square:
|
|
2582
|
-
triangle:
|
|
2583
|
-
diamond:
|
|
2584
|
+
circle: U,
|
|
2585
|
+
square: te,
|
|
2586
|
+
triangle: ne,
|
|
2587
|
+
diamond: ee
|
|
2584
2588
|
};
|
|
2585
2589
|
function gr(e, t = 48) {
|
|
2586
2590
|
return e === "none" ? null : H().type(hr[e]).size(t)() ?? null;
|
|
@@ -2632,7 +2636,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
2632
2636
|
"d",
|
|
2633
2637
|
"stroke",
|
|
2634
2638
|
"stroke-width"
|
|
2635
|
-
], Er = ["data-series-id", "data-point-type"], Dr = ["d", "fill"], Or = /*#__PURE__*/
|
|
2639
|
+
], Er = ["data-series-id", "data-point-type"], Dr = ["d", "fill"], Or = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
2636
2640
|
__name: "WaveformSeriesLayer",
|
|
2637
2641
|
props: {
|
|
2638
2642
|
track: {},
|
|
@@ -3134,7 +3138,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3134
3138
|
"d",
|
|
3135
3139
|
"stroke",
|
|
3136
3140
|
"stroke-width"
|
|
3137
|
-
], li = ["d", "fill"], ui = ["title"], di = /*#__PURE__*/
|
|
3141
|
+
], li = ["d", "fill"], ui = ["title"], di = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
3138
3142
|
__name: "WaveformLegend",
|
|
3139
3143
|
props: {
|
|
3140
3144
|
series: {},
|
|
@@ -3230,7 +3234,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3230
3234
|
"x1",
|
|
3231
3235
|
"x2",
|
|
3232
3236
|
"y2"
|
|
3233
|
-
], hi = /*#__PURE__*/
|
|
3237
|
+
], hi = /*#__PURE__*/ Z(/* @__PURE__ */ c({
|
|
3234
3238
|
__name: "WaveformHoverLayer",
|
|
3235
3239
|
props: {
|
|
3236
3240
|
state: {},
|
|
@@ -3271,6 +3275,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3271
3275
|
"data-presentation-mode",
|
|
3272
3276
|
"data-overlay-mode",
|
|
3273
3277
|
"data-chart-left-margin",
|
|
3278
|
+
"data-plot-margin-top",
|
|
3279
|
+
"data-plot-margin-bottom",
|
|
3274
3280
|
"data-title-area-height"
|
|
3275
3281
|
], _i = [
|
|
3276
3282
|
"role",
|
|
@@ -3300,9 +3306,9 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3300
3306
|
__name: "WaveformChartView",
|
|
3301
3307
|
props: { controller: {} },
|
|
3302
3308
|
setup(t) {
|
|
3303
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v,
|
|
3309
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: W, finishViewportDrag: G, cancelViewportDrag: K, handlePointerLeave: ae, handleAnnotationClick: oe, handleAnnotationContextMenu: q, resolveFrameNumber: se, frameStyle: ce, axes: le, resolvedZeroLine: ue, timeUnit: de, yLabel: fe, handleIndependentPointerMove: pe, beginViewportDrag: me, hoverState: he, showTooltip: ge, selectionBox: J, renderedAnnotations: _e, annotationsVisible: ve, handleExistingAnnotationContextMenu: Y, beginAnnotationDrag: X, handleAnnotationMove: ye, endAnnotationDrag: be, resolveLegendPosition: xe, resolveLegendOrientation: Se, legendBackgroundColor: Ce, legendInteractive: we, resolvedHiddenSeriesIds: Te, toggleSeriesVisibility: Ee, resolvedXLabel: De, xAxisTitleY: Oe, hasChartArea: ke, gridOptions: Ae, pageCount: je, currentPage: Z, getPageSize: Pe, chartTracks: Q, goToPage: Fe, annotationInteraction: Ie, editorDraft: Le, contextMenu: Re, editorSeries: ze, editorSeriesOptions: Be, confirmAnnotation: Ve, cancelAnnotation: He, changeDraftSeries: Ue, editContextAnnotation: We, deleteContextAnnotation: Ge, chartHeight: $, setContainer: Ke, setSvgElement: qe, setTitleMeasureElement: Je, setSharedOverlayElement: Ye } = C(t.controller);
|
|
3304
3310
|
return (t, C) => (g(), i("div", {
|
|
3305
|
-
ref: w(
|
|
3311
|
+
ref: w(Ke),
|
|
3306
3312
|
class: f(["waveform-chart", [
|
|
3307
3313
|
`waveform-chart--${w(o)}`,
|
|
3308
3314
|
`waveform-chart--interaction-${w(c)}`,
|
|
@@ -3318,52 +3324,54 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3318
3324
|
"data-presentation-mode": w(u),
|
|
3319
3325
|
"data-overlay-mode": w(h),
|
|
3320
3326
|
"data-chart-left-margin": w(_),
|
|
3327
|
+
"data-plot-margin-top": w(b).top,
|
|
3328
|
+
"data-plot-margin-bottom": w(b).bottom,
|
|
3321
3329
|
"data-title-area-height": w(v),
|
|
3322
|
-
onPointerenter: C[8] ||= (e) =>
|
|
3323
|
-
onPointerleave: C[9] ||= (e) =>
|
|
3324
|
-
onContextmenuCapture: C[10] ||= (...e) => w(
|
|
3330
|
+
onPointerenter: C[8] ||= (e) => x.value = !0,
|
|
3331
|
+
onPointerleave: C[9] ||= (e) => x.value = !1,
|
|
3332
|
+
onContextmenuCapture: C[10] ||= (...e) => w(T) && w(T)(...e)
|
|
3325
3333
|
}, [
|
|
3326
|
-
w(
|
|
3334
|
+
w(E) ? (g(), i("div", {
|
|
3327
3335
|
key: 0,
|
|
3328
3336
|
class: "waveform-chart__title-area",
|
|
3329
|
-
style: p(w(
|
|
3330
|
-
role: w(
|
|
3331
|
-
"aria-level": w(
|
|
3337
|
+
style: p(w(D)),
|
|
3338
|
+
role: w(O) ? "heading" : void 0,
|
|
3339
|
+
"aria-level": w(O) ? 2 : void 0,
|
|
3332
3340
|
"aria-hidden": w(l) || void 0
|
|
3333
3341
|
}, [a("span", {
|
|
3334
|
-
ref: w(
|
|
3342
|
+
ref: w(Je),
|
|
3335
3343
|
class: "waveform-chart__title-measure",
|
|
3336
|
-
style: p(w(
|
|
3344
|
+
style: p(w(k)),
|
|
3337
3345
|
"aria-hidden": "true"
|
|
3338
|
-
}, S(w(
|
|
3346
|
+
}, S(w(A)), 5), w(O) ? (g(), i("span", {
|
|
3339
3347
|
key: 0,
|
|
3340
3348
|
class: "waveform-chart__title-visual",
|
|
3341
|
-
style: p(w(
|
|
3349
|
+
style: p(w(j))
|
|
3342
3350
|
}, [a("span", {
|
|
3343
3351
|
class: "waveform-chart__title-text",
|
|
3344
|
-
style: p(w(
|
|
3345
|
-
"data-title-scale": w(
|
|
3346
|
-
"data-title-wrapped": w(
|
|
3347
|
-
}, S(w(
|
|
3352
|
+
style: p(w(M)),
|
|
3353
|
+
"data-title-scale": w(N).scale,
|
|
3354
|
+
"data-title-wrapped": w(N).wrapped || void 0
|
|
3355
|
+
}, S(w(A)), 13, vi)], 4)) : r("", !0)], 12, _i)) : r("", !0),
|
|
3348
3356
|
(g(), i("svg", {
|
|
3349
|
-
ref: w(
|
|
3357
|
+
ref: w(qe),
|
|
3350
3358
|
class: "waveform-chart__svg",
|
|
3351
|
-
width: w(
|
|
3352
|
-
height: w(
|
|
3359
|
+
width: w(P),
|
|
3360
|
+
height: w(F),
|
|
3353
3361
|
role: "img",
|
|
3354
|
-
"aria-label": w(
|
|
3355
|
-
onDblclick: C[7] ||= (...e) => w(
|
|
3362
|
+
"aria-label": w(I) ? "波形折线图" : "暂无波形数据",
|
|
3363
|
+
onDblclick: C[7] ||= (...e) => w(L) && w(L)(...e)
|
|
3356
3364
|
}, [
|
|
3357
|
-
a("defs", null, [(g(!0), i(e, null, y(w(
|
|
3358
|
-
id: `${w(
|
|
3359
|
-
key: `${w(
|
|
3365
|
+
a("defs", null, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("clipPath", {
|
|
3366
|
+
id: `${w(z)}-${e.index}`,
|
|
3367
|
+
key: `${w(z)}-${e.index}`,
|
|
3360
3368
|
clipPathUnits: "userSpaceOnUse"
|
|
3361
3369
|
}, [a("rect", {
|
|
3362
3370
|
width: e.width,
|
|
3363
3371
|
height: e.height
|
|
3364
3372
|
}, null, 8, xi)], 8, bi))), 128))]),
|
|
3365
|
-
a("g", { transform: `translate(${w(_)}, ${w(
|
|
3366
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g", Ci, [(g(!0), i(e, null, y(w(
|
|
3373
|
+
a("g", { transform: `translate(${w(_)}, ${w(B)})` }, [
|
|
3374
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", Ci, [(g(!0), i(e, null, y(w(V), (e) => (g(), i("g", {
|
|
3367
3375
|
key: `grid-slot-${e.slotIndex}`,
|
|
3368
3376
|
transform: `translate(${e.left}, ${e.top})`
|
|
3369
3377
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3372,46 +3380,46 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3372
3380
|
width: e.width,
|
|
3373
3381
|
height: e.cellHeight
|
|
3374
3382
|
}, null, 8, Ti))], 8, wi))), 128))])) : r("", !0),
|
|
3375
|
-
w(o) !== "independent" && w(
|
|
3383
|
+
w(o) !== "independent" && w(R).length && w(H) ? (g(), i("rect", {
|
|
3376
3384
|
key: 1,
|
|
3377
|
-
ref: w(
|
|
3385
|
+
ref: w(Ye),
|
|
3378
3386
|
class: f(["waveform-chart__overlay waveform-chart__overlay--shared", {
|
|
3379
|
-
"is-zoomable": !w(u) && w(
|
|
3387
|
+
"is-zoomable": !w(u) && w(U) && w(ee),
|
|
3380
3388
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
3381
3389
|
}]),
|
|
3382
3390
|
width: w(te),
|
|
3383
3391
|
height: w(ne),
|
|
3384
3392
|
onPointermove: C[0] ||= (...e) => w(re) && w(re)(...e),
|
|
3385
|
-
onPointerdown: C[1] ||= (...e) => w(
|
|
3386
|
-
onPointerup: C[2] ||= (...e) => w(
|
|
3387
|
-
onPointercancel: C[3] ||= (...e) => w(
|
|
3388
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3389
|
-
onClick: C[5] ||= (...e) => w(
|
|
3390
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3393
|
+
onPointerdown: C[1] ||= (...e) => w(W) && w(W)(...e),
|
|
3394
|
+
onPointerup: C[2] ||= (...e) => w(G) && w(G)(...e),
|
|
3395
|
+
onPointercancel: C[3] ||= (...e) => w(K) && w(K)(...e),
|
|
3396
|
+
onPointerleave: C[4] ||= (...e) => w(ae) && w(ae)(...e),
|
|
3397
|
+
onClick: C[5] ||= (...e) => w(oe) && w(oe)(...e),
|
|
3398
|
+
onContextmenu: C[6] ||= (...e) => w(q) && w(q)(...e)
|
|
3391
3399
|
}, null, 42, Ei)) : r("", !0),
|
|
3392
|
-
(g(!0), i(e, null, y(w(
|
|
3400
|
+
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(ri), {
|
|
3393
3401
|
key: `${e.index}-${e.series.name}`,
|
|
3394
3402
|
track: e,
|
|
3395
|
-
"clip-path-id": w(
|
|
3403
|
+
"clip-path-id": w(z),
|
|
3396
3404
|
"inner-width": w(te),
|
|
3397
|
-
zoomable: w(
|
|
3405
|
+
zoomable: w(U),
|
|
3398
3406
|
interactive: !w(u),
|
|
3399
3407
|
"display-mode": w(o),
|
|
3400
3408
|
"interaction-mode": w(c),
|
|
3401
|
-
"frame-number": w(
|
|
3402
|
-
"frame-style": w(
|
|
3403
|
-
axes: w(
|
|
3409
|
+
"frame-number": w(se)(e.index),
|
|
3410
|
+
"frame-style": w(ce),
|
|
3411
|
+
axes: w(le),
|
|
3404
3412
|
"clean-view": w(l),
|
|
3405
|
-
"zero-line": w(
|
|
3406
|
-
"time-unit": w(
|
|
3407
|
-
"y-label": w(
|
|
3408
|
-
onPointerMove: (t) => w(
|
|
3409
|
-
onPointerDown: (t) => w(
|
|
3410
|
-
onPointerUp: w(
|
|
3411
|
-
onPointerCancel: w(
|
|
3412
|
-
onPointerLeave: w(
|
|
3413
|
-
onClick: (t) => w(
|
|
3414
|
-
onContextmenu: (t) => w(
|
|
3413
|
+
"zero-line": w(ue),
|
|
3414
|
+
"time-unit": w(de),
|
|
3415
|
+
"y-label": w(fe),
|
|
3416
|
+
onPointerMove: (t) => w(pe)(t, e.index),
|
|
3417
|
+
onPointerDown: (t) => w(me)(t, e.index, !0),
|
|
3418
|
+
onPointerUp: w(G),
|
|
3419
|
+
onPointerCancel: w(K),
|
|
3420
|
+
onPointerLeave: w(ae),
|
|
3421
|
+
onClick: (t) => w(oe)(t, e.index),
|
|
3422
|
+
onContextmenu: (t) => w(q)(t, e.index)
|
|
3415
3423
|
}, null, 8, [
|
|
3416
3424
|
"track",
|
|
3417
3425
|
"clip-path-id",
|
|
@@ -3436,34 +3444,34 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3436
3444
|
"onContextmenu"
|
|
3437
3445
|
]))), 128)),
|
|
3438
3446
|
s(w(hi), {
|
|
3439
|
-
state: w(
|
|
3440
|
-
tracks: w(
|
|
3441
|
-
"clip-path-id": w(
|
|
3442
|
-
visible: w(
|
|
3447
|
+
state: w(he),
|
|
3448
|
+
tracks: w(R),
|
|
3449
|
+
"clip-path-id": w(z),
|
|
3450
|
+
visible: w(ge) && !w(u)
|
|
3443
3451
|
}, null, 8, [
|
|
3444
3452
|
"state",
|
|
3445
3453
|
"tracks",
|
|
3446
3454
|
"clip-path-id",
|
|
3447
3455
|
"visible"
|
|
3448
3456
|
]),
|
|
3449
|
-
w(
|
|
3457
|
+
w(J) && w(d)?.mode === "box" ? (g(), i("rect", {
|
|
3450
3458
|
key: 2,
|
|
3451
3459
|
class: "waveform-chart__zoom-selection",
|
|
3452
|
-
x: w(
|
|
3453
|
-
y: w(
|
|
3454
|
-
width: w(
|
|
3455
|
-
height: w(
|
|
3460
|
+
x: w(J).x,
|
|
3461
|
+
y: w(J).y,
|
|
3462
|
+
width: w(J).width,
|
|
3463
|
+
height: w(J).height,
|
|
3456
3464
|
"aria-hidden": "true"
|
|
3457
3465
|
}, null, 8, Di)) : r("", !0),
|
|
3458
|
-
w(l) ? r("", !0) : (g(), n(w(
|
|
3466
|
+
w(l) ? r("", !0) : (g(), n(w(Me), {
|
|
3459
3467
|
key: 3,
|
|
3460
|
-
annotations: w(
|
|
3461
|
-
visible: w(
|
|
3468
|
+
annotations: w(_e),
|
|
3469
|
+
visible: w(ve),
|
|
3462
3470
|
interactive: !w(u),
|
|
3463
|
-
onContextmenu: w(
|
|
3464
|
-
onDragStart: w(
|
|
3465
|
-
onMove: w(
|
|
3466
|
-
onDragEnd: w(
|
|
3471
|
+
onContextmenu: w(Y),
|
|
3472
|
+
onDragStart: w(X),
|
|
3473
|
+
onMove: w(ye),
|
|
3474
|
+
onDragEnd: w(be)
|
|
3467
3475
|
}, null, 8, [
|
|
3468
3476
|
"annotations",
|
|
3469
3477
|
"visible",
|
|
@@ -3473,7 +3481,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3473
3481
|
"onMove",
|
|
3474
3482
|
"onDragEnd"
|
|
3475
3483
|
])),
|
|
3476
|
-
w(l) ? r("", !0) : (g(), i("g", Oi, [(g(!0), i(e, null, y(w(
|
|
3484
|
+
w(l) ? r("", !0) : (g(), i("g", Oi, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("g", {
|
|
3477
3485
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3478
3486
|
class: "waveform-chart__legend-track",
|
|
3479
3487
|
"data-legend-track-index": e.index,
|
|
@@ -3482,8 +3490,8 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3482
3490
|
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(di), {
|
|
3483
3491
|
key: 0,
|
|
3484
3492
|
series: e.legendSeries,
|
|
3485
|
-
position: w(
|
|
3486
|
-
orientation: w(Se)(w(
|
|
3493
|
+
position: w(xe)(e.id),
|
|
3494
|
+
orientation: w(Se)(w(xe)(e.id)),
|
|
3487
3495
|
"background-color": w(Ce),
|
|
3488
3496
|
interactive: w(we),
|
|
3489
3497
|
"hidden-series-ids": w(Te),
|
|
@@ -3500,33 +3508,33 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3500
3508
|
"width",
|
|
3501
3509
|
"height",
|
|
3502
3510
|
"onToggle"
|
|
3503
|
-
])) : r("", !0)], 8, ki))), 128))]))
|
|
3504
|
-
w(De) && !w(l) ? (g(), i("text", {
|
|
3505
|
-
key: 5,
|
|
3506
|
-
class: "waveform-chart__label waveform-chart__x-label",
|
|
3507
|
-
x: w(te) / 2,
|
|
3508
|
-
y: w(Oe),
|
|
3509
|
-
"text-anchor": "middle"
|
|
3510
|
-
}, S(w(De)), 9, Ai)) : r("", !0)
|
|
3511
|
+
])) : r("", !0)], 8, ki))), 128))]))
|
|
3511
3512
|
], 8, Si),
|
|
3512
|
-
w(
|
|
3513
|
+
w(De) && !w(l) ? (g(), i("text", {
|
|
3513
3514
|
key: 0,
|
|
3515
|
+
class: "waveform-chart__label waveform-chart__x-label",
|
|
3516
|
+
x: w(_) + w(te) / 2,
|
|
3517
|
+
y: w(Oe),
|
|
3518
|
+
"text-anchor": "middle"
|
|
3519
|
+
}, S(w(De)), 9, Ai)) : r("", !0),
|
|
3520
|
+
w(ke) && !w(I) ? (g(), i("text", {
|
|
3521
|
+
key: 1,
|
|
3514
3522
|
class: "waveform-chart__empty",
|
|
3515
|
-
x: w(
|
|
3516
|
-
y: w(
|
|
3523
|
+
x: w(P) / 2,
|
|
3524
|
+
y: w(F) / 2,
|
|
3517
3525
|
"text-anchor": "middle"
|
|
3518
3526
|
}, " 暂无有效波形数据 ", 8, ji)) : r("", !0)
|
|
3519
3527
|
], 40, yi)),
|
|
3520
|
-
w(Ae).showPagination && w(je) > 1 && !w(l) ? (g(), n(w(
|
|
3528
|
+
w(Ae).showPagination && w(je) > 1 && !w(l) ? (g(), n(w(ie), {
|
|
3521
3529
|
key: 1,
|
|
3522
3530
|
class: "waveform-chart__pagination",
|
|
3523
3531
|
"aria-label": "波形分页",
|
|
3524
|
-
current: w(
|
|
3525
|
-
"page-size": w(
|
|
3526
|
-
total: w(
|
|
3532
|
+
current: w(Z),
|
|
3533
|
+
"page-size": w(Pe)(w(Ae)),
|
|
3534
|
+
total: w(Q).length,
|
|
3527
3535
|
"show-size-changer": !1,
|
|
3528
3536
|
"show-quick-jumper": !1,
|
|
3529
|
-
onChange: w(
|
|
3537
|
+
onChange: w(Fe)
|
|
3530
3538
|
}, null, 8, [
|
|
3531
3539
|
"current",
|
|
3532
3540
|
"page-size",
|
|
@@ -3537,12 +3545,12 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3537
3545
|
key: 2,
|
|
3538
3546
|
annotation: w(Le).annotation,
|
|
3539
3547
|
mode: w(Le).mode,
|
|
3540
|
-
series: w(
|
|
3541
|
-
"series-options": w(
|
|
3542
|
-
"time-unit": w(
|
|
3543
|
-
onConfirm: w(
|
|
3544
|
-
onCancel: w(
|
|
3545
|
-
onSeriesChange: w(
|
|
3548
|
+
series: w(ze),
|
|
3549
|
+
"series-options": w(Be),
|
|
3550
|
+
"time-unit": w(de),
|
|
3551
|
+
onConfirm: w(Ve),
|
|
3552
|
+
onCancel: w(He),
|
|
3553
|
+
onSeriesChange: w(Ue)
|
|
3546
3554
|
}, null, 8, [
|
|
3547
3555
|
"annotation",
|
|
3548
3556
|
"mode",
|
|
@@ -3553,14 +3561,14 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3553
3561
|
"onCancel",
|
|
3554
3562
|
"onSeriesChange"
|
|
3555
3563
|
])) : r("", !0),
|
|
3556
|
-
!w(l) && !w(u) ? (g(), n(w(
|
|
3564
|
+
!w(l) && !w(u) ? (g(), n(w(Ne), {
|
|
3557
3565
|
key: 3,
|
|
3558
|
-
visible: w(
|
|
3559
|
-
x: w(
|
|
3560
|
-
y: w(
|
|
3561
|
-
"can-edit": !!w(
|
|
3562
|
-
onEdit: w(
|
|
3563
|
-
onDelete: w(
|
|
3566
|
+
visible: w(Re) !== null,
|
|
3567
|
+
x: w(Re)?.x || 0,
|
|
3568
|
+
y: w(Re)?.y || 0,
|
|
3569
|
+
"can-edit": !!w(Re)?.annotationId,
|
|
3570
|
+
onEdit: w(We),
|
|
3571
|
+
onDelete: w(Ge),
|
|
3564
3572
|
onClose: w(Ie).closeContextMenu
|
|
3565
3573
|
}, null, 8, [
|
|
3566
3574
|
"visible",
|
|
@@ -3572,11 +3580,11 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3572
3580
|
"onClose"
|
|
3573
3581
|
])) : r("", !0),
|
|
3574
3582
|
s(w(lr), {
|
|
3575
|
-
state: w(
|
|
3576
|
-
visible: w(
|
|
3577
|
-
"time-unit": w(
|
|
3578
|
-
"container-width": w(
|
|
3579
|
-
"container-height": w(
|
|
3583
|
+
state: w(he),
|
|
3584
|
+
visible: w(ge) && !w(u),
|
|
3585
|
+
"time-unit": w(de),
|
|
3586
|
+
"container-width": w(P),
|
|
3587
|
+
"container-height": w($)
|
|
3580
3588
|
}, null, 8, [
|
|
3581
3589
|
"state",
|
|
3582
3590
|
"visible",
|
|
@@ -3631,6 +3639,7 @@ var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
|
3631
3639
|
showPagination: !0
|
|
3632
3640
|
}) },
|
|
3633
3641
|
rendering: { default: () => ({}) },
|
|
3642
|
+
plotMargin: { default: () => ({}) },
|
|
3634
3643
|
title: {},
|
|
3635
3644
|
legend: { default: () => ({
|
|
3636
3645
|
position: "top-right",
|