tsviewer 1.0.28 → 1.0.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/{BFButton-V2zgKAQA.mjs → BFButton-CI70UW6L.mjs} +2 -2
- package/dist/{IconSelection-BGj1-2Pf.mjs → IconSelection-CFPXCYRf.mjs} +1 -1
- package/dist/TSAnnotationCanvas-CvgQNy_8.mjs +730 -0
- package/dist/{TSAnnotationModal-BKwEWORY.mjs → TSAnnotationModal-EjnPa9Zo.mjs} +3 -3
- package/dist/{TSFilterModal-DjKgP7Y2.mjs → TSFilterModal-CJH8zXyp.mjs} +3 -3
- package/dist/{TSScrubber-BZo4SyGm.mjs → TSScrubber-BHyiFEEN.mjs} +46 -49
- package/dist/{TSViewerCanvas-CeGKq-zQ.mjs → TSViewerCanvas-bkWRtQiL.mjs} +2198 -2202
- package/dist/{TSViewerLayerWindow-laXtlKCp.mjs → TSViewerLayerWindow-BQ94kN9H.mjs} +2 -2
- package/dist/{TSViewerToolbar-CQ4uNXil.mjs → TSViewerToolbar-Difc8d0T.mjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-CoPkyAmW.mjs → TsAnnotationDeleteDialog-DxKI_m1a.mjs} +3 -3
- package/dist/index-knEI45_O.mjs +1308 -0
- package/dist/pathOr-DBQF4FRd.mjs +18 -0
- package/dist/tsviewer.css +1 -1
- package/dist/tsviewer.es.js +3 -3
- package/dist/tsviewer.umd.js +13 -13
- package/package.json +1 -1
- package/dist/TSAnnotationCanvas-DS-_o3gh.mjs +0 -732
- package/dist/index-BtnXpu3W.mjs +0 -902
- package/dist/pathOr-DE7WGRqe.mjs +0 -18
- package/dist/request_composable-DV-ftNZG.mjs +0 -212
- package/dist/useToken-CJWB6KGF.mjs +0 -16
|
@@ -3,9 +3,9 @@ import { E as yn } from "./el-overlay-_Fd7WVZL.mjs";
|
|
|
3
3
|
import { u as Ha, h as bn, i as gn, c as kn, j as wn, k as za, d as ja, l as Sn, e as qa, m as Dn, o as Cn, E as Mn, g as rt, n as $n, p as Pn, q as Vn, r as _n, T as Tn, C as ca, s as On, t as Yn, f as In, a as Rn, b as xn } from "./el-input-DNjlHApm.mjs";
|
|
4
4
|
import { a as Zt } from "./el-button-B2d_HO4x.mjs";
|
|
5
5
|
import { defineComponent as $e, ref as X, createElementBlock as Q, openBlock as I, normalizeStyle as Gt, normalizeClass as $, unref as e, renderSlot as me, createElementVNode as j, mergeProps as Jt, useAttrs as ha, inject as Re, computed as K, watch as De, nextTick as Ie, onBeforeUnmount as Za, provide as Nt, createBlock as ce, withCtx as le, withModifiers as He, createCommentVNode as se, resolveDynamicComponent as Qe, toDisplayString as fe, onMounted as Ga, Fragment as we, renderList as Pe, createTextVNode as Ge, withDirectives as Ye, createVNode as Z, Transition as An, withKeys as ze, useSlots as ya, toRef as je, vShow as Ze, getCurrentInstance as Ja, reactive as Nn, defineAsyncComponent as Fn } from "vue";
|
|
6
|
-
import {
|
|
6
|
+
import { g as En, u as Ln, p as Pa } from "./index-knEI45_O.mjs";
|
|
7
7
|
import { storeToRefs as Bn } from "pinia";
|
|
8
|
-
import { I as Un } from "./IconSelection-
|
|
8
|
+
import { I as Un } from "./IconSelection-CFPXCYRf.mjs";
|
|
9
9
|
import { g as Xe } from "./_commonjsHelpers-DaMA6jEr.mjs";
|
|
10
10
|
import { v as Va } from "./index-ClxLs_jS.mjs";
|
|
11
11
|
var Ft = { exports: {} }, Kn = Ft.exports, _a;
|
|
@@ -4242,7 +4242,7 @@ const Tl = Wa(_l), Ol = { slot: "body" }, Yl = { class: "select-wrapper" }, Il =
|
|
|
4242
4242
|
},
|
|
4243
4243
|
emits: ["closeWindow", "createUpdateAnnotation"],
|
|
4244
4244
|
setup(n, { emit: l }) {
|
|
4245
|
-
const a = Fn(() => import("./BFButton-
|
|
4245
|
+
const a = Fn(() => import("./BFButton-CI70UW6L.mjs")), t = n, d = X(!1);
|
|
4246
4246
|
De(() => t.visible, (_) => {
|
|
4247
4247
|
if (d.value = _, !_) return;
|
|
4248
4248
|
const M = u.value.start / 1e3, O = u.value.end / 1e3;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./base-CIy5gWpu.mjs";
|
|
2
2
|
import { E as F } from "./el-overlay-_Fd7WVZL.mjs";
|
|
3
|
-
import { I as g } from "./IconSelection-
|
|
3
|
+
import { I as g } from "./IconSelection-CFPXCYRf.mjs";
|
|
4
4
|
import { a as y, b as k } from "./el-input-DNjlHApm.mjs";
|
|
5
5
|
import { E as S } from "./el-input-number-CAzspsnM.mjs";
|
|
6
6
|
import { resolveComponent as P, createBlock as u, openBlock as o, withCtx as i, createElementVNode as s, createVNode as r, createElementBlock as a, toDisplayString as c, createTextVNode as d, createCommentVNode as p, Fragment as _, renderList as v } from "vue";
|
|
7
|
-
import {
|
|
7
|
+
import { g as N } from "./index-knEI45_O.mjs";
|
|
8
8
|
const H = {
|
|
9
9
|
name: "TimeseriesFilterModal",
|
|
10
10
|
components: {
|
|
11
|
-
"bf-button": () => import("./BFButton-
|
|
11
|
+
"bf-button": () => import("./BFButton-CI70UW6L.mjs"),
|
|
12
12
|
IconSelection: g
|
|
13
13
|
},
|
|
14
14
|
mixins: [],
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { _ as ve, a as
|
|
3
|
-
|
|
4
|
-
import { _ as me, a as je, u as fe, b as he } from "./request_composable-DV-ftNZG.mjs";
|
|
5
|
-
function Se(g, c, l) {
|
|
1
|
+
import { ref as v, computed as N, watch as U, nextTick as E, onMounted as Ne, createElementBlock as Ie, openBlock as $e, createElementVNode as x, toDisplayString as K, normalizeStyle as Q } from "vue";
|
|
2
|
+
import { _ as ve, a as Se, b as Y, c as Ue, d as ge, e as Ve, f as Oe, k as Le, g as Xe, u as je, h as de, i as fe, j as he } from "./index-knEI45_O.mjs";
|
|
3
|
+
function me(g, c, l) {
|
|
6
4
|
return function() {
|
|
7
|
-
for (var t = [], p = 0,
|
|
5
|
+
for (var t = [], p = 0, u = g, k = 0; k < c.length || p < arguments.length; ) {
|
|
8
6
|
var W;
|
|
9
|
-
k < c.length && (!ve(c[k]) || p >= arguments.length) ? W = c[k] : (W = arguments[p], p += 1), t[k] = W, ve(W) || (
|
|
7
|
+
k < c.length && (!ve(c[k]) || p >= arguments.length) ? W = c[k] : (W = arguments[p], p += 1), t[k] = W, ve(W) || (u -= 1), k += 1;
|
|
10
8
|
}
|
|
11
|
-
return
|
|
9
|
+
return u <= 0 ? l.apply(this, t) : Se(u, me(g, t, l));
|
|
12
10
|
};
|
|
13
11
|
}
|
|
14
12
|
var ze = /* @__PURE__ */ Y(function(c, l) {
|
|
15
|
-
return c === 1 ? Ue(l) :
|
|
13
|
+
return c === 1 ? Ue(l) : Se(c, me(c, [], l));
|
|
16
14
|
});
|
|
17
15
|
function Be(g, c) {
|
|
18
16
|
for (var l = 0, t = c.length, p = Array(t); l < t; )
|
|
@@ -36,9 +34,9 @@ var He = /* @__PURE__ */ function() {
|
|
|
36
34
|
return c.call(this, l.apply(this, arguments));
|
|
37
35
|
});
|
|
38
36
|
case "[object Object]":
|
|
39
|
-
return
|
|
37
|
+
return Oe(function(t, p) {
|
|
40
38
|
return t[p] = c(l[p]), t;
|
|
41
|
-
}, {},
|
|
39
|
+
}, {}, Le(l));
|
|
42
40
|
default:
|
|
43
41
|
return Be(c, l);
|
|
44
42
|
}
|
|
@@ -58,12 +56,11 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
58
56
|
duration: Number,
|
|
59
57
|
cursorLoc: Number,
|
|
60
58
|
labelWidth: Number,
|
|
61
|
-
config: Object,
|
|
62
59
|
activeViewer: Object
|
|
63
60
|
},
|
|
64
61
|
emits: ["setStart"],
|
|
65
62
|
setup(g, { expose: c, emit: l }) {
|
|
66
|
-
const t = g, p = l,
|
|
63
|
+
const t = g, p = l, u = je(), k = v(null), W = v(null), H = v(null), T = v(null), f = v(1), Z = v(28), C = v(30), V = v(!1), I = v(""), O = v("point"), ee = v(null), D = v([]), w = v([]), y = v([]), L = v(!1), te = v(0), ne = v(0), R = v(0), X = v(0), pe = N(() => oe(t.ts_start)), be = N(() => oe(t.ts_end)), _e = N(() => {
|
|
67
64
|
if (I.value !== "")
|
|
68
65
|
return I.value;
|
|
69
66
|
if (t.start > 0) {
|
|
@@ -89,12 +86,12 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
89
86
|
n && n !== e && (console.log("TSScrubber: ActiveViewer changed, resetting component state"), L.value = !0, se(), (a = n.content) != null && a.id ? E(() => {
|
|
90
87
|
B(), L.value = !1;
|
|
91
88
|
}) : L.value = !1);
|
|
92
|
-
}, { deep: !0 }), U(() =>
|
|
89
|
+
}, { deep: !0 }), U(() => u.viewerChannels, (n, e) => {
|
|
93
90
|
var a, s;
|
|
94
91
|
n && n.length > 0 && !L.value && (!e || n.length !== e.length || ((a = n[0]) == null ? void 0 : a.id) !== ((s = e[0]) == null ? void 0 : s.id)) && (console.log("TSScrubber: Viewer channels changed, re-initializing segments"), z(), E(() => {
|
|
95
92
|
ie();
|
|
96
93
|
}));
|
|
97
|
-
}, { deep: !0 }), U(() =>
|
|
94
|
+
}, { deep: !0 }), U(() => u.viewerAnnotations, (n, e) => {
|
|
98
95
|
var a, s;
|
|
99
96
|
n && n !== e && !L.value ? (console.log("TSScrubber: Viewer annotations changed independently, re-fetching annotations"), E(() => {
|
|
100
97
|
B();
|
|
@@ -130,8 +127,8 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
130
127
|
} else {
|
|
131
128
|
const e = T.value.getBoundingClientRect(), a = n.clientX - e.left, s = R.value + X.value, r = O.value;
|
|
132
129
|
a > R.value - 10 && a < s + 10 ? (O.value = "drag", T.value.setAttribute("dragme", !0), T.value.removeAttribute("resizeme")) : (O.value = "point", T.value.removeAttribute("dragme"), T.value.removeAttribute("resizeme"));
|
|
133
|
-
const o = a / t.cWidth * (t.ts_end - t.ts_start) + t.ts_start,
|
|
134
|
-
I.value =
|
|
130
|
+
const o = a / t.cWidth * (t.ts_end - t.ts_start) + t.ts_start, S = new Date(o / 1e3).toUTCString();
|
|
131
|
+
I.value = S.substring(0, S.length - 3), r !== O.value && A();
|
|
135
132
|
}
|
|
136
133
|
}, ke = () => {
|
|
137
134
|
V.value = !1;
|
|
@@ -147,7 +144,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
147
144
|
I.value = "";
|
|
148
145
|
}, ie = () => {
|
|
149
146
|
var a;
|
|
150
|
-
if (!
|
|
147
|
+
if (!u.viewerChannels || u.viewerChannels.length === 0) {
|
|
151
148
|
console.warn("TSScrubber: Cannot init segment spans - no viewer channels available");
|
|
152
149
|
return;
|
|
153
150
|
}
|
|
@@ -155,18 +152,18 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
155
152
|
console.warn("TSScrubber: Cannot init segment spans - invalid time range");
|
|
156
153
|
return;
|
|
157
154
|
}
|
|
158
|
-
if (!((a =
|
|
155
|
+
if (!((a = u.config) != null && a.timeSeriesApi)) {
|
|
159
156
|
console.warn("TSScrubber: Cannot init segment spans - no timeSeriesApi configured");
|
|
160
157
|
return;
|
|
161
158
|
}
|
|
162
|
-
console.log(`TSScrubber: Initializing segment spans for ${
|
|
163
|
-
const n = Math.min(t.constants.SEGMENTSPAN, t.ts_end - t.ts_start), e =
|
|
159
|
+
console.log(`TSScrubber: Initializing segment spans for ${u.viewerChannels.length} channels`), z();
|
|
160
|
+
const n = Math.min(t.constants.SEGMENTSPAN, t.ts_end - t.ts_start), e = u.viewerChannels;
|
|
164
161
|
for (let s = 0; s < e.length; s++)
|
|
165
162
|
le(e[s].id, s, t.ts_start, t.ts_start + n, 0);
|
|
166
163
|
}, le = async (n, e, a, s, r) => {
|
|
167
164
|
var o;
|
|
168
165
|
const i = t.constants.MAXRECURSION;
|
|
169
|
-
if (!((o =
|
|
166
|
+
if (!((o = u.config) != null && o.timeSeriesApi)) {
|
|
170
167
|
console.warn("TSScrubber: Cannot request segment span - no timeSeriesApi configured");
|
|
171
168
|
return;
|
|
172
169
|
}
|
|
@@ -175,10 +172,10 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
175
172
|
return;
|
|
176
173
|
}
|
|
177
174
|
try {
|
|
178
|
-
const
|
|
175
|
+
const S = await de(), _ = `${u.config.timeSeriesApi}/ts/retrieve/segments?session=${S}&channel=${n}&start=${a}&end=${s}`;
|
|
179
176
|
console.log(`TSScrubber: Fetching segments for channel ${n} (${e})`);
|
|
180
177
|
const b = await fe(_);
|
|
181
|
-
if (!
|
|
178
|
+
if (!u.viewerChannels[e] || u.viewerChannels[e].id !== n) {
|
|
182
179
|
console.warn("TSScrubber: Channel mismatch detected, ignoring segment response (likely package switched)");
|
|
183
180
|
return;
|
|
184
181
|
}
|
|
@@ -188,25 +185,25 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
188
185
|
const J = Math.floor((b[M][0] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3), De = Math.ceil((b[M][1] - t.ts_start) / (t.ts_end - t.ts_start) * 5e3);
|
|
189
186
|
y.value.fill(1, J, De);
|
|
190
187
|
}
|
|
191
|
-
let
|
|
192
|
-
for (w.value = [];
|
|
193
|
-
if (!y.value[
|
|
194
|
-
|
|
188
|
+
let m = 0, j = !1, G = 0;
|
|
189
|
+
for (w.value = []; m < y.value.length - 1; ) {
|
|
190
|
+
if (!y.value[m] && !j) {
|
|
191
|
+
m++;
|
|
195
192
|
continue;
|
|
196
|
-
} else y.value[
|
|
197
|
-
|
|
193
|
+
} else y.value[m] ? j || (G = m, j = !0) : (w.value = w.value.concat([G, m]), j = !1);
|
|
194
|
+
m++;
|
|
198
195
|
}
|
|
199
|
-
j && (w.value = w.value.concat([G,
|
|
200
|
-
let Ee = h[0], P =
|
|
196
|
+
j && (w.value = w.value.concat([G, m])), w.value = w.value.concat([5e3]);
|
|
197
|
+
let Ee = h[0], P = u.viewerChannels[e];
|
|
201
198
|
if (!P || P.id !== n) {
|
|
202
199
|
console.warn("TSScrubber: Channel configuration mismatch, skipping update");
|
|
203
200
|
return;
|
|
204
201
|
}
|
|
205
|
-
Ee < P.dataSegments[P.dataSegments.length - 1] && (h.shift(), h.shift()), P.dataSegments = P.dataSegments.concat(h.sort((M, J) => M - J)),
|
|
202
|
+
Ee < P.dataSegments[P.dataSegments.length - 1] && (h.shift(), h.shift()), P.dataSegments = P.dataSegments.concat(h.sort((M, J) => M - J)), u.updateChannelProperty(P.id, "dataSegments", P.dataSegments);
|
|
206
203
|
let ue = s - a;
|
|
207
204
|
a + ue < t.ts_end && r < i ? le(n, e, s, s + ue, r + 1) : F();
|
|
208
|
-
} catch (
|
|
209
|
-
console.error(`TSScrubber: Error fetching segments for channel ${n}:`,
|
|
205
|
+
} catch (S) {
|
|
206
|
+
console.error(`TSScrubber: Error fetching segments for channel ${n}:`, S), he(S);
|
|
210
207
|
}
|
|
211
208
|
}, B = async () => {
|
|
212
209
|
var e, a, s, r, i;
|
|
@@ -215,19 +212,19 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
215
212
|
console.warn("TSScrubber: Cannot get annotations - no active viewer ID"), D.value = [];
|
|
216
213
|
return;
|
|
217
214
|
}
|
|
218
|
-
if (!((s =
|
|
215
|
+
if (!((s = u.config) != null && s.apiUrl)) {
|
|
219
216
|
console.warn("TSScrubber: Cannot get annotations - no API URL configured"), D.value = [];
|
|
220
217
|
return;
|
|
221
218
|
}
|
|
222
|
-
if (!
|
|
219
|
+
if (!u.viewerAnnotations || u.viewerAnnotations.length === 0) {
|
|
223
220
|
console.log("TSScrubber: No annotation layers available, skipping annotation fetch"), D.value = [], A();
|
|
224
221
|
return;
|
|
225
222
|
}
|
|
226
223
|
try {
|
|
227
|
-
const o = await de(),
|
|
228
|
-
let h = `${
|
|
229
|
-
for (let
|
|
230
|
-
h = h + `&layerIds=${m
|
|
224
|
+
const o = await de(), S = Fe((m) => m.id, u.viewerAnnotations), _ = t.ts_end;
|
|
225
|
+
let h = `${u.config.apiUrl}/timeseries/${n}/annotations/window` + `?api_key=${o}&aggregation=count&start=${t.ts_start}&end=${t.ts_end}&period=${Ce.value}&mergePeriods=true`;
|
|
226
|
+
for (let m in S)
|
|
227
|
+
h = h + `&layerIds=${S[m]}`;
|
|
231
228
|
console.log(`TSScrubber: Fetching annotations for viewer ${n}`);
|
|
232
229
|
const d = await fe(h);
|
|
233
230
|
((i = (r = t.activeViewer) == null ? void 0 : r.content) == null ? void 0 : i.id) === n ? (D.value = d, A()) : console.log("TSScrubber: Ignoring annotation response - viewer changed during fetch");
|
|
@@ -284,7 +281,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
284
281
|
e.setTransform(f.value, 0, 0, f.value, 0, 0), e.clearRect(0, 0, t.cWidth, Z.value);
|
|
285
282
|
const a = t.ts_start, s = t.ts_end, r = D.value;
|
|
286
283
|
let i = 0;
|
|
287
|
-
const o = 0,
|
|
284
|
+
const o = 0, S = Math.floor((Z.value - 2) / Object.keys(r).length - o), _ = u.viewerAnnotations;
|
|
288
285
|
let b = "rgb(0,0,0)";
|
|
289
286
|
for (const h in r)
|
|
290
287
|
if (r.hasOwnProperty(h)) {
|
|
@@ -293,18 +290,18 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
293
290
|
i = d, b = _[d].color;
|
|
294
291
|
break;
|
|
295
292
|
}
|
|
296
|
-
Pe(e, a, s, o,
|
|
293
|
+
Pe(e, a, s, o, S, r[h], i, b);
|
|
297
294
|
}
|
|
298
|
-
}, Pe = (n, e, a, s, r, i, o,
|
|
295
|
+
}, Pe = (n, e, a, s, r, i, o, S) => {
|
|
299
296
|
E(() => {
|
|
300
|
-
n.setTransform(f.value, 0, 0, f.value, 0, 0), n.fillStyle =
|
|
297
|
+
n.setTransform(f.value, 0, 0, f.value, 0, 0), n.fillStyle = S;
|
|
301
298
|
for (let _ = 0; _ < i.length; _++)
|
|
302
299
|
if (i[_].value > 0) {
|
|
303
300
|
const b = (i[_].start - e) / (a - e) * t.cWidth;
|
|
304
301
|
let d = (i[_].end - e) / (a - e) * t.cWidth - b;
|
|
305
302
|
d < 1 && (d = 1);
|
|
306
|
-
const
|
|
307
|
-
n.fillRect(b,
|
|
303
|
+
const m = 1 + o * (r - 1 + s) + o;
|
|
304
|
+
n.fillRect(b, m, d, r);
|
|
308
305
|
}
|
|
309
306
|
});
|
|
310
307
|
}, Me = () => {
|
|
@@ -374,7 +371,7 @@ const Ge = { class: "timeseries-scrubber" }, Je = { class: "dateWrap" }, Ke = {
|
|
|
374
371
|
])
|
|
375
372
|
]));
|
|
376
373
|
}
|
|
377
|
-
},
|
|
374
|
+
}, st = /* @__PURE__ */ Xe(tt, [["__scopeId", "data-v-881659ce"]]);
|
|
378
375
|
export {
|
|
379
|
-
|
|
376
|
+
st as default
|
|
380
377
|
};
|