@insync-stageplayer/plotly-chart 0.5.35-beta.1 → 0.5.35
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/lib/Plotly.d.ts +5 -0
- package/lib/Plotly.d.ts.map +1 -0
- package/lib/Plotly.js +338 -0
- package/lib/Plotly.js.map +1 -0
- package/lib/PlotlyGraph/EventMenu.d.ts +12 -12
- package/lib/PlotlyGraph/EventMenu.js +65 -65
- package/lib/PlotlyGraph/MarkerTracks.d.ts +16 -16
- package/lib/PlotlyGraph/MarkerTracks.d.ts.map +1 -1
- package/lib/PlotlyGraph/MarkerTracks.js +239 -241
- package/lib/PlotlyGraph/MarkerTracks.js.map +1 -1
- package/lib/PlotlyGraph/Plotly.d.ts +5 -0
- package/lib/PlotlyGraph/Plotly.d.ts.map +1 -0
- package/lib/PlotlyGraph/Plotly.js +347 -0
- package/lib/PlotlyGraph/Plotly.js.map +1 -0
- package/lib/PlotlyGraph/PlotlyLiveview.d.ts +4 -4
- package/lib/PlotlyGraph/PlotlyLiveview.js +297 -297
- package/lib/PlotlyGraph/PlotlyPlayback.d.ts +4 -4
- package/lib/PlotlyGraph/PlotlyPlayback.d.ts.map +1 -1
- package/lib/PlotlyGraph/PlotlyPlayback.js +308 -524
- package/lib/PlotlyGraph/PlotlyPlayback.js.map +1 -1
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.d.ts +22 -22
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.d.ts.map +1 -1
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.js +146 -145
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.js.map +1 -1
- package/lib/PlotlyGraph/index.d.ts +2 -2
- package/lib/PlotlyGraph/index.d.ts.map +1 -1
- package/lib/PlotlyGraph/index.js +2 -2
- package/lib/PlotlyGraph/index.js.map +1 -1
- package/lib/PlotlyLiveview.d.ts +5 -0
- package/lib/PlotlyLiveview.d.ts.map +1 -0
- package/lib/PlotlyLiveview.js +310 -0
- package/lib/PlotlyLiveview.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -5
package/lib/Plotly.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const PlotlyChart: React.ForwardRefExoticComponent<Pick<Omit<Omit<Omit<any, "targetRef"> & {
|
|
2
|
+
targetRef?: any;
|
|
3
|
+
}, "width">, "height">, string | number | symbol> & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
import React from "react";
|
|
5
|
+
//# sourceMappingURL=Plotly.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plotly.d.ts","sourceRoot":"","sources":["../src/Plotly.js"],"names":[],"mappings":"AAiDA;;sFAmTE"}
|
package/lib/Plotly.js
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
2
|
+
import Plot from "react-plotly.js";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { withResizeDetector } from "react-resize-detector";
|
|
5
|
+
import { useTheme as useSelectedTheme, styled, } from "@insync-stageplayer/ui-components";
|
|
6
|
+
const normalizeRange = 1000;
|
|
7
|
+
const convertMicrosecondstoDateFormat = (inputMicroseconds) => {
|
|
8
|
+
let convertedDate = new Date(+inputMicroseconds / 1000);
|
|
9
|
+
return adjustWithLocalTimeZone(convertedDate);
|
|
10
|
+
};
|
|
11
|
+
const adjustWithLocalTimeZone = (date) => {
|
|
12
|
+
let adjustedDate = new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
|
|
13
|
+
return adjustedDate;
|
|
14
|
+
};
|
|
15
|
+
const convertDateToMicroseconds = (inputDate) => {
|
|
16
|
+
const convertIntoDate = new Date(inputDate);
|
|
17
|
+
return (convertIntoDate.getTime() * 1000 -
|
|
18
|
+
convertIntoDate.getTimezoneOffset() * 60 * 1000 * 1000);
|
|
19
|
+
};
|
|
20
|
+
const getMicroSecondStartAndLength = (originalFromDate, originalStopDate) => {
|
|
21
|
+
const start = convertDateToMicroseconds(originalFromDate);
|
|
22
|
+
const end = convertDateToMicroseconds(originalStopDate);
|
|
23
|
+
const length = end - start;
|
|
24
|
+
return [start, length];
|
|
25
|
+
};
|
|
26
|
+
// update some cursors to be more clear
|
|
27
|
+
const StyledPlotly = styled(Plot) `
|
|
28
|
+
rect.nsewdrag.cursor-ew-resize {
|
|
29
|
+
cursor: zoom-in;
|
|
30
|
+
}
|
|
31
|
+
rect.ewdrag.cursor-ew-resize {
|
|
32
|
+
cursor: grab;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
export const PlotlyChart = withResizeDetector(({ xRange, data, metadata, onStopSelect, onDrag, xScaleTickFormat, scrubbing, yAxisLabel, displaySecondYAxis, displayArrow, isLivePanel, totalTime, }) => {
|
|
36
|
+
var _a;
|
|
37
|
+
const [plotData, setPlotData] = useState([]);
|
|
38
|
+
const [nowLine, setNowline] = useState(isLivePanel ? 1 : (_a = sessionStorage.getItem("nl")) !== null && _a !== void 0 ? _a : 0);
|
|
39
|
+
const [layout, setLayout] = useState(null);
|
|
40
|
+
const selectedTheme = useSelectedTheme();
|
|
41
|
+
const [yAxisLabelLeft, setYAxisLabelLeft] = useState("");
|
|
42
|
+
const [yAxisLabelRight, setYAxisLabelRight] = useState("");
|
|
43
|
+
const updateLayout = useCallback(() => {
|
|
44
|
+
let annotations = [
|
|
45
|
+
{
|
|
46
|
+
xref: "paper",
|
|
47
|
+
yref: "paper",
|
|
48
|
+
x: nowLine,
|
|
49
|
+
xanchor: "right",
|
|
50
|
+
y: 1,
|
|
51
|
+
yanchor: "bottom",
|
|
52
|
+
text: "",
|
|
53
|
+
showarrow: displayArrow,
|
|
54
|
+
arrowhead: 0,
|
|
55
|
+
ax: 0,
|
|
56
|
+
ay: 1000,
|
|
57
|
+
arrowcolor: "red",
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
const convertXRangeFrom = xScaleTickFormat.includes(":")
|
|
61
|
+
? convertMicrosecondstoDateFormat(xRange.from > 0
|
|
62
|
+
? xRange.length === totalTime
|
|
63
|
+
? 0
|
|
64
|
+
: xRange.from + xRange.length > totalTime
|
|
65
|
+
? totalTime - xRange.length
|
|
66
|
+
: xRange.from
|
|
67
|
+
: 0)
|
|
68
|
+
: xRange.from / 1e6;
|
|
69
|
+
const convertXRangeTo = xScaleTickFormat.includes(":")
|
|
70
|
+
? convertMicrosecondstoDateFormat(xRange.from > 0
|
|
71
|
+
? xRange.length === totalTime
|
|
72
|
+
? xRange.length
|
|
73
|
+
: xRange.from + xRange.length > totalTime
|
|
74
|
+
? totalTime
|
|
75
|
+
: xRange.from + xRange.length
|
|
76
|
+
: xRange.length)
|
|
77
|
+
: (xRange.from + xRange.length) / 1e6;
|
|
78
|
+
let defaultLayout = {
|
|
79
|
+
// this hovermode setting creates a hover-over legend for all the signals at the same time. It also adds a spike line
|
|
80
|
+
hovermode: "x unified",
|
|
81
|
+
yaxis: {
|
|
82
|
+
fixedrange: true,
|
|
83
|
+
rangemode: isLivePanel ? "tozero" : "",
|
|
84
|
+
hoverformat: ".2f",
|
|
85
|
+
range: [],
|
|
86
|
+
title: yAxisLabelLeft,
|
|
87
|
+
showline: true,
|
|
88
|
+
showticklabels: isLivePanel ? false : true,
|
|
89
|
+
linewidth: 2,
|
|
90
|
+
linecolor: selectedTheme.colors.accent,
|
|
91
|
+
tickformat: null,
|
|
92
|
+
},
|
|
93
|
+
xaxis: {
|
|
94
|
+
rangemode: isLivePanel ? "tozero" : "",
|
|
95
|
+
showline: isLivePanel ? true : false,
|
|
96
|
+
linewidth: 2,
|
|
97
|
+
linecolor: selectedTheme.colors.accent,
|
|
98
|
+
fixedrange: isLivePanel ? true : false,
|
|
99
|
+
range: [convertXRangeFrom, convertXRangeTo],
|
|
100
|
+
tickformat: xScaleTickFormat.includes(":") ? "%H:%M:%S" : null,
|
|
101
|
+
},
|
|
102
|
+
showlegend: false,
|
|
103
|
+
autosize: true,
|
|
104
|
+
margin: { l: 25, r: 10, t: 20, b: 20 },
|
|
105
|
+
paper_bgcolor: selectedTheme.colors.background,
|
|
106
|
+
plot_bgcolor: selectedTheme.colors.background,
|
|
107
|
+
font: { color: selectedTheme.colors.foreground },
|
|
108
|
+
};
|
|
109
|
+
// Check if a second y-axis needs to be added
|
|
110
|
+
if (displaySecondYAxis && metadata.length == 2) {
|
|
111
|
+
const yAxis2 = {
|
|
112
|
+
fixedrange: true,
|
|
113
|
+
title: yAxisLabelRight,
|
|
114
|
+
anchor: "x",
|
|
115
|
+
overlaying: "y",
|
|
116
|
+
side: "right",
|
|
117
|
+
};
|
|
118
|
+
defaultLayout = Object.assign(Object.assign({}, defaultLayout), { yaxis2: yAxis2 });
|
|
119
|
+
}
|
|
120
|
+
// when scrubbing plotly is in charge, this to prevent the xRange to update and mess while
|
|
121
|
+
// still scrubbing in plotly
|
|
122
|
+
if (!scrubbing) {
|
|
123
|
+
setLayout(Object.assign(Object.assign({}, defaultLayout), { annotations }));
|
|
124
|
+
}
|
|
125
|
+
}, [
|
|
126
|
+
selectedTheme,
|
|
127
|
+
xRange,
|
|
128
|
+
xScaleTickFormat,
|
|
129
|
+
yAxisLabelLeft,
|
|
130
|
+
yAxisLabelRight,
|
|
131
|
+
displaySecondYAxis,
|
|
132
|
+
displayArrow,
|
|
133
|
+
scrubbing,
|
|
134
|
+
metadata,
|
|
135
|
+
nowLine,
|
|
136
|
+
]);
|
|
137
|
+
const onRelayout = (e) => {
|
|
138
|
+
if (e["xaxis.range[0]"] && e["xaxis.range[1]"]) {
|
|
139
|
+
let selection;
|
|
140
|
+
if (xScaleTickFormat.includes(":")) {
|
|
141
|
+
const [from, length] = getMicroSecondStartAndLength(e["xaxis.range[0]"], e["xaxis.range[1]"]);
|
|
142
|
+
selection = {
|
|
143
|
+
from: from,
|
|
144
|
+
length: length,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
selection = {
|
|
149
|
+
from: e["xaxis.range[0]"] * 1e6,
|
|
150
|
+
length: (e["xaxis.range[1]"] - e["xaxis.range[0]"]) * 1e6,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
onStopSelect({ selection });
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const onRelayouting = (e) => {
|
|
157
|
+
if (e["xaxis.range[0]"] && e["xaxis.range[1]"]) {
|
|
158
|
+
let seekTime;
|
|
159
|
+
if (xScaleTickFormat.includes(":")) {
|
|
160
|
+
const [from, length] = getMicroSecondStartAndLength(e["xaxis.range[0]"], e["xaxis.range[1]"]);
|
|
161
|
+
seekTime = (length / 2 + from) * 1e6;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
seekTime =
|
|
165
|
+
((e["xaxis.range[1]"] - e["xaxis.range[0]"]) / 2 +
|
|
166
|
+
e["xaxis.range[0]"]) *
|
|
167
|
+
1e6;
|
|
168
|
+
}
|
|
169
|
+
onDrag(seekTime);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
updateLayout();
|
|
174
|
+
const plotDataArr = [];
|
|
175
|
+
data.forEach((signal, idx) => {
|
|
176
|
+
const x = signal.map((item) => {
|
|
177
|
+
if (xScaleTickFormat.includes(":")) {
|
|
178
|
+
const xDateFormatted = convertMicrosecondstoDateFormat(+item.x);
|
|
179
|
+
return xDateFormatted;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const xDateFormatted = +item.x / 1e6;
|
|
183
|
+
return xDateFormatted;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
const y = signal.map((item) => {
|
|
187
|
+
return item.y;
|
|
188
|
+
});
|
|
189
|
+
const signalData = {
|
|
190
|
+
x,
|
|
191
|
+
y,
|
|
192
|
+
type: "scattergl",
|
|
193
|
+
hovertemplate: "vijay",
|
|
194
|
+
mode: metadata[idx].frequency * (xRange.length / 1000 / 1000) > 250
|
|
195
|
+
? "lines"
|
|
196
|
+
: "lines+markers",
|
|
197
|
+
name: metadata[idx].name,
|
|
198
|
+
marker: {
|
|
199
|
+
color: metadata[idx].color,
|
|
200
|
+
size: 5,
|
|
201
|
+
line: {
|
|
202
|
+
color: metadata[idx].color,
|
|
203
|
+
width: 1,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
plotDataArr.push(signalData);
|
|
208
|
+
});
|
|
209
|
+
console.log("iam in insync");
|
|
210
|
+
// Check if a second y-axis needs to be added
|
|
211
|
+
if (displaySecondYAxis && metadata.length == 2) {
|
|
212
|
+
plotDataArr[1] = Object.assign(Object.assign({}, plotDataArr[1]), { yaxis: "y2" });
|
|
213
|
+
}
|
|
214
|
+
// Setting y-axis labels if needed and meeting the requirements
|
|
215
|
+
if (metadata.length == 1) {
|
|
216
|
+
setYAxisLabelLeft(yAxisLabel ? metadata[0].name : "");
|
|
217
|
+
}
|
|
218
|
+
else if (metadata.length == 2 && displaySecondYAxis) {
|
|
219
|
+
setYAxisLabelLeft(yAxisLabel ? metadata[0].name : "");
|
|
220
|
+
setYAxisLabelRight(yAxisLabel ? metadata[1].name : "");
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
setYAxisLabelLeft("");
|
|
224
|
+
setYAxisLabelRight("");
|
|
225
|
+
}
|
|
226
|
+
setPlotData(plotDataArr);
|
|
227
|
+
}, [
|
|
228
|
+
data,
|
|
229
|
+
metadata,
|
|
230
|
+
updateLayout,
|
|
231
|
+
xScaleTickFormat,
|
|
232
|
+
xRange,
|
|
233
|
+
scrubbing,
|
|
234
|
+
yAxisLabel,
|
|
235
|
+
displaySecondYAxis,
|
|
236
|
+
]);
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (xRange.from < 0) {
|
|
239
|
+
let d = (xRange.length / 2 + xRange.from) / xRange.length;
|
|
240
|
+
setNowline(d);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
if (!isLivePanel) {
|
|
244
|
+
if (xRange.length === totalTime) {
|
|
245
|
+
setNowline(0.5 + xRange.from / totalTime);
|
|
246
|
+
}
|
|
247
|
+
else if (xRange.from + xRange.length > totalTime) {
|
|
248
|
+
setNowline(0.5 + (xRange.from - (totalTime - xRange.length)) / xRange.length);
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
setNowline(0.5);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
setNowline(1);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
isLivePanel
|
|
259
|
+
? sessionStorage.removeItem("nl")
|
|
260
|
+
: sessionStorage.setItem("nl", nowLine);
|
|
261
|
+
}, [plotData, xRange]);
|
|
262
|
+
const shouldNormalize = React.useMemo(() => {
|
|
263
|
+
const units = metadata.reduce((acc, curr) => {
|
|
264
|
+
if (curr != undefined && acc.indexOf(curr === null || curr === void 0 ? void 0 : curr.unit) < 0) {
|
|
265
|
+
return [...acc, curr.unit];
|
|
266
|
+
}
|
|
267
|
+
return acc;
|
|
268
|
+
}, []);
|
|
269
|
+
return units.length > 1;
|
|
270
|
+
}, [metadata]);
|
|
271
|
+
const normalized = React.useMemo(() => {
|
|
272
|
+
if (plotData.length <= 0)
|
|
273
|
+
return;
|
|
274
|
+
if (shouldNormalize) {
|
|
275
|
+
const newLinesData = plotData.map((item, i) => {
|
|
276
|
+
const line = metadata[i];
|
|
277
|
+
const { min, max } = line;
|
|
278
|
+
const lineRange = max - min;
|
|
279
|
+
return Object.assign(Object.assign({}, item), { y: item.y.map((value) => {
|
|
280
|
+
return (value - min) / lineRange;
|
|
281
|
+
}) });
|
|
282
|
+
});
|
|
283
|
+
return newLinesData;
|
|
284
|
+
}
|
|
285
|
+
return plotData;
|
|
286
|
+
}, [shouldNormalize, plotData, metadata]);
|
|
287
|
+
return (React.createElement(StyledPlotly, { useResizeHandler: true, className: "plot-div", data: normalized, layout: layout, style: { width: "100%", height: "100%" }, config: {
|
|
288
|
+
displaylogo: false,
|
|
289
|
+
displayModeBar: false,
|
|
290
|
+
responsive: true,
|
|
291
|
+
}, onRelayout: (e) => onRelayout(e), onRelayouting: (e) => onRelayouting(e) }));
|
|
292
|
+
});
|
|
293
|
+
PlotlyChart.defaultProps = {
|
|
294
|
+
xRange: null,
|
|
295
|
+
data: [],
|
|
296
|
+
metadata: [],
|
|
297
|
+
onStopSelect: () => { },
|
|
298
|
+
onDrag: () => { },
|
|
299
|
+
xScaleTickFormat: "SS",
|
|
300
|
+
scrubbing: false,
|
|
301
|
+
yAxisLabel: false,
|
|
302
|
+
displaySecondYAxis: false,
|
|
303
|
+
displayArrow: true,
|
|
304
|
+
selectedTheme: null,
|
|
305
|
+
isLivePanel: false,
|
|
306
|
+
totalTime: null,
|
|
307
|
+
};
|
|
308
|
+
const dataElement = PropTypes.shape({
|
|
309
|
+
x: PropTypes.number,
|
|
310
|
+
y: PropTypes.number,
|
|
311
|
+
});
|
|
312
|
+
const metadataElement = PropTypes.shape({
|
|
313
|
+
name: PropTypes.string,
|
|
314
|
+
color: PropTypes.string,
|
|
315
|
+
});
|
|
316
|
+
PlotlyChart.propTypes = {
|
|
317
|
+
xRange: PropTypes.shape({
|
|
318
|
+
from: PropTypes.number,
|
|
319
|
+
length: PropTypes.number,
|
|
320
|
+
}),
|
|
321
|
+
data: PropTypes.arrayOf(PropTypes.arrayOf(dataElement), PropTypes.arrayOf(dataElement)),
|
|
322
|
+
metadata: PropTypes.arrayOf(metadataElement),
|
|
323
|
+
onStopSelect: PropTypes.func,
|
|
324
|
+
onDrag: PropTypes.func,
|
|
325
|
+
xScaleTickFormat: PropTypes.string,
|
|
326
|
+
scrubbing: PropTypes.bool,
|
|
327
|
+
yAxisLabel: PropTypes.bool,
|
|
328
|
+
isLivePanel: PropTypes.bool,
|
|
329
|
+
displaySecondYAxis: PropTypes.bool,
|
|
330
|
+
displayArrow: PropTypes.bool,
|
|
331
|
+
selectedTheme: PropTypes.shape({
|
|
332
|
+
colors: PropTypes.shape({
|
|
333
|
+
background: PropTypes.string,
|
|
334
|
+
}),
|
|
335
|
+
}),
|
|
336
|
+
totalTime: PropTypes.number,
|
|
337
|
+
};
|
|
338
|
+
//# sourceMappingURL=Plotly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plotly.js","sourceRoot":"","sources":["../src/Plotly.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EACL,QAAQ,IAAI,gBAAgB,EAC5B,MAAM,GACP,MAAM,mCAAmC,CAAC;AAE3C,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,MAAM,+BAA+B,GAAG,CAAC,iBAAiB,EAAE,EAAE;IAC5D,IAAI,aAAa,GAAG,IAAI,IAAI,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,uBAAuB,CAAC,aAAa,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,IAAI,EAAE,EAAE;IACvC,IAAI,YAAY,GAAG,IAAI,IAAI,CACzB,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,GAAG,IAAI,CACtD,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,SAAS,EAAE,EAAE;IAC9C,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,CACL,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI;QAChC,eAAe,CAAC,iBAAiB,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CACvD,CAAC;AACJ,CAAC,CAAC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IAClC,CAAC,EAAE,SAAS,CAAC,MAAM;IACnB,CAAC,EAAE,SAAS,CAAC,MAAM;CACpB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,KAAK,EAAE,SAAS,CAAC,MAAM;CACxB,CAAC,CAAC;AAEH,WAAW,CAAC,SAAS,GAAG;IACtB,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC;QACtB,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM;KACzB,CAAC;IACF,IAAI,EAAE,SAAS,CAAC,OAAO,CACrB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,EAC9B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAC/B;IACD,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;IAC5C,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,MAAM,EAAE,SAAS,CAAC,IAAI;IACtB,gBAAgB,EAAE,SAAS,CAAC,MAAM;IAClC,SAAS,EAAE,SAAS,CAAC,IAAI;IACzB,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,kBAAkB,EAAE,SAAS,CAAC,IAAI;IAClC,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,aAAa,EAAE,SAAS,CAAC,KAAK,CAAC;QAC7B,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC;YACtB,UAAU,EAAE,SAAS,CAAC,MAAM;SAC7B,CAAC;KACH,CAAC;IACF,SAAS,EAAE,SAAS,CAAC,MAAM;CAC5B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare type props = {
|
|
3
|
-
id: string;
|
|
4
|
-
show: boolean;
|
|
5
|
-
bottom: number;
|
|
6
|
-
left: number;
|
|
7
|
-
useMarkersActions: any;
|
|
8
|
-
eventdatabyIds: any;
|
|
9
|
-
events: any;
|
|
10
|
-
};
|
|
11
|
-
export declare const EventMenu: React.FC<props>;
|
|
12
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type props = {
|
|
3
|
+
id: string;
|
|
4
|
+
show: boolean;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
useMarkersActions: any;
|
|
8
|
+
eventdatabyIds: any;
|
|
9
|
+
events: any;
|
|
10
|
+
};
|
|
11
|
+
export declare const EventMenu: React.FC<props>;
|
|
12
|
+
export {};
|
|
13
13
|
//# sourceMappingURL=EventMenu.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { parse } from "query-string";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { useTheme as useSelectedTheme } from "@insync-stageplayer/ui-components";
|
|
5
|
-
import { deleteMarkerEvent } from "@insync-stageplayer/measurements";
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { parse } from "query-string";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { useTheme as useSelectedTheme } from "@insync-stageplayer/ui-components";
|
|
5
|
+
import { deleteMarkerEvent } from "@insync-stageplayer/measurements";
|
|
6
6
|
const MenuWrapper = styled.div `
|
|
7
7
|
position: absolute;
|
|
8
8
|
z-index: 99;
|
|
9
|
-
`;
|
|
9
|
+
`;
|
|
10
10
|
const Menu = styled.div `
|
|
11
11
|
position: relative;
|
|
12
12
|
border-radius: 8px;
|
|
13
13
|
padding: 5px 10px;
|
|
14
14
|
bottom: -5px;
|
|
15
15
|
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
|
|
16
|
-
`;
|
|
16
|
+
`;
|
|
17
17
|
const MenuBubble = styled.div `
|
|
18
18
|
position: relative;
|
|
19
19
|
display: block;
|
|
@@ -23,62 +23,62 @@ const MenuBubble = styled.div `
|
|
|
23
23
|
bottom: 0;
|
|
24
24
|
transform: rotate(45deg);
|
|
25
25
|
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
|
|
26
|
-
`;
|
|
27
|
-
export const EventMenu = ({ id, show, bottom, left, useMarkersActions, eventdatabyIds, events, }) => {
|
|
28
|
-
const selectedTheme = useSelectedTheme();
|
|
29
|
-
const params = parse(document.location.search);
|
|
30
|
-
const [eventMenuHover, setEventMenuHover] = useState(false);
|
|
31
|
-
const [deleteMarker, setdeleteMarker] = useState({});
|
|
32
|
-
const [removeMarkerEvent, setremoveMarkerEvent] = useState(false);
|
|
33
|
-
const { setEvents } = useMarkersActions();
|
|
34
|
-
const markerDeleting = deleteMarkerEvent({
|
|
35
|
-
markerData: deleteMarker,
|
|
36
|
-
dataType: "eventdatadelete",
|
|
37
|
-
removeMarkerEvent,
|
|
38
|
-
});
|
|
39
|
-
const deleteEvent = () => {
|
|
40
|
-
const [eventStreamId] = eventdatabyIds.eventStreamIds;
|
|
41
|
-
const { file } = eventdatabyIds;
|
|
42
|
-
const { projectId } = params;
|
|
43
|
-
setdeleteMarker({
|
|
44
|
-
file,
|
|
45
|
-
eventStreamId,
|
|
46
|
-
MarkerEvents: [id],
|
|
47
|
-
projectId,
|
|
48
|
-
});
|
|
49
|
-
setremoveMarkerEvent(true);
|
|
50
|
-
};
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (removeMarkerEvent && deleteMarker && markerDeleting) {
|
|
53
|
-
markerDeleting
|
|
54
|
-
.then((response) => response)
|
|
55
|
-
.then((data) => {
|
|
56
|
-
const [deleteId] = data.eventData;
|
|
57
|
-
setEvents(events === null || events === void 0 ? void 0 : events.filter((list) => {
|
|
58
|
-
return list.id !== deleteId;
|
|
59
|
-
}));
|
|
60
|
-
setEventMenuHover(false); // after delete hide menu
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
return setremoveMarkerEvent(false);
|
|
64
|
-
}, [removeMarkerEvent, deleteMarker, events, markerDeleting, setEvents]);
|
|
65
|
-
return (React.createElement(MenuWrapper, { style: {
|
|
66
|
-
left: left + "px",
|
|
67
|
-
bottom: bottom + "px",
|
|
68
|
-
}, onMouseEnter: () => setEventMenuHover(true), onMouseLeave: () => setEventMenuHover(false) },
|
|
69
|
-
React.createElement(Menu, { style: {
|
|
70
|
-
display: show || eventMenuHover ? "block" : "none",
|
|
71
|
-
backgroundColor: selectedTheme.colors.foreground,
|
|
72
|
-
} },
|
|
73
|
-
React.createElement("button", { style: {
|
|
74
|
-
padding: 0,
|
|
75
|
-
border: "none",
|
|
76
|
-
background: "none",
|
|
77
|
-
color: selectedTheme.colors.background,
|
|
78
|
-
}, onClick: deleteEvent }, "delete")),
|
|
79
|
-
React.createElement(MenuBubble, { style: {
|
|
80
|
-
display: show || eventMenuHover ? "block" : "none",
|
|
81
|
-
backgroundColor: selectedTheme.colors.foreground,
|
|
82
|
-
} })));
|
|
83
|
-
};
|
|
26
|
+
`;
|
|
27
|
+
export const EventMenu = ({ id, show, bottom, left, useMarkersActions, eventdatabyIds, events, }) => {
|
|
28
|
+
const selectedTheme = useSelectedTheme();
|
|
29
|
+
const params = parse(document.location.search);
|
|
30
|
+
const [eventMenuHover, setEventMenuHover] = useState(false);
|
|
31
|
+
const [deleteMarker, setdeleteMarker] = useState({});
|
|
32
|
+
const [removeMarkerEvent, setremoveMarkerEvent] = useState(false);
|
|
33
|
+
const { setEvents } = useMarkersActions();
|
|
34
|
+
const markerDeleting = deleteMarkerEvent({
|
|
35
|
+
markerData: deleteMarker,
|
|
36
|
+
dataType: "eventdatadelete",
|
|
37
|
+
removeMarkerEvent,
|
|
38
|
+
});
|
|
39
|
+
const deleteEvent = () => {
|
|
40
|
+
const [eventStreamId] = eventdatabyIds.eventStreamIds;
|
|
41
|
+
const { file } = eventdatabyIds;
|
|
42
|
+
const { projectId } = params;
|
|
43
|
+
setdeleteMarker({
|
|
44
|
+
file,
|
|
45
|
+
eventStreamId,
|
|
46
|
+
MarkerEvents: [id],
|
|
47
|
+
projectId,
|
|
48
|
+
});
|
|
49
|
+
setremoveMarkerEvent(true);
|
|
50
|
+
};
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (removeMarkerEvent && deleteMarker && markerDeleting) {
|
|
53
|
+
markerDeleting
|
|
54
|
+
.then((response) => response)
|
|
55
|
+
.then((data) => {
|
|
56
|
+
const [deleteId] = data.eventData;
|
|
57
|
+
setEvents(events === null || events === void 0 ? void 0 : events.filter((list) => {
|
|
58
|
+
return list.id !== deleteId;
|
|
59
|
+
}));
|
|
60
|
+
setEventMenuHover(false); // after delete hide menu
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return setremoveMarkerEvent(false);
|
|
64
|
+
}, [removeMarkerEvent, deleteMarker, events, markerDeleting, setEvents]);
|
|
65
|
+
return (React.createElement(MenuWrapper, { style: {
|
|
66
|
+
left: left + "px",
|
|
67
|
+
bottom: bottom + "px",
|
|
68
|
+
}, onMouseEnter: () => setEventMenuHover(true), onMouseLeave: () => setEventMenuHover(false) },
|
|
69
|
+
React.createElement(Menu, { style: {
|
|
70
|
+
display: show || eventMenuHover ? "block" : "none",
|
|
71
|
+
backgroundColor: selectedTheme.colors.foreground,
|
|
72
|
+
} },
|
|
73
|
+
React.createElement("button", { style: {
|
|
74
|
+
padding: 0,
|
|
75
|
+
border: "none",
|
|
76
|
+
background: "none",
|
|
77
|
+
color: selectedTheme.colors.background,
|
|
78
|
+
}, onClick: deleteEvent }, "delete")),
|
|
79
|
+
React.createElement(MenuBubble, { style: {
|
|
80
|
+
display: show || eventMenuHover ? "block" : "none",
|
|
81
|
+
backgroundColor: selectedTheme.colors.foreground,
|
|
82
|
+
} })));
|
|
83
|
+
};
|
|
84
84
|
//# sourceMappingURL=EventMenu.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare type props = {
|
|
3
|
-
width: number;
|
|
4
|
-
left: number;
|
|
5
|
-
setHeight: any;
|
|
6
|
-
events: any;
|
|
7
|
-
markers: any;
|
|
8
|
-
xRange: any;
|
|
9
|
-
overlay: HTMLDivElement | null;
|
|
10
|
-
zoomRangeDisplay: any;
|
|
11
|
-
formatSecondsEventMarker: any;
|
|
12
|
-
useMarkersActions: any;
|
|
13
|
-
eventdatabyIds: any;
|
|
14
|
-
};
|
|
15
|
-
export declare const MarkerTracks: React.FC<props>;
|
|
16
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type props = {
|
|
3
|
+
width: number;
|
|
4
|
+
left: number;
|
|
5
|
+
setHeight: any;
|
|
6
|
+
events: any;
|
|
7
|
+
markers: any;
|
|
8
|
+
xRange: any;
|
|
9
|
+
overlay: HTMLDivElement | null;
|
|
10
|
+
zoomRangeDisplay: any;
|
|
11
|
+
formatSecondsEventMarker: any;
|
|
12
|
+
useMarkersActions: any;
|
|
13
|
+
eventdatabyIds: any;
|
|
14
|
+
};
|
|
15
|
+
export declare const MarkerTracks: React.FC<props>;
|
|
16
|
+
export {};
|
|
17
17
|
//# sourceMappingURL=MarkerTracks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerTracks.d.ts","sourceRoot":"","sources":["../../src/PlotlyGraph/MarkerTracks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkerTracks.d.ts","sourceRoot":"","sources":["../../src/PlotlyGraph/MarkerTracks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,gBAAgB,EAAE,GAAG,CAAC;IACtB,wBAAwB,EAAE,GAAG,CAAC;IAC9B,iBAAiB,EAAE,GAAG,CAAC;IACvB,cAAc,EAAE,GAAG,CAAC;CACrB,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsWxC,CAAC"}
|