@streamlayer/react-ui 0.96.2 → 0.97.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/hooks/analytics.js +50 -0
- package/lib/index-z0QjLiEL.js +75 -0
- package/lib/ui/app/Features/FeatureProvider.d.ts +1 -0
- package/lib/ui/app/Features/FeatureProvider.js +34 -6
- package/lib/ui/app/Features/Gamification/Friends.d.ts +0 -2
- package/lib/ui/app/Features/Gamification/Friends.js +20 -23
- package/lib/ui/app/Features/Gamification/Leaderboard.js +31 -25
- package/lib/ui/app/Features/Gamification/Question.js +4 -2
- package/lib/ui/app/Features/Gamification/QuestionsList.js +11 -8
- package/lib/ui/app/Features/Gamification/Tabs.js +30 -25
- package/lib/ui/app/Features/Gamification/UserSummary.js +14 -12
- package/lib/ui/app/Features/Gamification/gamification-feature.js +6 -2
- package/lib/ui/app/Features/Gamification/index.d.ts +10 -0
- package/lib/ui/app/Features/Gamification/index.js +73 -68
- package/lib/ui/app/Features/index.d.ts +8 -0
- package/lib/ui/app/Features/index.js +112 -16
- package/lib/ui/app/Navigation/MastersNavigation/index.js +5 -4
- package/lib/ui/app/Navigation/index.js +7 -6
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -0
- package/lib/ui/app/Notifications/Onboarding/index.js +76 -78
- package/lib/ui/app/Notifications/index.js +98 -91
- package/lib/ui/app/Points/index.js +20 -17
- package/lib/ui/app/masters.js +167 -86
- package/lib/ui/app/useMastersApp.js +12 -11
- package/lib/ui/app/useSdkFeature.js +13 -16
- package/lib/ui/app/useSdkResponsive.js +1 -1
- package/lib/ui/app/useSdkScroll.d.ts +1 -1
- package/lib/ui/app/useSdkScroll.js +28 -25
- package/lib/ui/gamification/invite-link/index.js +26 -12
- package/lib/ui/gamification/onboarding/index.d.ts +0 -2
- package/lib/ui/gamification/onboarding/index.js +46 -46
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +2 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +21 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +20 -15
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -3
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +34 -29
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +0 -3
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +17 -32
- package/lib/ui/gamification/points/index.d.ts +1 -0
- package/lib/ui/gamification/points/index.js +9 -9
- package/lib/ui/gamification/question/index.d.ts +1 -0
- package/lib/ui/gamification/question/index.js +31 -24
- package/lib/ui/gamification/question/insight/index.js +11 -15
- package/lib/ui/gamification/question/list/index.d.ts +3 -1
- package/lib/ui/gamification/question/list/index.js +50 -34
- package/lib/ui/gamification/question/notification/index.js +23 -25
- package/lib/ui/gamification/question/notification/insight/index.js +10 -9
- package/lib/ui/gamification/question/notification/tweet/index.js +3 -2
- package/lib/ui/gamification/question/styles.d.ts +2 -0
- package/lib/ui/gamification/question/styles.js +39 -28
- package/lib/ui/gamification/question/twitter/index.js +14 -18
- package/lib/ui/gamification/user-statistics/index.d.ts +3 -2
- package/lib/ui/gamification/user-statistics/index.js +48 -45
- package/lib/ui/gamification/vote/feedback/index.d.ts +3 -2
- package/lib/ui/gamification/vote/feedback/index.js +74 -58
- package/lib/ui/gamification/vote/feedback/styles.d.ts +2 -0
- package/lib/ui/gamification/vote/feedback/styles.js +33 -21
- package/lib/ui/gamification/vote/index.js +94 -83
- package/lib/ui/gamification/vote/insight-details/index.js +7 -6
- package/lib/ui/gamification/vote/twitter-details/index.js +3 -2
- package/lib/ui/gamification/vote/vote-option/index.d.ts +2 -1
- package/lib/ui/gamification/vote/vote-option/index.js +47 -39
- package/lib/ui/icons/index.d.ts +1 -2
- package/lib/ui/icons/index.js +122 -49
- package/lib/ui/modal/index.js +27 -21
- package/lib/ui/navigation/button/Channels.js +6 -5
- package/lib/ui/navigation/button/FeaturedGroups.js +4 -3
- package/lib/ui/navigation/button/LeaderBoard.js +6 -5
- package/lib/ui/navigation/button/index.js +20 -7
- package/lib/ui/navigation/button/styles.d.ts +3 -0
- package/lib/ui/navigation/button/styles.js +9 -6
- package/lib/ui/questions/insight/index.js +16 -16
- package/lib/ui/questions/twitter/index.js +3 -2
- package/lib/ui/show-in/index.d.ts +2 -0
- package/lib/ui/show-in/index.js +24 -14
- package/lib/ui/timer/index.js +32 -28
- package/lib/ui/video-player/index.js +41 -39
- package/lib/ui/video-player/styles.d.ts +1 -0
- package/lib/ui/video-player/styles.js +10 -9
- package/package.json +22 -21
- package/lib/index-keh7OLCY.js +0 -67
|
@@ -1,43 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useAnalyticsHandle as d } from "../../../../../hooks/analytics.js";
|
|
3
|
+
import { useRef as s } from "react";
|
|
4
|
+
import { InvitationFrom as f } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { useClipboardCopy as h } from "../../../../app/useClipboardCopy.js";
|
|
6
|
+
import { Container as y, IconContainer as C, InviteGameIcon as I, Content as k, Heading as u, Subtext as b, LinkContainer as g, LinkInfo as v, LinkTitle as x, LinkAddress as A, LinkIcon as L } from "./styles.js";
|
|
7
|
+
import "lodash.throttle";
|
|
8
|
+
import "@streamlayer/sdk-web-interfaces";
|
|
9
|
+
import "../../../../theme/constants.js";
|
|
6
10
|
import "../../../../../index-jRXrW6ie.js";
|
|
7
11
|
import "../../../../../index-uEuzH3jr.js";
|
|
8
12
|
import "../../../copyNotification/index.js";
|
|
9
|
-
import "
|
|
13
|
+
import "../../../../icons/index.js";
|
|
10
14
|
import "@linaria/react";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
inviteLink:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
inviteCardSubtext: l,
|
|
15
|
+
import "../../../copyNotification/styles.js";
|
|
16
|
+
const B = ({
|
|
17
|
+
inviteLink: i,
|
|
18
|
+
inviteCardTitle: t,
|
|
19
|
+
inviteCardSubtext: e,
|
|
17
20
|
primaryColor: m,
|
|
18
|
-
className:
|
|
21
|
+
className: c
|
|
19
22
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const r = s(null), [l, p] = h(r), [a] = d({
|
|
24
|
+
type: "invitation",
|
|
25
|
+
action: "sent",
|
|
26
|
+
payload: {
|
|
27
|
+
from: f.MENU
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ n(y, { className: c, children: [
|
|
31
|
+
/* @__PURE__ */ o(C, { style: { backgroundColor: m }, children: /* @__PURE__ */ o(I, { name: "invite-game-icon" }) }),
|
|
32
|
+
/* @__PURE__ */ n(k, { children: [
|
|
33
|
+
/* @__PURE__ */ o(u, { children: t || "" }),
|
|
34
|
+
/* @__PURE__ */ o(b, { children: e || "" })
|
|
26
35
|
] }),
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
36
|
+
i && /* @__PURE__ */ n(g, { ref: r, onClick: a(() => l(i)), children: [
|
|
37
|
+
/* @__PURE__ */ n(v, { children: [
|
|
38
|
+
/* @__PURE__ */ o(x, { children: "Invite link" }),
|
|
39
|
+
/* @__PURE__ */ o(A, { children: i })
|
|
31
40
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(L, { name: "icon-copy" })
|
|
33
42
|
] }),
|
|
34
|
-
i && i.length > 0 && /* @__PURE__ */ n(A, { children: i.map(({ icon: h, link: e, label: C }) => /* @__PURE__ */ o(G, { href: e, target: "_blank", children: [
|
|
35
|
-
/* @__PURE__ */ n(f, { name: h }),
|
|
36
|
-
/* @__PURE__ */ n(H, { children: C })
|
|
37
|
-
] }, e)) }),
|
|
38
43
|
p
|
|
39
44
|
] });
|
|
40
45
|
};
|
|
41
46
|
export {
|
|
42
|
-
|
|
47
|
+
B as OnboardingInviteCard
|
|
43
48
|
};
|
|
@@ -10,6 +10,3 @@ export declare const LinkInfo: import("@linaria/react").StyledComponent<import("
|
|
|
10
10
|
export declare const LinkTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
11
11
|
export declare const LinkAddress: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
12
12
|
export declare const LinkIcon: any;
|
|
13
|
-
export declare const SocialLinksContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
14
|
-
export declare const SocialLink: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
|
|
15
|
-
export declare const SocialLinkLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
@@ -2,15 +2,15 @@ import { styled as s } from "@linaria/react";
|
|
|
2
2
|
import { SvgIcon as n } from "../../../../icons/index.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
|
-
const
|
|
5
|
+
const p = /* @__PURE__ */ s("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "c1itm4k7",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
10
10
|
name: "IconContainer",
|
|
11
11
|
class: "i1w4fsni",
|
|
12
12
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
13
|
+
}), o = () => n, r = /* @__PURE__ */ s(o())({
|
|
14
14
|
name: "InviteGameIcon",
|
|
15
15
|
class: "i19m85r1",
|
|
16
16
|
propsAsIs: !0
|
|
@@ -22,56 +22,41 @@ const l = /* @__PURE__ */ s("div")({
|
|
|
22
22
|
name: "Heading",
|
|
23
23
|
class: "h1amdqtv",
|
|
24
24
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
25
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
26
26
|
name: "Subtext",
|
|
27
27
|
class: "s1lhlj9j",
|
|
28
28
|
propsAsIs: !1
|
|
29
|
-
}),
|
|
29
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
30
30
|
name: "LinkContainer",
|
|
31
31
|
class: "l1wot35e",
|
|
32
32
|
propsAsIs: !1
|
|
33
|
-
}),
|
|
33
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
34
34
|
name: "LinkInfo",
|
|
35
35
|
class: "l1jdw39q",
|
|
36
36
|
propsAsIs: !1
|
|
37
|
-
}),
|
|
37
|
+
}), A = /* @__PURE__ */ s("span")({
|
|
38
38
|
name: "LinkTitle",
|
|
39
39
|
class: "l1cr5mk",
|
|
40
40
|
propsAsIs: !1
|
|
41
|
-
}),
|
|
41
|
+
}), k = /* @__PURE__ */ s("span")({
|
|
42
42
|
name: "LinkAddress",
|
|
43
43
|
class: "lvi87q4",
|
|
44
44
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
45
|
+
}), e = () => n, L = /* @__PURE__ */ s(e())({
|
|
46
46
|
name: "LinkIcon",
|
|
47
47
|
class: "l1pqlvw3",
|
|
48
48
|
propsAsIs: !0
|
|
49
|
-
}), C = /* @__PURE__ */ s("div")({
|
|
50
|
-
name: "SocialLinksContainer",
|
|
51
|
-
class: "s1n7kzeh",
|
|
52
|
-
propsAsIs: !1
|
|
53
|
-
}), S = /* @__PURE__ */ s("a")({
|
|
54
|
-
name: "SocialLink",
|
|
55
|
-
class: "s2m9o9y",
|
|
56
|
-
propsAsIs: !1
|
|
57
|
-
}), b = /* @__PURE__ */ s("span")({
|
|
58
|
-
name: "SocialLinkLabel",
|
|
59
|
-
class: "sewjbbn",
|
|
60
|
-
propsAsIs: !1
|
|
61
49
|
});
|
|
62
50
|
export {
|
|
63
|
-
|
|
51
|
+
p as Container,
|
|
64
52
|
m as Content,
|
|
65
53
|
I as Heading,
|
|
66
|
-
|
|
54
|
+
l as IconContainer,
|
|
67
55
|
r as InviteGameIcon,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
b as SocialLinkLabel,
|
|
75
|
-
C as SocialLinksContainer,
|
|
76
|
-
k as Subtext
|
|
56
|
+
k as LinkAddress,
|
|
57
|
+
f as LinkContainer,
|
|
58
|
+
L as LinkIcon,
|
|
59
|
+
v as LinkInfo,
|
|
60
|
+
A as LinkTitle,
|
|
61
|
+
d as Subtext
|
|
77
62
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { AnimatedCounter as
|
|
3
|
-
import { resetCss as
|
|
4
|
-
import { PointsContainer as
|
|
2
|
+
import { AnimatedCounter as n } from "../../animated-counter/index.js";
|
|
3
|
+
import { resetCss as e } from "../../theme/theme.js";
|
|
4
|
+
import { PointsContainer as m, PointsIcon as s, PointsSvg as p, PointsBody as l, PointsTitle as c, PointsValue as a } from "./styles.js";
|
|
5
5
|
import "react-countup";
|
|
6
6
|
import "../../theme/breakpoints.js";
|
|
7
7
|
import "../../theme/constants.js";
|
|
8
8
|
import "@linaria/react";
|
|
9
9
|
import "../../icons/index.js";
|
|
10
10
|
import "react";
|
|
11
|
-
const
|
|
12
|
-
/* @__PURE__ */ o(
|
|
13
|
-
/* @__PURE__ */ t(
|
|
14
|
-
/* @__PURE__ */ o(
|
|
15
|
-
/* @__PURE__ */ o(
|
|
11
|
+
const T = ({ points: i, onClick: r }) => /* @__PURE__ */ t(m, { className: e, onClick: r, children: [
|
|
12
|
+
/* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(p, { name: "icon-trophy" }) }),
|
|
13
|
+
/* @__PURE__ */ t(l, { children: [
|
|
14
|
+
/* @__PURE__ */ o(c, { children: "Total points" }),
|
|
15
|
+
/* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(n, { value: i }) })
|
|
16
16
|
] })
|
|
17
17
|
] });
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
T as Points
|
|
20
20
|
};
|
|
@@ -1,46 +1,53 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { PickHistoryStatus as
|
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as y } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { QuestionTypeData as Q } from "../constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Skeleton as l } from "../../skeleton/index.js";
|
|
5
|
+
import { QuestionActionIcon as i, SkeletonContainer as I, SkeletonButton as S, QuestionItem as k, QuestionContent as f, QuestionCaption as A, QuestionTypeIcon as T, QuestionTypeLabel as L, QuestionBody as P, QuestionAction as w, PlayButton as x } from "./styles.js";
|
|
6
|
+
import "../../skeleton/styles.js";
|
|
5
7
|
import "@linaria/react";
|
|
6
8
|
import "../../icons/index.js";
|
|
7
9
|
import "react";
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
},
|
|
10
|
+
const C = {
|
|
11
|
+
[e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
|
|
12
|
+
[e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
|
|
13
|
+
[e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
|
|
14
|
+
[e.DNP]: /* @__PURE__ */ t(i, { name: "icon-arrow" })
|
|
15
|
+
}, j = () => /* @__PURE__ */ o(I, { children: [
|
|
16
|
+
/* @__PURE__ */ t(l, { loading: !0, style: { width: "35%" } }),
|
|
17
|
+
/* @__PURE__ */ t(l, { loading: !0, style: { width: "70%" } }),
|
|
18
|
+
/* @__PURE__ */ t(S, {})
|
|
19
|
+
] }), v = ({
|
|
14
20
|
questionId: s,
|
|
15
|
-
questionType:
|
|
21
|
+
questionType: n,
|
|
16
22
|
questionStatus: m,
|
|
17
|
-
subject:
|
|
18
|
-
openForVoting:
|
|
23
|
+
subject: u,
|
|
24
|
+
openForVoting: d,
|
|
19
25
|
openQuestion: r,
|
|
20
|
-
status:
|
|
26
|
+
status: p
|
|
21
27
|
}) => {
|
|
22
|
-
const c = Q[
|
|
23
|
-
return c ? /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
28
|
+
const c = Q[n], h = C[p];
|
|
29
|
+
return c ? /* @__PURE__ */ o(k, { onClick: () => r == null ? void 0 : r(s), children: [
|
|
30
|
+
/* @__PURE__ */ o(f, { children: [
|
|
31
|
+
/* @__PURE__ */ o(A, { children: [
|
|
26
32
|
/* @__PURE__ */ t(
|
|
27
33
|
T,
|
|
28
34
|
{
|
|
29
|
-
"data-type-trivia":
|
|
30
|
-
"data-type-poll":
|
|
35
|
+
"data-type-trivia": n === a.TRIVIA,
|
|
36
|
+
"data-type-poll": n === a.POLL,
|
|
31
37
|
name: c.iconName
|
|
32
38
|
}
|
|
33
39
|
),
|
|
34
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ o(L, { children: [
|
|
35
41
|
c.label,
|
|
36
|
-
|
|
42
|
+
n === a.TRIVIA && m === y.RESOLVED && " • Expired"
|
|
37
43
|
] })
|
|
38
44
|
] }),
|
|
39
|
-
/* @__PURE__ */ t(
|
|
45
|
+
/* @__PURE__ */ t(P, { children: u || "" })
|
|
40
46
|
] }),
|
|
41
|
-
/* @__PURE__ */ t(
|
|
47
|
+
/* @__PURE__ */ t(w, { children: d ? /* @__PURE__ */ t(x, { children: "Play" }) : h })
|
|
42
48
|
] }) : null;
|
|
43
49
|
};
|
|
44
50
|
export {
|
|
45
|
-
|
|
51
|
+
v as Question,
|
|
52
|
+
j as QuestionSkeleton
|
|
46
53
|
};
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InsightContent as
|
|
3
|
-
import {
|
|
4
|
-
import { Container as n, ActionBtn as e } from "./styles.js";
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { InsightContent as n } from "../../../questions/insight/index.js";
|
|
3
|
+
import { Container as p, ActionBtn as c } from "./styles.js";
|
|
5
4
|
import "@streamlayer/sdk-web-types";
|
|
6
|
-
import "../../../
|
|
7
|
-
import "@linaria/
|
|
5
|
+
import "../../../video-player/index.js";
|
|
6
|
+
import "@linaria/core";
|
|
8
7
|
import "react";
|
|
9
8
|
import "../../../icons/index.js";
|
|
9
|
+
import "@linaria/react";
|
|
10
10
|
import "../../../video-player/styles.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */ t(p, { questionId: o, ...i }),
|
|
17
|
-
r && /* @__PURE__ */ t(e, { onClick: m, children: "View Insight" })
|
|
18
|
-
] });
|
|
19
|
-
};
|
|
11
|
+
import "../../../questions/insight/styles.js";
|
|
12
|
+
const k = ({ openInsight: r, questionId: t, ...o }) => /* @__PURE__ */ m(p, { children: [
|
|
13
|
+
/* @__PURE__ */ i(n, { questionId: t, ...o }),
|
|
14
|
+
r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
|
|
15
|
+
] });
|
|
20
16
|
export {
|
|
21
17
|
k as Insight
|
|
22
18
|
};
|
|
@@ -4,7 +4,9 @@ import { VideoPlayerProps } from '../../../video-player';
|
|
|
4
4
|
type FeedItem = Exclude<Awaited<ReturnType<Exclude<Gamification['feedList'], undefined>['getValue']>>, undefined>;
|
|
5
5
|
interface QuestionListProps {
|
|
6
6
|
questions: FeedItem;
|
|
7
|
-
openQuestion: (questionId: string
|
|
7
|
+
openQuestion: (questionId: string, options: {
|
|
8
|
+
openedFrom: 'list';
|
|
9
|
+
}) => void;
|
|
8
10
|
controlVideo: VideoPlayerProps['controlVideo'];
|
|
9
11
|
}
|
|
10
12
|
export declare const QuestionList: React.FC<QuestionListProps>;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Question as
|
|
3
|
-
import { Insight as
|
|
4
|
-
import { Twitter as
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionSkeleton as l, Question as f } from "../index.js";
|
|
3
|
+
import { Insight as c } from "../insight/index.js";
|
|
4
|
+
import { Twitter as d } from "../twitter/index.js";
|
|
5
|
+
import { pauseAllVideos as h } from "../../../video-player/index.js";
|
|
6
|
+
import { QuestionsContainer as p } from "./styles.js";
|
|
6
7
|
import "@streamlayer/sdk-web-types";
|
|
7
8
|
import "../../constants.js";
|
|
8
|
-
import "
|
|
9
|
+
import "../../../skeleton/index.js";
|
|
10
|
+
import "../../../skeleton/styles.js";
|
|
9
11
|
import "@linaria/react";
|
|
12
|
+
import "../styles.js";
|
|
10
13
|
import "../../../icons/index.js";
|
|
11
14
|
import "react";
|
|
12
15
|
import "../../../questions/insight/index.js";
|
|
13
|
-
import "../../../video-player/index.js";
|
|
14
|
-
import "../../../video-player/styles.js";
|
|
15
16
|
import "../../../questions/insight/styles.js";
|
|
17
|
+
import "@linaria/core";
|
|
18
|
+
import "../../../video-player/styles.js";
|
|
16
19
|
import "../insight/styles.js";
|
|
17
20
|
import "../../../questions/twitter/index.js";
|
|
18
21
|
import "../../../questions/twitter/account/index.js";
|
|
@@ -22,31 +25,44 @@ import "../../../questions/twitter/styles.js";
|
|
|
22
25
|
import "../twitter/styles.js";
|
|
23
26
|
import "../../../button/index.js";
|
|
24
27
|
import "../../../button/styles.js";
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
|
|
29
|
+
const m = (t) => {
|
|
30
|
+
h(), b(t, { openedFrom: "list" });
|
|
31
|
+
};
|
|
32
|
+
return r ? /* @__PURE__ */ e(p, { children: r == null ? void 0 : r.map((t) => {
|
|
33
|
+
var o, u, s;
|
|
34
|
+
if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
|
|
35
|
+
const i = t.attributes.attributes.value;
|
|
36
|
+
return /* @__PURE__ */ e(f, { openQuestion: m, ...i }, i.questionId);
|
|
37
|
+
}
|
|
38
|
+
if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
|
|
39
|
+
const i = t.attributes.attributes.value;
|
|
40
|
+
return /* @__PURE__ */ e(
|
|
41
|
+
c,
|
|
42
|
+
{
|
|
43
|
+
openInsight: m,
|
|
44
|
+
controlVideo: n,
|
|
45
|
+
...i
|
|
46
|
+
},
|
|
47
|
+
i.questionId
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
|
|
51
|
+
const i = t.attributes.attributes.value, a = t.attributes.id;
|
|
52
|
+
return /* @__PURE__ */ e(
|
|
53
|
+
d,
|
|
54
|
+
{
|
|
55
|
+
openTweet: m,
|
|
56
|
+
controlVideo: n,
|
|
57
|
+
...i,
|
|
58
|
+
tweetId: a
|
|
59
|
+
},
|
|
60
|
+
a
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}) }) : /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ e(l, {}, o)) });
|
|
65
|
+
};
|
|
50
66
|
export {
|
|
51
|
-
|
|
67
|
+
N as QuestionList
|
|
52
68
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs as a, jsx as
|
|
2
|
-
import { QuestionType as
|
|
1
|
+
import { jsxs as a, jsx as o, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as m } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { QuestionTypeData as T } from "../../constants.js";
|
|
4
4
|
import { Insight as f } from "./insight/index.js";
|
|
5
|
-
import { Container as
|
|
5
|
+
import { Container as E, CloseIconWrap as I, CloseIcon as h, Header as C, TypeIcon as A, TypeName as W, Question as s, AnswerButton as x } from "./styles.js";
|
|
6
6
|
import { Tweet as D } from "./tweet/index.js";
|
|
7
7
|
import "../../../video-player/index.js";
|
|
8
|
+
import "@linaria/core";
|
|
8
9
|
import "react";
|
|
9
10
|
import "../../../icons/index.js";
|
|
10
11
|
import "@linaria/react";
|
|
@@ -16,37 +17,34 @@ import "../../../../utils/common.js";
|
|
|
16
17
|
import "../../../questions/twitter/account/styles.js";
|
|
17
18
|
import "../../../questions/twitter/styles.js";
|
|
18
19
|
import "./tweet/styles.js";
|
|
19
|
-
const
|
|
20
|
-
close:
|
|
21
|
-
action:
|
|
22
|
-
controlVideo:
|
|
23
|
-
data: { questionType: r, question: i, insight:
|
|
20
|
+
const K = ({
|
|
21
|
+
close: e,
|
|
22
|
+
action: t,
|
|
23
|
+
controlVideo: l,
|
|
24
|
+
data: { questionType: r, question: i, insight: n, tweet: c }
|
|
24
25
|
}) => {
|
|
25
26
|
const p = T[r];
|
|
26
|
-
return p ? /* @__PURE__ */ a(
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
r !==
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
27
|
+
return p ? /* @__PURE__ */ a(E, { style: r === m.TWEET ? { paddingTop: "12px" } : {}, children: [
|
|
28
|
+
/* @__PURE__ */ o(I, { onClick: e, children: /* @__PURE__ */ o(h, { name: "icon-cross" }) }),
|
|
29
|
+
r !== m.TWEET && /* @__PURE__ */ a(C, { children: [
|
|
30
|
+
/* @__PURE__ */ o(
|
|
31
|
+
A,
|
|
31
32
|
{
|
|
32
|
-
"data-type-trivia": r ===
|
|
33
|
-
"data-type-poll": r ===
|
|
33
|
+
"data-type-trivia": r === m.TRIVIA,
|
|
34
|
+
"data-type-poll": r === m.POLL,
|
|
34
35
|
name: p.iconName
|
|
35
36
|
}
|
|
36
37
|
),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ o(W, { children: p.label })
|
|
38
39
|
] }),
|
|
39
|
-
r ===
|
|
40
|
-
r ===
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
r !== o.FACTOID && r !== o.TWEET && /* @__PURE__ */ a(d, { children: [
|
|
45
|
-
/* @__PURE__ */ t(W, { children: i == null ? void 0 : i.title }),
|
|
46
|
-
/* @__PURE__ */ t(x, { onClick: m, children: "Answer" })
|
|
40
|
+
r === m.FACTOID && n && /* @__PURE__ */ o(f, { ...n, action: t, controlVideo: l }),
|
|
41
|
+
r === m.TWEET && c && /* @__PURE__ */ o(D, { ...c, action: t, controlVideo: l }),
|
|
42
|
+
r !== m.FACTOID && r !== m.TWEET && /* @__PURE__ */ a(d, { children: [
|
|
43
|
+
/* @__PURE__ */ o(s, { children: i == null ? void 0 : i.title }),
|
|
44
|
+
/* @__PURE__ */ o(x, { onClick: t, children: "Answer" })
|
|
47
45
|
] })
|
|
48
46
|
] }) : null;
|
|
49
47
|
};
|
|
50
48
|
export {
|
|
51
|
-
|
|
49
|
+
K as Notification
|
|
52
50
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { QuestionImages as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionImages as c } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { VideoPlayer as e } from "../../../../video-player/index.js";
|
|
4
4
|
import { InsightContainer as h, ImageContainer as u, Image as a, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
|
|
5
|
+
import "@linaria/core";
|
|
5
6
|
import "react";
|
|
6
7
|
import "../../../../icons/index.js";
|
|
7
8
|
import "@linaria/react";
|
|
8
9
|
import "../../../../video-player/styles.js";
|
|
9
|
-
const
|
|
10
|
-
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(e, { source: r.url, poster: r.thumbnailUrl, controlVideo:
|
|
11
|
-
n && !(r != null && r.url) && /* @__PURE__ */ t(u, { "data-rounded":
|
|
12
|
-
/* @__PURE__ */
|
|
10
|
+
const A = ({ video: r, image: n, imageMode: o, heading: i, body: s, action: m, controlVideo: p }) => /* @__PURE__ */ l(h, { children: [
|
|
11
|
+
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(e, { source: r.url, poster: r.thumbnailUrl, controlVideo: p }),
|
|
12
|
+
n && !(r != null && r.url) && /* @__PURE__ */ t(u, { "data-rounded": o === c.ROUNDED, children: /* @__PURE__ */ t(a, { src: n, alt: i }) }),
|
|
13
|
+
/* @__PURE__ */ l(I, { children: [
|
|
13
14
|
/* @__PURE__ */ t(g, { children: i }),
|
|
14
|
-
/* @__PURE__ */ t(f, { children:
|
|
15
|
-
|
|
15
|
+
/* @__PURE__ */ t(f, { children: s }),
|
|
16
|
+
m && /* @__PURE__ */ t(C, { onClick: m, children: "View Insight" })
|
|
16
17
|
] })
|
|
17
18
|
] });
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
A as Insight
|
|
20
21
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { TwitterContent as e } from "../../../../questions/twitter/index.js";
|
|
3
3
|
import { Container as m, QuoteWrap as n, Quote as p, ActionBtn as l } from "./styles.js";
|
|
4
4
|
import "../../../../video-player/index.js";
|
|
5
|
+
import "@linaria/core";
|
|
5
6
|
import "react";
|
|
6
7
|
import "../../../../icons/index.js";
|
|
7
8
|
import "@linaria/react";
|
|
@@ -10,11 +11,11 @@ import "../../../../questions/twitter/account/index.js";
|
|
|
10
11
|
import "../../../../../utils/common.js";
|
|
11
12
|
import "../../../../questions/twitter/account/styles.js";
|
|
12
13
|
import "../../../../questions/twitter/styles.js";
|
|
13
|
-
const
|
|
14
|
+
const g = ({ action: r, ...i }) => /* @__PURE__ */ o(m, { children: [
|
|
14
15
|
i.title && /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(p, { children: i.title }) }),
|
|
15
16
|
/* @__PURE__ */ t(e, { ...i }),
|
|
16
17
|
r && /* @__PURE__ */ t(l, { onClick: r, children: "View Insight" })
|
|
17
18
|
] });
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
g as Tweet
|
|
20
21
|
};
|
|
@@ -13,3 +13,5 @@ export declare const QuestionStatusIcon: import("@linaria/react").StyledComponen
|
|
|
13
13
|
export declare const QuestionTypeTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
14
14
|
export declare const ExpiredQuestion: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
15
15
|
export declare const PlayButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
16
|
+
export declare const SkeletonContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
17
|
+
export declare const SkeletonButton: any;
|