@streamlayer/react-ui 0.93.0 → 0.95.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/{useClipboardCopy-E5rEe6It.js → index-jRXrW6ie.js} +1513 -1537
- package/lib/ui/app/Features/Gamification/Friends.js +6 -5
- package/lib/ui/app/Features/Gamification/Leaderboard.js +4 -3
- package/lib/ui/app/Features/Gamification/Question.js +19 -21
- package/lib/ui/app/Features/Gamification/QuestionsList.js +1 -1
- package/lib/ui/app/Features/Gamification/Tabs.js +36 -37
- package/lib/ui/app/Features/Gamification/gamification-feature.js +12 -10
- package/lib/ui/app/Features/Gamification/index.js +73 -89
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -0
- package/lib/ui/app/Navigation/MastersNavigation/index.js +43 -35
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +3 -2
- package/lib/ui/app/Notifications/Onboarding/index.js +97 -80
- package/lib/ui/app/Notifications/index.js +114 -112
- package/lib/ui/app/masters.js +48 -40
- package/lib/ui/app/useClipboardCopy.js +26 -5
- package/lib/ui/app/useMastersApp.js +42 -35
- package/lib/ui/app/useSdkResponsive.d.ts +1 -1
- package/lib/ui/app/useSdkResponsive.js +25 -25
- package/lib/ui/app/useSdkScroll.js +16 -15
- package/lib/ui/gamification/onboarding/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/index.js +11 -10
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +14 -13
- package/lib/ui/gamification/question/insight/index.js +3 -4
- package/lib/ui/gamification/question/list/index.js +14 -14
- package/lib/ui/gamification/question/notification/index.js +3 -2
- package/lib/ui/gamification/question/notification/insight/index.d.ts +5 -3
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/insight/styles.d.ts +1 -0
- package/lib/ui/gamification/question/notification/insight/styles.js +15 -10
- package/lib/ui/gamification/question/notification/tweet/index.js +10 -7
- package/lib/ui/gamification/question/twitter/index.js +16 -33
- package/lib/ui/gamification/question/twitter/styles.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/styles.js +7 -12
- package/lib/ui/gamification/vote/feedback/index.js +5 -5
- package/lib/ui/gamification/vote/insight-details/index.js +5 -6
- package/lib/ui/gamification/vote/twitter-details/index.js +13 -29
- package/lib/ui/gamification/vote/twitter-details/styles.d.ts +0 -1
- package/lib/ui/gamification/vote/twitter-details/styles.js +3 -8
- package/lib/ui/modal/index.d.ts +9 -0
- package/lib/ui/modal/index.js +34 -0
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +3 -1
- package/lib/ui/navigation/button/FeaturedGroups.js +11 -11
- package/lib/ui/questions/insight/index.d.ts +1 -2
- package/lib/ui/questions/insight/index.js +13 -29
- package/lib/ui/questions/insight/styles.d.ts +0 -1
- package/lib/ui/questions/insight/styles.js +9 -14
- package/lib/ui/questions/twitter/account/index.d.ts +2 -1
- package/lib/ui/questions/twitter/account/index.js +24 -18
- package/lib/ui/questions/twitter/account/styles.d.ts +1 -1
- package/lib/ui/questions/twitter/account/styles.js +2 -2
- package/lib/ui/questions/twitter/index.d.ts +2 -2
- package/lib/ui/questions/twitter/index.js +62 -9
- package/lib/ui/questions/twitter/styles.d.ts +9 -0
- package/lib/ui/questions/twitter/styles.js +31 -6
- package/lib/ui/theme/constants.d.ts +1 -0
- package/lib/ui/theme/constants.js +3 -2
- package/lib/ui/theme/theme.js +26 -22
- package/lib/ui/video-player/index.js +44 -20
- package/lib/utils/common.js +22 -8
- package/lib/utils/debug/components/developer.js +62 -43
- package/package.json +14 -14
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import c from "lodash.throttle";
|
|
2
|
-
import { useState as m, useEffect as
|
|
3
|
-
import { BREAKPOINTS as
|
|
4
|
-
import { m as
|
|
2
|
+
import { useState as m, useEffect as u } from "react";
|
|
3
|
+
import { BREAKPOINTS as r } from "../theme/constants.js";
|
|
4
|
+
import { m as p } from "../../index-keh7OLCY.js";
|
|
5
5
|
import "../../index-uEuzH3jr.js";
|
|
6
|
-
const d = Object.keys(
|
|
7
|
-
const
|
|
6
|
+
const d = Object.keys(r), i = () => {
|
|
7
|
+
const t = window.innerWidth;
|
|
8
8
|
let e = "sm";
|
|
9
|
-
for (let
|
|
10
|
-
const
|
|
11
|
-
if (!(
|
|
12
|
-
e =
|
|
9
|
+
for (let n = d.length - 1; n > 0; n--) {
|
|
10
|
+
const s = d[n];
|
|
11
|
+
if (!(t < r[s]) && t >= r[s]) {
|
|
12
|
+
e = s;
|
|
13
13
|
break;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
17
|
name: e,
|
|
18
|
-
size:
|
|
18
|
+
size: r[e]
|
|
19
19
|
};
|
|
20
|
-
}, w = (
|
|
20
|
+
}, w = (t) => {
|
|
21
21
|
var e;
|
|
22
|
-
return (((e =
|
|
23
|
-
},
|
|
22
|
+
return (((e = t.current) == null ? void 0 : e.getBoundingClientRect().y) || 0) < -68;
|
|
23
|
+
}, k = (t) => t >= r.xl, I = (t) => {
|
|
24
24
|
const [e] = m(() => {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const n = i();
|
|
26
|
+
return p({
|
|
27
27
|
screen: i(),
|
|
28
|
-
sdkInView: w(
|
|
29
|
-
|
|
28
|
+
sdkInView: w(t),
|
|
29
|
+
sdkInDesktopView: k(n.size)
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
return
|
|
33
|
-
const
|
|
34
|
-
e.setKey("sdkInView", w(
|
|
35
|
-
}, 200),
|
|
32
|
+
return u(() => {
|
|
33
|
+
const n = c(() => {
|
|
34
|
+
e.setKey("sdkInView", w(t));
|
|
35
|
+
}, 200), s = c(() => {
|
|
36
36
|
const o = i();
|
|
37
|
-
e.setKey("screen", o), e.setKey("
|
|
37
|
+
e.setKey("screen", o), e.setKey("sdkInDesktopView", k(o.size));
|
|
38
38
|
}, 200);
|
|
39
|
-
return window.addEventListener("scroll",
|
|
40
|
-
window.removeEventListener("scroll",
|
|
39
|
+
return window.addEventListener("scroll", n), window.addEventListener("resize", s), () => {
|
|
40
|
+
window.removeEventListener("scroll", n), window.removeEventListener("resize", s);
|
|
41
41
|
};
|
|
42
|
-
}, [e,
|
|
42
|
+
}, [e, t]), [e];
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
45
|
I as useSdkResponsive
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { useStore as
|
|
1
|
+
import { useStore as p } from "@nanostores/react";
|
|
2
2
|
import S from "lodash.throttle";
|
|
3
|
-
import { useRef as f, useState as h, useEffect as
|
|
3
|
+
import { useRef as f, useState as h, useEffect as b } from "react";
|
|
4
4
|
import { BREAKPOINTS as m } from "../theme/constants.js";
|
|
5
|
-
import { m as
|
|
5
|
+
import { m as g } from "../../index-keh7OLCY.js";
|
|
6
6
|
import "../../index-uEuzH3jr.js";
|
|
7
|
-
const
|
|
7
|
+
const C = (t, n) => {
|
|
8
8
|
var r;
|
|
9
|
-
(r = t.current) == null || r.scrollIntoView(n);
|
|
10
|
-
},
|
|
9
|
+
(r = t.current) == null || r.scrollIntoView(n), window.scrollBy({ top: -52 });
|
|
10
|
+
}, D = (t, n) => {
|
|
11
11
|
const r = f(null), l = f(0), [e] = h(
|
|
12
|
-
|
|
12
|
+
g({
|
|
13
13
|
scrollPosition: 0,
|
|
14
|
+
tabsShown: !0,
|
|
14
15
|
scrollDirection: "forward"
|
|
15
16
|
})
|
|
16
|
-
), c =
|
|
17
|
-
return
|
|
17
|
+
), c = p(n);
|
|
18
|
+
return b(() => {
|
|
18
19
|
const s = window.innerWidth < m.xl ? window : r.current;
|
|
19
20
|
if (!s)
|
|
20
21
|
return () => {
|
|
21
22
|
};
|
|
22
|
-
const i = S((
|
|
23
|
+
const i = S((w) => {
|
|
23
24
|
var a;
|
|
24
|
-
const u =
|
|
25
|
+
const u = w.target;
|
|
25
26
|
if (!u)
|
|
26
27
|
return;
|
|
27
28
|
let o = 0;
|
|
28
29
|
c.screen.size < m.xl ? o = ((a = t.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : o = u.scrollTop;
|
|
29
|
-
const
|
|
30
|
+
const d = l.current < o ? "forward" : "backward";
|
|
30
31
|
l.current = o, e.set({
|
|
31
32
|
scrollPosition: Math.round(o),
|
|
32
|
-
scrollDirection:
|
|
33
|
+
scrollDirection: d,
|
|
33
34
|
tabsShown: e.get().tabsShown
|
|
34
35
|
});
|
|
35
36
|
}, 200);
|
|
@@ -39,6 +40,6 @@ const D = (t, n) => {
|
|
|
39
40
|
}, [e, t, c.screen]), [r, e];
|
|
40
41
|
};
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
C as scrollIntoAppView,
|
|
44
|
+
D as useSdkScroll
|
|
44
45
|
};
|
|
@@ -15,7 +15,7 @@ type OnboardingType = OnboardingInviteCardProps & {
|
|
|
15
15
|
primaryColor?: string;
|
|
16
16
|
inviteCardBtnLabel?: string;
|
|
17
17
|
loading: boolean;
|
|
18
|
-
renderToNode
|
|
18
|
+
renderToNode?: AppNodeRef | HeaderNodeRef;
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
};
|
|
21
21
|
export declare const Onboarding: React.FC<OnboardingType>;
|
|
@@ -10,7 +10,8 @@ import { Container as q, OnboardingHeader as J, CloseBtn as K, IconClose as Q, C
|
|
|
10
10
|
import "../../skeleton/styles.js";
|
|
11
11
|
import "@linaria/react";
|
|
12
12
|
import "./slides/onboarding-instructions/styles.js";
|
|
13
|
-
import "
|
|
13
|
+
import "../../app/useClipboardCopy.js";
|
|
14
|
+
import "../../../index-jRXrW6ie.js";
|
|
14
15
|
import "../../../index-uEuzH3jr.js";
|
|
15
16
|
import "../copyNotification/index.js";
|
|
16
17
|
import "../../icons/index.js";
|
|
@@ -42,14 +43,14 @@ const m = {
|
|
|
42
43
|
renderToNode: I,
|
|
43
44
|
onClose: N
|
|
44
45
|
}) => {
|
|
45
|
-
const [
|
|
46
|
+
const [o, p] = c(0), [l, b] = c(!1), [n, e] = c(m);
|
|
46
47
|
j(() => {
|
|
47
|
-
i != null && i.length ?
|
|
48
|
+
i != null && i.length ? e({ ...m, steps: !0 }) : r != null && r.length ? e({ ...m, rules: !0 }) : e({ ...m, inviteCard: !0 });
|
|
48
49
|
}, []);
|
|
49
|
-
const w = H(() => n.steps &&
|
|
50
|
-
i != null && i.length &&
|
|
51
|
-
}, [
|
|
52
|
-
n.inviteCard ? await S.onboardingStatus.submitInplay() : n.rules && l ?
|
|
50
|
+
const w = H(() => n.steps && o === 0 ? "Continue" : n.rules ? l || !a ? "Got it" : a : n.inviteCard ? h || "Play Now" : "Next", [n, o, l, a, h]), A = z(() => {
|
|
51
|
+
i != null && i.length && o < i.length - 1 ? p((d) => ++d) : r != null && r.length && n.steps ? e({ ...m, rules: !0 }) : n.rules && e({ ...m, inviteCard: !0 });
|
|
52
|
+
}, [o, i == null ? void 0 : i.length, r == null ? void 0 : r.length, n, p, e]), D = async () => {
|
|
53
|
+
n.inviteCard ? await S.onboardingStatus.submitInplay() : n.rules && l ? b(!1) : A();
|
|
53
54
|
};
|
|
54
55
|
return /* @__PURE__ */ t(E, { children: ({ width: d, height: C }) => /* @__PURE__ */ O(q, { style: { width: d, height: C, maxHeight: C }, children: [
|
|
55
56
|
/* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(K, { onClick: N, children: /* @__PURE__ */ t(Q, { name: "icon-close-btn-gray" }) }) }),
|
|
@@ -59,8 +60,8 @@ const m = {
|
|
|
59
60
|
{
|
|
60
61
|
loading: u,
|
|
61
62
|
stepsCount: i.length,
|
|
62
|
-
currentStep:
|
|
63
|
-
...i[
|
|
63
|
+
currentStep: o,
|
|
64
|
+
...i[o]
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
n.rules && !l && /* @__PURE__ */ t(
|
|
@@ -70,7 +71,7 @@ const m = {
|
|
|
70
71
|
rulesTitle: y,
|
|
71
72
|
termsText: f,
|
|
72
73
|
primaryColor: g,
|
|
73
|
-
openTerms: () =>
|
|
74
|
+
openTerms: () => b(!0)
|
|
74
75
|
}
|
|
75
76
|
),
|
|
76
77
|
n.rules && l && /* @__PURE__ */ t(R, { termsTitle: s, termsText: f }),
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useClipboardCopy as I } from "../../../../app/useClipboardCopy.js";
|
|
3
3
|
import { SvgIcon as f } from "../../../../icons/index.js";
|
|
4
|
-
import { Container as g, IconContainer as k, InviteGameIcon as
|
|
4
|
+
import { Container as g, IconContainer as k, InviteGameIcon as b, Content as s, Heading as y, Subtext as L, LinkContainer as S, LinkInfo as u, LinkTitle as x, LinkAddress as v, LinkIcon as j, SocialLinksContainer as A, SocialLink as G, SocialLinkLabel as H } from "./styles.js";
|
|
5
5
|
import "react";
|
|
6
|
+
import "../../../../../index-jRXrW6ie.js";
|
|
6
7
|
import "../../../../../index-uEuzH3jr.js";
|
|
7
8
|
import "../../../copyNotification/index.js";
|
|
8
9
|
import "../../../copyNotification/styles.js";
|
|
9
10
|
import "@linaria/react";
|
|
10
|
-
const
|
|
11
|
+
const F = ({
|
|
11
12
|
renderToNode: t,
|
|
12
13
|
inviteLink: r,
|
|
13
14
|
socialLinks: i,
|
|
14
15
|
inviteCardTitle: c,
|
|
15
16
|
inviteCardSubtext: l,
|
|
16
|
-
primaryColor:
|
|
17
|
-
className:
|
|
17
|
+
primaryColor: m,
|
|
18
|
+
className: a
|
|
18
19
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
return /* @__PURE__ */ o(g, { className:
|
|
21
|
-
/* @__PURE__ */ n(k, { style: { backgroundColor:
|
|
22
|
-
/* @__PURE__ */ o(
|
|
20
|
+
const [d, p] = I(t);
|
|
21
|
+
return /* @__PURE__ */ o(g, { className: a, children: [
|
|
22
|
+
/* @__PURE__ */ n(k, { style: { backgroundColor: m }, children: /* @__PURE__ */ n(b, { name: "invite-game-icon" }) }),
|
|
23
|
+
/* @__PURE__ */ o(s, { children: [
|
|
23
24
|
/* @__PURE__ */ n(y, { children: c || "" }),
|
|
24
|
-
/* @__PURE__ */ n(
|
|
25
|
+
/* @__PURE__ */ n(L, { children: l || "" })
|
|
25
26
|
] }),
|
|
26
|
-
r && /* @__PURE__ */ o(
|
|
27
|
-
/* @__PURE__ */ o(
|
|
27
|
+
r && /* @__PURE__ */ o(S, { onClick: () => d(r), children: [
|
|
28
|
+
/* @__PURE__ */ o(u, { children: [
|
|
28
29
|
/* @__PURE__ */ n(x, { children: "Invite link" }),
|
|
29
30
|
/* @__PURE__ */ n(v, { children: r })
|
|
30
31
|
] }),
|
|
@@ -38,5 +39,5 @@ const E = ({
|
|
|
38
39
|
] });
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
F as OnboardingInviteCard
|
|
42
43
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { InsightContent as n } from "../../../questions/insight/index.js";
|
|
3
3
|
import { Container as p, ActionBtn as c } from "./styles.js";
|
|
4
|
-
import "react";
|
|
5
4
|
import "../../../video-player/index.js";
|
|
5
|
+
import "react";
|
|
6
6
|
import "../../../icons/index.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "../../../video-player/styles.js";
|
|
9
|
-
import "../../../../utils/common.js";
|
|
10
9
|
import "../../../questions/insight/styles.js";
|
|
11
|
-
const
|
|
10
|
+
const a = ({
|
|
12
11
|
openInsight: r,
|
|
13
12
|
questionId: t,
|
|
14
13
|
...o
|
|
@@ -17,5 +16,5 @@ const d = ({
|
|
|
17
16
|
r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
|
|
18
17
|
] });
|
|
19
18
|
export {
|
|
20
|
-
|
|
19
|
+
a as Insight
|
|
21
20
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Question as
|
|
3
|
-
import { Insight as
|
|
4
|
-
import { Twitter as
|
|
5
|
-
import { QuestionsContainer as
|
|
2
|
+
import { Question as s } from "../index.js";
|
|
3
|
+
import { Insight as b } from "../insight/index.js";
|
|
4
|
+
import { Twitter as p } from "../twitter/index.js";
|
|
5
|
+
import { QuestionsContainer as c } from "./styles.js";
|
|
6
6
|
import "@streamlayer/sdk-web-types";
|
|
7
7
|
import "../../constants.js";
|
|
8
8
|
import "../styles.js";
|
|
@@ -12,32 +12,32 @@ import "react";
|
|
|
12
12
|
import "../../../questions/insight/index.js";
|
|
13
13
|
import "../../../video-player/index.js";
|
|
14
14
|
import "../../../video-player/styles.js";
|
|
15
|
-
import "../../../../utils/common.js";
|
|
16
15
|
import "../../../questions/insight/styles.js";
|
|
17
16
|
import "../insight/styles.js";
|
|
18
17
|
import "../../../questions/twitter/index.js";
|
|
19
18
|
import "../../../questions/twitter/account/index.js";
|
|
19
|
+
import "../../../../utils/common.js";
|
|
20
20
|
import "../../../questions/twitter/account/styles.js";
|
|
21
21
|
import "../../../questions/twitter/styles.js";
|
|
22
22
|
import "../twitter/styles.js";
|
|
23
23
|
import "../../../button/index.js";
|
|
24
24
|
import "../../../button/styles.js";
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
if (t.type === "question" && ((
|
|
25
|
+
const H = ({ questions: e, openQuestion: m }) => /* @__PURE__ */ r(c, { children: e == null ? void 0 : e.map((t) => {
|
|
26
|
+
var o, u, n;
|
|
27
|
+
if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
|
|
28
28
|
const i = t.attributes.attributes.value;
|
|
29
|
-
return /* @__PURE__ */ r(
|
|
29
|
+
return /* @__PURE__ */ r(s, { openQuestion: m, ...i }, i.questionId);
|
|
30
30
|
}
|
|
31
31
|
if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
|
|
32
|
-
const i = t.attributes.attributes.value
|
|
33
|
-
return /* @__PURE__ */ r(
|
|
32
|
+
const i = t.attributes.attributes.value;
|
|
33
|
+
return /* @__PURE__ */ r(b, { openInsight: m, ...i }, i.questionId);
|
|
34
34
|
}
|
|
35
35
|
if (t.type === "tweet" && ((n = t.attributes) == null ? void 0 : n.attributes.case) === "tweet") {
|
|
36
|
-
const i = t.attributes.attributes.value,
|
|
37
|
-
return /* @__PURE__ */ r(
|
|
36
|
+
const i = t.attributes.attributes.value, a = t.attributes.id;
|
|
37
|
+
return /* @__PURE__ */ r(p, { openTweet: m, ...i, tweetId: a }, a);
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}) });
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
H as QuestionList
|
|
43
43
|
};
|
|
@@ -12,10 +12,11 @@ import "../../../video-player/styles.js";
|
|
|
12
12
|
import "./insight/styles.js";
|
|
13
13
|
import "../../../questions/twitter/index.js";
|
|
14
14
|
import "../../../questions/twitter/account/index.js";
|
|
15
|
+
import "../../../../utils/common.js";
|
|
15
16
|
import "../../../questions/twitter/account/styles.js";
|
|
16
17
|
import "../../../questions/twitter/styles.js";
|
|
17
18
|
import "./tweet/styles.js";
|
|
18
|
-
const
|
|
19
|
+
const z = ({
|
|
19
20
|
close: n,
|
|
20
21
|
action: i,
|
|
21
22
|
data: { questionType: r, question: m, insight: l, tweet: e }
|
|
@@ -46,5 +47,5 @@ const y = ({
|
|
|
46
47
|
] }) : null;
|
|
47
48
|
};
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
z as Notification
|
|
50
51
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Notification } from '@streamlayer/sdk-web-notifications';
|
|
3
|
-
import { InstantView } from '@streamlayer/sdk-web-types';
|
|
4
|
-
export
|
|
3
|
+
import { InsightHistory, InstantView } from '@streamlayer/sdk-web-types';
|
|
4
|
+
export type InsightProps = InstantView & {
|
|
5
|
+
imageMode: InsightHistory['imageMode'];
|
|
5
6
|
action: Notification['action'];
|
|
6
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare const Insight: React.FC<InsightProps>;
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionImages as c } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { VideoPlayer as p } from "../../../../video-player/index.js";
|
|
4
|
+
import { InsightContainer as e, ImageContainer as h, Image as u, InsightContent as a, Title as I, Description as g, ActionBtn as f } from "./styles.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "../../../../icons/index.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
8
|
import "../../../../video-player/styles.js";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(c, { source: r.url, poster: r.thumbnailUrl }),
|
|
16
|
-
n && !(r != null && r.url) && /* @__PURE__ */ t(p, { src: n }),
|
|
17
|
-
/* @__PURE__ */ i(o, { children: [
|
|
18
|
-
/* @__PURE__ */ t(u, { children: s }),
|
|
19
|
-
/* @__PURE__ */ t(e, { children: m }),
|
|
20
|
-
l && /* @__PURE__ */ t(I, { onClick: l, children: "View Insight" })
|
|
9
|
+
const w = ({ video: r, image: n, imageMode: s, heading: i, body: o, action: l }) => /* @__PURE__ */ m(e, { children: [
|
|
10
|
+
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(p, { source: r.url, poster: r.thumbnailUrl }),
|
|
11
|
+
n && !(r != null && r.url) && /* @__PURE__ */ t(h, { "data-rounded": s === c.ROUNDED, children: /* @__PURE__ */ t(u, { src: n, alt: i }) }),
|
|
12
|
+
/* @__PURE__ */ m(a, { children: [
|
|
13
|
+
/* @__PURE__ */ t(I, { children: i }),
|
|
14
|
+
/* @__PURE__ */ t(g, { children: o }),
|
|
15
|
+
l && /* @__PURE__ */ t(f, { onClick: l, children: "View Insight" })
|
|
21
16
|
] })
|
|
22
17
|
] });
|
|
23
18
|
export {
|
|
24
|
-
|
|
19
|
+
w as Insight
|
|
25
20
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const InsightContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const ImageContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
5
|
export declare const InsightContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
6
|
export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement> & Record<never, unknown>>;
|
|
6
7
|
export declare const Description: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -7,28 +7,33 @@ const t = /* @__PURE__ */ s("div")({
|
|
|
7
7
|
name: "Image",
|
|
8
8
|
class: "igj7luu",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
+
}), a = /* @__PURE__ */ s("div")({
|
|
11
|
+
name: "ImageContainer",
|
|
12
|
+
class: "i1qne9g6",
|
|
13
|
+
propsAsIs: !1
|
|
10
14
|
}), o = /* @__PURE__ */ s("div")({
|
|
11
15
|
name: "InsightContent",
|
|
12
|
-
class: "
|
|
16
|
+
class: "itpr98r",
|
|
13
17
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
18
|
+
}), i = /* @__PURE__ */ s("h3")({
|
|
15
19
|
name: "Title",
|
|
16
|
-
class: "
|
|
20
|
+
class: "t17iaqp8",
|
|
17
21
|
propsAsIs: !1
|
|
18
|
-
}),
|
|
22
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
19
23
|
name: "Description",
|
|
20
|
-
class: "
|
|
24
|
+
class: "d16t3y7s",
|
|
21
25
|
propsAsIs: !1
|
|
22
|
-
}),
|
|
26
|
+
}), r = /* @__PURE__ */ s("button")({
|
|
23
27
|
name: "ActionBtn",
|
|
24
|
-
class: "
|
|
28
|
+
class: "a12495er",
|
|
25
29
|
propsAsIs: !1
|
|
26
30
|
});
|
|
27
31
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
r as ActionBtn,
|
|
33
|
+
p as Description,
|
|
30
34
|
e as Image,
|
|
35
|
+
a as ImageContainer,
|
|
31
36
|
t as InsightContainer,
|
|
32
37
|
o as InsightContent,
|
|
33
|
-
|
|
38
|
+
i as Title
|
|
34
39
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { TwitterContent as e } from "../../../../questions/twitter/index.js";
|
|
3
|
-
import { Container as
|
|
4
|
-
import "../../../../
|
|
3
|
+
import { Container as m, QuoteWrap as n, Quote as p, ActionBtn as l } from "./styles.js";
|
|
4
|
+
import "../../../../video-player/index.js";
|
|
5
|
+
import "react";
|
|
5
6
|
import "../../../../icons/index.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
|
-
import "
|
|
8
|
+
import "../../../../video-player/styles.js";
|
|
9
|
+
import "../../../../questions/twitter/account/index.js";
|
|
10
|
+
import "../../../../../utils/common.js";
|
|
8
11
|
import "../../../../questions/twitter/account/styles.js";
|
|
9
12
|
import "../../../../questions/twitter/styles.js";
|
|
10
|
-
const
|
|
11
|
-
i.title && /* @__PURE__ */ t(
|
|
13
|
+
const a = ({ action: r, ...i }) => /* @__PURE__ */ o(m, { children: [
|
|
14
|
+
i.title && /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(p, { children: i.title }) }),
|
|
12
15
|
/* @__PURE__ */ t(e, { ...i }),
|
|
13
|
-
r && /* @__PURE__ */ t(
|
|
16
|
+
r && /* @__PURE__ */ t(l, { onClick: r, children: "View Insight" })
|
|
14
17
|
] });
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
a as Tweet
|
|
17
20
|
};
|
|
@@ -1,42 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "../../../questions/twitter/account/index.js";
|
|
1
|
+
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { TwitterContent as m } from "../../../questions/twitter/index.js";
|
|
3
|
+
import { Container as e, Quote as n, ActionButton as p } from "./styles.js";
|
|
4
|
+
import "../../../video-player/index.js";
|
|
5
|
+
import "react";
|
|
7
6
|
import "../../../icons/index.js";
|
|
8
7
|
import "@linaria/react";
|
|
8
|
+
import "../../../video-player/styles.js";
|
|
9
|
+
import "../../../questions/twitter/account/index.js";
|
|
10
|
+
import "../../../../utils/common.js";
|
|
9
11
|
import "../../../questions/twitter/account/styles.js";
|
|
10
12
|
import "../../../questions/twitter/styles.js";
|
|
11
13
|
import "../../../button/index.js";
|
|
12
14
|
import "../../../button/styles.js";
|
|
13
|
-
const
|
|
14
|
-
openTweet:
|
|
15
|
-
created: i,
|
|
15
|
+
const k = ({
|
|
16
|
+
openTweet: o,
|
|
16
17
|
...t
|
|
17
|
-
}) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
date: d(e),
|
|
24
|
-
time: c(e)
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}, [i]);
|
|
29
|
-
return /* @__PURE__ */ n(u, { children: [
|
|
30
|
-
r && /* @__PURE__ */ n(p, { children: [
|
|
31
|
-
r.date,
|
|
32
|
-
" · ",
|
|
33
|
-
r.time
|
|
34
|
-
] }),
|
|
35
|
-
t.title && /* @__PURE__ */ o(s, { children: t.title }),
|
|
36
|
-
/* @__PURE__ */ o(l, { ...t }),
|
|
37
|
-
m && /* @__PURE__ */ o(h, { onClick: () => m(t.tweetId), children: "View Insight" })
|
|
38
|
-
] });
|
|
39
|
-
};
|
|
18
|
+
}) => /* @__PURE__ */ r(e, { children: [
|
|
19
|
+
t.title && /* @__PURE__ */ i(n, { children: t.title }),
|
|
20
|
+
/* @__PURE__ */ i(m, { ...t }),
|
|
21
|
+
o && /* @__PURE__ */ i(p, { onClick: () => o(t.tweetId), children: "View Insight" })
|
|
22
|
+
] });
|
|
40
23
|
export {
|
|
41
|
-
|
|
24
|
+
k as Twitter
|
|
42
25
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const ActionButton: any;
|
|
4
|
-
export declare const DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
4
|
export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { styled as o } from "@linaria/react";
|
|
2
|
+
import { Button as t } from "../../../button/index.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../../button/styles.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ o("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "cl56x6b",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), s = () => t, c = /* @__PURE__ */ o(s())({
|
|
10
10
|
name: "ActionButton",
|
|
11
11
|
class: "a11pzf92",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
-
}),
|
|
14
|
-
name: "DateTime",
|
|
15
|
-
class: "d1hbaleq",
|
|
16
|
-
propsAsIs: !1
|
|
17
|
-
}), i = /* @__PURE__ */ s("blockquote")({
|
|
13
|
+
}), i = /* @__PURE__ */ o("blockquote")({
|
|
18
14
|
name: "Quote",
|
|
19
|
-
class: "
|
|
15
|
+
class: "q1hbaleq",
|
|
20
16
|
propsAsIs: !1
|
|
21
17
|
});
|
|
22
18
|
export {
|
|
23
19
|
c as ActionButton,
|
|
24
|
-
|
|
25
|
-
m as DateTime,
|
|
20
|
+
a as Container,
|
|
26
21
|
i as Quote
|
|
27
22
|
};
|
|
@@ -18,11 +18,11 @@ const B = ({
|
|
|
18
18
|
enteredAnActiveQuestion: E,
|
|
19
19
|
marketClosed: N
|
|
20
20
|
}) => {
|
|
21
|
-
const b = a && (c === n.TRIVIA || c === n.PREDICTION) && m && T !== Q.RESOLVED,
|
|
22
|
-
if (!u && !w && !D && !O && !
|
|
21
|
+
const b = a && (c === n.TRIVIA || c === n.PREDICTION) && m && T !== Q.RESOLVED, k = c === n.PREDICTION && !F, x = N && c === n.PREDICTION && !a && !E || c === n.PREDICTION && y && m && E, D = b && k, O = b && F, R = c === n.PREDICTION && a && m && F, S = a && c === n.POLL && m;
|
|
22
|
+
if (!u && !w && !D && !O && !x && !S && !R)
|
|
23
23
|
return null;
|
|
24
24
|
const P = I ? "correct" : "incorrect", t = I ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
25
|
-
return /* @__PURE__ */ r(f, { "data-isPrediction":
|
|
25
|
+
return /* @__PURE__ */ r(f, { "data-isPrediction": k, children: [
|
|
26
26
|
u && /* @__PURE__ */ r(o, { children: [
|
|
27
27
|
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(l, { name: "questionExpired" }) }),
|
|
28
28
|
/* @__PURE__ */ r("div", { children: [
|
|
@@ -37,7 +37,7 @@ const B = ({
|
|
|
37
37
|
/* @__PURE__ */ i(s, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
38
38
|
] })
|
|
39
39
|
] }),
|
|
40
|
-
|
|
40
|
+
x && /* @__PURE__ */ r(o, { children: [
|
|
41
41
|
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(l, { name: "questionExpired" }) }),
|
|
42
42
|
/* @__PURE__ */ r("div", { children: [
|
|
43
43
|
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(d, { children: "Question Closed" }) }),
|
|
@@ -50,7 +50,7 @@ const B = ({
|
|
|
50
50
|
] }),
|
|
51
51
|
S && /* @__PURE__ */ r(o, { children: [
|
|
52
52
|
/* @__PURE__ */ i(h, { "data-feedback-type": "correct", children: /* @__PURE__ */ i(l, { name: "correct" }) }),
|
|
53
|
-
/* @__PURE__ */ i(d, { children: "
|
|
53
|
+
/* @__PURE__ */ i(d, { children: "Thanks for answering. Please stay tuned for the next question." })
|
|
54
54
|
] }),
|
|
55
55
|
(O || R) && /* @__PURE__ */ r(o, { children: [
|
|
56
56
|
/* @__PURE__ */ i(h, { "data-feedback-type": P, children: /* @__PURE__ */ i(l, { name: P }) }),
|