@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.
Files changed (29) hide show
  1. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.d.ts.map +1 -1
  2. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.js +17 -16
  3. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts +4 -1
  4. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts.map +1 -1
  5. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.js +70 -55
  6. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts +5 -5
  7. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts.map +1 -1
  8. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.js +55 -41
  9. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts +2 -2
  10. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts.map +1 -1
  11. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.js +16 -9
  12. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts +1 -1
  13. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts.map +1 -1
  14. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.js +6 -5
  15. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts +1 -0
  16. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts.map +1 -1
  17. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts +6 -6
  18. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts.map +1 -1
  19. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.js +82 -49
  20. package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts +1 -0
  21. package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts.map +1 -1
  22. package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.d.ts.map +1 -1
  23. package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.js +69 -64
  24. package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.d.ts.map +1 -1
  25. package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.js +205 -192
  26. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts +2 -2
  27. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts.map +1 -1
  28. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.js +32 -24
  29. 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 local midnight.
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":"AAAA,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;AAajB;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,IAAI,KAAG,MAK7C,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,KAC1C,sBAAsB,CAAC,CAAC,CAAC,EAsB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAG,6CAItC,yBAAyB,CAAC,CAAC,CAAC,KAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAiC7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAG,6CAIrC,yBAAyB,CAAC,CAAC,CAAC,KAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAyB7D,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,mFAMtC,yBAAyB,CAAC,CAAC,CAAC,KAAG,qBAsBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAG,2DAKrC,wBAAwB,CAAC,CAAC,CAAC,KAAG,aAAa,GAAG,IAahD,CAAC"}
1
+ {"version":3,"file":"playbackRange.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.ts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 @@
1
- const S = /* @__PURE__ */ new WeakMap(), l = (e) => Math.max(0, Math.min(86399, Math.floor(e))), m = (e) => e.getHours() * 3600 + e.getMinutes() * 60 + e.getSeconds() + e.getMilliseconds() / 1e3, u = (e) => Math.max(0, Math.min(86400, e)) * 100 / 86400, f = (e) => {
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(e.segmentsList);
5
- if (t)
6
- return t;
7
- const o = e.segmentsList.filter((n) => n.startTime && n.endTime && n.startTime < n.endTime).map((n) => ({
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: m(n.startTime),
11
- endSeconds: m(n.endTime)
12
- })).sort((n, s) => n.startSeconds - s.startSeconds);
13
- return S.set(e.segmentsList, o), o;
14
- }, g = ({
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: o
44
+ segments: s,
45
+ timeZoneName: o
18
46
  }) => {
19
47
  if (!e)
20
48
  return null;
21
- const n = o.find((c) => c.channelId === e), s = f(n);
22
- let r = 0, i = s.length - 1, d = -1;
23
- for (; r <= i; ) {
24
- const c = Math.floor((r + i) / 2);
25
- if (s[c].startSeconds <= t) {
26
- d = c, r = c + 1;
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
- i = c - 1;
60
+ a = i - 1;
30
61
  }
31
- for (let c = d; c >= 0; c -= 1) {
32
- const a = s[c];
33
- if (t <= a.endSeconds)
34
- return a;
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
- }, h = (e) => {
38
- const t = g(e);
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
- }, p = ({
79
+ }, C = ({
49
80
  activeChannel: e,
50
81
  candidateTime: t,
51
- fallbackPositionPercent: o,
52
- segments: n,
53
- snapEnabled: s
82
+ fallbackPositionPercent: s,
83
+ segments: o,
84
+ snapEnabled: c,
85
+ timeZoneName: r
54
86
  }) => {
55
- if (s) {
56
- const r = g({
87
+ if (c) {
88
+ const n = T({
57
89
  activeChannel: e,
58
90
  candidateTime: t,
59
- segments: n
91
+ segments: o,
92
+ timeZoneName: r
60
93
  });
61
- if (r)
94
+ if (n)
62
95
  return {
63
- time: l(r.startSeconds),
64
- positionPercent: u(r.startSeconds),
96
+ time: u(n.startSeconds),
97
+ positionPercent: _(n.startSeconds),
65
98
  snapsToSegment: !0
66
99
  };
67
100
  }
68
101
  return {
69
- time: l(t),
70
- positionPercent: o,
102
+ time: u(t),
103
+ positionPercent: s,
71
104
  snapsToSegment: !1
72
105
  };
73
- }, T = ({
106
+ }, D = ({
74
107
  indicatorTime: e,
75
108
  durationSeconds: t,
76
- segment: o,
77
- snapEnabled: n
109
+ segment: s,
110
+ snapEnabled: o
78
111
  }) => {
79
- if (!o || !t || t <= 0)
112
+ if (!s || !t || t <= 0)
80
113
  return null;
81
- const s = n ? o.startSeconds : e, r = Math.min(s + t, o.endSeconds);
82
- return r <= s ? null : { start: s, end: 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
- m as dateToDaySeconds,
86
- f as getSortedPlaybackSegments,
87
- g as resolveActiveSegment,
88
- T as resolvePreviewRange,
89
- p as resolveTooltipAnchor,
90
- u as secondsToTimelinePercent,
91
- h as snapToSegmentStart
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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BAAyB,CAAC,CAAC,GAAG,OAAO,IAAI,yBAAyB,CAAC,CAAC,CAAC,GAAG;IAClF,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB,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,qDAkKA,CAAC"}
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 M, Select as I } from "@m4l/components";
3
- import { ChartTimeLineRootStyled as z, ContainerSelectTimeChannelsStyled as Q, ChannelsRadioGroupStyled as B, ChannelsGroupStyled as W, WrapperDialTimeLineArrowsStyled as q, ArrowLeftIconStyled as G, ArrowRightIconStyled as Y } from "../../slots/VideoTimeLineSelectorSlots.js";
4
- import { TIME_VISIBLE_OPTIONS_KEYS as j, VIDEO_TIME_LINE_SELECTOR_CLASSES as d } from "../../constants.js";
5
- import { useEffect as F, useTransition as K, useMemo as g, useCallback as $ } from "react";
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 U } from "@m4l/core";
11
- import { useComponentSize as X } from "@m4l/graphics";
12
- import { ChannelCheckbox as Z } from "../ChannelCheckBox/ChannelCheckbox.js";
13
- import { ChartTimeLine as ee } from "../ChartTimeLine/ChartTimeLine.js";
14
- import { VIDEO_TIME_LINE_SELECTOR_ICONS as D } from "../../icons.js";
15
- import { ChannelRadioButton as ne } from "../ChannelRadioButton/ChannelRadioButton.js";
16
- import { getIntersectedSegments as ae } from "../../helpers/getIntersectedSegments/getIntersectedSegments.js";
17
- import { getDataWithoutProxy as re } from "../../helpers/getDataWithoutProxy/getDataWithoutProxy.js";
18
- const Ee = ({
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: _ = !0
20
+ showPlaybackDurationSelector: k = !0
21
21
  }) => {
22
- const { getLabel: r } = U(), { setTimeVisible: k, setActiveChannel: h, setCurrentQuadrant: C, setPlaybackDurationSeconds: p } = u((e) => e.actions), { timeVisible: L, currentQuadrant: o, quadrants: R, maxChannelsSelected: V, channels: b, allowedPlaybackDurationsSeconds: i, playbackDurationSeconds: O, onPlaybackDurationChange: f } = u(
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: l, activeChannels: s, segments: y, loading: w } = u(
35
+ ), { currentTime: s, activeChannels: l, segments: T, loading: A } = u(
36
36
  (e) => e
37
37
  );
38
- F(() => {
39
- const e = ae(l, s, y);
40
- S?.(...re(l, s, e));
41
- }, [l, s, y, S]);
42
- const { currentSize: t } = X(), [T, A] = K(), P = g(() => j.map((e) => ({
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: r(m[e])
45
- })), [r]), E = g(() => i.map((e) => ({
49
+ label: a(m[e])
50
+ })), [a]), I = D(() => i.map((e) => ({
46
51
  id: e,
47
- label: r(`${m.duration_seconds}.${e}`)
48
- })), [i, r]), N = _ && E.length > 1, x = (e) => {
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 a = e.id;
51
- H(a) && A(() => {
52
- k(a);
55
+ const r = e.id;
56
+ H(r) && N(() => {
57
+ R(r);
53
58
  });
54
59
  }
55
- }, v = $((e) => {
60
+ }, z = $((e) => {
56
61
  if (!e || Array.isArray(e))
57
62
  return;
58
- const a = Number(e.id);
59
- !Number.isFinite(a) || a <= 0 || (p(a), f?.(a));
60
- }, [f, p]);
61
- return w ? /* @__PURE__ */ n(M, { variant: "rectangular", width: "100%", height: "200px" }) : /* @__PURE__ */ c(z, { className: d.root, children: [
62
- /* @__PURE__ */ c(Q, { children: [
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
- I,
69
+ g,
65
70
  {
66
- options: P,
67
- value: L,
68
- onChange: x,
69
- disabled: T,
70
- size: t
71
+ options: x,
72
+ value: V,
73
+ onChange: M,
74
+ disabled: E,
75
+ size: o
71
76
  }
72
77
  ),
73
- V === 1 ? /* @__PURE__ */ n(B, { ownerState: { size: t }, children: b.map((e) => /* @__PURE__ */ n(
74
- ne,
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: h
82
+ onChange: C
78
83
  },
79
84
  e.id
80
- )) }) : /* @__PURE__ */ n(W, { ownerState: { size: t }, children: b.map((e) => /* @__PURE__ */ n(
81
- Z,
85
+ )) }) : /* @__PURE__ */ n(G, { ownerState: { size: o }, children: b.map((e) => /* @__PURE__ */ n(
86
+ re,
82
87
  {
83
88
  channel: e,
84
- onChange: h
89
+ onChange: C
85
90
  },
86
91
  e.id
87
92
  )) }),
88
- N && /* @__PURE__ */ n(
89
- I,
93
+ v && /* @__PURE__ */ n(
94
+ g,
90
95
  {
91
- options: E,
92
- value: O ?? i[0],
93
- onChange: v,
94
- placeholder: r(m.duration_placeholder),
95
- size: t
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(q, { children: [
104
+ /* @__PURE__ */ c(Y, { children: [
100
105
  /* @__PURE__ */ n(
101
- G,
106
+ j,
102
107
  {
103
108
  className: d.arrowLeft,
104
- src: D.ARROW_LEFT,
105
- onClick: () => C(o - 1),
109
+ src: _.ARROW_LEFT,
110
+ onClick: () => p(t - 1),
106
111
  color: "default",
107
112
  variant: "contained",
108
- disabled: o === 1
113
+ disabled: t === 1
109
114
  }
110
115
  ),
111
- /* @__PURE__ */ n(ee, { isTransitioning: T }),
116
+ /* @__PURE__ */ n(ae, { isTransitioning: E }),
112
117
  /* @__PURE__ */ n(
113
- Y,
118
+ F,
114
119
  {
115
120
  className: d.arrowRight,
116
- src: D.ARROW_RIGHT,
117
- onClick: () => C(o + 1),
121
+ src: _.ARROW_RIGHT,
122
+ onClick: () => p(t + 1),
118
123
  color: "default",
119
124
  variant: "contained",
120
- disabled: o === R
125
+ disabled: t === O
121
126
  }
122
127
  )
123
128
  ] })
124
129
  ] });
125
130
  };
126
131
  export {
127
- Ee as BaseVideoTimeLineSelector
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,sDAgpB1D,CAAC"}
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"}