@m4l/gclick 0.21.0 → 0.22.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/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.d.ts.map +1 -1
- package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.js +17 -16
- package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts +4 -1
- package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts.map +1 -1
- package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.js +70 -55
- package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts +5 -5
- package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.js +55 -41
- package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts +2 -2
- package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.js +16 -9
- package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts +1 -1
- package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.js +6 -5
- package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts +1 -0
- package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts +6 -6
- package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.js +82 -49
- package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts +1 -0
- package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.js +69 -64
- package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.js +205 -192
- package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts +2 -2
- package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts.map +1 -1
- package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.js +32 -24
- package/package.json +2 -2
|
@@ -1,237 +1,250 @@
|
|
|
1
|
-
import { jsx as r, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { TimeLineChannelWrapperStyled as
|
|
5
|
-
import { TIME_VISIBLE_OPTIONS_KEYS as
|
|
6
|
-
import { useVideoTimeLineSelectorStore as
|
|
7
|
-
import { shallow as
|
|
8
|
-
import { getTimeLinePosition as
|
|
9
|
-
import { clusterEvents as
|
|
10
|
-
import { EventCluster as
|
|
11
|
-
import { getTimeFromPointIndex as
|
|
12
|
-
import { convertHoursToTimeString as
|
|
13
|
-
import { getVisiblePoints as
|
|
14
|
-
import { useComponentSize as
|
|
15
|
-
import { Tooltip as
|
|
16
|
-
import
|
|
17
|
-
import { VIDEO_TIME_LINE_SELECTOR_DICTIONARY_KEYS as
|
|
18
|
-
import { useModuleDictionary as
|
|
19
|
-
import { resolveTooltipAnchor as
|
|
20
|
-
const
|
|
21
|
-
const { isTransitioning:
|
|
1
|
+
import { jsx as r, Fragment as De, jsxs as I } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { memo as $e, useRef as P, useState as N, useEffect as v, useCallback as c, useMemo as C, Fragment as Oe } from "react";
|
|
3
|
+
import We from "lodash-es/throttle";
|
|
4
|
+
import { TimeLineChannelWrapperStyled as Ve, PointChannelSegmentStyled as Fe, PlaybackRangePreviewStyled as ze, PointSegmentStyled as Be, AxisTickContainerStyled as ge, AxisTickNumberStyled as we, AxisTickLineStyled as Pe, WrapperDialTimeLineStyled as Qe, ContainerDialTimeLineStyled as Xe, DashLineContainerStyled as qe, DashLineStyled as He, PlaybackTooltipAnchorStyled as Ke, DialPointIndicatorStyled as Ye, DialPointIndicatorInnerStyled as Ue } from "../../slots/VideoTimeLineSelectorSlots.js";
|
|
5
|
+
import { TIME_VISIBLE_OPTIONS_KEYS as ee, TIME_SCALES as je, VIDEO_TIME_LINE_SELECTOR_CLASSES as m } from "../../constants.js";
|
|
6
|
+
import { useVideoTimeLineSelectorStore as ve } from "../../store/useVideoTimeLineSelectorStore.js";
|
|
7
|
+
import { shallow as Ze } from "zustand/shallow";
|
|
8
|
+
import { getTimeLinePosition as Ge } from "../../helpers/getTimeLinePosition/getTimeLinePosition.js";
|
|
9
|
+
import { clusterEvents as Je } from "../../helpers/clusterEvents/clusterEvents.js";
|
|
10
|
+
import { EventCluster as et } from "../EventCluster/EventCluster.js";
|
|
11
|
+
import { getTimeFromPointIndex as tt } from "../../helpers/getTimeFromPointIndex/getTimeFromPointIndex.js";
|
|
12
|
+
import { convertHoursToTimeString as F } from "../../helpers/convertHoursToTimeString/convertHoursToTimeString.js";
|
|
13
|
+
import { getVisiblePoints as nt } from "../../helpers/getVisiblePoints/getVisiblePoints.js";
|
|
14
|
+
import { useComponentSize as it } from "@m4l/graphics";
|
|
15
|
+
import { Tooltip as ot } from "@m4l/base";
|
|
16
|
+
import z from "clsx";
|
|
17
|
+
import { VIDEO_TIME_LINE_SELECTOR_DICTIONARY_KEYS as ye } from "../../dictionary.js";
|
|
18
|
+
import { useModuleDictionary as rt, useUserPreferences as st } from "@m4l/core";
|
|
19
|
+
import { resolveTooltipAnchor as at, secondsToTimelinePercent as A, snapToSegmentStart as Me, dateToDaySeconds as ct, resolveActiveSegment as lt, resolvePreviewRange as mt } from "../../helpers/playbackRange/playbackRange.js";
|
|
20
|
+
const ut = 1400, dt = 650, Nt = $e((Le) => {
|
|
21
|
+
const { isTransitioning: be } = Le, u = P(null), { getLabel: B } = rt(), { timeZone: Ee } = st(), s = Ee?.name?.trim() || "UTC", {
|
|
22
22
|
pointsQty: d,
|
|
23
|
-
zoomQty:
|
|
24
|
-
currentTime:
|
|
25
|
-
quadrantsQty:
|
|
26
|
-
currentQuadrant:
|
|
27
|
-
timeVisible:
|
|
28
|
-
channels:
|
|
23
|
+
zoomQty: Ce,
|
|
24
|
+
currentTime: a,
|
|
25
|
+
quadrantsQty: S,
|
|
26
|
+
currentQuadrant: h,
|
|
27
|
+
timeVisible: _,
|
|
28
|
+
channels: te,
|
|
29
29
|
segments: p,
|
|
30
|
-
events:
|
|
31
|
-
activeChannels:
|
|
30
|
+
events: D,
|
|
31
|
+
activeChannels: Q,
|
|
32
32
|
snapToSegmentStart: f,
|
|
33
|
-
showPlaybackRangePreview:
|
|
34
|
-
playbackDurationSeconds:
|
|
35
|
-
} =
|
|
33
|
+
showPlaybackRangePreview: ne,
|
|
34
|
+
playbackDurationSeconds: X
|
|
35
|
+
} = ve(
|
|
36
36
|
(e) => e,
|
|
37
|
-
|
|
38
|
-
), { currentSize:
|
|
39
|
-
|
|
40
|
-
u.current &&
|
|
37
|
+
Ze
|
|
38
|
+
), { currentSize: q } = it(), { setCurrentTime: y, setTimeVisible: ie } = ve((e) => e.actions), [$, ke] = N(0), [M, oe] = N(!1), [H, L] = N(!1), [K, re] = N(!1), [k, se] = N(0), Y = P(a), b = P(null), E = P(null), ae = P(null);
|
|
39
|
+
v(() => {
|
|
40
|
+
u.current && se(u.current.clientWidth);
|
|
41
41
|
const t = new ResizeObserver((n) => {
|
|
42
42
|
for (const i of n)
|
|
43
|
-
|
|
43
|
+
se(i.contentRect.width);
|
|
44
44
|
});
|
|
45
45
|
return u.current && t.observe(u.current), () => {
|
|
46
46
|
t.disconnect();
|
|
47
47
|
};
|
|
48
48
|
}, []);
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
49
|
+
const U = P(!1), ce = c((e) => {
|
|
50
|
+
if (U.current)
|
|
51
51
|
return;
|
|
52
|
-
const t =
|
|
52
|
+
const t = ee.indexOf(_);
|
|
53
53
|
let n;
|
|
54
|
-
if (e === "down" ? n = Math.max(0, t - 1) : n = Math.min(
|
|
55
|
-
|
|
56
|
-
const i =
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
if (e === "down" ? n = Math.max(0, t - 1) : n = Math.min(ee.length - 1, t + 1), n !== t) {
|
|
55
|
+
U.current = !0;
|
|
56
|
+
const i = ee[n];
|
|
57
|
+
ie(i), setTimeout(() => {
|
|
58
|
+
U.current = !1;
|
|
59
59
|
}, 500);
|
|
60
60
|
}
|
|
61
|
-
}, [
|
|
61
|
+
}, [_, ie]), j = c((e) => {
|
|
62
62
|
if (e.ctrlKey) {
|
|
63
63
|
e.preventDefault(), e.stopPropagation();
|
|
64
64
|
const t = e.deltaY < 0 ? "up" : "down";
|
|
65
|
-
|
|
65
|
+
ce(t);
|
|
66
66
|
}
|
|
67
|
-
}, [
|
|
68
|
-
|
|
67
|
+
}, [ce]);
|
|
68
|
+
v(() => {
|
|
69
69
|
const e = u.current;
|
|
70
70
|
if (e)
|
|
71
71
|
return e.addEventListener("wheel", j, { passive: !1 }), () => {
|
|
72
72
|
e.removeEventListener("wheel", j);
|
|
73
73
|
};
|
|
74
74
|
}, [j]);
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
}, []),
|
|
78
|
-
|
|
79
|
-
}, []),
|
|
80
|
-
|
|
81
|
-
}, []),
|
|
75
|
+
const g = c((e) => {
|
|
76
|
+
ke(e);
|
|
77
|
+
}, []), R = c(() => {
|
|
78
|
+
ae.current?.update();
|
|
79
|
+
}, []), O = c(() => {
|
|
80
|
+
E.current === null || typeof window > "u" || (window.cancelAnimationFrame(E.current), E.current = null);
|
|
81
|
+
}, []), le = c(() => {
|
|
82
82
|
if (typeof window > "u" || typeof window.requestAnimationFrame != "function") {
|
|
83
|
-
|
|
83
|
+
R();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
O();
|
|
87
87
|
const e = () => typeof window.performance?.now == "function" ? window.performance.now() : Date.now(), t = e(), n = () => {
|
|
88
|
-
if (
|
|
89
|
-
|
|
88
|
+
if (R(), e() - t < dt) {
|
|
89
|
+
E.current = window.requestAnimationFrame(n);
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
E.current = null;
|
|
93
93
|
};
|
|
94
|
-
|
|
95
|
-
}, [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
},
|
|
94
|
+
E.current = window.requestAnimationFrame(n);
|
|
95
|
+
}, [O, R]), me = c(() => {
|
|
96
|
+
b.current && clearTimeout(b.current), re(!0), b.current = setTimeout(() => {
|
|
97
|
+
re(!1), b.current = null;
|
|
98
|
+
}, ut);
|
|
99
99
|
}, []);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
const
|
|
104
|
-
activeChannel:
|
|
105
|
-
candidateTime:
|
|
106
|
-
fallbackPositionPercent:
|
|
100
|
+
v(() => () => {
|
|
101
|
+
b.current && clearTimeout(b.current), O();
|
|
102
|
+
}, [O]);
|
|
103
|
+
const l = Q[0] ?? null, W = C(() => at({
|
|
104
|
+
activeChannel: l,
|
|
105
|
+
candidateTime: a,
|
|
106
|
+
fallbackPositionPercent: $,
|
|
107
107
|
segments: p,
|
|
108
|
-
snapEnabled: f
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
snapEnabled: f,
|
|
109
|
+
timeZoneName: s
|
|
110
|
+
}), [l, a, $, p, f, s]);
|
|
111
|
+
v(() => {
|
|
112
|
+
(H || M || K) && R();
|
|
113
|
+
}, [a, M, K, H, $, W.positionPercent, R]), v(() => {
|
|
114
|
+
Y.current = a, g(A(a));
|
|
115
|
+
}, [a, g]);
|
|
116
|
+
const w = c((e, t = f) => {
|
|
117
|
+
const n = t ? Me({
|
|
118
|
+
activeChannel: l,
|
|
118
119
|
candidateTime: e,
|
|
119
|
-
segments: p
|
|
120
|
+
segments: p,
|
|
121
|
+
timeZoneName: s
|
|
120
122
|
}) : null, i = n?.time ?? e, o = Math.max(0, Math.min(86399, Math.floor(i)));
|
|
121
|
-
return
|
|
123
|
+
return g(A(o)), y(o), {
|
|
122
124
|
didSnap: !!n?.didSnap
|
|
123
125
|
};
|
|
124
|
-
}, [
|
|
125
|
-
|
|
126
|
-
if (!f || !
|
|
126
|
+
}, [l, p, y, f, s, g]);
|
|
127
|
+
v(() => {
|
|
128
|
+
if (!f || !l || M)
|
|
127
129
|
return;
|
|
128
|
-
const e =
|
|
129
|
-
activeChannel:
|
|
130
|
-
candidateTime:
|
|
131
|
-
segments: p
|
|
130
|
+
const e = Me({
|
|
131
|
+
activeChannel: l,
|
|
132
|
+
candidateTime: a,
|
|
133
|
+
segments: p,
|
|
134
|
+
timeZoneName: s
|
|
132
135
|
});
|
|
133
|
-
if (!e.segment || e.time ===
|
|
136
|
+
if (!e.segment || e.time === a)
|
|
134
137
|
return;
|
|
135
138
|
const t = Math.max(0, Math.min(86399, Math.floor(e.time)));
|
|
136
|
-
|
|
137
|
-
}, [
|
|
138
|
-
const
|
|
139
|
+
g(A(t)), y(t);
|
|
140
|
+
}, [l, a, M, p, y, f, s, g]);
|
|
141
|
+
const Re = c((e) => {
|
|
139
142
|
if (!u.current)
|
|
140
143
|
return;
|
|
141
|
-
const t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = u.current.clientWidth, o = t.width,
|
|
142
|
-
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, [
|
|
147
|
-
const
|
|
144
|
+
const t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = u.current.clientWidth, o = t.width, T = i - o, Te = (n + T * (n / o)) / i * 100, G = Math.floor(Te / 100 * 24 * 60 * 60), J = Math.max(0, Math.min(86399, G));
|
|
145
|
+
w(J);
|
|
146
|
+
}, [w]), ue = P(h);
|
|
147
|
+
v(() => {
|
|
148
|
+
ue.current = h;
|
|
149
|
+
}, [h]);
|
|
150
|
+
const de = C(() => k === 0 ? [] : nt({
|
|
148
151
|
totalPoints: d,
|
|
149
|
-
totalQuadrants:
|
|
150
|
-
currentQuadrant:
|
|
151
|
-
containerWidth:
|
|
152
|
-
}), [d,
|
|
152
|
+
totalQuadrants: S,
|
|
153
|
+
currentQuadrant: h,
|
|
154
|
+
containerWidth: k
|
|
155
|
+
}), [d, S, h, k]), xe = C(() => !D || D.length === 0 ? [] : Je(
|
|
156
|
+
D,
|
|
157
|
+
je[_].clusterThresholdMinutes,
|
|
158
|
+
k,
|
|
159
|
+
s
|
|
160
|
+
), [D, _, k, s]), pe = c((e) => {
|
|
153
161
|
const t = 24 / d;
|
|
154
162
|
return e * t;
|
|
155
|
-
}, [d]),
|
|
156
|
-
const { newTime: t } =
|
|
157
|
-
|
|
158
|
-
}, [
|
|
159
|
-
const t =
|
|
160
|
-
|
|
161
|
-
}, [
|
|
163
|
+
}, [d]), fe = c((e) => {
|
|
164
|
+
const { newTime: t } = tt(e, d, S, ue.current);
|
|
165
|
+
w(t);
|
|
166
|
+
}, [w, d, S]), Ie = c((e) => {
|
|
167
|
+
const t = ct(e, s);
|
|
168
|
+
w(t);
|
|
169
|
+
}, [w, s]), Ne = c((e) => {
|
|
162
170
|
e.stopPropagation(), e.preventDefault();
|
|
163
171
|
const t = u.current;
|
|
164
172
|
if (!t)
|
|
165
173
|
return;
|
|
166
|
-
|
|
167
|
-
const n = t.getBoundingClientRect(), o =
|
|
168
|
-
const G = (
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
174
|
+
oe(!0);
|
|
175
|
+
const n = t.getBoundingClientRect(), o = We((x) => {
|
|
176
|
+
const G = (x.clientX - n.left) * 100 / n.width, J = 100 / S * (h - 1), _e = 100 / S * (h - 1e-5), he = Math.max(J, Math.min(_e, G));
|
|
177
|
+
g(he);
|
|
178
|
+
const Se = he / 100 * 24 * 60 * 60;
|
|
179
|
+
Y.current = Se, y(Math.floor(Se));
|
|
172
180
|
}, 50, {
|
|
173
181
|
leading: !0,
|
|
174
182
|
trailing: !0
|
|
175
|
-
}),
|
|
176
|
-
|
|
183
|
+
}), T = () => {
|
|
184
|
+
oe(!1), window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", T), o.cancel(), f && w(Y.current, !0).didSnap && (me(), le());
|
|
177
185
|
};
|
|
178
|
-
window.addEventListener("mousemove", o), window.addEventListener("mouseup",
|
|
179
|
-
}, [
|
|
180
|
-
if (!
|
|
186
|
+
window.addEventListener("mousemove", o), window.addEventListener("mouseup", T);
|
|
187
|
+
}, [w, h, S, y, me, f, le, g]), V = C(() => {
|
|
188
|
+
if (!ne || !l || !X)
|
|
181
189
|
return null;
|
|
182
|
-
const e =
|
|
183
|
-
activeChannel:
|
|
184
|
-
candidateTime:
|
|
185
|
-
segments: p
|
|
190
|
+
const e = lt({
|
|
191
|
+
activeChannel: l,
|
|
192
|
+
candidateTime: a,
|
|
193
|
+
segments: p,
|
|
194
|
+
timeZoneName: s
|
|
186
195
|
});
|
|
187
|
-
return
|
|
188
|
-
indicatorTime:
|
|
189
|
-
durationSeconds:
|
|
196
|
+
return mt({
|
|
197
|
+
indicatorTime: a,
|
|
198
|
+
durationSeconds: X,
|
|
190
199
|
segment: e,
|
|
191
200
|
snapEnabled: f
|
|
192
201
|
});
|
|
193
|
-
}, [
|
|
194
|
-
if (!
|
|
202
|
+
}, [l, a, X, p, ne, f, s]), Z = C(() => {
|
|
203
|
+
if (!V)
|
|
195
204
|
return null;
|
|
196
|
-
const e = A(
|
|
205
|
+
const e = A(V.start), t = A(V.end);
|
|
197
206
|
return {
|
|
198
207
|
left: `${e}%`,
|
|
199
208
|
width: `${Math.max(0, t - e)}%`
|
|
200
209
|
};
|
|
201
|
-
}, [
|
|
210
|
+
}, [V]), Ae = C(() => /* @__PURE__ */ r(De, { children: te.map((e, t) => {
|
|
202
211
|
const n = p.find((i) => i.channelId === e.id);
|
|
203
|
-
return /* @__PURE__ */
|
|
204
|
-
|
|
212
|
+
return /* @__PURE__ */ I(
|
|
213
|
+
Ve,
|
|
205
214
|
{
|
|
206
|
-
className:
|
|
215
|
+
className: z(m.timeLineChannelWrapper, Q.includes(e.id) ? " active" : ""),
|
|
207
216
|
children: [
|
|
208
217
|
n && n?.segmentsList && n?.segmentsList.length > 0 && n?.segmentsList.map((i, o) => {
|
|
209
|
-
const { width:
|
|
218
|
+
const { width: T, left: x } = Ge({
|
|
219
|
+
startTime: i.startTime,
|
|
220
|
+
endTime: i.endTime,
|
|
221
|
+
timeZoneName: s
|
|
222
|
+
});
|
|
210
223
|
return !i.startTime || !i.endTime || i.startTime === i.endTime ? null : /* @__PURE__ */ r(
|
|
211
|
-
|
|
224
|
+
Fe,
|
|
212
225
|
{
|
|
213
226
|
className: m.pointChannelSegment,
|
|
214
227
|
style: {
|
|
215
|
-
width:
|
|
216
|
-
left:
|
|
228
|
+
width: T,
|
|
229
|
+
left: x
|
|
217
230
|
}
|
|
218
231
|
},
|
|
219
232
|
`point-channel-segment-${t}-${o}`
|
|
220
233
|
);
|
|
221
234
|
}),
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
Z && e.id === l && /* @__PURE__ */ r(
|
|
236
|
+
ze,
|
|
224
237
|
{
|
|
225
238
|
className: m.playbackRangePreview,
|
|
226
|
-
style:
|
|
239
|
+
style: Z
|
|
227
240
|
}
|
|
228
241
|
),
|
|
229
|
-
|
|
230
|
-
const o = i.index,
|
|
242
|
+
de.map((i) => {
|
|
243
|
+
const o = i.index, T = pe(o);
|
|
231
244
|
return /* @__PURE__ */ r(
|
|
232
|
-
|
|
245
|
+
Be,
|
|
233
246
|
{
|
|
234
|
-
className:
|
|
247
|
+
className: z(m.pointSegment),
|
|
235
248
|
style: {
|
|
236
249
|
position: "absolute",
|
|
237
250
|
width: i.widthPixels,
|
|
@@ -239,22 +252,22 @@ const at = 1400, ct = 650, kt = _e((Me) => {
|
|
|
239
252
|
},
|
|
240
253
|
role: "button",
|
|
241
254
|
tabIndex: 0,
|
|
242
|
-
"aria-label": `${
|
|
243
|
-
children: (o % 2 === 0 || o === d - 1) && /* @__PURE__ */
|
|
244
|
-
t === 0 && o !== d - 1 && /* @__PURE__ */
|
|
255
|
+
"aria-label": `${B(ye.select_time)} ${F(T)}`,
|
|
256
|
+
children: (o % 2 === 0 || o === d - 1) && /* @__PURE__ */ I(Oe, { children: [
|
|
257
|
+
t === 0 && o !== d - 1 && /* @__PURE__ */ I(ge, { className: m.axisTickContainer, onClick: () => fe(o), children: [
|
|
245
258
|
/* @__PURE__ */ r(
|
|
246
|
-
|
|
259
|
+
we,
|
|
247
260
|
{
|
|
248
261
|
className: m.axisTickNumber,
|
|
249
|
-
ownerState: { size:
|
|
250
|
-
children:
|
|
262
|
+
ownerState: { size: q },
|
|
263
|
+
children: F(T)
|
|
251
264
|
}
|
|
252
265
|
),
|
|
253
|
-
/* @__PURE__ */ r(
|
|
266
|
+
/* @__PURE__ */ r(Pe, { className: m.axisTickLine })
|
|
254
267
|
] }),
|
|
255
|
-
t === 0 && o === d - 1 && /* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */ r(
|
|
257
|
-
/* @__PURE__ */ r(
|
|
268
|
+
t === 0 && o === d - 1 && /* @__PURE__ */ I(ge, { className: `${m.axisTickContainer} last-tick`, children: [
|
|
269
|
+
/* @__PURE__ */ r(we, { className: m.axisTickNumber, ownerState: { size: q }, children: F(T, !0) }),
|
|
270
|
+
/* @__PURE__ */ r(Pe, { className: m.axisTickLine })
|
|
258
271
|
] })
|
|
259
272
|
] })
|
|
260
273
|
},
|
|
@@ -265,72 +278,72 @@ const at = 1400, ct = 650, kt = _e((Me) => {
|
|
|
265
278
|
},
|
|
266
279
|
`time-line-channel-${t}`
|
|
267
280
|
);
|
|
268
|
-
}) }), [
|
|
269
|
-
return /* @__PURE__ */ r(
|
|
270
|
-
|
|
281
|
+
}) }), [l, Q, te, q, pe, B, fe, Z, d, p, s, de]);
|
|
282
|
+
return /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ I(
|
|
283
|
+
Xe,
|
|
271
284
|
{
|
|
272
285
|
ref: u,
|
|
273
286
|
style: {
|
|
274
|
-
width: `${
|
|
275
|
-
transform: `translateX(-${100 /
|
|
287
|
+
width: `${Ce}%`,
|
|
288
|
+
transform: `translateX(-${100 / S * (h - 1)}%)`
|
|
276
289
|
},
|
|
277
290
|
children: [
|
|
278
|
-
/* @__PURE__ */ r(
|
|
279
|
-
|
|
280
|
-
|
|
291
|
+
/* @__PURE__ */ r(qe, { onClick: Re, children: /* @__PURE__ */ r(He, {}) }),
|
|
292
|
+
xe.map((e) => /* @__PURE__ */ r(
|
|
293
|
+
et,
|
|
281
294
|
{
|
|
282
295
|
clusteredEvent: e,
|
|
283
|
-
onEventClick:
|
|
296
|
+
onEventClick: Ie
|
|
284
297
|
},
|
|
285
298
|
e.id
|
|
286
299
|
)),
|
|
287
300
|
/* @__PURE__ */ r(
|
|
288
|
-
|
|
301
|
+
ot,
|
|
289
302
|
{
|
|
290
|
-
title:
|
|
303
|
+
title: F(W.time / 3600, !1, !0),
|
|
291
304
|
placement: "top",
|
|
292
305
|
offset: [0, 20],
|
|
293
306
|
PopperProps: {
|
|
294
|
-
popperRef:
|
|
307
|
+
popperRef: ae
|
|
295
308
|
},
|
|
296
|
-
open:
|
|
297
|
-
onOpen: () =>
|
|
298
|
-
onClose: () =>
|
|
309
|
+
open: H || M || K,
|
|
310
|
+
onOpen: () => L(!0),
|
|
311
|
+
onClose: () => L(!1),
|
|
299
312
|
children: /* @__PURE__ */ r(
|
|
300
|
-
|
|
313
|
+
Ke,
|
|
301
314
|
{
|
|
302
|
-
className:
|
|
315
|
+
className: z(
|
|
303
316
|
m.playbackTooltipAnchor,
|
|
304
|
-
|
|
317
|
+
W.snapsToSegment ? "snapped" : "floating"
|
|
305
318
|
),
|
|
306
|
-
style: { left: `${
|
|
319
|
+
style: { left: `${W.positionPercent}%` }
|
|
307
320
|
}
|
|
308
321
|
)
|
|
309
322
|
}
|
|
310
323
|
),
|
|
311
324
|
/* @__PURE__ */ r(
|
|
312
|
-
|
|
325
|
+
Ye,
|
|
313
326
|
{
|
|
314
|
-
style: { left: `${
|
|
315
|
-
className:
|
|
316
|
-
onMouseDown:
|
|
317
|
-
onMouseEnter: () =>
|
|
318
|
-
onMouseLeave: () =>
|
|
319
|
-
onFocus: () =>
|
|
320
|
-
onBlur: () =>
|
|
327
|
+
style: { left: `${$}%` },
|
|
328
|
+
className: z(m.dialPointIndicator, M ? "dragging" : ""),
|
|
329
|
+
onMouseDown: Ne,
|
|
330
|
+
onMouseEnter: () => L(!0),
|
|
331
|
+
onMouseLeave: () => L(!1),
|
|
332
|
+
onFocus: () => L(!0),
|
|
333
|
+
onBlur: () => L(!1),
|
|
321
334
|
role: "slider",
|
|
322
|
-
"aria-valuenow":
|
|
335
|
+
"aria-valuenow": a,
|
|
323
336
|
"aria-valuemin": 0,
|
|
324
337
|
"aria-valuemax": 86399,
|
|
325
|
-
"aria-label":
|
|
326
|
-
children: /* @__PURE__ */ r(
|
|
338
|
+
"aria-label": B(ye.time_selector),
|
|
339
|
+
children: /* @__PURE__ */ r(Ue, {})
|
|
327
340
|
}
|
|
328
341
|
),
|
|
329
|
-
!
|
|
342
|
+
!be && Ae
|
|
330
343
|
]
|
|
331
344
|
}
|
|
332
345
|
) });
|
|
333
346
|
});
|
|
334
347
|
export {
|
|
335
|
-
|
|
348
|
+
Nt as ChartTimeLine
|
|
336
349
|
};
|
|
@@ -4,8 +4,8 @@ interface EventClusterProps {
|
|
|
4
4
|
onEventClick?: (eventTime: Date) => void;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @param props -
|
|
7
|
+
* Component that renders an event cluster or a single event.
|
|
8
|
+
* @param props - Component properties
|
|
9
9
|
*/
|
|
10
10
|
export declare const EventCluster: import('react').MemoExoticComponent<({ clusteredEvent, onEventClick }: EventClusterProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventCluster.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAQ3E,UAAU,iBAAiB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,yEAA2C,iBAAiB,
|
|
1
|
+
{"version":3,"file":"EventCluster.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAQ3E,UAAU,iBAAiB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,yEAA2C,iBAAiB,sDA4GnF,CAAC"}
|