@insync-stageplayer/plotly-chart 0.5.35 → 0.5.38-beta.3
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/PlotlyGraph/EventMenu.d.ts +12 -12
- package/lib/PlotlyGraph/EventMenu.js +65 -65
- package/lib/PlotlyGraph/MarkerTracks.d.ts +20 -16
- package/lib/PlotlyGraph/MarkerTracks.d.ts.map +1 -1
- package/lib/PlotlyGraph/MarkerTracks.js +257 -239
- package/lib/PlotlyGraph/MarkerTracks.js.map +1 -1
- 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 +486 -308
- package/lib/PlotlyGraph/PlotlyPlayback.js.map +1 -1
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.d.ts +23 -22
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.d.ts.map +1 -1
- package/lib/PlotlyGraph/PlotlyPlaybackOverlay.js +187 -146
- 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/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -3
- package/lib/Plotly.d.ts +0 -5
- package/lib/Plotly.d.ts.map +0 -1
- package/lib/Plotly.js +0 -338
- package/lib/Plotly.js.map +0 -1
- package/lib/PlotlyGraph/Plotly.d.ts +0 -5
- package/lib/PlotlyGraph/Plotly.d.ts.map +0 -1
- package/lib/PlotlyGraph/Plotly.js +0 -347
- package/lib/PlotlyGraph/Plotly.js.map +0 -1
- package/lib/PlotlyLiveview.d.ts +0 -5
- package/lib/PlotlyLiveview.d.ts.map +0 -1
- package/lib/PlotlyLiveview.js +0 -310
- package/lib/PlotlyLiveview.js.map +0 -1
|
@@ -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,21 @@
|
|
|
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
|
-
|
|
16
|
-
|
|
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
|
+
totalTime: any;
|
|
15
|
+
scrubbing: boolean;
|
|
16
|
+
seekTime: number;
|
|
17
|
+
nowLine: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const MarkerTracks: React.FC<props>;
|
|
20
|
+
export {};
|
|
17
21
|
//# 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;AAkBnD,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;IACpB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+XxC,CAAC"}
|