@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsViewerChartSeries.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAkB9D,MAAM,WAAW,6BAA6B;IAC5C,iEAAiE;IACjE,MAAM,EAAE,uBAAuB,CAAC;IAChC,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,UAAkB,GACnB,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"ReportsViewerChartSeries.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAkB9D,MAAM,WAAW,6BAA6B;IAC5C,iEAAiE;IACjE,MAAM,EAAE,uBAAuB,CAAC;IAChC,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,UAAkB,GACnB,EAAE,6BAA6B,oDAqC/B"}
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import u from "echarts-for-react";
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useUserPreferences as
|
|
6
|
-
import { resolveChartSeriesCompactNumberDictionary as
|
|
7
|
-
import { generateReportsViewerChartSeriesOptions as
|
|
8
|
-
import { useReportsViewerChartResize as
|
|
9
|
-
const
|
|
3
|
+
import { useTheme as d, styled as n } from "@mui/material/styles";
|
|
4
|
+
import { useRef as R, useMemo as y } from "react";
|
|
5
|
+
import { useUserPreferences as C, useModuleDictionary as w } from "@m4l/core";
|
|
6
|
+
import { resolveChartSeriesCompactNumberDictionary as g } from "@m4l/widgets";
|
|
7
|
+
import { generateReportsViewerChartSeriesOptions as S } from "./helpers/generateReportsViewerChartSeriesOptions.js";
|
|
8
|
+
import { useReportsViewerChartResize as b } from "./hooks/useReportsViewerChartResize.js";
|
|
9
|
+
const V = n("div")({
|
|
10
10
|
containerName: "root",
|
|
11
11
|
containerType: "size",
|
|
12
12
|
width: "100%",
|
|
13
13
|
height: "100%"
|
|
14
|
-
}),
|
|
14
|
+
}), v = n("div")({
|
|
15
15
|
width: "100%",
|
|
16
16
|
height: "100%",
|
|
17
17
|
minWidth: "500px",
|
|
18
18
|
minHeight: "300px"
|
|
19
19
|
});
|
|
20
|
-
function
|
|
20
|
+
function P({
|
|
21
21
|
values: a,
|
|
22
22
|
scrollable: m = !1
|
|
23
23
|
}) {
|
|
24
|
-
const t =
|
|
24
|
+
const t = R(null), c = d(), { locale: r, decimalSymbol: o, thousandsSymbol: i, formatDate: h } = C(), { getLabel: s } = w(), l = b(t), p = y(
|
|
25
25
|
() => ({
|
|
26
26
|
locale: r ?? Intl.NumberFormat().resolvedOptions().locale,
|
|
27
27
|
decimalSymbol: o,
|
|
28
28
|
thousandsSymbol: i,
|
|
29
|
-
compactDictionary:
|
|
29
|
+
compactDictionary: g(s)
|
|
30
30
|
}),
|
|
31
31
|
[o, s, r, i]
|
|
32
|
-
),
|
|
32
|
+
), f = S(
|
|
33
33
|
a,
|
|
34
34
|
c,
|
|
35
35
|
m,
|
|
36
|
-
|
|
36
|
+
p,
|
|
37
|
+
h
|
|
37
38
|
);
|
|
38
|
-
return /* @__PURE__ */ e(
|
|
39
|
+
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(v, { ref: l, children: /* @__PURE__ */ e(
|
|
39
40
|
u,
|
|
40
41
|
{
|
|
41
42
|
ref: t,
|
|
42
|
-
option:
|
|
43
|
+
option: f,
|
|
43
44
|
style: { height: "100%", width: "100%" },
|
|
44
45
|
notMerge: !0,
|
|
45
46
|
lazyUpdate: !0
|
|
@@ -47,5 +48,5 @@ function O({
|
|
|
47
48
|
) }) });
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
P as ReportsViewerChartSeries
|
|
51
52
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Theme } from '@mui/material/styles';
|
|
2
|
+
import { ResolveDatePresentationOptions } from '@m4l/core';
|
|
2
3
|
import { CompactNumberLocalizationOptions } from '@m4l/widgets';
|
|
3
4
|
import { ChartSeriesParsedConfig } from '../../../../types';
|
|
5
|
+
type ReportsViewerChartDateFormatter = (options: ResolveDatePresentationOptions) => string;
|
|
4
6
|
/**
|
|
5
7
|
* Builds the ECharts options for ReportsViewer's local ChartSeries renderer.
|
|
6
8
|
*/
|
|
7
|
-
export declare function generateReportsViewerChartSeriesOptions(values: ChartSeriesParsedConfig, theme: Theme, scrollable: boolean, numberLocalization?: CompactNumberLocalizationOptions): object;
|
|
9
|
+
export declare function generateReportsViewerChartSeriesOptions(values: ChartSeriesParsedConfig, theme: Theme, scrollable: boolean, numberLocalization?: CompactNumberLocalizationOptions, formatDate?: ReportsViewerChartDateFormatter): object;
|
|
10
|
+
export {};
|
|
8
11
|
//# sourceMappingURL=generateReportsViewerChartSeriesOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateReportsViewerChartSeriesOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"generateReportsViewerChartSeriesOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAEhE,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAQjE,KAAK,+BAA+B,GAAG,CACrC,OAAO,EAAE,8BAA8B,KACpC,MAAM,CAAC;AA2HZ;;GAEG;AACH,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,OAAO,EACnB,kBAAkB,CAAC,EAAE,gCAAgC,EACrD,UAAU,CAAC,EAAE,+BAA+B,GAC3C,MAAM,CA2QR"}
|
|
@@ -1,57 +1,67 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { BASE_TAG_OBJECT_COLORS_LIGHT as
|
|
3
|
-
import { formatCompactNumber as
|
|
4
|
-
import { remapReportsViewerChartSeriesTooltip as
|
|
5
|
-
const p = "#9ca3af",
|
|
1
|
+
import * as x from "echarts";
|
|
2
|
+
import { BASE_TAG_OBJECT_COLORS_LIGHT as g } from "@m4l/styles";
|
|
3
|
+
import { formatCompactNumber as C } from "@m4l/widgets";
|
|
4
|
+
import { remapReportsViewerChartSeriesTooltip as b } from "./remapReportsViewerChartSeriesTooltip.js";
|
|
5
|
+
const p = "#9ca3af", h = 48, S = /^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:[Zz]|[+-]\d{2}:?\d{2})$/;
|
|
6
6
|
function s(t) {
|
|
7
7
|
if (t === null || typeof t != "string")
|
|
8
8
|
return p;
|
|
9
9
|
if (t.includes("#"))
|
|
10
10
|
return t;
|
|
11
|
-
const
|
|
12
|
-
return getComputedStyle(document.documentElement).getPropertyValue(
|
|
11
|
+
const e = t.replace("var(", "").replace(")", "");
|
|
12
|
+
return getComputedStyle(document.documentElement).getPropertyValue(e).trim() || p;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function d(t, e = "contained", l = "backgroundColorTone") {
|
|
15
15
|
if (t.includes("#"))
|
|
16
16
|
return t;
|
|
17
17
|
if (!t?.trim())
|
|
18
18
|
return p;
|
|
19
|
-
const n =
|
|
20
|
-
return n ? n[
|
|
19
|
+
const n = g[t];
|
|
20
|
+
return n ? n[e][l] : p;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return t ? Object.keys(t).reduce((
|
|
22
|
+
function T(t) {
|
|
23
|
+
return t ? Object.keys(t).reduce((e, l) => {
|
|
24
24
|
const n = t[l];
|
|
25
|
-
return n && typeof n == "object" && "v" in n && (
|
|
25
|
+
return n && typeof n == "object" && "v" in n && (e[l] = String(n.v).replace(/[0-9.\s]+/g, "")), e;
|
|
26
26
|
}, {}) : {};
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return typeof t == "string" && t.trim() !== "" ? t.trim() : typeof
|
|
28
|
+
function A(t, e) {
|
|
29
|
+
return typeof t == "string" && t.trim() !== "" ? t.trim() : typeof e == "string" && e.trim() !== "" ? e.trim() : "";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function _(t, e) {
|
|
32
|
+
return e ? `${t} (${e})` : t;
|
|
33
33
|
}
|
|
34
|
-
function L(t
|
|
35
|
-
|
|
34
|
+
function L(t) {
|
|
35
|
+
return typeof t != "string" || !S.test(t) ? !1 : !Number.isNaN(new Date(t).getTime());
|
|
36
|
+
}
|
|
37
|
+
function k(t, e) {
|
|
38
|
+
return !e || !L(t) ? t : e({
|
|
39
|
+
fallbackValue: t,
|
|
40
|
+
presentationType: "datetime",
|
|
41
|
+
value: t
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function P(t, e, l, n, f) {
|
|
45
|
+
const r = {
|
|
36
46
|
textPrimaryColor: s(
|
|
37
|
-
|
|
47
|
+
e.vars?.palette?.text?.primary
|
|
38
48
|
),
|
|
39
49
|
textDisabledColor: s(
|
|
40
|
-
|
|
50
|
+
e.vars?.palette?.text?.disabled
|
|
41
51
|
),
|
|
42
52
|
themeBackgroundColor: s(
|
|
43
|
-
|
|
53
|
+
e.vars?.palette?.background?.default
|
|
44
54
|
),
|
|
45
55
|
contrastTextColor: s(
|
|
46
|
-
|
|
56
|
+
e.vars?.palette?.text?.contrastText
|
|
47
57
|
),
|
|
48
58
|
backgroundNeutralColor: s(
|
|
49
|
-
|
|
59
|
+
e.vars?.palette?.background?.neutral
|
|
50
60
|
),
|
|
51
61
|
contrastDefaultColor: s(
|
|
52
|
-
|
|
62
|
+
e.vars?.palette?.background?.contrastDefault
|
|
53
63
|
)
|
|
54
|
-
},
|
|
64
|
+
}, u = T(t.values[0]);
|
|
55
65
|
return {
|
|
56
66
|
baseOption: {
|
|
57
67
|
tooltip: {
|
|
@@ -61,25 +71,25 @@ function L(t, r, l, n) {
|
|
|
61
71
|
shadowColor: "transparent",
|
|
62
72
|
borderWidth: 0,
|
|
63
73
|
textStyle: {
|
|
64
|
-
color:
|
|
74
|
+
color: r.contrastTextColor,
|
|
65
75
|
fontFamily: "Inter",
|
|
66
76
|
fontSize: 13,
|
|
67
77
|
fontWeight: 700
|
|
68
78
|
},
|
|
69
|
-
formatter: (o) =>
|
|
79
|
+
formatter: (o) => b(o, t, r),
|
|
70
80
|
axisPointer: {
|
|
71
81
|
type: "cross",
|
|
72
82
|
lineStyle: {
|
|
73
|
-
color:
|
|
83
|
+
color: r.textDisabledColor,
|
|
74
84
|
type: "solid"
|
|
75
85
|
},
|
|
76
86
|
crossStyle: {
|
|
77
|
-
color:
|
|
87
|
+
color: r.textDisabledColor,
|
|
78
88
|
type: "solid"
|
|
79
89
|
},
|
|
80
90
|
label: {
|
|
81
|
-
backgroundColor:
|
|
82
|
-
color:
|
|
91
|
+
backgroundColor: r.backgroundNeutralColor,
|
|
92
|
+
color: r.textPrimaryColor,
|
|
83
93
|
fontFamily: "Inter",
|
|
84
94
|
fontSize: 13,
|
|
85
95
|
fontWeight: 400,
|
|
@@ -116,13 +126,18 @@ function L(t, r, l, n) {
|
|
|
116
126
|
itemHeight: 11,
|
|
117
127
|
textStyle: {
|
|
118
128
|
fontSize: 12,
|
|
119
|
-
color:
|
|
129
|
+
color: r.textPrimaryColor
|
|
120
130
|
},
|
|
121
131
|
data: t.series.map((o) => o.title)
|
|
122
132
|
},
|
|
123
133
|
xAxis: t.xAxis.map((o, a) => ({
|
|
124
134
|
type: "category",
|
|
125
|
-
data: t.values.map(
|
|
135
|
+
data: t.values.map(
|
|
136
|
+
(i) => k(
|
|
137
|
+
i[o.field],
|
|
138
|
+
f
|
|
139
|
+
)
|
|
140
|
+
),
|
|
126
141
|
offset: a > 1 ? (a - 1) * 20 : 0,
|
|
127
142
|
axisLine: { show: !1 },
|
|
128
143
|
axisTick: { show: !1 },
|
|
@@ -133,23 +148,23 @@ function L(t, r, l, n) {
|
|
|
133
148
|
fontSize: 11,
|
|
134
149
|
fontWeight: 500,
|
|
135
150
|
hideOverlap: !0,
|
|
136
|
-
color:
|
|
151
|
+
color: r.textPrimaryColor
|
|
137
152
|
}
|
|
138
153
|
})),
|
|
139
154
|
yAxis: t.yAxis.map((o, a) => {
|
|
140
155
|
const i = t.series.find(
|
|
141
|
-
(
|
|
142
|
-
),
|
|
156
|
+
(c) => c.yAxisId === o.id
|
|
157
|
+
), m = A(
|
|
143
158
|
o.unit,
|
|
144
|
-
|
|
145
|
-
), y =
|
|
159
|
+
u[i?.field || ""]
|
|
160
|
+
), y = d(
|
|
146
161
|
i?.pallet_color || "",
|
|
147
162
|
"contained",
|
|
148
163
|
"backgroundColorTone"
|
|
149
164
|
);
|
|
150
165
|
return {
|
|
151
166
|
type: "value",
|
|
152
|
-
name:
|
|
167
|
+
name: _(o.title, m),
|
|
153
168
|
position: a === 0 ? "left" : "right",
|
|
154
169
|
offset: a > 1 ? (a - 1) * 70 : 0,
|
|
155
170
|
alignTicks: !0,
|
|
@@ -157,32 +172,32 @@ function L(t, r, l, n) {
|
|
|
157
172
|
show: !0,
|
|
158
173
|
lineStyle: {
|
|
159
174
|
type: "dashed",
|
|
160
|
-
color:
|
|
175
|
+
color: r.textDisabledColor,
|
|
161
176
|
opacity: 0.3,
|
|
162
177
|
width: 1,
|
|
163
178
|
dashOffset: 0
|
|
164
179
|
}
|
|
165
180
|
},
|
|
166
181
|
nameTextStyle: {
|
|
167
|
-
color:
|
|
182
|
+
color: r.textDisabledColor,
|
|
168
183
|
fontFamily: "Inter",
|
|
169
184
|
fontSize: "12px",
|
|
170
185
|
fontWeight: 500
|
|
171
186
|
},
|
|
172
187
|
nameRotate: 90,
|
|
173
188
|
nameLocation: "middle",
|
|
174
|
-
nameGap:
|
|
189
|
+
nameGap: h,
|
|
175
190
|
axisLabel: {
|
|
176
|
-
color:
|
|
191
|
+
color: r.textPrimaryColor,
|
|
177
192
|
fontFamily: "Jura",
|
|
178
193
|
fontSize: "13px",
|
|
179
194
|
fontWeight: 700,
|
|
180
195
|
/**
|
|
181
196
|
* Format y-axis values with locale-aware compact notation.
|
|
182
197
|
*/
|
|
183
|
-
formatter: (
|
|
184
|
-
value:
|
|
185
|
-
fallbackValue: `${
|
|
198
|
+
formatter: (c) => C({
|
|
199
|
+
value: c,
|
|
200
|
+
fallbackValue: `${c}`,
|
|
186
201
|
...n
|
|
187
202
|
})
|
|
188
203
|
},
|
|
@@ -208,10 +223,10 @@ function L(t, r, l, n) {
|
|
|
208
223
|
type: o.type,
|
|
209
224
|
yAxisIndex: a !== -1 ? a : 0,
|
|
210
225
|
areaStyle: {
|
|
211
|
-
color: new
|
|
226
|
+
color: new x.graphic.LinearGradient(0, 0, 0, 1, [
|
|
212
227
|
{
|
|
213
228
|
offset: 0,
|
|
214
|
-
color:
|
|
229
|
+
color: d(
|
|
215
230
|
o?.pallet_color || "",
|
|
216
231
|
"contained",
|
|
217
232
|
"backgroundColor"
|
|
@@ -231,16 +246,16 @@ function L(t, r, l, n) {
|
|
|
231
246
|
symbolSize: 10,
|
|
232
247
|
itemStyle: {
|
|
233
248
|
borderWidth: 2,
|
|
234
|
-
borderColor:
|
|
249
|
+
borderColor: d(
|
|
235
250
|
o.pallet_color,
|
|
236
251
|
"contained",
|
|
237
252
|
"backgroundColorTone"
|
|
238
253
|
),
|
|
239
|
-
color:
|
|
254
|
+
color: r.themeBackgroundColor
|
|
240
255
|
},
|
|
241
256
|
lineStyle: {
|
|
242
257
|
width: 2,
|
|
243
|
-
color:
|
|
258
|
+
color: d(
|
|
244
259
|
o.pallet_color,
|
|
245
260
|
"contained",
|
|
246
261
|
"backgroundColorTone"
|
|
@@ -248,7 +263,7 @@ function L(t, r, l, n) {
|
|
|
248
263
|
},
|
|
249
264
|
emphasis: {
|
|
250
265
|
itemStyle: {
|
|
251
|
-
color:
|
|
266
|
+
color: d(
|
|
252
267
|
o.pallet_color,
|
|
253
268
|
"contained",
|
|
254
269
|
"backgroundColorTone"
|
|
@@ -263,7 +278,7 @@ function L(t, r, l, n) {
|
|
|
263
278
|
itemStyle: {
|
|
264
279
|
borderRadius: [6, 6, 0, 0]
|
|
265
280
|
},
|
|
266
|
-
color:
|
|
281
|
+
color: d(
|
|
267
282
|
o.pallet_color,
|
|
268
283
|
"contained",
|
|
269
284
|
"backgroundColorTone"
|
|
@@ -275,5 +290,5 @@ function L(t, r, l, n) {
|
|
|
275
290
|
};
|
|
276
291
|
}
|
|
277
292
|
export {
|
|
278
|
-
|
|
293
|
+
P as generateReportsViewerChartSeriesOptions
|
|
279
294
|
};
|
|
@@ -10,10 +10,10 @@ export interface ClusteredEvent {
|
|
|
10
10
|
jumpNextTimeVisible: TimeVisible | null;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* @param events -
|
|
15
|
-
* @param clusterThreshold -
|
|
16
|
-
* @returns
|
|
13
|
+
* Group nearby timeline events into single-event markers or clusters.
|
|
14
|
+
* @param events - Event array to group.
|
|
15
|
+
* @param clusterThreshold - Minutes used to consider events nearby.
|
|
16
|
+
* @returns Single-event markers and clusters.
|
|
17
17
|
*/
|
|
18
|
-
export declare const clusterEvents: (events: EventType<unknown>[], clusterThreshold: number | undefined, containerWidth: number) => ClusteredEvent[];
|
|
18
|
+
export declare const clusterEvents: (events: EventType<unknown>[], clusterThreshold: number | undefined, containerWidth: number, timeZoneName?: string | null) => ClusteredEvent[];
|
|
19
19
|
//# sourceMappingURL=clusterEvents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clusterEvents.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"clusterEvents.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkCrD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,WAAW,GAAG,IAAI,CAAC;CACzC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,SAAS,CAAC,OAAO,CAAC,EAAE,EAC5B,oCAAoB,EACpB,gBAAgB,MAAM,EACtB,eAAe,MAAM,GAAG,IAAI,KAC3B,cAAc,EA+ChB,CAAC"}
|
|
@@ -1,67 +1,81 @@
|
|
|
1
|
-
import { TIME_SCALES as
|
|
2
|
-
import { getTimeLinePosition as
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
1
|
+
import { TIME_SCALES as g } from "../../constants.js";
|
|
2
|
+
import { getTimeLinePosition as p } from "../getTimeLinePosition/getTimeLinePosition.js";
|
|
3
|
+
const a = (e) => {
|
|
4
|
+
if (e.length < 2)
|
|
5
5
|
return null;
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
6
|
+
const l = [...e].sort((s, r) => s.startTime.getTime() - r.startTime.getTime()), n = (l[1].startTime.getTime() - l[0].startTime.getTime()) / (1e3 * 60);
|
|
7
|
+
if (n === 0)
|
|
8
8
|
return null;
|
|
9
|
-
const
|
|
10
|
-
for (const s of
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
9
|
+
const o = ["24h", "6h", "2h", "1h", "10min"];
|
|
10
|
+
for (const s of o) {
|
|
11
|
+
const r = g[s];
|
|
12
|
+
if (n > r.clusterThresholdMinutes)
|
|
13
13
|
return s;
|
|
14
14
|
}
|
|
15
15
|
return "10min";
|
|
16
|
-
},
|
|
17
|
-
if (!
|
|
16
|
+
}, C = (e, l = 5, n, o) => {
|
|
17
|
+
if (!e || e.length === 0)
|
|
18
18
|
return [];
|
|
19
|
-
const
|
|
20
|
-
let
|
|
21
|
-
for (let
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
else if ((
|
|
26
|
-
|
|
19
|
+
const s = [...e].sort((m, t) => m.startTime.getTime() - t.startTime.getTime()), r = [];
|
|
20
|
+
let i = [], u = null;
|
|
21
|
+
for (let m = 0; m < s.length; m++) {
|
|
22
|
+
const t = s[m];
|
|
23
|
+
if (i.length === 0)
|
|
24
|
+
i = [t], u = t.startTime;
|
|
25
|
+
else if ((t.startTime.getTime() - (u?.getTime() ?? 0)) / 6e4 <= l)
|
|
26
|
+
i.push(t);
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const f = a(i);
|
|
29
|
+
r.push(c(
|
|
30
|
+
i,
|
|
31
|
+
n,
|
|
32
|
+
f,
|
|
33
|
+
o
|
|
34
|
+
)), i = [t], u = t.startTime;
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
|
|
37
|
+
if (i.length > 0) {
|
|
38
|
+
const m = a(i);
|
|
39
|
+
r.push(c(
|
|
40
|
+
i,
|
|
41
|
+
n,
|
|
42
|
+
m,
|
|
43
|
+
o
|
|
44
|
+
));
|
|
35
45
|
}
|
|
36
|
-
return
|
|
37
|
-
},
|
|
38
|
-
const { left:
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
return r;
|
|
47
|
+
}, c = (e, l, n, o) => {
|
|
48
|
+
const { left: s } = p({
|
|
49
|
+
startTime: e[0].startTime,
|
|
50
|
+
endTime: e[0].startTime,
|
|
51
|
+
timeZoneName: o
|
|
52
|
+
}), r = 5.5, i = 7, u = parseFloat(s) - r * 100 / l, m = parseFloat(s) - i * 100 / l;
|
|
53
|
+
if (e.length === 1) {
|
|
54
|
+
const t = e[0];
|
|
41
55
|
return {
|
|
42
|
-
id: `event-${
|
|
43
|
-
events: [
|
|
44
|
-
startTime:
|
|
56
|
+
id: `event-${t.startTime.getTime()}`,
|
|
57
|
+
events: [t],
|
|
58
|
+
startTime: t.startTime,
|
|
45
59
|
position: {
|
|
46
|
-
left: `${
|
|
60
|
+
left: `${u.toString()}%`
|
|
47
61
|
},
|
|
48
62
|
isCluster: !1,
|
|
49
63
|
jumpNextTimeVisible: null
|
|
50
64
|
};
|
|
51
65
|
} else {
|
|
52
|
-
const
|
|
66
|
+
const t = new Date(Math.min(...e.map((T) => T.startTime.getTime())));
|
|
53
67
|
return {
|
|
54
|
-
id: `cluster-${
|
|
55
|
-
events:
|
|
56
|
-
startTime:
|
|
68
|
+
id: `cluster-${t.getTime()}`,
|
|
69
|
+
events: e,
|
|
70
|
+
startTime: t,
|
|
57
71
|
position: {
|
|
58
|
-
left: `${
|
|
72
|
+
left: `${m.toString()}%`
|
|
59
73
|
},
|
|
60
74
|
isCluster: !0,
|
|
61
|
-
jumpNextTimeVisible:
|
|
75
|
+
jumpNextTimeVisible: n
|
|
62
76
|
};
|
|
63
77
|
}
|
|
64
78
|
};
|
|
65
79
|
export {
|
|
66
|
-
|
|
80
|
+
C as clusterEvents
|
|
67
81
|
};
|
package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveChannel, IntersectedSegmentType, SegmentType } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Resolve the active-channel segments intersecting the selected wall-clock time.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getIntersectedSegments: (currentTime: number, activeChannels: ActiveChannel[], segments: SegmentType<any>[]) => IntersectedSegmentType[];
|
|
5
|
+
export declare const getIntersectedSegments: (currentTime: number, activeChannels: ActiveChannel[], segments: SegmentType<any>[], timeZoneName?: string | null) => IntersectedSegmentType[];
|
|
6
6
|
//# sourceMappingURL=getIntersectedSegments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntersectedSegments.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"getIntersectedSegments.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGjF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,EACnB,gBAAgB,aAAa,EAAE,EAC/B,UAAU,WAAW,CAAC,GAAG,CAAC,EAAE,EAC5B,eAAe,MAAM,GAAG,IAAI,6BA+B7B,CAAC"}
|
package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.js
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { dateToDaySeconds as d } from "../playbackRange/playbackRange.js";
|
|
2
|
+
const S = (t, o, i, s) => {
|
|
3
|
+
const r = i.filter(
|
|
4
|
+
(n) => o.includes(n.channelId)
|
|
5
|
+
), c = [];
|
|
6
|
+
return r.forEach((n) => {
|
|
6
7
|
n.segmentsList.forEach((e) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const a = d(
|
|
9
|
+
e.startTime,
|
|
10
|
+
s
|
|
11
|
+
), T = d(
|
|
12
|
+
e.endTime,
|
|
13
|
+
s
|
|
14
|
+
);
|
|
15
|
+
a <= t && T >= t && c.push({
|
|
9
16
|
channelId: n.channelId,
|
|
10
17
|
segmentId: e.segmentId,
|
|
11
18
|
startTime: e.startTime,
|
|
12
19
|
endTime: e.endTime
|
|
13
20
|
});
|
|
14
21
|
});
|
|
15
|
-
}),
|
|
22
|
+
}), c;
|
|
16
23
|
};
|
|
17
24
|
export {
|
|
18
|
-
|
|
25
|
+
S as getIntersectedSegments
|
|
19
26
|
};
|
package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetTimeLinePositionProps } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Resolve the timeline position and width for one wall-clock time range.
|
|
4
4
|
*/
|
|
5
5
|
export declare const getTimeLinePosition: (props: GetTimeLinePositionProps) => {
|
|
6
6
|
width: string;
|
package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTimeLinePosition.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"getTimeLinePosition.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB;;;CAelE,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { dateToDaySeconds as n } from "../playbackRange/playbackRange.js";
|
|
2
|
+
const T = (o) => {
|
|
3
|
+
const { startTime: i, endTime: s, timeZoneName: e } = o, m = n(i, e), a = n(s, e), t = m / 3600;
|
|
3
4
|
return {
|
|
4
|
-
width: `${(
|
|
5
|
-
left: `${
|
|
5
|
+
width: `${(a / 3600 - t) / 24 * 100}%`,
|
|
6
|
+
left: `${t * 100 / 24}%`
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
T as getTimeLinePosition
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAA"}
|