@streamlayer/react-ui 0.96.3 → 0.97.1
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/Gamification/Friends.d.ts +0 -2
- package/lib/ui/app/Features/Gamification/Friends.js +16 -22
- 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 +5 -1
- package/lib/ui/app/Features/Gamification/index.js +9 -5
- package/lib/ui/app/Features/index.js +24 -21
- 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 +76 -65
- package/lib/ui/app/useMastersApp.js +9 -9
- 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 +3 -2
- package/lib/ui/gamification/question/list/index.d.ts +3 -1
- package/lib/ui/gamification/question/list/index.js +22 -19
- package/lib/ui/gamification/question/notification/index.js +3 -2
- 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 +3 -2
- 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 +76 -63
- package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/styles.js +31 -24
- package/lib/ui/gamification/vote/index.js +93 -89
- 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 +44 -36
- package/lib/ui/modal/index.js +27 -21
- package/lib/ui/questions/insight/index.js +3 -2
- 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,26 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InvitingUser as
|
|
3
|
-
import { Skeleton as
|
|
4
|
-
import { Container as
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { InvitingUser as h } from "../../invitingUser/index.js";
|
|
3
|
+
import { Skeleton as d } from "../../../../skeleton/index.js";
|
|
4
|
+
import { Container as l, Content as p, Graphic as s, GraphicImage as f, Headline as I, InvitingUserWrap as g, StepsContainer as v, StepIndicator as x } from "./styles.js";
|
|
5
5
|
import "../../../../../utils/common.js";
|
|
6
6
|
import "../../invitingUser/styles.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "../../../../skeleton/styles.js";
|
|
9
|
-
const
|
|
10
|
-
loading:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
] });
|
|
9
|
+
const A = ({
|
|
10
|
+
loading: e,
|
|
11
|
+
steps: o,
|
|
12
|
+
currentStep: r,
|
|
13
|
+
inviterName: t
|
|
14
|
+
}) => {
|
|
15
|
+
const { headline: a } = o[r];
|
|
16
|
+
return /* @__PURE__ */ c(l, { children: [
|
|
17
|
+
/* @__PURE__ */ c(p, { "data-welcome-screen": r === 0, children: [
|
|
18
|
+
/* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(d, { loading: e, children: o.map(({ graphicSrc: m }, n) => /* @__PURE__ */ i(f, { src: m, "data-active": r === n })) }) }),
|
|
19
|
+
a && /* @__PURE__ */ i(d, { loading: e, children: /* @__PURE__ */ i(I, { children: a }) })
|
|
20
|
+
] }),
|
|
21
|
+
t && r === 0 && /* @__PURE__ */ i(g, { children: /* @__PURE__ */ i(h, { name: t }) }),
|
|
22
|
+
/* @__PURE__ */ i(v, { style: e ? { visibility: "hidden" } : {}, children: Array.from({ length: o.length }).map((m, n) => /* @__PURE__ */ i(x, { "data-active": r === n }, n)) })
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
A as OnboardingInstructions
|
|
26
27
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
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 Graphic: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const GraphicImage: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
4
5
|
export declare const Headline: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
6
|
export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
7
|
export declare const StepsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const n = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1htq1lb",
|
|
5
5
|
propsAsIs: !1
|
|
@@ -7,33 +7,38 @@ const a = /* @__PURE__ */ s("div")({
|
|
|
7
7
|
name: "Graphic",
|
|
8
8
|
class: "gjyzpp7",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}), p = /* @__PURE__ */ s("
|
|
10
|
+
}), p = /* @__PURE__ */ s("img")({
|
|
11
|
+
name: "GraphicImage",
|
|
12
|
+
class: "g16mldgz",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), o = /* @__PURE__ */ s("div")({
|
|
11
15
|
name: "Headline",
|
|
12
|
-
class: "
|
|
16
|
+
class: "h69js65",
|
|
13
17
|
propsAsIs: !1
|
|
14
18
|
}), t = /* @__PURE__ */ s("div")({
|
|
15
19
|
name: "Content",
|
|
16
|
-
class: "
|
|
20
|
+
class: "cmm7qmo",
|
|
17
21
|
propsAsIs: !1
|
|
18
|
-
}),
|
|
22
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
19
23
|
name: "StepsContainer",
|
|
20
|
-
class: "
|
|
24
|
+
class: "s17knuw2",
|
|
21
25
|
propsAsIs: !1
|
|
22
|
-
}),
|
|
26
|
+
}), r = /* @__PURE__ */ s("span")({
|
|
23
27
|
name: "StepIndicator",
|
|
24
|
-
class: "
|
|
28
|
+
class: "s1b74psg",
|
|
25
29
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
30
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
27
31
|
name: "InvitingUserWrap",
|
|
28
|
-
class: "
|
|
32
|
+
class: "i1y99ug7",
|
|
29
33
|
propsAsIs: !1
|
|
30
34
|
});
|
|
31
35
|
export {
|
|
32
|
-
|
|
36
|
+
n as Container,
|
|
33
37
|
t as Content,
|
|
34
38
|
e as Graphic,
|
|
35
|
-
p as
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
p as GraphicImage,
|
|
40
|
+
o as Headline,
|
|
41
|
+
c as InvitingUserWrap,
|
|
42
|
+
r as StepIndicator,
|
|
43
|
+
i as StepsContainer
|
|
39
44
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { HeaderNodeRef, type AppNodeRef } from '../../../../app/masters';
|
|
3
2
|
import { icons } from '../../../../icons';
|
|
4
3
|
export type OnboardingInviteCardProps = {
|
|
5
|
-
renderToNode: AppNodeRef | HeaderNodeRef;
|
|
6
4
|
inviteLink?: string;
|
|
7
5
|
inviteCardTitle?: string;
|
|
8
6
|
inviteCardSubtext?: string;
|
|
9
7
|
primaryColor?: string;
|
|
10
|
-
socialLinks?: InviteCardSocialLink[];
|
|
11
8
|
className?: string;
|
|
12
9
|
};
|
|
13
10
|
export type InviteCardSocialLink = {
|
|
@@ -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
|
};
|
|
@@ -3,15 +3,16 @@ import { InsightContent as n } from "../../../questions/insight/index.js";
|
|
|
3
3
|
import { Container as p, ActionBtn as c } from "./styles.js";
|
|
4
4
|
import "@streamlayer/sdk-web-types";
|
|
5
5
|
import "../../../video-player/index.js";
|
|
6
|
+
import "@linaria/core";
|
|
6
7
|
import "react";
|
|
7
8
|
import "../../../icons/index.js";
|
|
8
9
|
import "@linaria/react";
|
|
9
10
|
import "../../../video-player/styles.js";
|
|
10
11
|
import "../../../questions/insight/styles.js";
|
|
11
|
-
const
|
|
12
|
+
const k = ({ openInsight: r, questionId: t, ...o }) => /* @__PURE__ */ m(p, { children: [
|
|
12
13
|
/* @__PURE__ */ i(n, { questionId: t, ...o }),
|
|
13
14
|
r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
|
|
14
15
|
] });
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
k as Insight
|
|
17
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,17 +1,20 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Question as
|
|
2
|
+
import { QuestionSkeleton as l, Question as f } from "../index.js";
|
|
3
3
|
import { Insight as c } from "../insight/index.js";
|
|
4
|
-
import { Twitter as
|
|
5
|
-
import { pauseAllVideos as
|
|
6
|
-
import { QuestionsContainer as
|
|
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";
|
|
7
7
|
import "@streamlayer/sdk-web-types";
|
|
8
8
|
import "../../constants.js";
|
|
9
|
-
import "
|
|
9
|
+
import "../../../skeleton/index.js";
|
|
10
|
+
import "../../../skeleton/styles.js";
|
|
10
11
|
import "@linaria/react";
|
|
12
|
+
import "../styles.js";
|
|
11
13
|
import "../../../icons/index.js";
|
|
12
14
|
import "react";
|
|
13
15
|
import "../../../questions/insight/index.js";
|
|
14
16
|
import "../../../questions/insight/styles.js";
|
|
17
|
+
import "@linaria/core";
|
|
15
18
|
import "../../../video-player/styles.js";
|
|
16
19
|
import "../insight/styles.js";
|
|
17
20
|
import "../../../questions/twitter/index.js";
|
|
@@ -22,23 +25,23 @@ 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
|
-
const
|
|
27
|
-
|
|
28
|
+
const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
|
|
29
|
+
const m = (t) => {
|
|
30
|
+
h(), b(t, { openedFrom: "list" });
|
|
28
31
|
};
|
|
29
|
-
return /* @__PURE__ */ e(
|
|
30
|
-
var
|
|
31
|
-
if (t.type === "question" && ((
|
|
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") {
|
|
32
35
|
const i = t.attributes.attributes.value;
|
|
33
|
-
return /* @__PURE__ */ e(
|
|
36
|
+
return /* @__PURE__ */ e(f, { openQuestion: m, ...i }, i.questionId);
|
|
34
37
|
}
|
|
35
38
|
if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
|
|
36
39
|
const i = t.attributes.attributes.value;
|
|
37
40
|
return /* @__PURE__ */ e(
|
|
38
41
|
c,
|
|
39
42
|
{
|
|
40
|
-
openInsight:
|
|
41
|
-
controlVideo:
|
|
43
|
+
openInsight: m,
|
|
44
|
+
controlVideo: n,
|
|
42
45
|
...i
|
|
43
46
|
},
|
|
44
47
|
i.questionId
|
|
@@ -47,10 +50,10 @@ const K = ({ questions: r, openQuestion: p, controlVideo: m }) => {
|
|
|
47
50
|
if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
|
|
48
51
|
const i = t.attributes.attributes.value, a = t.attributes.id;
|
|
49
52
|
return /* @__PURE__ */ e(
|
|
50
|
-
|
|
53
|
+
d,
|
|
51
54
|
{
|
|
52
|
-
openTweet:
|
|
53
|
-
controlVideo:
|
|
55
|
+
openTweet: m,
|
|
56
|
+
controlVideo: n,
|
|
54
57
|
...i,
|
|
55
58
|
tweetId: a
|
|
56
59
|
},
|
|
@@ -58,8 +61,8 @@ const K = ({ questions: r, openQuestion: p, controlVideo: m }) => {
|
|
|
58
61
|
);
|
|
59
62
|
}
|
|
60
63
|
return null;
|
|
61
|
-
}) });
|
|
64
|
+
}) }) : /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ e(l, {}, o)) });
|
|
62
65
|
};
|
|
63
66
|
export {
|
|
64
|
-
|
|
67
|
+
N as QuestionList
|
|
65
68
|
};
|
|
@@ -5,6 +5,7 @@ import { Insight as f } from "./insight/index.js";
|
|
|
5
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,7 +17,7 @@ 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
|
+
const K = ({
|
|
20
21
|
close: e,
|
|
21
22
|
action: t,
|
|
22
23
|
controlVideo: l,
|
|
@@ -45,5 +46,5 @@ const J = ({
|
|
|
45
46
|
] }) : null;
|
|
46
47
|
};
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
K as Notification
|
|
49
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
|
};
|