@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,9 +1,9 @@
|
|
|
1
1
|
import { SegmentType } from '../../types';
|
|
2
2
|
import { IndexedPlaybackSegment, PlaybackRange, PlaybackTooltipAnchor, ResolveActiveSegmentInput, ResolvePreviewRangeInput, ResolveTooltipAnchorInput, SnapToSegmentStartResult } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* Converts a Date value into seconds elapsed since
|
|
4
|
+
* Converts a Date value into seconds elapsed since the requested wall-clock midnight.
|
|
5
5
|
*/
|
|
6
|
-
export declare const dateToDaySeconds: (date: Date) => number;
|
|
6
|
+
export declare const dateToDaySeconds: (date: Date, timeZoneName?: string | null) => number;
|
|
7
7
|
/**
|
|
8
8
|
* Converts a day-second value into a full-day timeline percentage.
|
|
9
9
|
*/
|
|
@@ -11,16 +11,16 @@ export declare const secondsToTimelinePercent: (seconds: number) => number;
|
|
|
11
11
|
/**
|
|
12
12
|
* Builds or reuses a sorted playback-segment index for one channel.
|
|
13
13
|
*/
|
|
14
|
-
export declare const getSortedPlaybackSegments: <T>(channelSegments: SegmentType<T> | undefined) => IndexedPlaybackSegment<T>[];
|
|
14
|
+
export declare const getSortedPlaybackSegments: <T>(channelSegments: SegmentType<T> | undefined, timeZoneName?: string | null) => IndexedPlaybackSegment<T>[];
|
|
15
15
|
/**
|
|
16
16
|
* Resolves the active segment that contains the candidate time.
|
|
17
17
|
* When segments overlap, the segment with the latest start wins.
|
|
18
18
|
*/
|
|
19
|
-
export declare const resolveActiveSegment: <T>({ activeChannel, candidateTime, segments, }: ResolveActiveSegmentInput<T>) => IndexedPlaybackSegment<T> | null;
|
|
19
|
+
export declare const resolveActiveSegment: <T>({ activeChannel, candidateTime, segments, timeZoneName, }: ResolveActiveSegmentInput<T>) => IndexedPlaybackSegment<T> | null;
|
|
20
20
|
/**
|
|
21
21
|
* Finds the closest segment that ended before the candidate time.
|
|
22
22
|
*/
|
|
23
|
-
export declare const findPreviousSegment: <T>({ activeChannel, candidateTime, segments, }: ResolveActiveSegmentInput<T>) => IndexedPlaybackSegment<T> | null;
|
|
23
|
+
export declare const findPreviousSegment: <T>({ activeChannel, candidateTime, segments, timeZoneName, }: ResolveActiveSegmentInput<T>) => IndexedPlaybackSegment<T> | null;
|
|
24
24
|
/**
|
|
25
25
|
* Resolves the final indicator time for segment-start snapping.
|
|
26
26
|
*/
|
|
@@ -28,7 +28,7 @@ export declare const snapToSegmentStart: <T>(input: ResolveActiveSegmentInput<T>
|
|
|
28
28
|
/**
|
|
29
29
|
* Resolves the time label anchor independently from the draggable indicator.
|
|
30
30
|
*/
|
|
31
|
-
export declare const resolveTooltipAnchor: <T>({ activeChannel, candidateTime, fallbackPositionPercent, segments, snapEnabled, }: ResolveTooltipAnchorInput<T>) => PlaybackTooltipAnchor;
|
|
31
|
+
export declare const resolveTooltipAnchor: <T>({ activeChannel, candidateTime, fallbackPositionPercent, segments, snapEnabled, timeZoneName, }: ResolveTooltipAnchorInput<T>) => PlaybackTooltipAnchor;
|
|
32
32
|
/**
|
|
33
33
|
* Resolves the visible playback preview range for the active segment.
|
|
34
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbackRange.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playbackRange.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAmDjB;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,IAAI,EACV,eAAe,MAAM,GAAG,IAAI,KAC3B,MAYF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,KAAG,MAG1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,CAAC,EACzC,iBAAiB,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,EAC3C,eAAe,MAAM,GAAG,IAAI,KAC3B,sBAAsB,CAAC,CAAC,CAAC,EAiC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAG,2DAKtC,yBAAyB,CAAC,CAAC,CAAC,KAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAoC7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAG,2DAKrC,yBAAyB,CAAC,CAAC,CAAC,KAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,IA4B7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAClC,OAAO,yBAAyB,CAAC,CAAC,CAAC,KAClC,wBAAwB,CAAC,CAAC,CAe5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAG,iGAOtC,yBAAyB,CAAC,CAAC,CAAC,KAAG,qBAuBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAG,2DAKrC,wBAAwB,CAAC,CAAC,CAAC,KAAG,aAAa,GAAG,IAahD,CAAC"}
|
|
@@ -1,41 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
import { convertDateToUserTimeZone as h } from "@m4l/core";
|
|
2
|
+
const m = 1440 * 60, p = "__local__", S = /* @__PURE__ */ new WeakMap(), u = (e) => Math.max(0, Math.min(m - 1, Math.floor(e)));
|
|
3
|
+
function g(e) {
|
|
4
|
+
if (typeof e != "string")
|
|
5
|
+
return null;
|
|
6
|
+
const t = e.trim();
|
|
7
|
+
if (t === "")
|
|
8
|
+
return null;
|
|
9
|
+
try {
|
|
10
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
11
|
+
timeZone: t
|
|
12
|
+
}).format(/* @__PURE__ */ new Date(0)), t;
|
|
13
|
+
} catch {
|
|
14
|
+
return "UTC";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function M(e) {
|
|
18
|
+
return g(e) ?? p;
|
|
19
|
+
}
|
|
20
|
+
const f = (e, t) => {
|
|
21
|
+
const s = g(t), o = s ? h(e, s) : e;
|
|
22
|
+
return o.getHours() * 3600 + o.getMinutes() * 60 + o.getSeconds() + o.getMilliseconds() / 1e3;
|
|
23
|
+
}, _ = (e) => Math.max(0, Math.min(m, e)) * 100 / m, v = (e, t) => {
|
|
2
24
|
if (!e?.segmentsList)
|
|
3
25
|
return [];
|
|
4
|
-
const t = S.get(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
26
|
+
const s = M(t), o = S.get(
|
|
27
|
+
e.segmentsList
|
|
28
|
+
), c = o?.get(s);
|
|
29
|
+
if (c)
|
|
30
|
+
return c;
|
|
31
|
+
const r = e.segmentsList.filter((n) => n.startTime && n.endTime && n.startTime < n.endTime).map((n) => ({
|
|
8
32
|
channelId: e.channelId,
|
|
9
33
|
segment: n,
|
|
10
|
-
startSeconds:
|
|
11
|
-
endSeconds:
|
|
12
|
-
})).sort((n,
|
|
13
|
-
return
|
|
14
|
-
|
|
34
|
+
startSeconds: f(n.startTime, t),
|
|
35
|
+
endSeconds: f(n.endTime, t)
|
|
36
|
+
})).sort((n, a) => n.startSeconds - a.startSeconds);
|
|
37
|
+
return o ? o.set(s, r) : S.set(
|
|
38
|
+
e.segmentsList,
|
|
39
|
+
/* @__PURE__ */ new Map([[s, r]])
|
|
40
|
+
), r;
|
|
41
|
+
}, T = ({
|
|
15
42
|
activeChannel: e,
|
|
16
43
|
candidateTime: t,
|
|
17
|
-
segments:
|
|
44
|
+
segments: s,
|
|
45
|
+
timeZoneName: o
|
|
18
46
|
}) => {
|
|
19
47
|
if (!e)
|
|
20
48
|
return null;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
49
|
+
const c = s.find((i) => i.channelId === e), r = v(
|
|
50
|
+
c,
|
|
51
|
+
o
|
|
52
|
+
);
|
|
53
|
+
let n = 0, a = r.length - 1, d = -1;
|
|
54
|
+
for (; n <= a; ) {
|
|
55
|
+
const i = Math.floor((n + a) / 2);
|
|
56
|
+
if (r[i].startSeconds <= t) {
|
|
57
|
+
d = i, n = i + 1;
|
|
27
58
|
continue;
|
|
28
59
|
}
|
|
29
|
-
|
|
60
|
+
a = i - 1;
|
|
30
61
|
}
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
33
|
-
if (t <=
|
|
34
|
-
return
|
|
62
|
+
for (let i = d; i >= 0; i -= 1) {
|
|
63
|
+
const l = r[i];
|
|
64
|
+
if (t <= l.endSeconds)
|
|
65
|
+
return l;
|
|
35
66
|
}
|
|
36
67
|
return null;
|
|
37
|
-
},
|
|
38
|
-
const t =
|
|
68
|
+
}, y = (e) => {
|
|
69
|
+
const t = T(e);
|
|
39
70
|
return t ? {
|
|
40
71
|
time: t.startSeconds,
|
|
41
72
|
segment: t,
|
|
@@ -45,48 +76,50 @@ const S = /* @__PURE__ */ new WeakMap(), l = (e) => Math.max(0, Math.min(86399,
|
|
|
45
76
|
segment: null,
|
|
46
77
|
didSnap: !1
|
|
47
78
|
};
|
|
48
|
-
},
|
|
79
|
+
}, C = ({
|
|
49
80
|
activeChannel: e,
|
|
50
81
|
candidateTime: t,
|
|
51
|
-
fallbackPositionPercent:
|
|
52
|
-
segments:
|
|
53
|
-
snapEnabled:
|
|
82
|
+
fallbackPositionPercent: s,
|
|
83
|
+
segments: o,
|
|
84
|
+
snapEnabled: c,
|
|
85
|
+
timeZoneName: r
|
|
54
86
|
}) => {
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
87
|
+
if (c) {
|
|
88
|
+
const n = T({
|
|
57
89
|
activeChannel: e,
|
|
58
90
|
candidateTime: t,
|
|
59
|
-
segments:
|
|
91
|
+
segments: o,
|
|
92
|
+
timeZoneName: r
|
|
60
93
|
});
|
|
61
|
-
if (
|
|
94
|
+
if (n)
|
|
62
95
|
return {
|
|
63
|
-
time:
|
|
64
|
-
positionPercent:
|
|
96
|
+
time: u(n.startSeconds),
|
|
97
|
+
positionPercent: _(n.startSeconds),
|
|
65
98
|
snapsToSegment: !0
|
|
66
99
|
};
|
|
67
100
|
}
|
|
68
101
|
return {
|
|
69
|
-
time:
|
|
70
|
-
positionPercent:
|
|
102
|
+
time: u(t),
|
|
103
|
+
positionPercent: s,
|
|
71
104
|
snapsToSegment: !1
|
|
72
105
|
};
|
|
73
|
-
},
|
|
106
|
+
}, D = ({
|
|
74
107
|
indicatorTime: e,
|
|
75
108
|
durationSeconds: t,
|
|
76
|
-
segment:
|
|
77
|
-
snapEnabled:
|
|
109
|
+
segment: s,
|
|
110
|
+
snapEnabled: o
|
|
78
111
|
}) => {
|
|
79
|
-
if (!
|
|
112
|
+
if (!s || !t || t <= 0)
|
|
80
113
|
return null;
|
|
81
|
-
const
|
|
82
|
-
return r <=
|
|
114
|
+
const c = o ? s.startSeconds : e, r = Math.min(c + t, s.endSeconds);
|
|
115
|
+
return r <= c ? null : { start: c, end: r };
|
|
83
116
|
};
|
|
84
117
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
118
|
+
f as dateToDaySeconds,
|
|
119
|
+
v as getSortedPlaybackSegments,
|
|
120
|
+
T as resolveActiveSegment,
|
|
121
|
+
D as resolvePreviewRange,
|
|
122
|
+
C as resolveTooltipAnchor,
|
|
123
|
+
_ as secondsToTimelinePercent,
|
|
124
|
+
y as snapToSegmentStart
|
|
92
125
|
};
|
|
@@ -23,6 +23,7 @@ export type ResolveActiveSegmentInput<T = unknown> = {
|
|
|
23
23
|
activeChannel: ActiveChannel | null | undefined;
|
|
24
24
|
candidateTime: number;
|
|
25
25
|
segments: SegmentType<T>[];
|
|
26
|
+
timeZoneName?: string | null;
|
|
26
27
|
};
|
|
27
28
|
export type ResolvePreviewRangeInput<T = unknown> = {
|
|
28
29
|
indicatorTime: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/playbackRange/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,OAAO,IAAI;IAChD,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,GAAG,OAAO,IAAI;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,OAAO,IAAI;IACnD,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/playbackRange/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,OAAO,IAAI;IAChD,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,GAAG,OAAO,IAAI;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,OAAO,IAAI;IACnD,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,GAAG,OAAO,IAAI;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1C,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,OAAO,IAAI,yBAAyB,CAAC,CAAC,CAAC,GAAG;IAClF,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseVideoTimeLineSelector.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAMjF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,6CAGvC;IACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,IAAI,CAAC;IACpH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC,
|
|
1
|
+
{"version":3,"file":"BaseVideoTimeLineSelector.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAMjF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,6CAGvC;IACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,IAAI,CAAC;IACpH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC,qDAyKA,CAAC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as n, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
import { ChartTimeLineRootStyled as
|
|
4
|
-
import { TIME_VISIBLE_OPTIONS_KEYS as
|
|
5
|
-
import { useEffect as
|
|
2
|
+
import { Skeleton as Q, Select as g } from "@m4l/components";
|
|
3
|
+
import { ChartTimeLineRootStyled as B, ContainerSelectTimeChannelsStyled as W, ChannelsRadioGroupStyled as q, ChannelsGroupStyled as G, WrapperDialTimeLineArrowsStyled as Y, ArrowLeftIconStyled as j, ArrowRightIconStyled as F } from "../../slots/VideoTimeLineSelectorSlots.js";
|
|
4
|
+
import { TIME_VISIBLE_OPTIONS_KEYS as K, VIDEO_TIME_LINE_SELECTOR_CLASSES as d } from "../../constants.js";
|
|
5
|
+
import { useEffect as U, useTransition as Z, useMemo as D, useCallback as $ } from "react";
|
|
6
6
|
import { VIDEO_TIME_LINE_SELECTOR_DICTIONARY_KEYS as m } from "../../dictionary.js";
|
|
7
7
|
import { isValidTimeVisible as H } from "../../helpers/isValidTimeVisible/isValidTimeVisible.js";
|
|
8
8
|
import { useVideoTimeLineSelectorStore as u } from "../../store/useVideoTimeLineSelectorStore.js";
|
|
9
9
|
import { shallow as J } from "zustand/shallow";
|
|
10
|
-
import { useModuleDictionary as
|
|
11
|
-
import { useComponentSize as
|
|
12
|
-
import { ChannelCheckbox as
|
|
13
|
-
import { ChartTimeLine as
|
|
14
|
-
import { VIDEO_TIME_LINE_SELECTOR_ICONS as
|
|
15
|
-
import { ChannelRadioButton as
|
|
16
|
-
import { getIntersectedSegments as
|
|
17
|
-
import { getDataWithoutProxy as
|
|
18
|
-
const
|
|
10
|
+
import { useModuleDictionary as X, useUserPreferences as ee } from "@m4l/core";
|
|
11
|
+
import { useComponentSize as ne } from "@m4l/graphics";
|
|
12
|
+
import { ChannelCheckbox as re } from "../ChannelCheckBox/ChannelCheckbox.js";
|
|
13
|
+
import { ChartTimeLine as ae } from "../ChartTimeLine/ChartTimeLine.js";
|
|
14
|
+
import { VIDEO_TIME_LINE_SELECTOR_ICONS as _ } from "../../icons.js";
|
|
15
|
+
import { ChannelRadioButton as te } from "../ChannelRadioButton/ChannelRadioButton.js";
|
|
16
|
+
import { getIntersectedSegments as oe } from "../../helpers/getIntersectedSegments/getIntersectedSegments.js";
|
|
17
|
+
import { getDataWithoutProxy as ie } from "../../helpers/getDataWithoutProxy/getDataWithoutProxy.js";
|
|
18
|
+
const De = ({
|
|
19
19
|
onChange: S,
|
|
20
|
-
showPlaybackDurationSelector:
|
|
20
|
+
showPlaybackDurationSelector: k = !0
|
|
21
21
|
}) => {
|
|
22
|
-
const { getLabel:
|
|
22
|
+
const { getLabel: a } = X(), { timeZone: L } = ee(), h = L?.name?.trim() || "UTC", { setTimeVisible: R, setActiveChannel: C, setCurrentQuadrant: p, setPlaybackDurationSeconds: f } = u((e) => e.actions), { timeVisible: V, currentQuadrant: t, quadrants: O, maxChannelsSelected: P, channels: b, allowedPlaybackDurationsSeconds: i, playbackDurationSeconds: w, onPlaybackDurationChange: y } = u(
|
|
23
23
|
(e) => ({
|
|
24
24
|
timeVisible: e.timeVisible,
|
|
25
25
|
activeChannels: e.activeChannels,
|
|
@@ -32,97 +32,102 @@ const Ee = ({
|
|
|
32
32
|
onPlaybackDurationChange: e.onPlaybackDurationChange
|
|
33
33
|
}),
|
|
34
34
|
J
|
|
35
|
-
), { currentTime:
|
|
35
|
+
), { currentTime: s, activeChannels: l, segments: T, loading: A } = u(
|
|
36
36
|
(e) => e
|
|
37
37
|
);
|
|
38
|
-
|
|
39
|
-
const e =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
U(() => {
|
|
39
|
+
const e = oe(
|
|
40
|
+
s,
|
|
41
|
+
l,
|
|
42
|
+
T,
|
|
43
|
+
h
|
|
44
|
+
);
|
|
45
|
+
S?.(...ie(s, l, e));
|
|
46
|
+
}, [s, l, T, S, h]);
|
|
47
|
+
const { currentSize: o } = ne(), [E, N] = Z(), x = D(() => K.map((e) => ({
|
|
43
48
|
id: e,
|
|
44
|
-
label:
|
|
45
|
-
})), [
|
|
49
|
+
label: a(m[e])
|
|
50
|
+
})), [a]), I = D(() => i.map((e) => ({
|
|
46
51
|
id: e,
|
|
47
|
-
label:
|
|
48
|
-
})), [i,
|
|
52
|
+
label: a(`${m.duration_seconds}.${e}`)
|
|
53
|
+
})), [i, a]), v = k && I.length > 1, M = (e) => {
|
|
49
54
|
if (e && !Array.isArray(e)) {
|
|
50
|
-
const
|
|
51
|
-
H(
|
|
52
|
-
|
|
55
|
+
const r = e.id;
|
|
56
|
+
H(r) && N(() => {
|
|
57
|
+
R(r);
|
|
53
58
|
});
|
|
54
59
|
}
|
|
55
|
-
},
|
|
60
|
+
}, z = $((e) => {
|
|
56
61
|
if (!e || Array.isArray(e))
|
|
57
62
|
return;
|
|
58
|
-
const
|
|
59
|
-
!Number.isFinite(
|
|
60
|
-
}, [
|
|
61
|
-
return
|
|
62
|
-
/* @__PURE__ */ c(
|
|
63
|
+
const r = Number(e.id);
|
|
64
|
+
!Number.isFinite(r) || r <= 0 || (f(r), y?.(r));
|
|
65
|
+
}, [y, f]);
|
|
66
|
+
return A ? /* @__PURE__ */ n(Q, { variant: "rectangular", width: "100%", height: "200px" }) : /* @__PURE__ */ c(B, { className: d.root, children: [
|
|
67
|
+
/* @__PURE__ */ c(W, { children: [
|
|
63
68
|
/* @__PURE__ */ n(
|
|
64
|
-
|
|
69
|
+
g,
|
|
65
70
|
{
|
|
66
|
-
options:
|
|
67
|
-
value:
|
|
68
|
-
onChange:
|
|
69
|
-
disabled:
|
|
70
|
-
size:
|
|
71
|
+
options: x,
|
|
72
|
+
value: V,
|
|
73
|
+
onChange: M,
|
|
74
|
+
disabled: E,
|
|
75
|
+
size: o
|
|
71
76
|
}
|
|
72
77
|
),
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
P === 1 ? /* @__PURE__ */ n(q, { ownerState: { size: o }, children: b.map((e) => /* @__PURE__ */ n(
|
|
79
|
+
te,
|
|
75
80
|
{
|
|
76
81
|
channel: e,
|
|
77
|
-
onChange:
|
|
82
|
+
onChange: C
|
|
78
83
|
},
|
|
79
84
|
e.id
|
|
80
|
-
)) }) : /* @__PURE__ */ n(
|
|
81
|
-
|
|
85
|
+
)) }) : /* @__PURE__ */ n(G, { ownerState: { size: o }, children: b.map((e) => /* @__PURE__ */ n(
|
|
86
|
+
re,
|
|
82
87
|
{
|
|
83
88
|
channel: e,
|
|
84
|
-
onChange:
|
|
89
|
+
onChange: C
|
|
85
90
|
},
|
|
86
91
|
e.id
|
|
87
92
|
)) }),
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
v && /* @__PURE__ */ n(
|
|
94
|
+
g,
|
|
90
95
|
{
|
|
91
|
-
options:
|
|
92
|
-
value:
|
|
93
|
-
onChange:
|
|
94
|
-
placeholder:
|
|
95
|
-
size:
|
|
96
|
+
options: I,
|
|
97
|
+
value: w ?? i[0],
|
|
98
|
+
onChange: z,
|
|
99
|
+
placeholder: a(m.duration_placeholder),
|
|
100
|
+
size: o
|
|
96
101
|
}
|
|
97
102
|
)
|
|
98
103
|
] }),
|
|
99
|
-
/* @__PURE__ */ c(
|
|
104
|
+
/* @__PURE__ */ c(Y, { children: [
|
|
100
105
|
/* @__PURE__ */ n(
|
|
101
|
-
|
|
106
|
+
j,
|
|
102
107
|
{
|
|
103
108
|
className: d.arrowLeft,
|
|
104
|
-
src:
|
|
105
|
-
onClick: () =>
|
|
109
|
+
src: _.ARROW_LEFT,
|
|
110
|
+
onClick: () => p(t - 1),
|
|
106
111
|
color: "default",
|
|
107
112
|
variant: "contained",
|
|
108
|
-
disabled:
|
|
113
|
+
disabled: t === 1
|
|
109
114
|
}
|
|
110
115
|
),
|
|
111
|
-
/* @__PURE__ */ n(
|
|
116
|
+
/* @__PURE__ */ n(ae, { isTransitioning: E }),
|
|
112
117
|
/* @__PURE__ */ n(
|
|
113
|
-
|
|
118
|
+
F,
|
|
114
119
|
{
|
|
115
120
|
className: d.arrowRight,
|
|
116
|
-
src:
|
|
117
|
-
onClick: () =>
|
|
121
|
+
src: _.ARROW_RIGHT,
|
|
122
|
+
onClick: () => p(t + 1),
|
|
118
123
|
color: "default",
|
|
119
124
|
variant: "contained",
|
|
120
|
-
disabled:
|
|
125
|
+
disabled: t === O
|
|
121
126
|
}
|
|
122
127
|
)
|
|
123
128
|
] })
|
|
124
129
|
] });
|
|
125
130
|
};
|
|
126
131
|
export {
|
|
127
|
-
|
|
132
|
+
De as BaseVideoTimeLineSelector
|
|
128
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTimeLine.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAe7C;;;GAGG;AACH,eAAO,MAAM,aAAa,8CAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ChartTimeLine.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAe7C;;;GAGG;AACH,eAAO,MAAM,aAAa,8CAAgB,kBAAkB,sDAypB1D,CAAC"}
|