@streamlayer/react-ui 0.98.1 → 0.100.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/showIn.js +45 -0
- package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
- package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
- package/lib/index.js +4 -8
- package/lib/ui/app/Features/Gamification/Friends.js +10 -23
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
- package/lib/ui/app/Features/Gamification/Question.js +33 -65
- package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
- package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
- package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
- package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/index.js +68 -143
- package/lib/ui/app/Features/index.d.ts +1 -2
- package/lib/ui/app/Features/index.js +20 -109
- package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
- package/lib/ui/app/Navigation/index.js +9 -12
- package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
- package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
- package/lib/ui/app/Notifications/index.js +96 -148
- package/lib/ui/app/Notifications/styles.js +10 -15
- package/lib/ui/app/Points/index.js +18 -26
- package/lib/ui/app/masters.js +71 -190
- package/lib/ui/app/useClipboardCopy.js +11 -15
- package/lib/ui/app/useMastersApp.js +34 -44
- package/lib/ui/app/useSdkResponsive.js +18 -19
- package/lib/ui/app/useSdkScroll.js +28 -26
- package/lib/ui/button/index.js +3 -4
- package/lib/ui/gamification/copyNotification/index.js +5 -7
- package/lib/ui/gamification/detail/header/index.js +15 -18
- package/lib/ui/gamification/detail/header/styles.js +12 -14
- package/lib/ui/gamification/detail/sponsor/index.js +2 -3
- package/lib/ui/gamification/insight/index.js +5 -6
- package/lib/ui/gamification/insight-list/index.js +3 -6
- package/lib/ui/gamification/invite-link/index.js +11 -17
- package/lib/ui/gamification/invite-link/styles.js +13 -15
- package/lib/ui/gamification/leaderboard/index.js +21 -28
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
- package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
- package/lib/ui/gamification/leaderboard/static.js +34 -31
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.js +51 -73
- package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
- package/lib/ui/gamification/onboarding/styles.js +14 -17
- package/lib/ui/gamification/points/index.js +9 -15
- package/lib/ui/gamification/points/styles.js +12 -14
- package/lib/ui/gamification/question/index.d.ts +1 -3
- package/lib/ui/gamification/question/index.js +29 -34
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.js +7 -15
- package/lib/ui/gamification/question/list/index.js +20 -57
- package/lib/ui/gamification/question/notification/index.js +22 -35
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/pill/index.js +7 -9
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
- package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
- package/lib/ui/gamification/question/notification/styles.js +17 -19
- package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
- package/lib/ui/gamification/question/styles.js +32 -34
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.js +8 -20
- package/lib/ui/gamification/question/twitter/styles.js +4 -6
- package/lib/ui/gamification/tabs/index.js +6 -7
- package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
- package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
- package/lib/ui/gamification/user-statistics/index.js +2 -6
- package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
- package/lib/ui/gamification/vote/alert/index.js +11 -0
- package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
- package/lib/ui/gamification/vote/feedback/index.js +29 -33
- package/lib/ui/gamification/vote/feedback/styles.js +20 -23
- package/lib/ui/gamification/vote/index.d.ts +1 -0
- package/lib/ui/gamification/vote/index.js +123 -117
- package/lib/ui/gamification/vote/insight-details/index.js +9 -16
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +14 -8
- package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
- package/lib/ui/gamification/vote/vote-option/index.js +38 -41
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
- package/lib/ui/gamification/vote/win-bar/index.js +29 -37
- package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
- package/lib/ui/login/demo.d.ts +1 -0
- package/lib/ui/login/demo.js +5 -17
- package/lib/ui/login/index.js +29 -35
- package/lib/ui/modal/index.js +31 -32
- package/lib/ui/navigation/button/Channels.js +5 -8
- package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
- package/lib/ui/navigation/button/LeaderBoard.js +8 -11
- package/lib/ui/navigation/button/index.js +10 -11
- package/lib/ui/navigation/masters.js +2 -3
- package/lib/ui/questions/insight/index.js +14 -19
- package/lib/ui/questions/twitter/account/index.js +13 -15
- package/lib/ui/questions/twitter/account/styles.js +14 -16
- package/lib/ui/questions/twitter/index.js +31 -38
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +12 -10
- package/lib/ui/skeleton/index.js +3 -4
- package/lib/ui/theme/index.js +3 -5
- package/lib/ui/video-player/index.js +44 -38
- package/lib/utils/createDemo.js +18 -28
- package/lib/utils/debug/components/copyLogs.js +2 -3
- package/lib/utils/debug/components/developer.js +20 -24
- package/lib/utils/debug/components/eventInput.js +9 -10
- package/lib/utils/debug/components/sdkKey.js +9 -10
- package/lib/utils/debug/index.js +17 -28
- package/lib/utils/debug/storage.js +32 -14
- package/lib/utils/decorators/container.js +5 -9
- package/lib/utils/storage.js +32 -14
- package/package.json +25 -26
- package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
- package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
- /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
- /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
- /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
|
@@ -1,44 +1,41 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { Button as o } from "../../button/index.js";
|
|
3
3
|
import { SvgIcon as n } from "../../icons/index.js";
|
|
4
|
-
|
|
5
|
-
import "../../button/styles.js";
|
|
6
|
-
import "react";
|
|
7
|
-
const m = /* @__PURE__ */ s("div")({
|
|
4
|
+
const i = /* @__PURE__ */ s("div")({
|
|
8
5
|
name: "Container",
|
|
9
6
|
class: "c18uddbs",
|
|
10
7
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
8
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
12
9
|
name: "Content",
|
|
13
10
|
class: "cvcfjf6",
|
|
14
11
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
12
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
16
13
|
name: "OnboardingHeader",
|
|
17
14
|
class: "o1ie27lw",
|
|
18
15
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
16
|
+
}), d = /* @__PURE__ */ s("button")({
|
|
20
17
|
name: "CloseBtn",
|
|
21
18
|
class: "c15cjkwi",
|
|
22
19
|
propsAsIs: !1
|
|
23
|
-
}), t = () => n,
|
|
20
|
+
}), t = () => n, m = /* @__PURE__ */ s(t())({
|
|
24
21
|
name: "IconClose",
|
|
25
22
|
class: "i1mavjt2",
|
|
26
23
|
propsAsIs: !0
|
|
27
|
-
}),
|
|
24
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
28
25
|
name: "OnboardingFooter",
|
|
29
26
|
class: "o1x0dyzv",
|
|
30
27
|
propsAsIs: !1
|
|
31
|
-
}), e = () => o,
|
|
28
|
+
}), e = () => o, I = /* @__PURE__ */ s(e())({
|
|
32
29
|
name: "OnboardingActionBtn",
|
|
33
30
|
class: "o1jfi9c3",
|
|
34
31
|
propsAsIs: !0
|
|
35
32
|
});
|
|
36
33
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
d as CloseBtn,
|
|
35
|
+
i as Container,
|
|
36
|
+
p as Content,
|
|
37
|
+
m as IconClose,
|
|
38
|
+
I as OnboardingActionBtn,
|
|
39
|
+
f as OnboardingFooter,
|
|
40
|
+
l as OnboardingHeader
|
|
44
41
|
};
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { AnimatedCounter as
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatedCounter as r } from "../../animated-counter/index.js";
|
|
3
3
|
import { resetCss as e } from "../../theme/theme.js";
|
|
4
|
-
import { PointsContainer as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "react";
|
|
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 }) })
|
|
4
|
+
import { PointsContainer as s, PointsIcon as m, PointsSvg as l, PointsBody as c, PointsTitle as a, PointsValue as d } from "./styles.js";
|
|
5
|
+
const u = ({ points: t, onClick: i }) => /* @__PURE__ */ n(s, { className: e, onClick: i, children: [
|
|
6
|
+
/* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(l, { name: "icon-trophy" }) }),
|
|
7
|
+
/* @__PURE__ */ n(c, { children: [
|
|
8
|
+
/* @__PURE__ */ o(a, { children: "Total points" }),
|
|
9
|
+
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(r, { value: t }) })
|
|
16
10
|
] })
|
|
17
11
|
] });
|
|
18
12
|
export {
|
|
19
|
-
|
|
13
|
+
u as Points
|
|
20
14
|
};
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as o } from "../../icons/index.js";
|
|
3
|
-
|
|
4
|
-
import "react";
|
|
5
|
-
const a = /* @__PURE__ */ s("div")({
|
|
3
|
+
const e = /* @__PURE__ */ s("div")({
|
|
6
4
|
name: "PointsContainer",
|
|
7
5
|
class: "psiob9b",
|
|
8
6
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
7
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
10
8
|
name: "PointsIcon",
|
|
11
9
|
class: "p1gqe4lh",
|
|
12
10
|
propsAsIs: !1
|
|
13
|
-
}), n = () => o,
|
|
11
|
+
}), n = () => o, a = /* @__PURE__ */ s(n())({
|
|
14
12
|
name: "PointsSvg",
|
|
15
13
|
class: "p15syg2y",
|
|
16
14
|
propsAsIs: !0
|
|
17
|
-
}),
|
|
15
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
18
16
|
name: "PointsBody",
|
|
19
17
|
class: "p12n4f2h",
|
|
20
18
|
propsAsIs: !1
|
|
21
|
-
}),
|
|
19
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
22
20
|
name: "PointsTitle",
|
|
23
21
|
class: "poqmx89",
|
|
24
22
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
23
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
26
24
|
name: "PointsValue",
|
|
27
25
|
class: "prj9b3v",
|
|
28
26
|
propsAsIs: !1
|
|
29
27
|
});
|
|
30
28
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
l as PointsBody,
|
|
30
|
+
e as PointsContainer,
|
|
31
|
+
p as PointsIcon,
|
|
32
|
+
a as PointsSvg,
|
|
33
|
+
c as PointsTitle,
|
|
34
|
+
r as PointsValue
|
|
37
35
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type PickHistory } from '@streamlayer/sdk-web-types';
|
|
3
3
|
export declare const QuestionSkeleton: React.FC;
|
|
4
|
-
export declare const Question: React.FC<
|
|
5
|
-
openQuestion?: (questionId: string) => void;
|
|
6
|
-
} & PickHistory>;
|
|
4
|
+
export declare const Question: React.FC<PickHistory>;
|
|
@@ -1,53 +1,48 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as
|
|
3
|
-
import { QuestionTypeData as
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { QuestionActionIcon as i, SkeletonContainer as
|
|
6
|
-
|
|
7
|
-
import "@linaria/react";
|
|
8
|
-
import "../../icons/index.js";
|
|
9
|
-
import "react";
|
|
10
|
-
const C = {
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as p } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { QuestionTypeData as h } from "../constants.js";
|
|
4
|
+
import { Skeleton as c } from "../../skeleton/index.js";
|
|
5
|
+
import { QuestionActionIcon as i, SkeletonContainer as y, SkeletonButton as I, QuestionItem as S, QuestionContent as f, QuestionCaption as k, QuestionTypeIcon as A, QuestionTypeLabel as T, QuestionBody as L, QuestionAction as P, PlayButton as w } from "./styles.js";
|
|
6
|
+
const x = {
|
|
11
7
|
[e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
|
|
12
8
|
[e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
|
|
13
9
|
[e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
|
|
14
10
|
[e.DNP]: /* @__PURE__ */ t(i, { name: "icon-arrow" })
|
|
15
|
-
},
|
|
16
|
-
/* @__PURE__ */ t(
|
|
17
|
-
/* @__PURE__ */ t(
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
] }),
|
|
11
|
+
}, B = () => /* @__PURE__ */ n(y, { children: [
|
|
12
|
+
/* @__PURE__ */ t(c, { loading: !0, style: { width: "35%" } }),
|
|
13
|
+
/* @__PURE__ */ t(c, { loading: !0, style: { width: "70%" } }),
|
|
14
|
+
/* @__PURE__ */ t(I, {})
|
|
15
|
+
] }), C = ({
|
|
20
16
|
questionId: s,
|
|
21
|
-
questionType:
|
|
22
|
-
questionStatus:
|
|
17
|
+
questionType: o,
|
|
18
|
+
questionStatus: l,
|
|
23
19
|
subject: u,
|
|
24
20
|
openForVoting: d,
|
|
25
|
-
|
|
26
|
-
status: p
|
|
21
|
+
status: m
|
|
27
22
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
return
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
23
|
+
const r = h[o], Q = x[m];
|
|
24
|
+
return r ? /* @__PURE__ */ n(S, { "data-name": s, children: [
|
|
25
|
+
/* @__PURE__ */ n(f, { children: [
|
|
26
|
+
/* @__PURE__ */ n(k, { children: [
|
|
32
27
|
/* @__PURE__ */ t(
|
|
33
|
-
|
|
28
|
+
A,
|
|
34
29
|
{
|
|
35
|
-
"data-type-trivia":
|
|
36
|
-
"data-type-poll":
|
|
37
|
-
name:
|
|
30
|
+
"data-type-trivia": o === a.TRIVIA,
|
|
31
|
+
"data-type-poll": o === a.POLL,
|
|
32
|
+
name: r.iconName
|
|
38
33
|
}
|
|
39
34
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
/* @__PURE__ */ n(T, { children: [
|
|
36
|
+
r.label,
|
|
37
|
+
o === a.TRIVIA && l === p.RESOLVED && " • Expired"
|
|
43
38
|
] })
|
|
44
39
|
] }),
|
|
45
|
-
/* @__PURE__ */ t(
|
|
40
|
+
/* @__PURE__ */ t(L, { children: u || "" })
|
|
46
41
|
] }),
|
|
47
|
-
/* @__PURE__ */ t(
|
|
42
|
+
/* @__PURE__ */ t(P, { children: d ? /* @__PURE__ */ t(w, { children: "Play" }) : Q })
|
|
48
43
|
] }) : null;
|
|
49
44
|
};
|
|
50
45
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
C as Question,
|
|
47
|
+
B as QuestionSkeleton
|
|
53
48
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { InsightContentProps } from '../../../questions/insight';
|
|
3
3
|
import { VideoPlayerProps } from '../../../video-player';
|
|
4
4
|
type InsightProps = InsightContentProps & {
|
|
5
|
-
openInsight?: (questionId: string) => void;
|
|
6
5
|
controlVideo: VideoPlayerProps['controlVideo'];
|
|
7
6
|
};
|
|
8
7
|
export declare const Insight: React.FC<InsightProps>;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InsightContent as
|
|
3
|
-
import { Container as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "react";
|
|
8
|
-
import "../../../icons/index.js";
|
|
9
|
-
import "@linaria/react";
|
|
10
|
-
import "../../../video-player/styles.js";
|
|
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" })
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { InsightContent as o } from "../../../questions/insight/index.js";
|
|
3
|
+
import { Container as m, ActionBtn as a } from "./styles.js";
|
|
4
|
+
const c = ({ questionId: t, ...r }) => /* @__PURE__ */ i(m, { "data-name": t, children: [
|
|
5
|
+
/* @__PURE__ */ n(o, { questionId: t, ...r }),
|
|
6
|
+
/* @__PURE__ */ n(a, { "data-name": t, children: "View Insight" })
|
|
15
7
|
] });
|
|
16
8
|
export {
|
|
17
|
-
|
|
9
|
+
c as Insight
|
|
18
10
|
};
|
|
@@ -1,68 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { QuestionSkeleton as
|
|
3
|
-
import { Insight as
|
|
4
|
-
import { Twitter as
|
|
5
|
-
import { pauseAllVideos as
|
|
6
|
-
import { QuestionsContainer as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import "@linaria/react";
|
|
12
|
-
import "../styles.js";
|
|
13
|
-
import "../../../icons/index.js";
|
|
14
|
-
import "react";
|
|
15
|
-
import "../../../questions/insight/index.js";
|
|
16
|
-
import "../../../questions/insight/styles.js";
|
|
17
|
-
import "@linaria/core";
|
|
18
|
-
import "../../../video-player/styles.js";
|
|
19
|
-
import "../insight/styles.js";
|
|
20
|
-
import "../../../questions/twitter/index.js";
|
|
21
|
-
import "../../../questions/twitter/account/index.js";
|
|
22
|
-
import "../../../../utils/common.js";
|
|
23
|
-
import "../../../questions/twitter/account/styles.js";
|
|
24
|
-
import "../../../questions/twitter/styles.js";
|
|
25
|
-
import "../twitter/styles.js";
|
|
26
|
-
import "../../../button/index.js";
|
|
27
|
-
import "../../../button/styles.js";
|
|
28
|
-
const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
|
|
29
|
-
const m = (t) => {
|
|
30
|
-
h(), b(t, { openedFrom: "list" });
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionSkeleton as c, Question as f } from "../index.js";
|
|
3
|
+
import { Insight as d } from "../insight/index.js";
|
|
4
|
+
import { Twitter as h } from "../twitter/index.js";
|
|
5
|
+
import { pauseAllVideos as g } from "../../../video-player/index.js";
|
|
6
|
+
import { QuestionsContainer as m } from "./styles.js";
|
|
7
|
+
const k = ({ questions: n, openQuestion: b, controlVideo: u }) => {
|
|
8
|
+
const l = (t) => {
|
|
9
|
+
const e = t.target.getAttribute("data-name");
|
|
10
|
+
e && (g(), b(e, { openedFrom: "list" }));
|
|
31
11
|
};
|
|
32
|
-
return
|
|
33
|
-
var
|
|
34
|
-
if (t.type === "question" && ((
|
|
12
|
+
return n ? /* @__PURE__ */ r(m, { onClick: l, children: n == null ? void 0 : n.map((t) => {
|
|
13
|
+
var e, a, s;
|
|
14
|
+
if (t.type === "question" && ((e = t.attributes) == null ? void 0 : e.attributes.case) === "question") {
|
|
35
15
|
const i = t.attributes.attributes.value;
|
|
36
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ r(f, { ...i }, i.questionId);
|
|
37
17
|
}
|
|
38
|
-
if (t.type === "insight" && ((
|
|
18
|
+
if (t.type === "insight" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "insight") {
|
|
39
19
|
const i = t.attributes.attributes.value;
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
c,
|
|
42
|
-
{
|
|
43
|
-
openInsight: m,
|
|
44
|
-
controlVideo: n,
|
|
45
|
-
...i
|
|
46
|
-
},
|
|
47
|
-
i.questionId
|
|
48
|
-
);
|
|
20
|
+
return /* @__PURE__ */ r(d, { controlVideo: u, ...i }, i.questionId);
|
|
49
21
|
}
|
|
50
22
|
if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
|
|
51
|
-
const i = t.attributes.attributes.value,
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
d,
|
|
54
|
-
{
|
|
55
|
-
openTweet: m,
|
|
56
|
-
controlVideo: n,
|
|
57
|
-
...i,
|
|
58
|
-
tweetId: a
|
|
59
|
-
},
|
|
60
|
-
a
|
|
61
|
-
);
|
|
23
|
+
const i = t.attributes.attributes.value, o = t.attributes.id;
|
|
24
|
+
return /* @__PURE__ */ r(h, { controlVideo: u, ...i, tweetId: o }, o);
|
|
62
25
|
}
|
|
63
26
|
return null;
|
|
64
|
-
}) }) : /* @__PURE__ */
|
|
27
|
+
}) }) : /* @__PURE__ */ r(m, { children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ r(c, {}, e)) });
|
|
65
28
|
};
|
|
66
29
|
export {
|
|
67
|
-
|
|
30
|
+
k as QuestionList
|
|
68
31
|
};
|
|
@@ -1,50 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { QuestionType as
|
|
1
|
+
import { jsxs as t, jsx as a, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as l } 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
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../../../video-player/styles.js";
|
|
13
|
-
import "./insight/styles.js";
|
|
14
|
-
import "../../../questions/twitter/index.js";
|
|
15
|
-
import "../../../questions/twitter/account/index.js";
|
|
16
|
-
import "../../../../utils/common.js";
|
|
17
|
-
import "../../../questions/twitter/account/styles.js";
|
|
18
|
-
import "../../../questions/twitter/styles.js";
|
|
19
|
-
import "./tweet/styles.js";
|
|
20
|
-
const K = ({
|
|
21
|
-
close: e,
|
|
22
|
-
action: t,
|
|
23
|
-
controlVideo: l,
|
|
24
|
-
data: { questionType: r, question: i, insight: n, tweet: c }
|
|
7
|
+
const k = ({
|
|
8
|
+
close: d,
|
|
9
|
+
action: n,
|
|
10
|
+
controlVideo: c,
|
|
11
|
+
data: { questionType: r, question: o, insight: e, tweet: i }
|
|
25
12
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
r !==
|
|
30
|
-
/* @__PURE__ */
|
|
13
|
+
const m = T[r];
|
|
14
|
+
return m ? /* @__PURE__ */ t(E, { style: r === l.TWEET ? { paddingTop: "12px" } : {}, children: [
|
|
15
|
+
/* @__PURE__ */ a(I, { onClick: d, children: /* @__PURE__ */ a(h, { name: "icon-cross" }) }),
|
|
16
|
+
r !== l.TWEET && /* @__PURE__ */ t(C, { children: [
|
|
17
|
+
/* @__PURE__ */ a(
|
|
31
18
|
A,
|
|
32
19
|
{
|
|
33
|
-
"data-type-trivia": r ===
|
|
34
|
-
"data-type-poll": r ===
|
|
35
|
-
name:
|
|
20
|
+
"data-type-trivia": r === l.TRIVIA,
|
|
21
|
+
"data-type-poll": r === l.POLL,
|
|
22
|
+
name: m.iconName
|
|
36
23
|
}
|
|
37
24
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ a(W, { children: m.label })
|
|
39
26
|
] }),
|
|
40
|
-
r ===
|
|
41
|
-
r ===
|
|
42
|
-
r !==
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
27
|
+
r === l.FACTOID && e && /* @__PURE__ */ a(f, { ...e, action: n, controlVideo: c }),
|
|
28
|
+
r === l.TWEET && i && /* @__PURE__ */ a(D, { ...i, action: n, controlVideo: c }),
|
|
29
|
+
r !== l.FACTOID && r !== l.TWEET && /* @__PURE__ */ t(p, { children: [
|
|
30
|
+
/* @__PURE__ */ a(s, { children: o == null ? void 0 : o.title }),
|
|
31
|
+
/* @__PURE__ */ a(x, { onClick: n, children: "Answer" })
|
|
45
32
|
] })
|
|
46
33
|
] }) : null;
|
|
47
34
|
};
|
|
48
35
|
export {
|
|
49
|
-
|
|
36
|
+
k as Notification
|
|
50
37
|
};
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { QuestionImages as
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { InsightContainer as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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: [
|
|
14
|
-
/* @__PURE__ */ t(g, { children: i }),
|
|
15
|
-
/* @__PURE__ */ t(f, { children: s }),
|
|
16
|
-
m && /* @__PURE__ */ t(C, { onClick: m, children: "View Insight" })
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionImages as h } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { VideoPlayer as o } from "../../../../video-player/index.js";
|
|
4
|
+
import { InsightContainer as u, ImageContainer as a, Image as p, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
|
|
5
|
+
const V = ({ video: r, image: t, imageMode: i, heading: l, body: m, action: s, controlVideo: e }) => /* @__PURE__ */ c(u, { children: [
|
|
6
|
+
(r == null ? void 0 : r.url) && /* @__PURE__ */ n(o, { source: r.url, poster: r.thumbnailUrl, controlVideo: e }),
|
|
7
|
+
t && !(r != null && r.url) && /* @__PURE__ */ n(a, { "data-rounded": i === h.ROUNDED, children: /* @__PURE__ */ n(p, { src: t, alt: l }) }),
|
|
8
|
+
/* @__PURE__ */ c(I, { children: [
|
|
9
|
+
/* @__PURE__ */ n(g, { children: l }),
|
|
10
|
+
/* @__PURE__ */ n(f, { children: m }),
|
|
11
|
+
s && /* @__PURE__ */ n(C, { onClick: s, children: "View Insight" })
|
|
17
12
|
] })
|
|
18
13
|
] });
|
|
19
14
|
export {
|
|
20
|
-
|
|
15
|
+
V as Insight
|
|
21
16
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { SvgIcon as
|
|
3
|
-
import { Container as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */ r(e, { name: "iconUp" }),
|
|
8
|
-
o && /* @__PURE__ */ r(l, { children: o })
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon as m } from "../../../../icons/index.js";
|
|
3
|
+
import { Container as c, Content as l, Title as p } from "./styles.js";
|
|
4
|
+
const h = ({ title: n, onClick: o, className: i, style: e }) => /* @__PURE__ */ r(c, { onClick: o, className: i, style: e, children: /* @__PURE__ */ t(l, { children: [
|
|
5
|
+
/* @__PURE__ */ r(m, { name: "iconUp" }),
|
|
6
|
+
n && /* @__PURE__ */ r(p, { children: n })
|
|
9
7
|
] }) });
|
|
10
8
|
export {
|
|
11
|
-
|
|
9
|
+
h as Pill
|
|
12
10
|
};
|
package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
import { jsxs as r, Fragment as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { BGWrap as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/* @__PURE__ */ r(n, { "data-active": i === 1, "data-first-screen": "true", children: [
|
|
2
|
+
import { BGWrap as i, BGOneLineOne as T, BGOneLineTwo as l, BGOneLineThree as u, BGTwoLineOne as t, BGTwoLineTwo as o, BGTwoLineThree as c, BGThreeLineOne as d, BGThreeLineTwo as h, BGThreeLineThree as B, BGThreeLineFour as G, BGFourLineOne as w, BGFourLineTwo as F, BGFourLineThree as O, BGFourLineFour as m } from "./styles.js";
|
|
3
|
+
const s = ({ step: n, correct: L }) => /* @__PURE__ */ r(a, { children: [
|
|
4
|
+
/* @__PURE__ */ r(i, { "data-active": n === 1, "data-first-screen": "true", children: [
|
|
6
5
|
/* @__PURE__ */ e(T, {}),
|
|
7
6
|
/* @__PURE__ */ e(l, {}),
|
|
8
7
|
/* @__PURE__ */ e(u, {})
|
|
9
8
|
] }),
|
|
10
|
-
/* @__PURE__ */ r(
|
|
9
|
+
/* @__PURE__ */ r(i, { "data-active": n === 2, children: [
|
|
11
10
|
/* @__PURE__ */ e(t, {}),
|
|
12
11
|
/* @__PURE__ */ e(o, {}),
|
|
13
12
|
/* @__PURE__ */ e(c, {})
|
|
14
13
|
] }),
|
|
15
|
-
/* @__PURE__ */ r(
|
|
14
|
+
/* @__PURE__ */ r(i, { "data-active": n === 3, children: [
|
|
16
15
|
/* @__PURE__ */ e(t, {}),
|
|
17
16
|
/* @__PURE__ */ e(o, {}),
|
|
18
17
|
/* @__PURE__ */ e(c, {})
|
|
19
18
|
] }),
|
|
20
19
|
L ? /* @__PURE__ */ r(a, { children: [
|
|
21
|
-
/* @__PURE__ */ r(
|
|
20
|
+
/* @__PURE__ */ r(i, { "data-active": n === 4, "data-correct": "true", children: [
|
|
22
21
|
/* @__PURE__ */ e(d, {}),
|
|
23
22
|
/* @__PURE__ */ e(h, {}),
|
|
24
23
|
/* @__PURE__ */ e(B, {}),
|
|
25
24
|
/* @__PURE__ */ e(G, {})
|
|
26
25
|
] }),
|
|
27
|
-
/* @__PURE__ */ r(
|
|
26
|
+
/* @__PURE__ */ r(i, { "data-active": n === 5, "data-correct": "true", children: [
|
|
28
27
|
/* @__PURE__ */ e(d, {}),
|
|
29
28
|
/* @__PURE__ */ e(h, {}),
|
|
30
29
|
/* @__PURE__ */ e(B, {}),
|
|
31
30
|
/* @__PURE__ */ e(G, {})
|
|
32
31
|
] })
|
|
33
|
-
] }) : /* @__PURE__ */ r(
|
|
34
|
-
/* @__PURE__ */ e(m, {}),
|
|
32
|
+
] }) : /* @__PURE__ */ r(i, { "data-active": n === 4, "data-correct": "false", children: [
|
|
35
33
|
/* @__PURE__ */ e(w, {}),
|
|
36
34
|
/* @__PURE__ */ e(F, {}),
|
|
37
|
-
/* @__PURE__ */ e(O, {})
|
|
35
|
+
/* @__PURE__ */ e(O, {}),
|
|
36
|
+
/* @__PURE__ */ e(m, {})
|
|
38
37
|
] })
|
|
39
38
|
] });
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
s as AnimationLines
|
|
42
41
|
};
|