@streamlayer/react-ui 1.14.3 → 1.15.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/app/app/Features/Gamification/Leaderboard.js +9 -8
- package/lib/app/app/InApp/index.d.ts +4 -0
- package/lib/app/app/InApp/index.js +31 -0
- package/lib/app/app/Notifications/Onboarding/index.js +78 -72
- package/lib/app/app/story/index.d.ts +0 -1
- package/lib/app/app/story/index.js +39 -50
- package/lib/app/app/story/styles.d.ts +1 -0
- package/lib/app/app/story/styles.js +9 -4
- package/lib/app/app/story/video.js +28 -25
- package/lib/app/masters/Features/Gamification/Leaderboard.js +3 -2
- package/lib/assets/style.css +1 -1
- package/lib/ui/close-btn/index.d.ts +1 -1
- package/lib/ui/gamification/constants.d.ts +1 -0
- package/lib/ui/gamification/constants.js +11 -2
- package/lib/ui/gamification/points/index.js +7 -7
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +61 -0
- package/lib/ui/gamification/question/inapp/notification/index.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/notification/index.js +38 -0
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/styles.js +40 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.d.ts +2 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.js +24 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.js +24 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.js +50 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.js +51 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +57 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +59 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.js +26 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.js +38 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.js +33 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.js +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.js +9 -0
- package/lib/ui/gamification/question/index.d.ts +10 -1
- package/lib/ui/gamification/question/index.js +45 -36
- package/lib/ui/icons/index.d.ts +2 -3
- package/lib/ui/icons/index.js +72 -63
- package/lib/ui/questions/twitter/account/index.js +17 -17
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +2 -1
- package/lib/ui/theme/constants.d.ts +6 -0
- package/lib/ui/theme/constants.js +20 -14
- package/lib/ui/theme/index.d.ts +1 -0
- package/lib/ui/theme/index.js +4 -4
- package/lib/ui/theme/theme.js +2 -2
- package/lib/utils/decorators/container.js +10 -6
- package/lib/utils/decorators/styles.js +7 -2
- package/package.json +19 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CloseTimerAuto } from '@streamlayer/sdk-web-types';
|
|
2
2
|
export declare const CloseButton: React.FC<{
|
|
3
|
-
close?: () => void;
|
|
3
|
+
close?: (e?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
4
4
|
duration?: number;
|
|
5
5
|
autoClose?: CloseTimerAuto;
|
|
6
6
|
isPlaying?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuestionType as i } from "@streamlayer/sdk-web-types";
|
|
2
|
-
const
|
|
2
|
+
const e = {
|
|
3
3
|
[i.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
4
4
|
[i.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
5
5
|
[i.UNSET]: void 0,
|
|
@@ -7,7 +7,16 @@ const o = {
|
|
|
7
7
|
[i.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
8
8
|
[i.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
9
9
|
[i.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
10
|
+
}, o = {
|
|
11
|
+
[i.TWEET]: "Learn more",
|
|
12
|
+
[i.FACTOID]: "Learn more",
|
|
13
|
+
[i.POLL]: "Answer",
|
|
14
|
+
[i.TRIVIA]: "Answer",
|
|
15
|
+
[i.PREDICTION]: "Answer",
|
|
16
|
+
[i.PROMOTION]: "",
|
|
17
|
+
[i.UNSET]: ""
|
|
10
18
|
};
|
|
11
19
|
export {
|
|
12
|
-
o as
|
|
20
|
+
o as QuestionActionLabel,
|
|
21
|
+
e as QuestionTypeData
|
|
13
22
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { AnimatedCounter as r } from "../../animated-counter/index.js";
|
|
3
|
-
import { resetCss as
|
|
4
|
-
import { PointsContainer as
|
|
5
|
-
const u = ({ points:
|
|
6
|
-
/* @__PURE__ */ o(
|
|
7
|
-
/* @__PURE__ */
|
|
3
|
+
import { resetCss as s } from "../../theme/theme.js";
|
|
4
|
+
import { PointsContainer as e, PointsIcon as l, PointsSvg as m, PointsBody as c, PointsTitle as a, PointsValue as d } from "./styles.js";
|
|
5
|
+
const u = ({ points: n, onClick: t }) => /* @__PURE__ */ i(e, { className: s, onClick: t, children: [
|
|
6
|
+
/* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(m, { name: "icon-trophy-solid" }) }),
|
|
7
|
+
/* @__PURE__ */ i(c, { children: [
|
|
8
8
|
/* @__PURE__ */ o(a, { children: "Total points" }),
|
|
9
|
-
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(r, { value:
|
|
9
|
+
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(r, { value: n }) })
|
|
10
10
|
] })
|
|
11
11
|
] });
|
|
12
12
|
export {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { styled as o } from "@linaria/react";
|
|
3
|
+
import { QuestionImages as s } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { SvgIcon as p } from "../../../../../icons/index.js";
|
|
5
|
+
const e = /* @__PURE__ */ o("div")({
|
|
6
|
+
name: "Media",
|
|
7
|
+
class: "m1bcvojl",
|
|
8
|
+
propsAsIs: !1
|
|
9
|
+
}), I = () => e, l = /* @__PURE__ */ o(I())({
|
|
10
|
+
name: "MediaImgBottom",
|
|
11
|
+
class: "m58gin0",
|
|
12
|
+
propsAsIs: !0
|
|
13
|
+
}), g = () => e, i = /* @__PURE__ */ o(g())({
|
|
14
|
+
name: "MediaImgSolid",
|
|
15
|
+
class: "m1atm8do",
|
|
16
|
+
propsAsIs: !0
|
|
17
|
+
}), M = () => e, u = /* @__PURE__ */ o(M())({
|
|
18
|
+
name: "MediaImgRounded",
|
|
19
|
+
class: "myx3xoi",
|
|
20
|
+
propsAsIs: !0
|
|
21
|
+
}), x = () => e, N = /* @__PURE__ */ o(x())({
|
|
22
|
+
name: "MediaImgCentered",
|
|
23
|
+
class: "m1bwv0gx",
|
|
24
|
+
propsAsIs: !0
|
|
25
|
+
}), f = () => e, A = /* @__PURE__ */ o(f())({
|
|
26
|
+
name: "MediaImgInsight",
|
|
27
|
+
class: "mntjanp",
|
|
28
|
+
propsAsIs: !0
|
|
29
|
+
}), E = /* @__PURE__ */ o("div")({
|
|
30
|
+
name: "VideoIcon",
|
|
31
|
+
class: "v1kofb47",
|
|
32
|
+
propsAsIs: !1
|
|
33
|
+
}), v = {
|
|
34
|
+
[s.UNSET]: i,
|
|
35
|
+
[s.NONE]: i,
|
|
36
|
+
[s.ROUNDED]: u,
|
|
37
|
+
[s.CENTERED]: N,
|
|
38
|
+
[s.TRANSPARENT]: l
|
|
39
|
+
}, h = ({
|
|
40
|
+
src: a,
|
|
41
|
+
imageMode: t = s.UNSET,
|
|
42
|
+
withVideo: m,
|
|
43
|
+
fromInsight: c
|
|
44
|
+
}) => {
|
|
45
|
+
if (t === s.NONE)
|
|
46
|
+
return null;
|
|
47
|
+
const d = c ? A : v[t];
|
|
48
|
+
return /* @__PURE__ */ r(d, {
|
|
49
|
+
children: [/* @__PURE__ */ n("img", {
|
|
50
|
+
src: a,
|
|
51
|
+
alt: ""
|
|
52
|
+
}), m && /* @__PURE__ */ n(E, {
|
|
53
|
+
children: /* @__PURE__ */ n(p, {
|
|
54
|
+
name: "icon-play"
|
|
55
|
+
})
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
h as NotificationMedia
|
|
61
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as c, QuestionImages as N, QuestionStatus as h } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { QuestionTypeData as M, QuestionActionLabel as Q } from "../../../constants.js";
|
|
4
|
+
import { QuestionTypeHeader as S } from "../../index.js";
|
|
5
|
+
import { NotificationMedia as u } from "./NotificationMedia/index.js";
|
|
6
|
+
import { NotificationContainer as v, NotificationContent as A, Button as V, StyledChevronRight as g, Body as T, Title as x } from "./styles.js";
|
|
7
|
+
import { Tweet as D } from "./tweet/index.js";
|
|
8
|
+
const F = ({ title: t, questionType: n, questionTypeData: r }) => /* @__PURE__ */ p(T, { children: [
|
|
9
|
+
/* @__PURE__ */ o(
|
|
10
|
+
S,
|
|
11
|
+
{
|
|
12
|
+
questionTypeData: r,
|
|
13
|
+
questionType: n,
|
|
14
|
+
questionStatus: h.UNSET
|
|
15
|
+
}
|
|
16
|
+
),
|
|
17
|
+
t && /* @__PURE__ */ o(x, { children: t })
|
|
18
|
+
] }), L = ({ tweet: t }) => t ? /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(D, { ...t, controlVideo: () => {
|
|
19
|
+
} }) }) : null, k = ({ action: t, questionType: n, inApp: r, insight: e, tweet: i }) => {
|
|
20
|
+
var s;
|
|
21
|
+
const d = M[n], C = Q[n];
|
|
22
|
+
if (!d || !r || !r.notification)
|
|
23
|
+
return null;
|
|
24
|
+
const { title: E, image: I, imageMode: f } = r.notification;
|
|
25
|
+
let a = I;
|
|
26
|
+
n === c.TWEET && (i != null && i.tweetMedia) && (a = i.tweetMedia.image), f === N.NONE && (a = "");
|
|
27
|
+
const m = r.useMediaFromContent && (e == null ? void 0 : e.image), l = n === c.TWEET && ((s = i == null ? void 0 : i.tweetMedia) == null ? void 0 : s.video) || n === c.FACTOID && (e == null ? void 0 : e.video);
|
|
28
|
+
return /* @__PURE__ */ o(v, { className: "SL_InApp", onClick: t, children: /* @__PURE__ */ p(A, { style: a ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
29
|
+
a && !m && /* @__PURE__ */ o(u, { src: a, imageMode: f, withVideo: !!l }),
|
|
30
|
+
m && /* @__PURE__ */ o(u, { src: m, fromInsight: !0, withVideo: !!l }),
|
|
31
|
+
n === c.TWEET ? /* @__PURE__ */ o(L, { tweet: i }) : /* @__PURE__ */ o(F, { questionTypeData: d, questionType: n, title: E }),
|
|
32
|
+
/* @__PURE__ */ o(V, { name: "inapp-button", children: C || "Open" }),
|
|
33
|
+
/* @__PURE__ */ o(g, { name: "chevronRight" })
|
|
34
|
+
] }) });
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
k as InAppNotification
|
|
38
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CardContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const NotificationContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const Button: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const StyledChevronRight: any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
import { SvgIcon as n } from "../../../../icons/index.js";
|
|
3
|
+
const e = /* @__PURE__ */ s("div")({
|
|
4
|
+
name: "CardContainer",
|
|
5
|
+
class: "cy7yrc",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
8
|
+
name: "NotificationContent",
|
|
9
|
+
class: "nuraq9m",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
12
|
+
name: "NotificationContainer",
|
|
13
|
+
class: "ns1nzpg",
|
|
14
|
+
propsAsIs: !1
|
|
15
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
16
|
+
name: "Body",
|
|
17
|
+
class: "b1j59nzs",
|
|
18
|
+
propsAsIs: !1
|
|
19
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
20
|
+
name: "Title",
|
|
21
|
+
class: "t9vmnpp",
|
|
22
|
+
propsAsIs: !1
|
|
23
|
+
}), l = /* @__PURE__ */ s("button")({
|
|
24
|
+
name: "Button",
|
|
25
|
+
class: "b14ivj5k",
|
|
26
|
+
propsAsIs: !1
|
|
27
|
+
}), t = () => n, m = /* @__PURE__ */ s(t())({
|
|
28
|
+
name: "StyledChevronRight",
|
|
29
|
+
class: "s1atci8n",
|
|
30
|
+
propsAsIs: !0
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
r as Body,
|
|
34
|
+
l as Button,
|
|
35
|
+
e as CardContainer,
|
|
36
|
+
c as NotificationContainer,
|
|
37
|
+
i as NotificationContent,
|
|
38
|
+
m as StyledChevronRight,
|
|
39
|
+
p as Title
|
|
40
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { sanitizeContent as p } from "../../../../../questions/twitter/index.js";
|
|
3
|
+
import { Account as s } from "../../../../../questions/twitter/account/index.js";
|
|
4
|
+
import { Container as u, QuoteWrap as f, Quote as h, Body as l } from "./styles.js";
|
|
5
|
+
const Q = ({ image: m, tweet: r, account: a, accountVerified: c, body: d, title: n }) => {
|
|
6
|
+
var i;
|
|
7
|
+
return /* @__PURE__ */ e(u, { children: [
|
|
8
|
+
n && /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(h, { children: n }) }),
|
|
9
|
+
/* @__PURE__ */ o(
|
|
10
|
+
s,
|
|
11
|
+
{
|
|
12
|
+
image: m,
|
|
13
|
+
name: (i = r == null ? void 0 : r.meta) == null ? void 0 : i.accountName,
|
|
14
|
+
userName: a,
|
|
15
|
+
verified: c,
|
|
16
|
+
createdTweet: r == null ? void 0 : r.date
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ o(l, { children: p(d) })
|
|
20
|
+
] });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
Q as Tweet
|
|
24
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const QuoteWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const Quote: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLQuoteElement> & import('react').BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
const a = /* @__PURE__ */ s("div")({
|
|
3
|
+
name: "QuoteWrap",
|
|
4
|
+
class: "q4w8jgs",
|
|
5
|
+
propsAsIs: !1
|
|
6
|
+
}), e = /* @__PURE__ */ s("blockquote")({
|
|
7
|
+
name: "Quote",
|
|
8
|
+
class: "qaa0kez",
|
|
9
|
+
propsAsIs: !1
|
|
10
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
11
|
+
name: "Body",
|
|
12
|
+
class: "b1wvd52w",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
15
|
+
name: "Container",
|
|
16
|
+
class: "ccvukea",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
t as Body,
|
|
21
|
+
n as Container,
|
|
22
|
+
e as Quote,
|
|
23
|
+
a as QuoteWrap
|
|
24
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationContainer as p, IconContainer as h, Icon as l, Body as m, Title as o, TitleIcon as d, Description as f, Button as C, Close as k } from "./styles.js";
|
|
3
|
+
const I = ({
|
|
4
|
+
open: e,
|
|
5
|
+
close: r,
|
|
6
|
+
...t
|
|
7
|
+
}) => {
|
|
8
|
+
var c, a;
|
|
9
|
+
return /* @__PURE__ */ s(
|
|
10
|
+
p,
|
|
11
|
+
{
|
|
12
|
+
onClick: () => {
|
|
13
|
+
e == null || e(), t && (t.instantOpen = !0);
|
|
14
|
+
},
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ s(h, { children: [
|
|
17
|
+
/* @__PURE__ */ i(l, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
|
|
18
|
+
/* @__PURE__ */ i(
|
|
19
|
+
l,
|
|
20
|
+
{
|
|
21
|
+
className: "on-dark",
|
|
22
|
+
src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ s(m, { children: [
|
|
27
|
+
/* @__PURE__ */ s(o, { children: [
|
|
28
|
+
/* @__PURE__ */ i(d, { name: "icon-trophy-solid" }),
|
|
29
|
+
(c = t == null ? void 0 : t.titleCard) == null ? void 0 : c.title
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ s(f, { children: [
|
|
32
|
+
/* @__PURE__ */ i("span", { children: (a = t == null ? void 0 : t.titleCard) == null ? void 0 : a.subtitle }),
|
|
33
|
+
/* @__PURE__ */ i(C, { name: "inapp-button", children: "Play Now" })
|
|
34
|
+
] })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ i(
|
|
37
|
+
k,
|
|
38
|
+
{
|
|
39
|
+
close: (n) => {
|
|
40
|
+
n == null || n.stopPropagation(), r == null || r();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
I as InAppOnboarding
|
|
50
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const Icon: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const IconContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const TitleIcon: any;
|
|
5
|
+
export declare const Close: any;
|
|
6
|
+
export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const Description: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
+
export declare const Button: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
import { CloseButton as o } from "../../../../close-btn/index.js";
|
|
3
|
+
import { SvgIcon as n } from "../../../../icons/index.js";
|
|
4
|
+
const p = /* @__PURE__ */ s("div")({
|
|
5
|
+
name: "NotificationContainer",
|
|
6
|
+
class: "n11jcrxe",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), r = /* @__PURE__ */ s("img")({
|
|
9
|
+
name: "Icon",
|
|
10
|
+
class: "i1vmpt6u",
|
|
11
|
+
propsAsIs: !1
|
|
12
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
13
|
+
name: "IconContainer",
|
|
14
|
+
class: "i180665s",
|
|
15
|
+
propsAsIs: !1
|
|
16
|
+
}), t = () => n, m = /* @__PURE__ */ s(t())({
|
|
17
|
+
name: "TitleIcon",
|
|
18
|
+
class: "t16zzzei",
|
|
19
|
+
propsAsIs: !0
|
|
20
|
+
}), e = () => o, I = /* @__PURE__ */ s(e())({
|
|
21
|
+
name: "Close",
|
|
22
|
+
class: "c1sur0q2",
|
|
23
|
+
propsAsIs: !0
|
|
24
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
25
|
+
name: "Body",
|
|
26
|
+
class: "bai9j52",
|
|
27
|
+
propsAsIs: !1
|
|
28
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
29
|
+
name: "Title",
|
|
30
|
+
class: "t1bnt25p",
|
|
31
|
+
propsAsIs: !1
|
|
32
|
+
}), u = /* @__PURE__ */ s("div")({
|
|
33
|
+
name: "Description",
|
|
34
|
+
class: "dmixjec",
|
|
35
|
+
propsAsIs: !1
|
|
36
|
+
}), A = /* @__PURE__ */ s("button")({
|
|
37
|
+
name: "Button",
|
|
38
|
+
class: "b1ubkw1q",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
f as Body,
|
|
43
|
+
A as Button,
|
|
44
|
+
I as Close,
|
|
45
|
+
u as Description,
|
|
46
|
+
r as Icon,
|
|
47
|
+
l as IconContainer,
|
|
48
|
+
p as NotificationContainer,
|
|
49
|
+
d as Title,
|
|
50
|
+
m as TitleIcon
|
|
51
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { SvgIcon as e } from "../../../../../icons/index.js";
|
|
4
|
+
const a = /* @__PURE__ */ s("div")({
|
|
5
|
+
name: "Container",
|
|
6
|
+
class: "cef8huz",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), p = () => e, d = /* @__PURE__ */ s(p())({
|
|
9
|
+
name: "CheckIcon",
|
|
10
|
+
class: "c1mo15kk",
|
|
11
|
+
propsAsIs: !0
|
|
12
|
+
}), l = () => e, m = /* @__PURE__ */ s(l())({
|
|
13
|
+
name: "PredictionIcon",
|
|
14
|
+
class: "p16zkqnm",
|
|
15
|
+
propsAsIs: !0
|
|
16
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
17
|
+
name: "PredictionIconContainer",
|
|
18
|
+
class: "pjszi7a",
|
|
19
|
+
propsAsIs: !1
|
|
20
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
21
|
+
name: "BodyContainer",
|
|
22
|
+
class: "bftbmo3",
|
|
23
|
+
propsAsIs: !1
|
|
24
|
+
}), h = /* @__PURE__ */ s("div")({
|
|
25
|
+
name: "Body",
|
|
26
|
+
class: "barrbyu",
|
|
27
|
+
propsAsIs: !1
|
|
28
|
+
}), C = /* @__PURE__ */ s("div")({
|
|
29
|
+
name: "Subtitle",
|
|
30
|
+
class: "sz7237i",
|
|
31
|
+
propsAsIs: !1
|
|
32
|
+
}), A = ({
|
|
33
|
+
step: c,
|
|
34
|
+
children: i,
|
|
35
|
+
answer: r,
|
|
36
|
+
state: t = "pending"
|
|
37
|
+
}) => /* @__PURE__ */ o(a, {
|
|
38
|
+
children: [/* @__PURE__ */ n(I, {
|
|
39
|
+
children: /* @__PURE__ */ n(m, {
|
|
40
|
+
name: "icon-prediction"
|
|
41
|
+
})
|
|
42
|
+
}), /* @__PURE__ */ n(f, {
|
|
43
|
+
children: /* @__PURE__ */ n(h, {
|
|
44
|
+
children: i
|
|
45
|
+
}, c)
|
|
46
|
+
}), /* @__PURE__ */ n(C, {
|
|
47
|
+
className: t,
|
|
48
|
+
children: /* @__PURE__ */ o("div", {
|
|
49
|
+
children: [/* @__PURE__ */ n(d, {
|
|
50
|
+
name: "icon-check"
|
|
51
|
+
}), "Your Pick: ", r]
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
A as Content
|
|
57
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NotificationData } from '@streamlayer/sdk-web-notifications';
|
|
2
|
+
export declare const PredictionResultSteps: React.FC<NotificationData['question'] & {
|
|
3
|
+
close?: () => void;
|
|
4
|
+
action?: () => void;
|
|
5
|
+
setStep?: (step: number) => void;
|
|
6
|
+
hiding?: boolean;
|
|
7
|
+
step: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const PredictionResult: React.FC<NotificationData['question'] & {
|
|
10
|
+
close?: () => void;
|
|
11
|
+
action?: () => void;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as k, useState as x } from "react";
|
|
3
|
+
import { Content as T } from "./content.js";
|
|
4
|
+
import { Lines as g } from "./lines.js";
|
|
5
|
+
import { Step1 as j } from "./step1.js";
|
|
6
|
+
import { Step2 as P } from "./step2.js";
|
|
7
|
+
import { CorrectStep as R, InCorrectStep as a } from "./step3.js";
|
|
8
|
+
import { Step4 as y } from "./step4.js";
|
|
9
|
+
import { Container as h, Body as C } from "./styles.js";
|
|
10
|
+
const c = {
|
|
11
|
+
1: 3e3,
|
|
12
|
+
2: 4e3,
|
|
13
|
+
3: 4e3,
|
|
14
|
+
4: 4e3
|
|
15
|
+
}, B = ({ close: m, action: o, setStep: f, votedAnswer: n, correct: t, correctAnswerTitle: u, questionTitle: e, step: i }) => {
|
|
16
|
+
if (k(() => {
|
|
17
|
+
if (f) {
|
|
18
|
+
const p = setTimeout(() => {
|
|
19
|
+
c[i + 1] && (t || i < 3) ? f(i + 1) : m == null || m();
|
|
20
|
+
}, c[i]);
|
|
21
|
+
return () => {
|
|
22
|
+
p && clearTimeout(p);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return () => {
|
|
26
|
+
};
|
|
27
|
+
}, [f, i, m, t]), i === 1)
|
|
28
|
+
return /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(j, {}) }) });
|
|
29
|
+
let l = "pending";
|
|
30
|
+
return (i === 3 || i === 4) && (l = t ? "correct" : "incorrect"), /* @__PURE__ */ r(h, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ S(C, { children: [
|
|
31
|
+
i !== 1 && /* @__PURE__ */ r(g, {}, i),
|
|
32
|
+
/* @__PURE__ */ S(T, { state: l, step: i, answer: (n == null ? void 0 : n.title) || "unknown", children: [
|
|
33
|
+
i === 2 && /* @__PURE__ */ r(P, { title: e || "unknown" }),
|
|
34
|
+
i === 3 && t && /* @__PURE__ */ r(R, {}),
|
|
35
|
+
i === 3 && !t && /* @__PURE__ */ r(a, { title: u || "unknown" }),
|
|
36
|
+
i === 4 && /* @__PURE__ */ r(y, { points: (n == null ? void 0 : n.points) || 0 })
|
|
37
|
+
] })
|
|
38
|
+
] }) });
|
|
39
|
+
}, G = ({ close: m, action: o, votedAnswer: f, correct: n, correctAnswerTitle: t, questionTitle: u }) => {
|
|
40
|
+
const [e, i] = x(1);
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
42
|
+
B,
|
|
43
|
+
{
|
|
44
|
+
close: m,
|
|
45
|
+
action: o,
|
|
46
|
+
votedAnswer: f,
|
|
47
|
+
correct: n,
|
|
48
|
+
correctAnswerTitle: t,
|
|
49
|
+
questionTitle: u,
|
|
50
|
+
setStep: i,
|
|
51
|
+
step: e,
|
|
52
|
+
title: ""
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
G as PredictionResult,
|
|
58
|
+
B as PredictionResultSteps
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Lines: React.FC;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { styled as e } from "@linaria/react";
|
|
3
|
+
const i = /* @__PURE__ */ e("div")({
|
|
4
|
+
name: "Container",
|
|
5
|
+
class: "ckyzolp",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), n = /* @__PURE__ */ e("div")({
|
|
8
|
+
name: "Line",
|
|
9
|
+
class: "l16t1zr7",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), r = () => n, t = /* @__PURE__ */ e(r())({
|
|
12
|
+
name: "Line1",
|
|
13
|
+
class: "le78kvg",
|
|
14
|
+
propsAsIs: !0
|
|
15
|
+
}), c = () => n, l = /* @__PURE__ */ e(c())({
|
|
16
|
+
name: "Line2",
|
|
17
|
+
class: "l1o7966d",
|
|
18
|
+
propsAsIs: !0
|
|
19
|
+
}), p = () => n, a = /* @__PURE__ */ e(p())({
|
|
20
|
+
name: "Line3",
|
|
21
|
+
class: "lu9lyxq",
|
|
22
|
+
propsAsIs: !0
|
|
23
|
+
}), L = () => /* @__PURE__ */ o(i, {
|
|
24
|
+
children: [/* @__PURE__ */ s(t, {
|
|
25
|
+
children: /* @__PURE__ */ s("div", {})
|
|
26
|
+
}), /* @__PURE__ */ s(l, {
|
|
27
|
+
children: /* @__PURE__ */ s("div", {})
|
|
28
|
+
}), /* @__PURE__ */ s(a, {
|
|
29
|
+
children: /* @__PURE__ */ s("div", {})
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
L as Lines
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Step1: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { SvgIcon as e } from "../../../../../icons/index.js";
|
|
4
|
+
const n = /* @__PURE__ */ s("div")({
|
|
5
|
+
name: "Container",
|
|
6
|
+
class: "c10jy6zf",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), r = () => e, t = /* @__PURE__ */ s(r())({
|
|
9
|
+
name: "CheckIcon",
|
|
10
|
+
class: "c1c7scay",
|
|
11
|
+
propsAsIs: !0
|
|
12
|
+
}), m = () => /* @__PURE__ */ c(n, {
|
|
13
|
+
children: [/* @__PURE__ */ o(t, {
|
|
14
|
+
name: "icon-check"
|
|
15
|
+
}), " Prediction results are in!"]
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
m as Step1
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
const o = /* @__PURE__ */ s("div")({
|
|
4
|
+
name: "Container",
|
|
5
|
+
class: "cf6k2yy",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
8
|
+
name: "Caption",
|
|
9
|
+
class: "c1c8xjus",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
12
|
+
name: "Title",
|
|
13
|
+
class: "t1d1uekn",
|
|
14
|
+
propsAsIs: !1
|
|
15
|
+
}), l = ({
|
|
16
|
+
title: n
|
|
17
|
+
}) => /* @__PURE__ */ t(o, {
|
|
18
|
+
children: [/* @__PURE__ */ e(r, {
|
|
19
|
+
children: "Results for"
|
|
20
|
+
}), /* @__PURE__ */ e(i, {
|
|
21
|
+
children: n
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
l as Step2
|
|
26
|
+
};
|