@streamlayer/react-ui 1.22.6 → 1.23.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/Advertisement/index.js +11 -11
- package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
- package/lib/app/app/Navigation/index.js +1 -0
- package/lib/app/app/Notifications/Onboarding/Notification/index.js +12 -12
- package/lib/app/app/Notifications/index.js +31 -30
- package/lib/app/app/Points/index.js +19 -13
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +2 -1
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +5 -4
- package/lib/app/masters/BetPack/index.js +38 -36
- package/lib/assets/style.css +1 -1
- package/lib/hooks/analytics.js +12 -9
- package/lib/ui/advertisement/banner/index.js +3 -3
- package/lib/ui/advertisement/overlay/externalAd/index.js +7 -7
- package/lib/ui/advertisement/overlay/index.js +10 -10
- package/lib/ui/button/index.js +2 -2
- package/lib/ui/close-btn/index.js +23 -20
- package/lib/ui/gamification/detail/header/index.js +8 -8
- package/lib/ui/gamification/insight/index.js +6 -6
- package/lib/ui/gamification/invite-link/index.js +1 -1
- package/lib/ui/gamification/leaderboard/static.js +14 -13
- package/lib/ui/gamification/onboarding/index.js +15 -15
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +10 -10
- package/lib/ui/gamification/question/inapp/notification/index.js +1 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.js +10 -9
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +27 -27
- package/lib/ui/gamification/question/index.js +23 -23
- package/lib/ui/gamification/question/insight/index.js +6 -6
- package/lib/ui/gamification/question/list/index.js +9 -9
- package/lib/ui/gamification/question/notification/index.js +13 -12
- package/lib/ui/gamification/question/notification/insight/index.js +11 -11
- package/lib/ui/gamification/question/notification/pill/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/index.js +32 -32
- package/lib/ui/gamification/question/notification/tweet/index.js +3 -3
- package/lib/ui/gamification/question/twitter/index.js +4 -4
- package/lib/ui/gamification/tabs/index.js +8 -8
- package/lib/ui/gamification/vote/insight-details/index.js +6 -6
- package/lib/ui/gamification/vote/vote-option/index.js +20 -19
- package/lib/ui/navigation/button/index.js +9 -8
- package/lib/ui/theme/constants.d.ts +1 -0
- package/lib/ui/theme/constants.js +2 -1
- package/lib/ui/video-player/index.js +1 -0
- package/package.json +15 -15
package/lib/hooks/analytics.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { useEffect as c } from "react";
|
|
2
|
-
import { eventBus as
|
|
2
|
+
import { eventBus as a } from "@streamlayer/sdk-web-interfaces";
|
|
3
3
|
import { BREAKPOINTS as s } from "../ui/theme/constants.js";
|
|
4
|
-
const f = (t) => [(r) => (...n) => (t &&
|
|
4
|
+
const f = (t) => [(r) => (...n) => (t && a.emit(t == null ? void 0 : t.type, t), r ? r(n) : null)], A = (t) => {
|
|
5
5
|
const e = t.target;
|
|
6
|
-
e instanceof HTMLAnchorElement && e.target === "_blank" && e.getAttribute("data-
|
|
6
|
+
e instanceof HTMLAnchorElement && e.target === "_blank" && e.getAttribute("data-a") === "web-link" && a.emit("poll", {
|
|
7
7
|
action: "navigated",
|
|
8
8
|
payload: {}
|
|
9
|
+
}), e instanceof Element && e.getAttribute("data-a") === "intr" && a.emit("interactions", {
|
|
10
|
+
action: "tap",
|
|
11
|
+
payload: {}
|
|
9
12
|
});
|
|
10
|
-
},
|
|
13
|
+
}, b = (t, e) => {
|
|
11
14
|
const r = window.innerWidth < s.xl;
|
|
12
15
|
c(() => {
|
|
13
|
-
const n = r && e.useDomNode ? document : t.current,
|
|
16
|
+
const n = r && e.useDomNode ? document : t.current, i = (l) => {
|
|
14
17
|
e.listener(l, t);
|
|
15
18
|
};
|
|
16
|
-
return e.enabled && (n == null || n.addEventListener(e.event,
|
|
17
|
-
n == null || n.removeEventListener(e.event,
|
|
19
|
+
return e.enabled && (n == null || n.addEventListener(e.event, i)), () => {
|
|
20
|
+
n == null || n.removeEventListener(e.event, i);
|
|
18
21
|
};
|
|
19
22
|
}, [r, e.enabled, e.listener]);
|
|
20
23
|
};
|
|
21
24
|
export {
|
|
22
|
-
|
|
25
|
+
A as newTabLinkListener,
|
|
23
26
|
f as useAnalyticsHandle,
|
|
24
|
-
|
|
27
|
+
b as useAnalyticsListener
|
|
25
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { SlideIn as o } from "../../slide-in/index.js";
|
|
3
3
|
import { BannerContainer as m, BannerLink as s } from "./styles.js";
|
|
4
|
-
const
|
|
4
|
+
const B = ({ promotion: n, promotionId: i, hiding: l, direction: d = "bottom" }) => {
|
|
5
5
|
var e, t;
|
|
6
6
|
if (!((e = n.additionalBanner) != null && e.imageUrl))
|
|
7
7
|
return null;
|
|
@@ -18,11 +18,11 @@ const u = ({ promotion: n, promotionId: i, hiding: l, direction: d = "bottom" })
|
|
|
18
18
|
},
|
|
19
19
|
"data-promo-id": i,
|
|
20
20
|
"data-promo-type": n.type,
|
|
21
|
-
"data-
|
|
21
|
+
"data-a": "banner",
|
|
22
22
|
target: "_blank"
|
|
23
23
|
}
|
|
24
24
|
) }) });
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
B as Banner
|
|
28
28
|
};
|
|
@@ -4,9 +4,9 @@ import { useRef as L } from "react";
|
|
|
4
4
|
import { useStore as T } from "@streamlayer/react-polyfills";
|
|
5
5
|
import { PromotionLogoMode as V } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { PromoOverlay as W, Header as G, HeaderContent as U, headerContentShift as _, ADLogo as $, Media as q, ActionBtnWrap as w, ActionButton as z } from "../styles.js";
|
|
7
|
-
import { CloseButton as
|
|
7
|
+
import { CloseButton as C } from "../../../close-btn/index.js";
|
|
8
8
|
import { Controls as F } from "./controls.js";
|
|
9
|
-
import { ControlsContainer as J, mediaStyle as
|
|
9
|
+
import { ControlsContainer as J, mediaStyle as y, mediaVisible as g, mediaHidden as P, Container as K, WhyThisAd as Q, VideoControls as X, MuteIcon as Y, PauseIcon as Z } from "./styles.js";
|
|
10
10
|
import { useGAMPlayer as oo } from "./vast-player/useGAMPlayer.js";
|
|
11
11
|
const uo = ({
|
|
12
12
|
promotion: e,
|
|
@@ -38,7 +38,7 @@ const uo = ({
|
|
|
38
38
|
/* @__PURE__ */ a(J, { children: [
|
|
39
39
|
/* @__PURE__ */ o(F, { time: B, adCount: S, adPosition: A }),
|
|
40
40
|
!!c && t && /* @__PURE__ */ o(
|
|
41
|
-
|
|
41
|
+
C,
|
|
42
42
|
{
|
|
43
43
|
timerClassName: "SkipTimerCount",
|
|
44
44
|
className: "ClosePromoIcon",
|
|
@@ -51,7 +51,7 @@ const uo = ({
|
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
53
|
N && /* @__PURE__ */ o(
|
|
54
|
-
|
|
54
|
+
C,
|
|
55
55
|
{
|
|
56
56
|
className: "ClosePromoIcon",
|
|
57
57
|
close: () => {
|
|
@@ -61,7 +61,7 @@ const uo = ({
|
|
|
61
61
|
)
|
|
62
62
|
] })
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */ o(q, { className: n(
|
|
64
|
+
/* @__PURE__ */ o(q, { className: n(y, t && g, !t && P), children: /* @__PURE__ */ a(K, { ref: l, children: [
|
|
65
65
|
r && /* @__PURE__ */ o(Q, { whyThisAd: r }),
|
|
66
66
|
/* @__PURE__ */ a(
|
|
67
67
|
X,
|
|
@@ -74,7 +74,7 @@ const uo = ({
|
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
] }) }),
|
|
77
|
-
R && /* @__PURE__ */ o(w, { className: n(
|
|
77
|
+
R && /* @__PURE__ */ o(w, { className: n(y, t && g, !t && P), children: /* @__PURE__ */ o(
|
|
78
78
|
z,
|
|
79
79
|
{
|
|
80
80
|
as: "button",
|
|
@@ -83,7 +83,7 @@ const uo = ({
|
|
|
83
83
|
backgroundColor: ((p = (u = e.banner) == null ? void 0 : u.ctaButton) == null ? void 0 : p.color) || "#009dc4",
|
|
84
84
|
color: ((h = (f = e.banner) == null ? void 0 : f.ctaButton) == null ? void 0 : h.textColor) || "#fff"
|
|
85
85
|
},
|
|
86
|
-
"data-
|
|
86
|
+
"data-a": "button",
|
|
87
87
|
"data-promo-id": k,
|
|
88
88
|
"data-promo-type": e.type,
|
|
89
89
|
target: "_blank",
|
|
@@ -6,7 +6,7 @@ import { PromotionType as K, PromotionLogoMode as s, AutoPlayVideo as ro, Promot
|
|
|
6
6
|
import { CloseButton as no } from "../../close-btn/index.js";
|
|
7
7
|
import { VideoPlayer as ao } from "../../video-player/index.js";
|
|
8
8
|
import { ExternalAdOverlay as lo } from "./externalAd/index.js";
|
|
9
|
-
import { PromoOverlay as io, Header as so, HeaderContent as mo, headerContentShift as
|
|
9
|
+
import { PromoOverlay as io, Header as so, HeaderContent as mo, headerContentShift as po, SponsorLogo as Q, Sponsor as co, SponsorName as yo, SponsorText as uo, ADLogo as fo, SponsoredText as bo, Media as ho, shiftMedia as Ao, Content as X, PromoImg as To, Title as No, hideOnMobile as Po, Description as vo, ActionBtnWrap as xo, ActionButton as go } from "./styles.js";
|
|
10
10
|
import { OverlayContainer as ko } from "./styles.js";
|
|
11
11
|
const Ro = (f) => {
|
|
12
12
|
var A, T, N, P, v, x, g, B, C, E, O, L, M, S, I, D, R, U, _, k, F, V, j, G, H, w, W, $, q, z;
|
|
@@ -21,7 +21,7 @@ const Ro = (f) => {
|
|
|
21
21
|
onClose: oo,
|
|
22
22
|
markAsViewed: m,
|
|
23
23
|
externalAd: b
|
|
24
|
-
} = f,
|
|
24
|
+
} = f, p = o.type === K.INGAME_IAB11_LBAR || o.type === K.INGAME_IAB11, c = ((A = o.sponsor) == null ? void 0 : A.logo) && o.logoMode === s.CENTER, h = !!((N = (T = o.banner) == null ? void 0 : T.video) != null && N.url), i = o.autoPlayVideo === ro.ENABLED;
|
|
25
25
|
if (u(() => {
|
|
26
26
|
r == null || r(h || i), d == null || d();
|
|
27
27
|
}, []), u(() => {
|
|
@@ -35,10 +35,10 @@ const Ro = (f) => {
|
|
|
35
35
|
let y = !0;
|
|
36
36
|
return h && (!Y || !i ? y = !0 : y = !1), /* @__PURE__ */ t(io, { className: "PromoOverlay", children: [
|
|
37
37
|
/* @__PURE__ */ t(so, { children: [
|
|
38
|
-
/* @__PURE__ */ t(mo, { className: J(!
|
|
38
|
+
/* @__PURE__ */ t(mo, { className: J(!c && po), children: [
|
|
39
39
|
((v = o.sponsor) == null ? void 0 : v.logo) && o.logoMode === s.LEFT && /* @__PURE__ */ e(Q, { className: "PromoSponsorLogo", src: (x = o.sponsor) == null ? void 0 : x.logo, alt: "promo" }),
|
|
40
40
|
/* @__PURE__ */ t(
|
|
41
|
-
|
|
41
|
+
co,
|
|
42
42
|
{
|
|
43
43
|
style: {
|
|
44
44
|
paddingLeft: (g = o.sponsor) != null && g.logo && o.logoMode === s.LEFT ? "0px" : "8px"
|
|
@@ -65,13 +65,13 @@ const Ro = (f) => {
|
|
|
65
65
|
)
|
|
66
66
|
] }),
|
|
67
67
|
/* @__PURE__ */ t(ho, { children: [
|
|
68
|
-
|
|
68
|
+
c && /* @__PURE__ */ e(Q, { className: Ao, src: (L = o.sponsor) == null ? void 0 : L.logo, alt: "promo" }),
|
|
69
69
|
/* @__PURE__ */ e(X, { children: (S = (M = o.banner) == null ? void 0 : M.video) != null && S.url ? /* @__PURE__ */ e(
|
|
70
70
|
ao,
|
|
71
71
|
{
|
|
72
72
|
source: (D = (I = o.banner) == null ? void 0 : I.video) == null ? void 0 : D.url,
|
|
73
73
|
poster: (U = (R = o.banner) == null ? void 0 : R.video) == null ? void 0 : U.thumbnailUrl,
|
|
74
|
-
aspectRatio:
|
|
74
|
+
aspectRatio: p ? "1/1" : "16/9",
|
|
75
75
|
onPause: () => {
|
|
76
76
|
i && (r == null || r(!0));
|
|
77
77
|
},
|
|
@@ -87,9 +87,9 @@ const Ro = (f) => {
|
|
|
87
87
|
controlVideo: n,
|
|
88
88
|
autoPlay: i
|
|
89
89
|
}
|
|
90
|
-
) : (_ = o.banner) != null && _.imageUrl ? /* @__PURE__ */ e(To, { style:
|
|
91
|
-
!
|
|
92
|
-
((F = o.banner) == null ? void 0 : F.title) && /* @__PURE__ */ e(No, { className: J("AdvTitle",
|
|
90
|
+
) : (_ = o.banner) != null && _.imageUrl ? /* @__PURE__ */ e(To, { style: p ? { aspectRatio: "1/1" } : {}, src: (k = o.banner) == null ? void 0 : k.imageUrl, alt: "promo" }) : null }),
|
|
91
|
+
!p && /* @__PURE__ */ t(X, { children: [
|
|
92
|
+
((F = o.banner) == null ? void 0 : F.title) && /* @__PURE__ */ e(No, { className: J("AdvTitle", c && Po), children: (V = o.banner) == null ? void 0 : V.title }),
|
|
93
93
|
((j = o.banner) == null ? void 0 : j.body) && /* @__PURE__ */ e(vo, { className: "AdvDescription", children: (G = o.banner) == null ? void 0 : G.body })
|
|
94
94
|
] })
|
|
95
95
|
] }),
|
|
@@ -101,7 +101,7 @@ const Ro = (f) => {
|
|
|
101
101
|
backgroundColor: ((w = (H = o.banner) == null ? void 0 : H.ctaButton) == null ? void 0 : w.color) || "#009dc4",
|
|
102
102
|
color: (($ = (W = o.banner) == null ? void 0 : W.ctaButton) == null ? void 0 : $.textColor) || "#fff"
|
|
103
103
|
},
|
|
104
|
-
"data-
|
|
104
|
+
"data-a": "button",
|
|
105
105
|
"data-promo-id": l,
|
|
106
106
|
"data-promo-type": o.type,
|
|
107
107
|
target: "_blank",
|
package/lib/ui/button/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { SButton as m, ButtonLabel as e } from "./styles.js";
|
|
3
|
-
const
|
|
3
|
+
const d = ({ disabled: r, variant: a = "primary", onClick: o, children: n, ...i }) => /* @__PURE__ */ t(m, { "data-a": "intr", onClick: o, disabled: r, "data-variant": a, ...i, children: /* @__PURE__ */ t(e, { children: n }) });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
d as Button
|
|
6
6
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { styled as t } from "@linaria/react";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { CloseTimerAuto as
|
|
5
|
-
import { SvgIcon as
|
|
6
|
-
import { SimpleTimer as
|
|
3
|
+
import { useState as d, useEffect as u, useCallback as I } from "react";
|
|
4
|
+
import { CloseTimerAuto as v } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { SvgIcon as x } from "../icons/index.js";
|
|
6
|
+
import { SimpleTimer as T } from "../timer/index.js";
|
|
7
7
|
const g = /* @__PURE__ */ t("div")({
|
|
8
8
|
name: "CloseIconWrap",
|
|
9
9
|
class: "c3v6bv6",
|
|
@@ -12,41 +12,44 @@ const g = /* @__PURE__ */ t("div")({
|
|
|
12
12
|
name: "TimerWrap",
|
|
13
13
|
class: "teuhmro",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}), A = () =>
|
|
15
|
+
}), A = () => x, C = /* @__PURE__ */ t(A())({
|
|
16
16
|
name: "Icon",
|
|
17
17
|
class: "i17rfxv5",
|
|
18
18
|
propsAsIs: !0
|
|
19
19
|
}), y = ({
|
|
20
20
|
close: r,
|
|
21
|
-
className:
|
|
22
|
-
timerClassName:
|
|
21
|
+
className: a,
|
|
22
|
+
timerClassName: m,
|
|
23
23
|
skipIcon: o,
|
|
24
|
-
isPlaying:
|
|
24
|
+
isPlaying: c = !0,
|
|
25
25
|
duration: e = 0,
|
|
26
|
-
autoClose:
|
|
26
|
+
autoClose: n
|
|
27
27
|
}) => {
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const [p, i] = d(e === 0);
|
|
29
|
+
u(() => {
|
|
30
|
+
i(!e);
|
|
31
31
|
}, [e]);
|
|
32
|
-
const l =
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
return
|
|
32
|
+
const l = I(() => {
|
|
33
|
+
n === v.ENABLED ? r == null || r() : i(!0);
|
|
34
|
+
}, [n, r]);
|
|
35
|
+
return p ? /* @__PURE__ */ f(g, {
|
|
36
|
+
"data-a": "intr",
|
|
36
37
|
onClick: r,
|
|
37
|
-
className:
|
|
38
|
+
className: a,
|
|
38
39
|
style: o ? {
|
|
39
40
|
width: "auto"
|
|
40
41
|
} : {},
|
|
41
42
|
children: [o && /* @__PURE__ */ s("span", {
|
|
43
|
+
"data-a": "intr",
|
|
42
44
|
children: "Skip"
|
|
43
45
|
}), /* @__PURE__ */ s(C, {
|
|
46
|
+
"data-a": "intr",
|
|
44
47
|
name: o ? "iconSkip" : "icon-cross"
|
|
45
48
|
})]
|
|
46
49
|
}) : /* @__PURE__ */ s(h, {
|
|
47
|
-
children: /* @__PURE__ */ s(
|
|
48
|
-
className:
|
|
49
|
-
isPlaying:
|
|
50
|
+
children: /* @__PURE__ */ s(T, {
|
|
51
|
+
className: m,
|
|
52
|
+
isPlaying: c,
|
|
50
53
|
duration: e,
|
|
51
54
|
onTimerExpired: l
|
|
52
55
|
})
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionType as e } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { CloseButton as c } from "../../../close-btn/index.js";
|
|
4
4
|
import { QuestionTypeData as p } from "../../constants.js";
|
|
5
5
|
import { Container as s, QuestionTypeWrap as l, QuestionTypeIcon as m, QuestionTypeTitle as u, CloseIconWrap as C, CloseIcon as f } from "./styles.js";
|
|
6
|
-
const b = ({ type:
|
|
7
|
-
const o =
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
6
|
+
const b = ({ type: a, closeTimer: n, close: r, label: d }) => {
|
|
7
|
+
const o = a ? p[a] : { label: d, iconName: void 0 };
|
|
8
|
+
return /* @__PURE__ */ i(s, { children: [
|
|
9
|
+
/* @__PURE__ */ i(l, { children: [
|
|
10
10
|
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ t(
|
|
11
11
|
m,
|
|
12
12
|
{
|
|
13
|
-
"data-type-trivia":
|
|
14
|
-
"data-type-poll":
|
|
13
|
+
"data-type-trivia": a === e.TRIVIA,
|
|
14
|
+
"data-type-poll": a === e.POLL,
|
|
15
15
|
name: o.iconName
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
18
|
(o == null ? void 0 : o.label) && /* @__PURE__ */ t(u, { children: o.label })
|
|
19
19
|
] }),
|
|
20
|
-
n != null && n.seconds ? /* @__PURE__ */ t(c, { close:
|
|
20
|
+
n != null && n.seconds ? /* @__PURE__ */ t(c, { close: r, autoClose: n.auto, duration: n.seconds }) : /* @__PURE__ */ t(C, { "data-a": "intr", onClick: r, children: /* @__PURE__ */ t(f, { "data-a": "intr", name: "icon-cross" }) })
|
|
21
21
|
] });
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionImages as c } from "@streamlayer/sdk-web-types";
|
|
3
|
-
import { Container as h, Graphic as l, Content as C, Title as
|
|
3
|
+
import { Container as h, Graphic as l, Content as C, Title as a, NextIcon as g, InsightIconDefault as d, InsightIconAbsolute as I, InsightIconCircle as u } from "./styles.js";
|
|
4
4
|
const v = "data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Chevron'%3e%3cpath%20id='Chevron_2'%20d='M12%208.17222C12%208.28783%2011.9781%208.39553%2011.9342%208.49533C11.8903%208.59513%2011.822%208.68992%2011.7292%208.7797L6.36949%2013.9439C6.21462%2014.0965%206.02742%2014.1729%205.80787%2014.1729C5.65752%2014.1729%205.52191%2014.1379%205.40104%2014.0679C5.28016%2013.998%205.1831%2013.9039%205.10986%2013.7856C5.03662%2013.6673%205%2013.5345%205%2013.3873C5%2013.1721%205.08288%2012.9818%205.24863%2012.8164L10.0807%208.17095L5.24863%203.52799C5.08288%203.36425%205%203.17439%205%202.95841C5%202.81118%205.03662%202.67842%205.10986%202.56013C5.1831%202.44183%205.28016%202.34771%205.40104%202.27777C5.52191%202.20782%205.65752%202.17285%205.80787%202.17285C6.02742%202.17285%206.21462%202.24731%206.36949%202.39624L11.7292%207.56473C11.8211%207.65451%2011.889%207.74909%2011.9329%207.84846C11.9768%207.94784%2011.9991%208.05576%2012%208.17222Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e", x = (i, n) => {
|
|
5
5
|
switch (i) {
|
|
6
6
|
case c.ROUNDED:
|
|
7
7
|
return /* @__PURE__ */ t(u, { alt: "insight-icon", src: n });
|
|
8
8
|
case c.TRANSPARENT:
|
|
9
|
-
return /* @__PURE__ */ t(d, { alt: "insight-icon", src: n });
|
|
10
|
-
case c.CENTERED:
|
|
11
9
|
return /* @__PURE__ */ t(I, { alt: "insight-icon", src: n });
|
|
10
|
+
case c.CENTERED:
|
|
11
|
+
return /* @__PURE__ */ t(d, { alt: "insight-icon", src: n });
|
|
12
12
|
default:
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
}, w = ({ title: i, image: n, questionId: r, imageMode: o, openInsight: s }) => /* @__PURE__ */ e(h, { onClick: () => s(r), children: [
|
|
15
|
+
}, w = ({ title: i, image: n, questionId: r, imageMode: o, openInsight: s }) => /* @__PURE__ */ e(h, { "data-a": "intr", onClick: () => s(r), children: [
|
|
16
16
|
/* @__PURE__ */ t(l, { children: n && x(o, n) }),
|
|
17
17
|
/* @__PURE__ */ e(C, { children: [
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
/* @__PURE__ */ t(
|
|
18
|
+
/* @__PURE__ */ t(a, { children: i || "" }),
|
|
19
|
+
/* @__PURE__ */ t(g, { alt: "next-icon", src: v })
|
|
20
20
|
] })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
@@ -10,7 +10,7 @@ const C = ({ title: o, description: t, onClick: r, className: e }) => {
|
|
|
10
10
|
from: m.TITLE_CARD
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
return /* @__PURE__ */ i(s, { onClick: c(r), className: e, children: [
|
|
13
|
+
return /* @__PURE__ */ i(s, { "data-a": "intr", onClick: c(r), className: e, children: [
|
|
14
14
|
/* @__PURE__ */ n(l, { name: "icon-friends" }),
|
|
15
15
|
/* @__PURE__ */ i(d, { children: [
|
|
16
16
|
/* @__PURE__ */ n(p, { children: o }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { styled as c } from "@linaria/react";
|
|
3
3
|
import { useCallback as f } from "react";
|
|
4
4
|
import m from "react-infinite-scroller";
|
|
@@ -9,27 +9,28 @@ const u = /* @__PURE__ */ c("div")({
|
|
|
9
9
|
propsAsIs: !1
|
|
10
10
|
}), S = ({
|
|
11
11
|
items: s,
|
|
12
|
-
currentUserId:
|
|
13
|
-
openItemDetail:
|
|
12
|
+
currentUserId: e,
|
|
13
|
+
openItemDetail: o,
|
|
14
14
|
fetchMore: n,
|
|
15
15
|
scrollNode: i,
|
|
16
|
-
hasMore:
|
|
16
|
+
hasMore: d
|
|
17
17
|
}) => {
|
|
18
|
-
const
|
|
18
|
+
const l = f((r) => {
|
|
19
19
|
const a = r.target.getAttribute("data-name");
|
|
20
|
-
a &&
|
|
21
|
-
}, [
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
a && o(a);
|
|
21
|
+
}, [o]);
|
|
22
|
+
return /* @__PURE__ */ t(m, {
|
|
23
23
|
loadMore: n,
|
|
24
24
|
initialLoad: !1,
|
|
25
|
-
hasMore:
|
|
25
|
+
hasMore: d,
|
|
26
26
|
useWindow: !1,
|
|
27
27
|
getScrollParent: () => i.current,
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
children: /* @__PURE__ */ t(u, {
|
|
29
|
+
"data-a": "intr",
|
|
30
|
+
onClick: l,
|
|
31
|
+
children: s.map((r) => /* @__PURE__ */ t(p, {
|
|
31
32
|
...r,
|
|
32
|
-
isCurrentUser: !!
|
|
33
|
+
isCurrentUser: !!e && e === r.userId
|
|
33
34
|
}, r.userId))
|
|
34
35
|
})
|
|
35
36
|
});
|
|
@@ -11,10 +11,10 @@ const o = {
|
|
|
11
11
|
steps: !1,
|
|
12
12
|
rules: !1,
|
|
13
13
|
inviteCard: !1
|
|
14
|
-
},
|
|
14
|
+
}, tn = ({
|
|
15
15
|
gamification: I,
|
|
16
16
|
steps: n,
|
|
17
|
-
rules:
|
|
17
|
+
rules: t,
|
|
18
18
|
rulesBtnLabel: c,
|
|
19
19
|
rulesTitle: T,
|
|
20
20
|
termsTitle: x,
|
|
@@ -29,40 +29,40 @@ const o = {
|
|
|
29
29
|
sdk: C,
|
|
30
30
|
onClose: A
|
|
31
31
|
}) => {
|
|
32
|
-
const [
|
|
32
|
+
const [a, O] = h(0), [l, S] = h(!1), [e, r] = h(o);
|
|
33
33
|
v(() => {
|
|
34
|
-
n != null && n.length ?
|
|
34
|
+
n != null && n.length ? r({ ...o, steps: !0 }) : t != null && t.length ? r({ ...o, rules: !0 }) : r({ ...o, inviteCard: !0 });
|
|
35
35
|
}, []);
|
|
36
|
-
const j = N(() => e.steps &&
|
|
37
|
-
n != null && n.length &&
|
|
38
|
-
}, [
|
|
39
|
-
e.inviteCard ? await I.onboardingStatus.submitInplay() : e.rules &&
|
|
36
|
+
const j = N(() => e.steps && a === 0 ? "Continue" : e.rules ? l || !c ? "Got it" : c : e.inviteCard ? b || "Play Now" : "Next", [e, a, l, c, b]), p = z(() => {
|
|
37
|
+
n != null && n.length && a < n.length - 1 ? O((m) => ++m) : t != null && t.length && e.steps ? r({ ...o, rules: !0 }) : e.rules && r({ ...o, inviteCard: !0 });
|
|
38
|
+
}, [a, n == null ? void 0 : n.length, t == null ? void 0 : t.length, e, O, r]), H = async () => {
|
|
39
|
+
e.inviteCard ? await I.onboardingStatus.submitInplay() : e.rules && l ? S(!1) : p();
|
|
40
40
|
};
|
|
41
41
|
return v(() => {
|
|
42
42
|
!d && f && C.inviteDisplayed();
|
|
43
43
|
}, [d, f, C]), /* @__PURE__ */ i(E, { children: ({ width: m, height: y }) => /* @__PURE__ */ s(U, { style: { width: m, height: y, maxHeight: y }, children: [
|
|
44
|
-
/* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(J, { onClick: A, children: /* @__PURE__ */ i(K, { name: "icon-close-btn-gray" }) }) }),
|
|
44
|
+
/* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(J, { "data-a": "intr", onClick: A, children: /* @__PURE__ */ i(K, { name: "icon-close-btn-gray" }) }) }),
|
|
45
45
|
/* @__PURE__ */ s(Q, { children: [
|
|
46
46
|
e.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */ i(
|
|
47
47
|
G,
|
|
48
48
|
{
|
|
49
49
|
loading: d,
|
|
50
50
|
steps: n,
|
|
51
|
-
currentStep:
|
|
51
|
+
currentStep: a,
|
|
52
52
|
inviterName: f
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
e.rules && !
|
|
55
|
+
e.rules && !l && /* @__PURE__ */ i(
|
|
56
56
|
P,
|
|
57
57
|
{
|
|
58
|
-
rules:
|
|
58
|
+
rules: t,
|
|
59
59
|
rulesTitle: T,
|
|
60
60
|
termsText: u,
|
|
61
61
|
primaryColor: g,
|
|
62
62
|
openTerms: () => S(!0)
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
e.rules &&
|
|
65
|
+
e.rules && l && /* @__PURE__ */ i(R, { termsTitle: x, termsText: u }),
|
|
66
66
|
e.inviteCard && /* @__PURE__ */ i(
|
|
67
67
|
M,
|
|
68
68
|
{
|
|
@@ -73,9 +73,9 @@ const o = {
|
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
] }),
|
|
76
|
-
/* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(F, { loading: d, style: { width: "100%" }, children: /* @__PURE__ */ i(W, { onClick: H, children: j }) }) })
|
|
76
|
+
/* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(F, { loading: d, style: { width: "100%" }, children: /* @__PURE__ */ i(W, { "data-a": "intr", onClick: H, children: j }) }) })
|
|
77
77
|
] }) });
|
|
78
78
|
};
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
tn as OnboardingUI
|
|
81
81
|
};
|
|
@@ -6,25 +6,25 @@ import { InvitationFrom as h } from "@streamlayer/sdk-web-types";
|
|
|
6
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
7
|
const M = ({
|
|
8
8
|
inviteLink: i,
|
|
9
|
-
inviteCardTitle:
|
|
9
|
+
inviteCardTitle: e,
|
|
10
10
|
inviteCardSubtext: t,
|
|
11
11
|
primaryColor: c,
|
|
12
|
-
className:
|
|
12
|
+
className: a
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const r = f(null), [l, d] = s(r), [m] = p({
|
|
15
15
|
type: "invitation",
|
|
16
16
|
action: "sent",
|
|
17
17
|
payload: {
|
|
18
18
|
from: h.MENU
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
return /* @__PURE__ */ o(y, { className:
|
|
21
|
+
return /* @__PURE__ */ o(y, { className: a, children: [
|
|
22
22
|
/* @__PURE__ */ n(C, { style: { backgroundColor: c }, children: /* @__PURE__ */ n(I, { name: "invite-game-icon" }) }),
|
|
23
23
|
/* @__PURE__ */ o(k, { children: [
|
|
24
|
-
/* @__PURE__ */ n(u, { children:
|
|
24
|
+
/* @__PURE__ */ n(u, { children: e || "" }),
|
|
25
25
|
/* @__PURE__ */ n(b, { children: t || "" })
|
|
26
26
|
] }),
|
|
27
|
-
i && /* @__PURE__ */ o(g, { ref:
|
|
27
|
+
i && /* @__PURE__ */ o(g, { ref: r, "data-a": "intr", onClick: m(() => l(i)), children: [
|
|
28
28
|
/* @__PURE__ */ o(v, { children: [
|
|
29
29
|
/* @__PURE__ */ n(x, { children: "Invite link" }),
|
|
30
30
|
/* @__PURE__ */ n(A, { children: i })
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { SvgIcon as
|
|
1
|
+
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon as m } from "../../../../icons/index.js";
|
|
3
3
|
import { Container as h, Content as s, Title as p, RulesList as C, RulesItem as R, RuleIcon as u, RuleText as x, TermsButton as T } from "./styles.js";
|
|
4
4
|
const b = ({
|
|
5
5
|
rules: e,
|
|
6
|
-
rulesTitle:
|
|
6
|
+
rulesTitle: o,
|
|
7
7
|
termsText: i,
|
|
8
8
|
primaryColor: d,
|
|
9
9
|
openTerms: l
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */ n(p, { children:
|
|
13
|
-
/* @__PURE__ */ n(C, { children: e == null ? void 0 : e.map(({ label: c, icon:
|
|
14
|
-
|
|
10
|
+
}) => /* @__PURE__ */ t(h, { children: [
|
|
11
|
+
/* @__PURE__ */ t(s, { children: [
|
|
12
|
+
/* @__PURE__ */ n(p, { children: o }),
|
|
13
|
+
/* @__PURE__ */ n(C, { children: e == null ? void 0 : e.map(({ label: c, icon: r }, a) => /* @__PURE__ */ t(R, { children: [
|
|
14
|
+
r && /* @__PURE__ */ n(u, { style: { backgroundColor: d }, children: /* @__PURE__ */ n(m, { name: r, "data-icon": r }) }),
|
|
15
15
|
/* @__PURE__ */ n(x, { children: c })
|
|
16
|
-
] },
|
|
16
|
+
] }, a)) })
|
|
17
17
|
] }),
|
|
18
|
-
i && /* @__PURE__ */ n(T, { onClick: l, children: "See Terms and Conditions" })
|
|
18
|
+
i && /* @__PURE__ */ n(T, { "data-a": "intr", onClick: l, children: "See Terms and Conditions" })
|
|
19
19
|
] });
|
|
20
20
|
export {
|
|
21
21
|
b as OnboardingRules
|
|
@@ -25,7 +25,7 @@ const F = ({ title: t, questionType: n, questionTypeData: r }) => /* @__PURE__ *
|
|
|
25
25
|
let a = I;
|
|
26
26
|
n === c.TWEET && (i != null && i.tweetMedia) && (a = i.tweetMedia.image), f === N.NONE && (a = "");
|
|
27
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: [
|
|
28
|
+
return /* @__PURE__ */ o(v, { "data-a": "intr", className: "SL_InApp", onClick: t, children: /* @__PURE__ */ p(A, { style: a ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
29
29
|
a && !m && /* @__PURE__ */ o(u, { src: a, imageMode: f, withVideo: !!l }),
|
|
30
30
|
m && /* @__PURE__ */ o(u, { src: m, fromInsight: !0, withVideo: !!l }),
|
|
31
31
|
n === c.TWEET ? /* @__PURE__ */ o(L, { tweet: i }) : /* @__PURE__ */ o(F, { questionTypeData: d, questionType: n, title: E }),
|
|
@@ -1,14 +1,15 @@
|
|
|
1
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
|
|
2
|
+
import { NotificationContainer as p, IconContainer as h, Icon as l, Body as d, Title as m, TitleIcon as o, Description as f, Button as C, Close as k } from "./styles.js";
|
|
3
3
|
const I = ({
|
|
4
4
|
open: e,
|
|
5
5
|
close: r,
|
|
6
6
|
...t
|
|
7
7
|
}) => {
|
|
8
|
-
var
|
|
8
|
+
var n, c;
|
|
9
9
|
return /* @__PURE__ */ s(
|
|
10
10
|
p,
|
|
11
11
|
{
|
|
12
|
+
"data-a": "intr",
|
|
12
13
|
onClick: () => {
|
|
13
14
|
e == null || e(), t && (t.instantOpen = !0);
|
|
14
15
|
},
|
|
@@ -23,21 +24,21 @@ const I = ({
|
|
|
23
24
|
}
|
|
24
25
|
)
|
|
25
26
|
] }),
|
|
26
|
-
/* @__PURE__ */ s(
|
|
27
|
-
/* @__PURE__ */ s(
|
|
28
|
-
/* @__PURE__ */ i(
|
|
29
|
-
(
|
|
27
|
+
/* @__PURE__ */ s(d, { children: [
|
|
28
|
+
/* @__PURE__ */ s(m, { children: [
|
|
29
|
+
/* @__PURE__ */ i(o, { name: "icon-trophy-solid" }),
|
|
30
|
+
(n = t == null ? void 0 : t.titleCard) == null ? void 0 : n.title
|
|
30
31
|
] }),
|
|
31
32
|
/* @__PURE__ */ s(f, { children: [
|
|
32
|
-
/* @__PURE__ */ i("span", { children: (
|
|
33
|
+
/* @__PURE__ */ i("span", { children: (c = t == null ? void 0 : t.titleCard) == null ? void 0 : c.subtitle }),
|
|
33
34
|
/* @__PURE__ */ i(C, { name: "inapp-button", children: "Play Now" })
|
|
34
35
|
] })
|
|
35
36
|
] }),
|
|
36
37
|
/* @__PURE__ */ i(
|
|
37
38
|
k,
|
|
38
39
|
{
|
|
39
|
-
close: (
|
|
40
|
-
|
|
40
|
+
close: (a) => {
|
|
41
|
+
a == null || a.stopPropagation(), r == null || r();
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
)
|