@pennsieve-viz/tsviewer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BFLibraryButton-BiLkvU6m.cjs +1 -0
- package/dist/BFLibraryButton-C6aAhW1T.js +72 -0
- package/dist/IconSelection-Bud2XLOy.js +37 -0
- package/dist/IconSelection-DGTELjPb.cjs +1 -0
- package/dist/TSAnnotationCanvas-C3-VI46n.cjs +1 -0
- package/dist/TSAnnotationCanvas-CMZHn8mY.js +729 -0
- package/dist/TSAnnotationModal-BcqWVXP_.js +199 -0
- package/dist/TSAnnotationModal-DskdoFo4.cjs +1 -0
- package/dist/TSFilterModal-BtLOK_nq.js +233 -0
- package/dist/TSFilterModal-DEOWfIi6.cjs +1 -0
- package/dist/TSScrubber-CTjzX-Xq.js +377 -0
- package/dist/TSScrubber-DAnIUBuC.cjs +1 -0
- package/dist/TSViewerCanvas-DkKV70m8.js +5731 -0
- package/dist/TSViewerCanvas-Jbu-Kh9F.cjs +11 -0
- package/dist/TSViewerLayerWindow-wHkjTl6e.cjs +1 -0
- package/dist/TSViewerLayerWindow-zI_48DIx.js +257 -0
- package/dist/TSViewerToolbar-BMZIlD4q.js +551 -0
- package/dist/TSViewerToolbar-C6yy7GJr.cjs +1 -0
- package/dist/TsAnnotationDeleteDialog-Be3AJIyo.cjs +1 -0
- package/dist/TsAnnotationDeleteDialog-Iwpo79Pe.js +245 -0
- package/dist/index-CGSfhm_E.cjs +1 -0
- package/dist/index-Cexzl5Xu.js +1317 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +6 -0
- package/dist/pathOr-D0158Gk1.cjs +1 -0
- package/dist/pathOr-Do2dduwx.js +18 -0
- package/dist/style.css +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { defineAsyncComponent as q, ref as r, watch as b, computed as m, resolveComponent as v, createBlock as g, openBlock as c, withCtx as f, createElementVNode as n, createVNode as d, unref as i, createElementBlock as k, Fragment as C, renderList as M, createTextVNode as T, toDisplayString as U } from "vue";
|
|
2
|
+
import { g as G, u as J, p as x } from "./index-Cexzl5Xu.js";
|
|
3
|
+
import { storeToRefs as K } from "pinia";
|
|
4
|
+
import { I as Q } from "./IconSelection-Bud2XLOy.js";
|
|
5
|
+
const X = { slot: "body" }, Z = { class: "select-wrapper" }, ee = { class: "range-type-selector" }, le = { class: "select-wrapper" }, te = { class: "description-wrapper" }, ae = { slot: "footer" }, ne = { class: "button-wrapper" }, oe = { class: "channels-selected" }, se = { class: "buttons" }, re = {
|
|
6
|
+
__name: "TSAnnotationModal",
|
|
7
|
+
props: {
|
|
8
|
+
visible: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
emits: ["closeWindow", "createUpdateAnnotation"],
|
|
14
|
+
setup(B, { emit: I }) {
|
|
15
|
+
const E = q(() => import("./BFLibraryButton-C6aAhW1T.js")), V = B, p = r(!1);
|
|
16
|
+
b(() => V.visible, (o) => {
|
|
17
|
+
if (p.value = o, !o) return;
|
|
18
|
+
const l = e.value.start / 1e3, u = e.value.end / 1e3;
|
|
19
|
+
A.value = {
|
|
20
|
+
start: e.value.start,
|
|
21
|
+
end: e.value.end
|
|
22
|
+
}, e.value.duration == 0 ? (s.value = !1, a.value = l) : (s.value = !0, a.value = [l, u]);
|
|
23
|
+
}, { immediate: !0 });
|
|
24
|
+
const _ = I, y = J(), {
|
|
25
|
+
activeAnnotation: e,
|
|
26
|
+
viewerChannels: ie,
|
|
27
|
+
viewerAnnotations: N
|
|
28
|
+
} = K(y);
|
|
29
|
+
r(null);
|
|
30
|
+
const O = r(null), R = r(!1), a = r(null), A = r({
|
|
31
|
+
start: 0,
|
|
32
|
+
end: 0
|
|
33
|
+
}), s = r(!0), D = r([
|
|
34
|
+
{ value: "Event", label: "Event" },
|
|
35
|
+
{ value: "Artifact", label: "Artifact" },
|
|
36
|
+
{ value: "Seizure", label: "Seizure" },
|
|
37
|
+
{ value: "Mark", label: "Mark" },
|
|
38
|
+
{ value: "Stim On", label: "Stim On" },
|
|
39
|
+
{ value: "Stim Off", label: "Stim Off" },
|
|
40
|
+
{ value: "Start", label: "Start" },
|
|
41
|
+
{ value: "Stop", label: "Stop" }
|
|
42
|
+
]), F = m(() => e.value.id ? "Edit Annotation" : "Create Annotation"), L = m(() => e.value.id ? "Update" : "Create"), Y = m(() => s.value ? "datetimerange" : "datetime"), P = m(() => {
|
|
43
|
+
let o = "";
|
|
44
|
+
return e.value.allChannels ? o = "Adding to all channels" : x([], "channelIds", e.value).length == 1 ? o = "Adding to single channel" : o = `Adding to ${x([], "channelIds", e.value).length} channels`, o;
|
|
45
|
+
});
|
|
46
|
+
b(() => V.visible, (o) => {
|
|
47
|
+
if (!o) return;
|
|
48
|
+
const l = e.value.start / 1e3, u = e.value.end / 1e3;
|
|
49
|
+
A.value = {
|
|
50
|
+
start: e.value.start,
|
|
51
|
+
end: e.value.end
|
|
52
|
+
}, e.value.duration == 0 ? (s.value = !1, a.value = l) : (s.value = !0, a.value = [l, u]);
|
|
53
|
+
}), b(s, (o) => {
|
|
54
|
+
const l = e.value.start / 1e3, u = e.value.end / 1e3;
|
|
55
|
+
o ? a.value = [l, u] : (e.value.duration = 0, a.value = l);
|
|
56
|
+
});
|
|
57
|
+
const W = () => {
|
|
58
|
+
if (!e.value.layer_id) {
|
|
59
|
+
console.error("No layer selected for annotation");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!a.value) {
|
|
63
|
+
console.error("No time range selected for annotation");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (s.value)
|
|
67
|
+
if (Array.isArray(a.value) && a.value.length >= 2)
|
|
68
|
+
e.value.start = a.value[0] * 1e3, e.value.end = a.value[1] * 1e3, e.value.duration = e.value.end - e.value.start;
|
|
69
|
+
else {
|
|
70
|
+
console.error("Invalid range value for range mode:", a.value);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
else if (typeof a.value == "number")
|
|
74
|
+
e.value.start = a.value * 1e3, e.value.end = a.value * 1e3, e.value.duration = 0;
|
|
75
|
+
else {
|
|
76
|
+
console.error("Invalid range value for point mode:", a.value);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
y.setActiveAnnotation(e.value), _("createUpdateAnnotation", e.value), S();
|
|
80
|
+
}, S = () => {
|
|
81
|
+
p.value = !1, _("closeWindow");
|
|
82
|
+
}, z = () => {
|
|
83
|
+
R.value = !1;
|
|
84
|
+
};
|
|
85
|
+
return (o, l) => {
|
|
86
|
+
const u = v("el-switch"), H = v("el-date-picker"), w = v("el-option"), h = v("el-select"), $ = v("el-input"), j = v("el-dialog");
|
|
87
|
+
return c(), g(j, {
|
|
88
|
+
class: "timeseries-annotation-modal",
|
|
89
|
+
ref: "annotation-modal",
|
|
90
|
+
title: F.value,
|
|
91
|
+
modelValue: p.value,
|
|
92
|
+
"onUpdate:modelValue": l[5] || (l[5] = (t) => {
|
|
93
|
+
p.value = t, t || _("closeWindow");
|
|
94
|
+
}),
|
|
95
|
+
onClose: S,
|
|
96
|
+
onClosed: z
|
|
97
|
+
}, {
|
|
98
|
+
default: f(() => [
|
|
99
|
+
n("div", X, [
|
|
100
|
+
n("div", Z, [
|
|
101
|
+
n("div", ee, [
|
|
102
|
+
l[6] || (l[6] = n("div", { class: "select-label" }, " Range? ", -1)),
|
|
103
|
+
d(u, {
|
|
104
|
+
modelValue: s.value,
|
|
105
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => s.value = t),
|
|
106
|
+
"active-color": "#5039F7",
|
|
107
|
+
"inactive-color": "#CAC5BF"
|
|
108
|
+
}, null, 8, ["modelValue"])
|
|
109
|
+
]),
|
|
110
|
+
d(H, {
|
|
111
|
+
modelValue: a.value,
|
|
112
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => a.value = t),
|
|
113
|
+
class: "date-time-picker",
|
|
114
|
+
type: Y.value,
|
|
115
|
+
format: "YYYY-MM-DD HH:mm:ss",
|
|
116
|
+
"value-format": "x",
|
|
117
|
+
"range-separator": "To",
|
|
118
|
+
"start-placeholder": "Start date/time",
|
|
119
|
+
"end-placeholder": "End date/time"
|
|
120
|
+
}, null, 8, ["modelValue", "type"])
|
|
121
|
+
]),
|
|
122
|
+
n("div", le, [
|
|
123
|
+
n("div", null, [
|
|
124
|
+
l[7] || (l[7] = n("div", { class: "select-label" }, " Annotation Layer ", -1)),
|
|
125
|
+
d(h, {
|
|
126
|
+
modelValue: i(e).layer_id,
|
|
127
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => i(e).layer_id = t),
|
|
128
|
+
placeholder: "Select"
|
|
129
|
+
}, {
|
|
130
|
+
default: f(() => [
|
|
131
|
+
(c(!0), k(C, null, M(i(N), (t) => (c(), g(w, {
|
|
132
|
+
key: t.id,
|
|
133
|
+
label: t.name,
|
|
134
|
+
value: t.id
|
|
135
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["modelValue"])
|
|
139
|
+
]),
|
|
140
|
+
n("div", null, [
|
|
141
|
+
l[8] || (l[8] = n("div", { class: "select-label" }, " Annotation Type ", -1)),
|
|
142
|
+
d(h, {
|
|
143
|
+
modelValue: i(e).label,
|
|
144
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => i(e).label = t),
|
|
145
|
+
placeholder: "Select"
|
|
146
|
+
}, {
|
|
147
|
+
default: f(() => [
|
|
148
|
+
(c(!0), k(C, null, M(D.value, (t) => (c(), g(w, {
|
|
149
|
+
key: t.value,
|
|
150
|
+
label: t.label,
|
|
151
|
+
value: t.value
|
|
152
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, ["modelValue"])
|
|
156
|
+
])
|
|
157
|
+
]),
|
|
158
|
+
n("div", te, [
|
|
159
|
+
l[9] || (l[9] = n("div", { class: "select-label" }, " Description ", -1)),
|
|
160
|
+
d($, {
|
|
161
|
+
ref_key: "input",
|
|
162
|
+
ref: O,
|
|
163
|
+
modelValue: i(e).description,
|
|
164
|
+
"onUpdate:modelValue": l[4] || (l[4] = (t) => i(e).description = t),
|
|
165
|
+
placeholder: "Please provide additional information...",
|
|
166
|
+
type: "textarea",
|
|
167
|
+
rows: 5
|
|
168
|
+
}, null, 8, ["modelValue"])
|
|
169
|
+
])
|
|
170
|
+
]),
|
|
171
|
+
n("div", ae, [
|
|
172
|
+
n("div", ne, [
|
|
173
|
+
n("div", oe, [
|
|
174
|
+
d(Q, {
|
|
175
|
+
class: "inline-icon",
|
|
176
|
+
height: 16,
|
|
177
|
+
width: 16
|
|
178
|
+
}),
|
|
179
|
+
T(" " + U(P.value), 1)
|
|
180
|
+
]),
|
|
181
|
+
n("div", se, [
|
|
182
|
+
d(i(E), { onClick: W }, {
|
|
183
|
+
default: f(() => [
|
|
184
|
+
T(U(L.value), 1)
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})
|
|
188
|
+
])
|
|
189
|
+
])
|
|
190
|
+
])
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["title", "modelValue"]);
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}, pe = /* @__PURE__ */ G(re, [["__scopeId", "data-v-d74b3ef8"]]);
|
|
197
|
+
export {
|
|
198
|
+
pe as default
|
|
199
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CGSfhm_E.cjs"),U=require("pinia"),I=require("./IconSelection-DGTELjPb.cjs"),O={slot:"body"},q={class:"select-wrapper"},D={class:"range-type-selector"},F={class:"select-wrapper"},L={class:"description-wrapper"},P={slot:"footer"},R={class:"button-wrapper"},Y={class:"channels-selected"},W={class:"buttons"},z={__name:"TSAnnotationModal",props:{visible:{type:Boolean,default:!1}},emits:["closeWindow","createUpdateAnnotation"],setup(_,{emit:b}){const g=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BFLibraryButton-BiLkvU6m.cjs"))),c=_,i=e.ref(!1);e.watch(()=>c.visible,n=>{if(i.value=n,!n)return;const l=t.value.start/1e3,s=t.value.end/1e3;p.value={start:t.value.start,end:t.value.end},t.value.duration==0?(r.value=!1,o.value=l):(r.value=!0,o.value=[l,s])},{immediate:!0});const d=b,v=u.useViewerStore(),{activeAnnotation:t,viewerChannels:j,viewerAnnotations:N}=U.storeToRefs(v);e.ref(null);const y=e.ref(null),S=e.ref(!1),o=e.ref(null),p=e.ref({start:0,end:0}),r=e.ref(!0),h=e.ref([{value:"Event",label:"Event"},{value:"Artifact",label:"Artifact"},{value:"Seizure",label:"Seizure"},{value:"Mark",label:"Mark"},{value:"Stim On",label:"Stim On"},{value:"Stim Off",label:"Stim Off"},{value:"Start",label:"Start"},{value:"Stop",label:"Stop"}]),w=e.computed(()=>t.value.id?"Edit Annotation":"Create Annotation"),A=e.computed(()=>t.value.id?"Update":"Create"),C=e.computed(()=>r.value?"datetimerange":"datetime"),E=e.computed(()=>{let n="";return t.value.allChannels?n="Adding to all channels":u.propOr([],"channelIds",t.value).length==1?n="Adding to single channel":n=`Adding to ${u.propOr([],"channelIds",t.value).length} channels`,n});e.watch(()=>c.visible,n=>{if(!n)return;const l=t.value.start/1e3,s=t.value.end/1e3;p.value={start:t.value.start,end:t.value.end},t.value.duration==0?(r.value=!1,o.value=l):(r.value=!0,o.value=[l,s])}),e.watch(r,n=>{const l=t.value.start/1e3,s=t.value.end/1e3;n?o.value=[l,s]:(t.value.duration=0,o.value=l)});const k=()=>{if(!t.value.layer_id){console.error("No layer selected for annotation");return}if(!o.value){console.error("No time range selected for annotation");return}if(r.value)if(Array.isArray(o.value)&&o.value.length>=2)t.value.start=o.value[0]*1e3,t.value.end=o.value[1]*1e3,t.value.duration=t.value.end-t.value.start;else{console.error("Invalid range value for range mode:",o.value);return}else if(typeof o.value=="number")t.value.start=o.value*1e3,t.value.end=o.value*1e3,t.value.duration=0;else{console.error("Invalid range value for point mode:",o.value);return}v.setActiveAnnotation(t.value),d("createUpdateAnnotation",t.value),m()},m=()=>{i.value=!1,d("closeWindow")},B=()=>{S.value=!1};return(n,l)=>{const s=e.resolveComponent("el-switch"),M=e.resolveComponent("el-date-picker"),f=e.resolveComponent("el-option"),V=e.resolveComponent("el-select"),x=e.resolveComponent("el-input"),T=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(T,{class:"timeseries-annotation-modal",ref:"annotation-modal",title:w.value,modelValue:i.value,"onUpdate:modelValue":l[5]||(l[5]=a=>{i.value=a,a||d("closeWindow")}),onClose:m,onClosed:B},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createElementVNode("div",q,[e.createElementVNode("div",D,[l[6]||(l[6]=e.createElementVNode("div",{class:"select-label"}," Range? ",-1)),e.createVNode(s,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=a=>r.value=a),"active-color":"#5039F7","inactive-color":"#CAC5BF"},null,8,["modelValue"])]),e.createVNode(M,{modelValue:o.value,"onUpdate:modelValue":l[1]||(l[1]=a=>o.value=a),class:"date-time-picker",type:C.value,format:"YYYY-MM-DD HH:mm:ss","value-format":"x","range-separator":"To","start-placeholder":"Start date/time","end-placeholder":"End date/time"},null,8,["modelValue","type"])]),e.createElementVNode("div",F,[e.createElementVNode("div",null,[l[7]||(l[7]=e.createElementVNode("div",{class:"select-label"}," Annotation Layer ",-1)),e.createVNode(V,{modelValue:e.unref(t).layer_id,"onUpdate:modelValue":l[2]||(l[2]=a=>e.unref(t).layer_id=a),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N),a=>(e.openBlock(),e.createBlock(f,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",null,[l[8]||(l[8]=e.createElementVNode("div",{class:"select-label"}," Annotation Type ",-1)),e.createVNode(V,{modelValue:e.unref(t).label,"onUpdate:modelValue":l[3]||(l[3]=a=>e.unref(t).label=a),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createBlock(f,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),e.createElementVNode("div",L,[l[9]||(l[9]=e.createElementVNode("div",{class:"select-label"}," Description ",-1)),e.createVNode(x,{ref_key:"input",ref:y,modelValue:e.unref(t).description,"onUpdate:modelValue":l[4]||(l[4]=a=>e.unref(t).description=a),placeholder:"Please provide additional information...",type:"textarea",rows:5},null,8,["modelValue"])])]),e.createElementVNode("div",P,[e.createElementVNode("div",R,[e.createElementVNode("div",Y,[e.createVNode(I.IconSelection,{class:"inline-icon",height:16,width:16}),e.createTextVNode(" "+e.toDisplayString(E.value),1)]),e.createElementVNode("div",W,[e.createVNode(e.unref(g),{onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.value),1)]),_:1})])])])]),_:1},8,["title","modelValue"])}}},H=u._export_sfc(z,[["__scopeId","data-v-d74b3ef8"]]);exports.default=H;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { I as F } from "./IconSelection-Bud2XLOy.js";
|
|
2
|
+
import { resolveComponent as s, createBlock as c, openBlock as o, withCtx as r, createElementVNode as a, createVNode as u, createElementBlock as i, toDisplayString as d, createTextVNode as p, createCommentVNode as h, Fragment as v, renderList as g } from "vue";
|
|
3
|
+
import { g as y } from "./index-Cexzl5Xu.js";
|
|
4
|
+
const k = {
|
|
5
|
+
name: "TimeseriesFilterModal",
|
|
6
|
+
components: {
|
|
7
|
+
"bf-library-button": () => import("./BFLibraryButton-C6aAhW1T.js"),
|
|
8
|
+
IconSelection: F
|
|
9
|
+
},
|
|
10
|
+
mixins: [],
|
|
11
|
+
watch: {},
|
|
12
|
+
computed: {
|
|
13
|
+
computeVisible0: function() {
|
|
14
|
+
switch (this.selectedFilter) {
|
|
15
|
+
case "lowpass":
|
|
16
|
+
return !0;
|
|
17
|
+
case "highpass":
|
|
18
|
+
return !0;
|
|
19
|
+
case "bandpass":
|
|
20
|
+
return !0;
|
|
21
|
+
default:
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
onSingleChannel: function() {
|
|
26
|
+
return this.onChannels.length == 1;
|
|
27
|
+
},
|
|
28
|
+
selectedChannels: function() {
|
|
29
|
+
return this.onChannels.length;
|
|
30
|
+
},
|
|
31
|
+
computeVisible1: function() {
|
|
32
|
+
switch (this.selectedFilter) {
|
|
33
|
+
case "lowpass":
|
|
34
|
+
return !1;
|
|
35
|
+
case "highpass":
|
|
36
|
+
return !1;
|
|
37
|
+
case "bandpass":
|
|
38
|
+
return !0;
|
|
39
|
+
default:
|
|
40
|
+
return !1;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computeVisible2: function() {
|
|
44
|
+
switch (this.selectedFilter) {
|
|
45
|
+
case "bandstop":
|
|
46
|
+
return !0;
|
|
47
|
+
default:
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
computePlaceholder1: function(l) {
|
|
52
|
+
switch (this.selectedFilter) {
|
|
53
|
+
case "lowpass":
|
|
54
|
+
return "Low Pass Cutoff Frequency (Hz)";
|
|
55
|
+
case "highpass":
|
|
56
|
+
return "High Pass Cutoff Frequency (Hz)";
|
|
57
|
+
case "bandpass":
|
|
58
|
+
return "Low Pass Cutoff Frequency (Hz)";
|
|
59
|
+
default:
|
|
60
|
+
return "";
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
computePlaceholder2: function(l) {
|
|
64
|
+
switch (this.selectedFilter) {
|
|
65
|
+
case "bandpass":
|
|
66
|
+
return "High Pass Cutoff Frequency (Hz)";
|
|
67
|
+
default:
|
|
68
|
+
return "";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
props: {
|
|
73
|
+
visible: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
data: function() {
|
|
79
|
+
return {
|
|
80
|
+
selectedFilter: null,
|
|
81
|
+
filterOptions: [
|
|
82
|
+
{
|
|
83
|
+
label: "No Filter",
|
|
84
|
+
value: "clear"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: "Low Pass",
|
|
88
|
+
value: "lowpass"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "High Pass",
|
|
92
|
+
value: "highpass"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: "Band Pass",
|
|
96
|
+
value: "bandpass"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: "Notch",
|
|
100
|
+
value: "bandstop"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
selectedNotch: null,
|
|
104
|
+
notchOptions: [
|
|
105
|
+
{
|
|
106
|
+
label: "50Hz",
|
|
107
|
+
value: 50
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: "60Hz",
|
|
111
|
+
value: 60
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
input0: null,
|
|
115
|
+
input1: null,
|
|
116
|
+
onChannels: []
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
methods: {
|
|
120
|
+
close: function() {
|
|
121
|
+
this.$emit("closeWindow");
|
|
122
|
+
},
|
|
123
|
+
handleChange: function() {
|
|
124
|
+
},
|
|
125
|
+
onButtonClick: function() {
|
|
126
|
+
},
|
|
127
|
+
submitForm: function(l) {
|
|
128
|
+
this.$emit("closeWindow");
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}, S = { slot: "body" }, P = { class: "select-wrapper" }, H = {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "filter-input-wrapper"
|
|
134
|
+
}, N = {
|
|
135
|
+
key: 1,
|
|
136
|
+
class: "filter-input-wrapper"
|
|
137
|
+
}, I = { slot: "footer" }, z = { class: "button-wrapper" }, B = { class: "channels-selected" }, U = { key: 0 }, q = { key: 1 }, L = { class: "buttons" };
|
|
138
|
+
function O(l, t, f, T, A, n) {
|
|
139
|
+
const m = s("el-option"), b = s("el-select"), _ = s("el-input-number"), C = s("IconSelection"), V = s("bf-library-button"), w = s("el-dialog");
|
|
140
|
+
return o(), c(w, {
|
|
141
|
+
class: "timeseries-filter-modal",
|
|
142
|
+
ref: "filter-modal",
|
|
143
|
+
title: "Set Filter",
|
|
144
|
+
modelValue: f.visible,
|
|
145
|
+
"onUpdate:modelValue": t[4] || (t[4] = (e) => f.visible = e),
|
|
146
|
+
onClose: n.close
|
|
147
|
+
}, {
|
|
148
|
+
default: r(() => [
|
|
149
|
+
a("div", S, [
|
|
150
|
+
a("div", P, [
|
|
151
|
+
u(b, {
|
|
152
|
+
modelValue: l.selectedFilter,
|
|
153
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => l.selectedFilter = e),
|
|
154
|
+
placeholder: "Select"
|
|
155
|
+
}, {
|
|
156
|
+
default: r(() => [
|
|
157
|
+
(o(!0), i(v, null, g(l.filterOptions, (e) => (o(), c(m, {
|
|
158
|
+
key: e.value,
|
|
159
|
+
label: e.label,
|
|
160
|
+
value: e.value
|
|
161
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["modelValue"]),
|
|
165
|
+
n.computeVisible0 ? (o(), i("div", H, [
|
|
166
|
+
p(d(n.computePlaceholder1) + " ", 1),
|
|
167
|
+
u(_, {
|
|
168
|
+
class: "filterInput",
|
|
169
|
+
modelValue: l.input0,
|
|
170
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => l.input0 = e),
|
|
171
|
+
"controls-position": "right",
|
|
172
|
+
precision: 2,
|
|
173
|
+
onChange: n.handleChange
|
|
174
|
+
}, null, 8, ["modelValue", "onChange"])
|
|
175
|
+
])) : h("", !0),
|
|
176
|
+
n.computeVisible1 ? (o(), i("div", N, [
|
|
177
|
+
p(d(n.computePlaceholder2) + " ", 1),
|
|
178
|
+
u(_, {
|
|
179
|
+
class: "filterInput",
|
|
180
|
+
modelValue: l.input1,
|
|
181
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => l.input1 = e),
|
|
182
|
+
"controls-position": "right",
|
|
183
|
+
precision: 2,
|
|
184
|
+
onChange: n.handleChange
|
|
185
|
+
}, null, 8, ["modelValue", "onChange"])
|
|
186
|
+
])) : h("", !0),
|
|
187
|
+
n.computeVisible2 ? (o(), c(b, {
|
|
188
|
+
key: 2,
|
|
189
|
+
modelValue: l.selectedNotch,
|
|
190
|
+
"onUpdate:modelValue": t[3] || (t[3] = (e) => l.selectedNotch = e),
|
|
191
|
+
placeholder: "Select",
|
|
192
|
+
class: "filter-input-wrapper"
|
|
193
|
+
}, {
|
|
194
|
+
default: r(() => [
|
|
195
|
+
(o(!0), i(v, null, g(l.notchOptions, (e) => (o(), c(m, {
|
|
196
|
+
key: e.value,
|
|
197
|
+
label: e.label,
|
|
198
|
+
value: e.value
|
|
199
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["modelValue"])) : h("", !0)
|
|
203
|
+
])
|
|
204
|
+
])
|
|
205
|
+
]),
|
|
206
|
+
footer: r(() => [
|
|
207
|
+
a("div", I, [
|
|
208
|
+
a("div", z, [
|
|
209
|
+
a("div", B, [
|
|
210
|
+
u(C, {
|
|
211
|
+
height: 24,
|
|
212
|
+
width: 24
|
|
213
|
+
}),
|
|
214
|
+
n.onSingleChannel ? (o(), i("div", U, " Adding to single channel ")) : (o(), i("div", q, " Adding to " + d(n.selectedChannels) + " Selected Channels ", 1))
|
|
215
|
+
]),
|
|
216
|
+
a("div", L, [
|
|
217
|
+
u(V, { onClick: n.submitForm }, {
|
|
218
|
+
default: r(() => [...t[5] || (t[5] = [
|
|
219
|
+
p("Set Filter ", -1)
|
|
220
|
+
])]),
|
|
221
|
+
_: 1
|
|
222
|
+
}, 8, ["onClick"])
|
|
223
|
+
])
|
|
224
|
+
])
|
|
225
|
+
])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["modelValue", "onClose"]);
|
|
229
|
+
}
|
|
230
|
+
const D = /* @__PURE__ */ y(k, [["render", O], ["__scopeId", "data-v-7546755f"]]);
|
|
231
|
+
export {
|
|
232
|
+
D as default
|
|
233
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./IconSelection-DGTELjPb.cjs"),e=require("vue"),m=require("./index-CGSfhm_E.cjs"),h={name:"TimeseriesFilterModal",components:{"bf-library-button":()=>Promise.resolve().then(()=>require("./BFLibraryButton-BiLkvU6m.cjs")),IconSelection:p.IconSelection},mixins:[],watch:{},computed:{computeVisible0:function(){switch(this.selectedFilter){case"lowpass":return!0;case"highpass":return!0;case"bandpass":return!0;default:return!1}},onSingleChannel:function(){return this.onChannels.length==1},selectedChannels:function(){return this.onChannels.length},computeVisible1:function(){switch(this.selectedFilter){case"lowpass":return!1;case"highpass":return!1;case"bandpass":return!0;default:return!1}},computeVisible2:function(){switch(this.selectedFilter){case"bandstop":return!0;default:return!1}},computePlaceholder1:function(l){switch(this.selectedFilter){case"lowpass":return"Low Pass Cutoff Frequency (Hz)";case"highpass":return"High Pass Cutoff Frequency (Hz)";case"bandpass":return"Low Pass Cutoff Frequency (Hz)";default:return""}},computePlaceholder2:function(l){switch(this.selectedFilter){case"bandpass":return"High Pass Cutoff Frequency (Hz)";default:return""}}},props:{visible:{type:Boolean,default:!1}},data:function(){return{selectedFilter:null,filterOptions:[{label:"No Filter",value:"clear"},{label:"Low Pass",value:"lowpass"},{label:"High Pass",value:"highpass"},{label:"Band Pass",value:"bandpass"},{label:"Notch",value:"bandstop"}],selectedNotch:null,notchOptions:[{label:"50Hz",value:50},{label:"60Hz",value:60}],input0:null,input1:null,onChannels:[]}},methods:{close:function(){this.$emit("closeWindow")},handleChange:function(){},onButtonClick:function(){},submitForm:function(l){this.$emit("closeWindow")}}},f={slot:"body"},b={class:"select-wrapper"},v={key:0,class:"filter-input-wrapper"},C={key:1,class:"filter-input-wrapper"},V={slot:"footer"},g={class:"button-wrapper"},_={class:"channels-selected"},k={key:0},w={key:1},B={class:"buttons"};function N(l,n,s,F,S,o){const a=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),i=e.resolveComponent("el-input-number"),c=e.resolveComponent("IconSelection"),u=e.resolveComponent("bf-library-button"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(d,{class:"timeseries-filter-modal",ref:"filter-modal",title:"Set Filter",modelValue:s.visible,"onUpdate:modelValue":n[4]||(n[4]=t=>s.visible=t),onClose:o.close},{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.createElementVNode("div",b,[e.createVNode(r,{modelValue:l.selectedFilter,"onUpdate:modelValue":n[0]||(n[0]=t=>l.selectedFilter=t),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.filterOptions,t=>(e.openBlock(),e.createBlock(a,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o.computeVisible0?(e.openBlock(),e.createElementBlock("div",v,[e.createTextVNode(e.toDisplayString(o.computePlaceholder1)+" ",1),e.createVNode(i,{class:"filterInput",modelValue:l.input0,"onUpdate:modelValue":n[1]||(n[1]=t=>l.input0=t),"controls-position":"right",precision:2,onChange:o.handleChange},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),o.computeVisible1?(e.openBlock(),e.createElementBlock("div",C,[e.createTextVNode(e.toDisplayString(o.computePlaceholder2)+" ",1),e.createVNode(i,{class:"filterInput",modelValue:l.input1,"onUpdate:modelValue":n[2]||(n[2]=t=>l.input1=t),"controls-position":"right",precision:2,onChange:o.handleChange},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),o.computeVisible2?(e.openBlock(),e.createBlock(r,{key:2,modelValue:l.selectedNotch,"onUpdate:modelValue":n[3]||(n[3]=t=>l.selectedNotch=t),placeholder:"Select",class:"filter-input-wrapper"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.notchOptions,t=>(e.openBlock(),e.createBlock(a,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])])]),footer:e.withCtx(()=>[e.createElementVNode("div",V,[e.createElementVNode("div",g,[e.createElementVNode("div",_,[e.createVNode(c,{height:24,width:24}),o.onSingleChannel?(e.openBlock(),e.createElementBlock("div",k," Adding to single channel ")):(e.openBlock(),e.createElementBlock("div",w," Adding to "+e.toDisplayString(o.selectedChannels)+" Selected Channels ",1))]),e.createElementVNode("div",B,[e.createVNode(u,{onClick:o.submitForm},{default:e.withCtx(()=>[...n[5]||(n[5]=[e.createTextVNode("Set Filter ",-1)])]),_:1},8,["onClick"])])])])]),_:1},8,["modelValue","onClose"])}const y=m._export_sfc(h,[["render",N],["__scopeId","data-v-7546755f"]]);exports.default=y;
|