@streamlayer/react-ui 0.92.0 → 0.93.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/lib/assets/style.css +1 -1
- package/lib/index.js +5 -4
- package/lib/ui/app/Features/Gamification/Tabs.js +36 -32
- package/lib/ui/app/Features/Gamification/gamification-feature.js +4 -1
- package/lib/ui/app/Features/Gamification/index.js +42 -38
- package/lib/ui/app/Navigation/MastersNavigation/index.js +27 -25
- package/lib/ui/app/Notifications/Onboarding/index.js +91 -80
- package/lib/ui/app/Notifications/index.js +65 -60
- package/lib/ui/app/Points/index.js +6 -5
- package/lib/ui/app/masters.js +8 -2
- package/lib/ui/app/styles.d.ts +1 -0
- package/lib/ui/app/styles.js +6 -1
- package/lib/ui/app/useImagesPreload.d.ts +4 -0
- package/lib/ui/app/useImagesPreload.js +23 -0
- package/lib/ui/app/useSdkResponsive.js +11 -11
- package/lib/ui/app/useSdkScroll.d.ts +1 -0
- package/lib/ui/app/useSdkScroll.js +29 -21
- package/lib/ui/gamification/detail/header/index.js +11 -11
- package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.js +11 -11
- package/lib/ui/gamification/onboarding/index.d.ts +1 -0
- package/lib/ui/gamification/onboarding/index.js +54 -43
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
- package/lib/ui/gamification/points/index.js +5 -4
- package/lib/ui/gamification/question/insight/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
- package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
- package/lib/ui/gamification/vote/index.js +57 -56
- package/lib/ui/gamification/vote/insight-details/index.js +1 -1
- package/lib/ui/gamification/vote/vote-option/index.js +61 -57
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/index.js +21 -20
- package/lib/ui/navigation/masters.d.ts +2 -1
- package/lib/ui/navigation/masters.js +9 -4
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.js +21 -27
- package/lib/ui/skeleton/index.d.ts +7 -0
- package/lib/ui/skeleton/index.js +7 -0
- package/lib/ui/skeleton/styles.d.ts +2 -0
- package/lib/ui/skeleton/styles.js +9 -0
- package/lib/ui/theme/breakpoints.d.ts +4 -1
- package/lib/ui/theme/breakpoints.js +24 -12
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +6 -2
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/theme.js +29 -21
- package/lib/utils/decorators/container.js +4 -3
- package/package.json +18 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as o } from "../../../../icons/index.js";
|
|
3
|
-
import { ShowIn as
|
|
3
|
+
import { ShowIn as e } from "../../../../show-in/index.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "@linaria/core";
|
|
7
|
-
const
|
|
7
|
+
const d = 118, n = () => e, f = /* @__PURE__ */ s(n())({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c10131zw",
|
|
10
10
|
propsAsIs: !0
|
|
@@ -12,15 +12,15 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
|
|
|
12
12
|
name: "InnerContainer",
|
|
13
13
|
class: "ir6k2eo",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
16
16
|
name: "Content",
|
|
17
17
|
class: "c1hwoq9l",
|
|
18
18
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
19
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
20
20
|
name: "Title",
|
|
21
21
|
class: "t4ujo4g",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}), c = () =>
|
|
23
|
+
}), c = () => t, u = /* @__PURE__ */ s(c())({
|
|
24
24
|
name: "PointsTitle",
|
|
25
25
|
class: "p1pjil1h",
|
|
26
26
|
propsAsIs: !0
|
|
@@ -40,8 +40,8 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
|
|
|
40
40
|
name: "FeedbackIcon",
|
|
41
41
|
class: "frcvk3t",
|
|
42
42
|
propsAsIs: !0
|
|
43
|
-
}), S = /* @__PURE__ */ s("
|
|
44
|
-
name: "
|
|
43
|
+
}), S = /* @__PURE__ */ s("div")({
|
|
44
|
+
name: "CloseIconWrap",
|
|
45
45
|
class: "c33p82r",
|
|
46
46
|
propsAsIs: !1
|
|
47
47
|
}), a = () => o, _ = /* @__PURE__ */ s(a())({
|
|
@@ -51,15 +51,15 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
|
|
|
51
51
|
});
|
|
52
52
|
export {
|
|
53
53
|
x as AnswerText,
|
|
54
|
-
S as CloseButton,
|
|
55
54
|
_ as CloseIcon,
|
|
55
|
+
S as CloseIconWrap,
|
|
56
56
|
f as Container,
|
|
57
|
-
|
|
57
|
+
v as Content,
|
|
58
58
|
w as FeedbackIcon,
|
|
59
59
|
C as InnerContainer,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
d as MIN_CONTENT_HEIGHT,
|
|
61
|
+
u as PointsTitle,
|
|
62
62
|
T as Subtitle,
|
|
63
63
|
b as SubtitleFG,
|
|
64
|
-
|
|
64
|
+
t as Title
|
|
65
65
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { QuestionType as
|
|
4
|
-
import { ExpiredAlert as
|
|
5
|
-
import { Feedback as
|
|
6
|
-
import { QuestionScrollContainer as
|
|
7
|
-
import { VotingOption as
|
|
8
|
-
import { WinBar as
|
|
1
|
+
import { jsx as n, jsxs as k, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useEffect as K, useCallback as R, useMemo as f } from "react";
|
|
3
|
+
import { QuestionType as o, QuestionStatus as E } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { ExpiredAlert as U } from "./expired-alert/index.js";
|
|
5
|
+
import { Feedback as X } from "./feedback/index.js";
|
|
6
|
+
import { QuestionScrollContainer as Z, Container as _, Content as $, Title as Q, Options as tt } from "./styles.js";
|
|
7
|
+
import { VotingOption as rt } from "./vote-option/index.js";
|
|
8
|
+
import { WinBar as it } from "./win-bar/index.js";
|
|
9
9
|
import "../../icons/index.js";
|
|
10
10
|
import "@linaria/react";
|
|
11
11
|
import "./expired-alert/styles.js";
|
|
@@ -18,28 +18,28 @@ import "../../timer/index.js";
|
|
|
18
18
|
import "react-countdown-circle-timer";
|
|
19
19
|
import "../../theme/constants.js";
|
|
20
20
|
import "./win-bar/styles.js";
|
|
21
|
-
const
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const vt = ({ openedQuestion: t, isLoading: C, vote: p, close: v }) => {
|
|
22
|
+
var P, g;
|
|
23
|
+
const A = t.subject, a = t.type, m = t.status, V = (P = t.options) == null ? void 0 : P.options, d = t.marketClosed, [O, b] = I(!1), [y, L] = I(!1), [T, w] = I(!0), [c, M] = I(!1), [x, D] = I(""), h = t == null ? void 0 : t.id;
|
|
24
|
+
K(() => {
|
|
25
|
+
a === o.PREDICTION ? d && w(!1) : m === E.RESOLVED && w(!1);
|
|
26
26
|
}, []);
|
|
27
|
-
const j =
|
|
27
|
+
const j = R((e) => {
|
|
28
28
|
L(e), b(!0);
|
|
29
|
-
}, []),
|
|
29
|
+
}, []), q = R(
|
|
30
30
|
async (e) => {
|
|
31
31
|
if (h) {
|
|
32
32
|
const u = e.currentTarget.value;
|
|
33
|
-
|
|
33
|
+
D(u), await p(h, u);
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
[h,
|
|
37
|
-
), B =
|
|
36
|
+
[h, D, p]
|
|
37
|
+
), B = R(() => {
|
|
38
38
|
M(!0), setTimeout(v, 3e3);
|
|
39
39
|
}, [v]), r = f(
|
|
40
40
|
() => t == null ? void 0 : t.answers.find((e) => e.youVoted === !0),
|
|
41
41
|
[t]
|
|
42
|
-
),
|
|
42
|
+
), s = f(
|
|
43
43
|
() => !!(t != null && t.answers.find((e) => e.correct === !0)),
|
|
44
44
|
[t]
|
|
45
45
|
), i = f(
|
|
@@ -51,77 +51,78 @@ const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
|
|
|
51
51
|
...e,
|
|
52
52
|
questionVoted: !!r,
|
|
53
53
|
youSelected: x === e.id,
|
|
54
|
-
isLoading:
|
|
55
|
-
hasCorrectAnswer:
|
|
54
|
+
isLoading: C,
|
|
55
|
+
hasCorrectAnswer: s,
|
|
56
56
|
questionType: t.type,
|
|
57
|
-
answerTimeExpired:
|
|
58
|
-
questionStatus:
|
|
57
|
+
answerTimeExpired: c,
|
|
58
|
+
questionStatus: m,
|
|
59
59
|
imageMode: (u = t.appearance) == null ? void 0 : u.images,
|
|
60
|
-
onVote:
|
|
60
|
+
onVote: q
|
|
61
61
|
};
|
|
62
62
|
}) : [], [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
s,
|
|
64
|
+
c,
|
|
65
|
+
C,
|
|
66
66
|
t,
|
|
67
67
|
r,
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
m,
|
|
69
|
+
q,
|
|
70
70
|
x
|
|
71
|
-
]), F = V && (V.case === "trivia" || V.case === "prediction") ? V.value : void 0, l =
|
|
72
|
-
if (
|
|
71
|
+
]), F = V && (V.case === "trivia" || V.case === "prediction") ? V.value : void 0, l = m === E.RESOLVED && a === o.TRIVIA && !r && !T, S = a === o.TRIVIA && y && O && T, N = f(() => a === o.PREDICTION ? !!(r && !s || r && s && (i != null && i.youVoted)) : !0, [a, r, s, i]), Y = f(() => {
|
|
72
|
+
if (a === o.PREDICTION && r && (!s || s && (i != null && i.youVoted)))
|
|
73
73
|
return r.points;
|
|
74
|
-
if (!(l ||
|
|
75
|
-
return
|
|
74
|
+
if (!(l || c))
|
|
75
|
+
return m === E.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : i == null ? void 0 : i.points;
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
c,
|
|
78
78
|
r,
|
|
79
79
|
i,
|
|
80
|
-
|
|
80
|
+
m,
|
|
81
81
|
l,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]), H = f(() =>
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
82
|
+
a,
|
|
83
|
+
s
|
|
84
|
+
]), H = f(() => a === o.PREDICTION && r ? s ? s && (i != null && i.youVoted) ? "You won" : "" : "To win" : l || c ? "Time expired" : a === o.POLL ? "Time remaining" : r ? "You won" : "To win", [c, a, r, l, s, i]), z = (a === o.TRIVIA || a === o.PREDICTION) && r && s && (i == null ? void 0 : i.youVoted), G = r || l || S || a === o.TRIVIA && m === E.RESOLVED && T;
|
|
85
|
+
return /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(_, { children: /* @__PURE__ */ k($, { children: [
|
|
86
|
+
/* @__PURE__ */ n(
|
|
87
|
+
X,
|
|
88
88
|
{
|
|
89
89
|
feedbackMessages: F,
|
|
90
90
|
questionVoted: !!r,
|
|
91
91
|
questionVotedCorrectly: r == null ? void 0 : r.correct,
|
|
92
|
-
questionType:
|
|
93
|
-
hasCorrectAnswer:
|
|
94
|
-
questionStatus:
|
|
92
|
+
questionType: a,
|
|
93
|
+
hasCorrectAnswer: s,
|
|
94
|
+
questionStatus: m,
|
|
95
95
|
showExpiredNotification: l,
|
|
96
96
|
showClosedNotificationTrivia: S,
|
|
97
|
-
votedInCurrentRender:
|
|
97
|
+
votedInCurrentRender: O,
|
|
98
98
|
votedAfterQuestionClosed: y,
|
|
99
99
|
enteredAnActiveQuestion: T,
|
|
100
100
|
marketClosed: d
|
|
101
101
|
}
|
|
102
102
|
),
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
N && /* @__PURE__ */ n(
|
|
104
|
+
it,
|
|
105
105
|
{
|
|
106
106
|
title: H,
|
|
107
107
|
points: Y,
|
|
108
108
|
onTimerExpired: B,
|
|
109
109
|
questionType: t.type,
|
|
110
|
-
isTimer: !
|
|
110
|
+
isTimer: !C,
|
|
111
111
|
isPlayingTimer: !r,
|
|
112
|
-
|
|
112
|
+
animatePoints: z,
|
|
113
|
+
timerDuration: G ? 0 : Number(((g = t == null ? void 0 : t.appearance) == null ? void 0 : g.autoHideInterval) || "30")
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
c ? /* @__PURE__ */ n(
|
|
117
|
+
U,
|
|
117
118
|
{
|
|
118
119
|
title: "More to come...",
|
|
119
120
|
description: "Watch for additional enhanced stream interactive experience."
|
|
120
121
|
}
|
|
121
|
-
) : /* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
122
|
+
) : /* @__PURE__ */ k(J, { children: [
|
|
123
|
+
/* @__PURE__ */ n(Q, { style: N ? {} : { marginTop: 0 }, children: A }),
|
|
124
|
+
/* @__PURE__ */ n(tt, { children: W.map((e) => /* @__PURE__ */ n(
|
|
125
|
+
rt,
|
|
125
126
|
{
|
|
126
127
|
...e,
|
|
127
128
|
markThatVoted: j,
|
|
@@ -135,5 +136,5 @@ const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
|
|
|
135
136
|
] }) }) });
|
|
136
137
|
};
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
+
vt as Vote
|
|
139
140
|
};
|
|
@@ -9,7 +9,7 @@ import "../../../video-player/styles.js";
|
|
|
9
9
|
import "../../../../utils/common.js";
|
|
10
10
|
import "../../../questions/insight/styles.js";
|
|
11
11
|
const C = ({ instantView: r, ...p }) => /* @__PURE__ */ o(k, { children: [
|
|
12
|
-
/* @__PURE__ */ m(b, { instantView: r, ...p }),
|
|
12
|
+
/* @__PURE__ */ m(b, { instantView: r, ...p, isDetail: !0 }),
|
|
13
13
|
(r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", children: [
|
|
14
14
|
r == null ? void 0 : r.webLink.label,
|
|
15
15
|
/* @__PURE__ */ m(l, { name: "icon-external-link" })
|
|
@@ -1,83 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useLayoutEffect as j } from "react";
|
|
3
|
+
import { QuestionImages as a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { AnimatedCounter as U } from "../../../animated-counter/index.js";
|
|
5
|
+
import { IconDefault as $, IconContainer as y, IconWrap as F, IconCircle as M, ButtonContainer as W, ButtonPct as z, ButtonBody as G, Title as H, Pts as J, Indicators as K, CheckIcon as X, Percentage as Y } from "./styles.js";
|
|
5
6
|
import "react-countup";
|
|
6
7
|
import "@linaria/react";
|
|
7
8
|
import "../../../icons/index.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[a.
|
|
11
|
-
[a.
|
|
12
|
-
[a.ROUNDED]: (t) => /* @__PURE__ */ e(j, { alt: "option-icon", src: t }),
|
|
9
|
+
const I = {
|
|
10
|
+
[a.CENTERED]: (t) => /* @__PURE__ */ n($, { alt: "option-icon", src: t }),
|
|
11
|
+
[a.TRANSPARENT]: (t) => /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(F, { style: { backgroundImage: `url(${t})` } }) }),
|
|
12
|
+
[a.ROUNDED]: (t) => /* @__PURE__ */ n(M, { alt: "option-icon", src: t }),
|
|
13
13
|
[a.NONE]: () => null,
|
|
14
14
|
[a.UNSET]: () => null
|
|
15
|
-
},
|
|
16
|
-
if (t ===
|
|
15
|
+
}, Z = ({ questionType: t, hasCorrectAnswer: c, correct: r, youVoted: i, questionVoted: e }) => {
|
|
16
|
+
if (t === o.POLL && i)
|
|
17
17
|
return "correct";
|
|
18
|
-
if (t ===
|
|
19
|
-
if (c &&
|
|
20
|
-
return
|
|
21
|
-
if (
|
|
18
|
+
if (t === o.PREDICTION) {
|
|
19
|
+
if (c && e)
|
|
20
|
+
return i ? r ? "correct" : "incorrect" : "unset";
|
|
21
|
+
if (i)
|
|
22
22
|
return "correct";
|
|
23
23
|
}
|
|
24
|
-
return t ===
|
|
25
|
-
},
|
|
24
|
+
return t === o.TRIVIA && e && i ? r ? "correct" : "incorrect" : "unset";
|
|
25
|
+
}, _ = ({
|
|
26
26
|
questionType: t,
|
|
27
27
|
questionVoted: c,
|
|
28
|
-
correct:
|
|
29
|
-
hasCorrectAnswer:
|
|
30
|
-
questionStatus:
|
|
31
|
-
}) => t ===
|
|
32
|
-
var
|
|
28
|
+
correct: r,
|
|
29
|
+
hasCorrectAnswer: i,
|
|
30
|
+
questionStatus: e
|
|
31
|
+
}) => t === o.TRIVIA ? c && r : t === o.PREDICTION ? c && r && i || e === S.RESOLVED && r : !1, st = (t) => {
|
|
32
|
+
var N;
|
|
33
33
|
const {
|
|
34
34
|
// option props
|
|
35
35
|
id: c,
|
|
36
|
-
icon:
|
|
37
|
-
text:
|
|
38
|
-
percentageDecimal:
|
|
39
|
-
points:
|
|
36
|
+
icon: r,
|
|
37
|
+
text: i,
|
|
38
|
+
percentageDecimal: e,
|
|
39
|
+
points: T,
|
|
40
40
|
// extra props
|
|
41
|
-
onVote:
|
|
42
|
-
markThatVoted:
|
|
41
|
+
onVote: A,
|
|
42
|
+
markThatVoted: D,
|
|
43
43
|
youSelected: h,
|
|
44
44
|
questionVoted: s,
|
|
45
|
-
imageMode:
|
|
46
|
-
answerTimeExpired:
|
|
47
|
-
questionStatus:
|
|
48
|
-
isLoading:
|
|
45
|
+
imageMode: E,
|
|
46
|
+
answerTimeExpired: w,
|
|
47
|
+
questionStatus: C,
|
|
48
|
+
isLoading: O,
|
|
49
49
|
questionType: d,
|
|
50
|
-
correct:
|
|
50
|
+
correct: g,
|
|
51
51
|
hasCorrectAnswer: k,
|
|
52
|
-
votedAfterQuestionClosed:
|
|
53
|
-
enteredAnActiveQuestion:
|
|
54
|
-
marketClosed:
|
|
55
|
-
} = t,
|
|
56
|
-
return
|
|
57
|
-
|
|
52
|
+
votedAfterQuestionClosed: x,
|
|
53
|
+
enteredAnActiveQuestion: P,
|
|
54
|
+
marketClosed: l
|
|
55
|
+
} = t, [L, p] = b(e), m = Z(t), v = _({ questionType: d, questionVoted: s, correct: g, hasCorrectAnswer: k, questionStatus: C }), f = l && d === o.PREDICTION, R = s || f, Q = d === o.PREDICTION && !s && !l, B = s && !h && m !== "incorrect";
|
|
56
|
+
return j(() => {
|
|
57
|
+
e > 0 && (p(0), requestAnimationFrame(() => {
|
|
58
|
+
p(e);
|
|
59
|
+
}));
|
|
60
|
+
}, [e]), /* @__PURE__ */ u(
|
|
61
|
+
W,
|
|
58
62
|
{
|
|
59
63
|
value: c,
|
|
60
64
|
"data-selected": h,
|
|
61
|
-
"data-answer-state":
|
|
62
|
-
disabled: s ||
|
|
63
|
-
"data-is-not-checked":
|
|
64
|
-
onClick: (
|
|
65
|
-
|
|
66
|
-
d ===
|
|
67
|
-
),
|
|
65
|
+
"data-answer-state": m,
|
|
66
|
+
disabled: s || O || w || f && !P || f && P && x,
|
|
67
|
+
"data-is-not-checked": B,
|
|
68
|
+
onClick: (V) => {
|
|
69
|
+
D(
|
|
70
|
+
d === o.PREDICTION ? l : C === S.RESOLVED
|
|
71
|
+
), A(V);
|
|
68
72
|
},
|
|
69
73
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ n(z, { "data-answer-state": m, style: { width: `${R ? L : 0}%` } }),
|
|
75
|
+
/* @__PURE__ */ u(G, { children: [
|
|
76
|
+
r && E && ((N = I[E]) == null ? void 0 : N.call(I, r)),
|
|
77
|
+
/* @__PURE__ */ n(H, { children: i }),
|
|
78
|
+
Q && /* @__PURE__ */ u("div", { children: [
|
|
79
|
+
T,
|
|
80
|
+
/* @__PURE__ */ n(J, { children: "pts" })
|
|
77
81
|
] }),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/* @__PURE__ */
|
|
82
|
+
R && /* @__PURE__ */ u(K, { children: [
|
|
83
|
+
v && /* @__PURE__ */ n(X, { name: "selected" }),
|
|
84
|
+
/* @__PURE__ */ n(Y, { children: /* @__PURE__ */ n(U, { value: e, suffix: "%" }) })
|
|
81
85
|
] })
|
|
82
86
|
] })
|
|
83
87
|
]
|
|
@@ -85,5 +89,5 @@ const f = {
|
|
|
85
89
|
);
|
|
86
90
|
};
|
|
87
91
|
export {
|
|
88
|
-
|
|
92
|
+
st as VotingOption
|
|
89
93
|
};
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { jsxs as i, jsx as r, Fragment as
|
|
2
|
-
import { QuestionType as
|
|
3
|
-
import { AnimatedCounter as
|
|
4
|
-
import { Timer as
|
|
5
|
-
import { WinBarContainer as
|
|
1
|
+
import { jsxs as i, jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as o } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { AnimatedCounter as s } from "../../../animated-counter/index.js";
|
|
4
|
+
import { Timer as h } from "../../../timer/index.js";
|
|
5
|
+
import { WinBarContainer as P, Content as C, Title as f, WinIcon as u, Points as I, PointsCount as y, PointsUnits as T } from "./styles.js";
|
|
6
6
|
import "react-countup";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "react";
|
|
9
9
|
import "react-countdown-circle-timer";
|
|
10
10
|
import "../../../theme/constants.js";
|
|
11
11
|
import "../../../icons/index.js";
|
|
12
|
-
const
|
|
13
|
-
title:
|
|
14
|
-
points:
|
|
12
|
+
const R = ({
|
|
13
|
+
title: e,
|
|
14
|
+
points: n,
|
|
15
15
|
isPlayingTimer: m,
|
|
16
16
|
isTimer: c,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
e
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
17
|
+
animatePoints: a,
|
|
18
|
+
questionType: t,
|
|
19
|
+
timerDuration: d,
|
|
20
|
+
onTimerExpired: l
|
|
21
|
+
}) => /* @__PURE__ */ i(P, { style: { justifyContent: t === o.PREDICTION ? "center" : "space-between" }, children: [
|
|
22
|
+
/* @__PURE__ */ i(C, { children: [
|
|
23
|
+
e && /* @__PURE__ */ r(f, { children: e }),
|
|
24
|
+
n !== void 0 && t !== o.POLL && /* @__PURE__ */ i(p, { children: [
|
|
25
|
+
/* @__PURE__ */ r(u, { name: "icon-trophy" }),
|
|
26
|
+
/* @__PURE__ */ i(I, { children: [
|
|
27
|
+
/* @__PURE__ */ r(y, { children: a ? /* @__PURE__ */ r(s, { value: n, delay: 0.3 }) : n }),
|
|
27
28
|
/* @__PURE__ */ r(T, { children: "PTS" })
|
|
28
29
|
] })
|
|
29
30
|
] })
|
|
30
31
|
] }),
|
|
31
|
-
c &&
|
|
32
|
+
c && t !== o.PREDICTION && /* @__PURE__ */ r(h, { isPlaying: m, onTimerExpired: l, duration: d })
|
|
32
33
|
] });
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
R as WinBar
|
|
35
36
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Navigation: import("@linaria/react").
|
|
2
|
+
export declare const Navigation: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const NavigationItems: import("@linaria/react").WYWEvalMeta & import("react").FC<{
|
|
3
4
|
children: import("react").ReactElement<import("./button").ButtonProps, string | import("react").JSXElementConstructor<any>>[];
|
|
4
5
|
className?: string | undefined;
|
|
5
6
|
}>;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
import { Navigation as
|
|
1
|
+
import { styled as a } from "@linaria/react";
|
|
2
|
+
import { Navigation as s } from "./index.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ a("div")({
|
|
5
5
|
name: "Navigation",
|
|
6
6
|
class: "n19lpak2",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), o = () => s, e = /* @__PURE__ */ a(o())({
|
|
9
|
+
name: "NavigationItems",
|
|
10
|
+
class: "n1w473c2",
|
|
7
11
|
propsAsIs: !0
|
|
8
12
|
});
|
|
9
13
|
export {
|
|
10
|
-
p as Navigation
|
|
14
|
+
p as Navigation,
|
|
15
|
+
e as NavigationItems
|
|
11
16
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { InsightHistory, FeedItem } from '@streamlayer/sdk-web-types';
|
|
3
3
|
export type InsightContentProps = InsightHistory & {
|
|
4
4
|
created?: FeedItem['created'];
|
|
5
|
-
|
|
5
|
+
isDetail?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const InsightContent: React.FC<InsightContentProps>;
|
|
@@ -1,43 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { isValidDate as
|
|
5
|
-
import { Container as
|
|
1
|
+
import { jsxs as e, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as T } from "react";
|
|
3
|
+
import { VideoPlayer as v } from "../../video-player/index.js";
|
|
4
|
+
import { isValidDate as b, formatDate as f, formatTime as x } from "../../../utils/common.js";
|
|
5
|
+
import { Container as C, DateWrap as I, Image as j, Content as B, Title as M, Description as P } from "./styles.js";
|
|
6
6
|
import "../../icons/index.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "../../video-player/styles.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
notification: d
|
|
15
|
-
}) => {
|
|
16
|
-
const l = f(() => {
|
|
17
|
-
if (o) {
|
|
18
|
-
const p = new Date(o);
|
|
19
|
-
if (D(p))
|
|
9
|
+
const G = ({ created: d, instantView: r, isDetail: h, notification: o }) => {
|
|
10
|
+
const l = T(() => {
|
|
11
|
+
if (d) {
|
|
12
|
+
const p = new Date(d);
|
|
13
|
+
if (b(p))
|
|
20
14
|
return {
|
|
21
|
-
date:
|
|
22
|
-
time:
|
|
15
|
+
date: f(p),
|
|
16
|
+
time: x(p)
|
|
23
17
|
};
|
|
24
18
|
}
|
|
25
19
|
return null;
|
|
26
|
-
}, [
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
l && /* @__PURE__ */
|
|
20
|
+
}, [d]), u = r == null ? void 0 : r.heading, c = r == null ? void 0 : r.body, g = u || c, y = o == null ? void 0 : o.title, D = o == null ? void 0 : o.body;
|
|
21
|
+
return /* @__PURE__ */ e(C, { children: [
|
|
22
|
+
l && /* @__PURE__ */ e(I, { children: [
|
|
29
23
|
l.date,
|
|
30
24
|
" · ",
|
|
31
25
|
l.time
|
|
32
26
|
] }),
|
|
33
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */ m(
|
|
34
|
-
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ m(
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */ m(
|
|
37
|
-
/* @__PURE__ */ m(
|
|
27
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ m(v, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
28
|
+
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ m(j, { src: r == null ? void 0 : r.image }),
|
|
29
|
+
/* @__PURE__ */ e(B, { children: [
|
|
30
|
+
/* @__PURE__ */ m(M, { children: h && g ? u : y }),
|
|
31
|
+
/* @__PURE__ */ m(P, { children: h && g ? c : D })
|
|
38
32
|
] })
|
|
39
33
|
] });
|
|
40
34
|
};
|
|
41
35
|
export {
|
|
42
|
-
|
|
36
|
+
G as InsightContent
|
|
43
37
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { BREAKPOINTS } from './constants';
|
|
1
|
+
import { BREAKPOINTS, ORIENTATION } from './constants';
|
|
2
2
|
export type Breakpoints = keyof typeof BREAKPOINTS;
|
|
3
|
+
export type Orientation = keyof typeof ORIENTATION;
|
|
3
4
|
export declare const breakpoints: {
|
|
4
5
|
up: (key: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
5
6
|
down: (key: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
7
|
+
intermediate: (down: Breakpoints, up: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
8
|
+
orientation: (key: Orientation) => (styles: TemplateStringsArray) => string;
|
|
6
9
|
};
|