@streamlayer/react-ui 1.18.1 → 1.19.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/app/app/Notifications/index.js +1 -1
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +12 -8
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +42 -14
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +12 -0
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +40 -20
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +8 -4
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +4 -0
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +27 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +21 -19
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +22 -17
- package/lib/app/masters/BetPack/BetPackContent/index.js +88 -62
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/styles.js +8 -7
- package/lib/app/masters/BetPack/index.js +59 -53
- package/lib/app/masters/Features/Gamification/Question.js +3 -3
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -7
- package/lib/app/masters/Features/Gamification/Tabs.js +9 -42
- package/lib/app/masters/Features/Gamification/UserSummary.js +15 -14
- package/lib/app/masters/Features/Gamification/index.d.ts +1 -6
- package/lib/app/masters/Features/Gamification/index.js +37 -76
- package/lib/app/masters/Features/index.d.ts +1 -6
- package/lib/app/masters/Features/index.js +15 -25
- package/lib/app/masters/Header/index.d.ts +3 -0
- package/lib/app/masters/Header/index.js +38 -0
- package/lib/app/masters/Notifications/index.js +1 -1
- package/lib/app/masters/masters.d.ts +1 -0
- package/lib/app/masters/masters.js +75 -92
- package/lib/app/masters/story/index.d.ts +1 -0
- package/lib/app/masters/story/index.js +21 -22
- package/lib/app/masters/styles.d.ts +0 -10
- package/lib/app/masters/styles.js +13 -23
- package/lib/app/masters/useSdkResponsive.js +1 -1
- package/lib/app/masters/useSdkScroll.js +1 -1
- package/lib/app/useClipboardCopy.js +1 -1
- package/lib/app/useSdkResponsive.js +1 -1
- package/lib/app/useSdkScroll.js +1 -1
- package/lib/assets/style.css +1 -1
- package/lib/index-BEm7B1u1.js +72 -0
- package/lib/index-DALxy-8N.js +5437 -0
- package/lib/ui/gamification/user-statistics/index.d.ts +1 -0
- package/lib/ui/gamification/user-statistics/index.js +47 -39
- package/lib/ui/gamification/user-statistics/styles.d.ts +2 -0
- package/lib/ui/gamification/user-statistics/styles.js +34 -24
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/index.js +60 -47
- package/lib/ui/gamification/vote/feedback/styles.d.ts +12 -0
- package/lib/ui/gamification/vote/feedback/styles.js +47 -27
- package/lib/ui/gamification/vote/index.js +145 -136
- package/lib/ui/gamification/vote/styles.d.ts +3 -1
- package/lib/ui/gamification/vote/styles.js +42 -32
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/index.js +59 -60
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +16 -11
- package/lib/ui/icons/index.d.ts +3 -0
- package/lib/ui/icons/index.js +69 -51
- package/lib/ui/loader/index.js +4 -3
- package/lib/ui/modal/index.js +1 -1
- package/lib/ui/theme/masters-theme.js +152 -32
- package/lib/ui/theme/theme.js +66 -20
- package/package.json +16 -15
- package/lib/app/masters/Features/Gamification/Friends.d.ts +0 -3
- package/lib/app/masters/Features/Gamification/Friends.js +0 -19
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -8
- package/lib/app/masters/Features/Gamification/Leaderboard.js +0 -56
- package/lib/index-B1QdimmR.js +0 -19047
- package/lib/index-CZvwzN5o.js +0 -75
- package/lib/index-xuotMAFm.js +0 -118
|
@@ -1,84 +1,90 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cx as p } from "@linaria/core";
|
|
3
|
+
import C from "lodash.throttle";
|
|
4
|
+
import { useState as g, useCallback as S, memo as H, useMemo as B, useRef as N, useEffect as A } from "react";
|
|
5
|
+
import { useStore as P } from "@streamlayer/react-polyfills";
|
|
6
|
+
import { FeatureType as b } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { BetPackContent as L } from "./BetPackContent/index.js";
|
|
8
|
+
import { EmergencyScreen as z } from "./BetPackContent/EmergencyScreen/index.js";
|
|
9
|
+
import { LoaderScreen as F } from "./BetPackContent/LoaderScreen/index.js";
|
|
10
|
+
import { BetPackContainer as I } from "./styles.js";
|
|
11
|
+
import { defaultEventHandler as O } from "./utils.js";
|
|
12
|
+
import { SvgIcon as x } from "../../../ui/icons/index.js";
|
|
13
|
+
import { Container as R, Header as j, HeaderTitle as E, CloseButton as M, Main as T, Footer as G, SlideSwitchButton as v, IconArrowPrev as U, buttonAvailable as y, IconArrowNext as Y } from "./BetPackOverlay/styles.js";
|
|
14
|
+
const ne = ({ sdk: l, onEvent: o, close: u, isMobile: c }) => {
|
|
15
|
+
const [t, h] = g(), [e, a] = g(), i = S(
|
|
15
16
|
(n) => {
|
|
16
17
|
if (n.type === "slBetPackReady") {
|
|
17
|
-
const { next: s, prev: d, current:
|
|
18
|
-
h({ next: s, prev: d }), a({
|
|
18
|
+
const { next: s, prev: d, current: m, canNext: k, canPrev: w } = n.payload || {};
|
|
19
|
+
h({ next: s, prev: d }), a({
|
|
20
|
+
current: m,
|
|
21
|
+
canPrev: w,
|
|
22
|
+
canNext: k
|
|
23
|
+
});
|
|
19
24
|
}
|
|
20
25
|
if (n.type === "slBetPackChangeCard") {
|
|
21
|
-
const { current: s, canNext: d, canPrev:
|
|
22
|
-
a({ current: s, canNext: d, canPrev:
|
|
26
|
+
const { current: s, canNext: d, canPrev: m } = n.payload || {};
|
|
27
|
+
a({ current: s, canNext: d, canPrev: m });
|
|
23
28
|
}
|
|
24
|
-
|
|
29
|
+
o == null || o(n);
|
|
25
30
|
},
|
|
26
|
-
[
|
|
31
|
+
[o]
|
|
27
32
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ r(
|
|
33
|
+
return /* @__PURE__ */ f(R, { children: [
|
|
34
|
+
/* @__PURE__ */ f(j, { children: [
|
|
35
|
+
/* @__PURE__ */ f(E, { children: [
|
|
36
|
+
/* @__PURE__ */ r(x, { name: "icon-trophy-bet-pack" }),
|
|
32
37
|
"LiveMatch Experience",
|
|
33
38
|
" "
|
|
34
39
|
] }),
|
|
35
|
-
/* @__PURE__ */ r(
|
|
40
|
+
/* @__PURE__ */ r(M, { onClick: u, children: /* @__PURE__ */ r(x, { name: "icon-close-btn-gray" }) })
|
|
36
41
|
] }),
|
|
37
42
|
/* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
|
|
38
|
-
|
|
43
|
+
q,
|
|
39
44
|
{
|
|
40
|
-
sdk:
|
|
41
|
-
onEvent:
|
|
42
|
-
swipeable: !!
|
|
43
|
-
centerPadding:
|
|
44
|
-
heightOffset:
|
|
45
|
+
sdk: l,
|
|
46
|
+
onEvent: i,
|
|
47
|
+
swipeable: !!c,
|
|
48
|
+
centerPadding: c ? "18px" : "30px",
|
|
49
|
+
heightOffset: c ? 0 : 48
|
|
45
50
|
}
|
|
46
51
|
) }),
|
|
47
|
-
!
|
|
48
|
-
/* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(
|
|
49
|
-
/* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(
|
|
52
|
+
!c && /* @__PURE__ */ f(G, { children: [
|
|
53
|
+
/* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(U, { name: "iconArrowPrev", className: p((e == null ? void 0 : e.canPrev) && y) }) }),
|
|
54
|
+
/* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(Y, { name: "iconArrowPrev", className: p((e == null ? void 0 : e.canNext) && y) }) })
|
|
50
55
|
] })
|
|
51
56
|
] });
|
|
52
|
-
},
|
|
53
|
-
const h =
|
|
54
|
-
|
|
57
|
+
}, q = H(({ sdk: l, swipeable: o = !0, heightOffset: u = 65, onEvent: c = O, centerPadding: t }) => {
|
|
58
|
+
const h = P(l.featuresList.getStore()), e = B(() => l.getFeature(b.GAMES), [h]), a = P(l.getUserStore()), i = N(null), [n, s] = g(), d = S(() => {
|
|
59
|
+
i.current && s(i.current.clientHeight);
|
|
55
60
|
}, []);
|
|
56
61
|
return A(() => {
|
|
57
|
-
const
|
|
58
|
-
|
|
62
|
+
const m = C(() => {
|
|
63
|
+
i.current && s(i.current.clientHeight);
|
|
64
|
+
}, 200);
|
|
65
|
+
return window.addEventListener("resize", m), () => {
|
|
66
|
+
window.removeEventListener("resize", m);
|
|
59
67
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
}, []), a.data ? e ? /* @__PURE__ */ r(F, { ref: c, children: /* @__PURE__ */ r(
|
|
64
|
-
b,
|
|
68
|
+
}, []), a.data ? e ? /* @__PURE__ */ r(I, { ref: i, className: p("betPack", o && "isMobile"), children: /* @__PURE__ */ r(
|
|
69
|
+
L,
|
|
65
70
|
{
|
|
66
71
|
gamification: e,
|
|
67
|
-
onEvent:
|
|
68
|
-
swipeable:
|
|
72
|
+
onEvent: c,
|
|
73
|
+
swipeable: o,
|
|
69
74
|
centerPadding: t,
|
|
70
75
|
changeHeightOnInit: d,
|
|
71
|
-
height: n ? n -
|
|
76
|
+
height: n ? n - u : void 0
|
|
72
77
|
}
|
|
73
78
|
) }) : /* @__PURE__ */ r("div", { children: "no gamification" }) : a.error && !a.loading ? /* @__PURE__ */ r(
|
|
74
|
-
|
|
79
|
+
z,
|
|
75
80
|
{
|
|
76
|
-
actionFn: () =>
|
|
77
|
-
description:
|
|
81
|
+
actionFn: () => c({ type: "slHardRefresh" }),
|
|
82
|
+
description: `You are not authorized to
|
|
83
|
+
view this resource.`
|
|
78
84
|
}
|
|
79
|
-
) : /* @__PURE__ */ r(
|
|
85
|
+
) : /* @__PURE__ */ r(F, {});
|
|
80
86
|
});
|
|
81
87
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
q as BetPack,
|
|
89
|
+
ne as BetPackOverlay
|
|
84
90
|
};
|
|
@@ -41,7 +41,7 @@ const h = /* @__PURE__ */ l("div")({
|
|
|
41
41
|
openedQuestion: i,
|
|
42
42
|
isLoading: !!o
|
|
43
43
|
}) : /* @__PURE__ */ e(b, {});
|
|
44
|
-
},
|
|
44
|
+
}, H = ({
|
|
45
45
|
gamification: t
|
|
46
46
|
}) => {
|
|
47
47
|
var i;
|
|
@@ -60,10 +60,10 @@ const h = /* @__PURE__ */ l("div")({
|
|
|
60
60
|
}), o !== "question" && /* @__PURE__ */ e(x, {
|
|
61
61
|
openedQuestion: r
|
|
62
62
|
}), /* @__PURE__ */ e(p, {
|
|
63
|
-
|
|
63
|
+
mastersApp: !0
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
H as Question
|
|
69
69
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
2
|
-
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
|
-
import { ScrollStore } from '../../useSdkScroll';
|
|
4
1
|
import { Gamification } from '@streamlayer/feature-gamification';
|
|
5
2
|
export declare const Tabs: React.FC<{
|
|
6
|
-
appNode: AppNodeRef;
|
|
7
3
|
gamification: Gamification;
|
|
8
|
-
scrollStore: ScrollStore;
|
|
9
|
-
scrollNode: ScrollNodeRef;
|
|
10
|
-
responsiveStore: ResponsiveStore;
|
|
11
4
|
className?: string;
|
|
12
5
|
style?: React.CSSProperties;
|
|
13
6
|
}>;
|
|
@@ -1,44 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { TabsContainer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { UserSummary as O } from "./UserSummary.js";
|
|
10
|
-
const q = ({ gamification: s, className: f, scrollStore: t, scrollNode: l, appNode: c, style: b, responsiveStore: n }) => {
|
|
11
|
-
const { tabsShown: d } = u(t, { keys: ["tabsShown"] }), [i, w] = S(a.HOME), [, y] = E(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
|
|
12
|
-
y(() => {
|
|
13
|
-
var p;
|
|
14
|
-
w(r), m === !1 && (((p = c.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && P(c, g.size, { behavior: "instant" });
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
V(() => t.subscribe((r) => {
|
|
18
|
-
if (r.scrollPosition === 0) {
|
|
19
|
-
t.setKey("tabsShown", !0);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
n.get().sdkInDesktopView ? t.setKey("tabsShown", r.scrollDirection === "backward") : t.setKey("tabsShown", r.scrollDirection === "forward");
|
|
23
|
-
}), [t, n]);
|
|
24
|
-
let o = "0px";
|
|
25
|
-
return m ? o = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : o = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ h(D, { className: f, style: b, children: [
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
T,
|
|
28
|
-
{
|
|
29
|
-
style: {
|
|
30
|
-
top: o
|
|
31
|
-
},
|
|
32
|
-
children: /* @__PURE__ */ e(K, { activePage: i, toggleActivePage: k })
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
i === a.HOME && /* @__PURE__ */ h(x, { children: [
|
|
36
|
-
/* @__PURE__ */ e(v, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(O, { userSummary: s.userSummary }) }) }),
|
|
37
|
-
/* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(F, { openQuestion: s.openQuestion, store: s.feedList.getStore() }) })
|
|
38
|
-
] }),
|
|
39
|
-
i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(L, { scrollStore: t, scrollNode: l, gamification: s }) })
|
|
40
|
-
] });
|
|
41
|
-
};
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TabsContainer as s, SDKWhiteContainer as m, UserSummaryContainer as i, SDKContentContainer as p } from "../../styles.js";
|
|
3
|
+
import { QuestionsList as u } from "./QuestionsList.js";
|
|
4
|
+
import { UserSummary as a } from "./UserSummary.js";
|
|
5
|
+
const h = ({ gamification: r, className: t, style: o }) => /* @__PURE__ */ n(s, { className: t, style: o, children: [
|
|
6
|
+
/* @__PURE__ */ e(m, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(a, { userSummary: r.userSummary }) }) }),
|
|
7
|
+
/* @__PURE__ */ e(p, { style: { flex: 1 }, children: /* @__PURE__ */ e(u, { openQuestion: r.openQuestion, store: r.feedList.getStore() }) })
|
|
8
|
+
] });
|
|
42
9
|
export {
|
|
43
|
-
|
|
10
|
+
h as Tabs
|
|
44
11
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { UserStatistics as
|
|
4
|
-
const
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
import { useStore as e } from "@streamlayer/react-polyfills";
|
|
3
|
+
import { UserStatistics as s } from "../../../../ui/gamification/user-statistics/index.js";
|
|
4
|
+
const n = ({ userSummary: o }) => {
|
|
5
|
+
var t;
|
|
6
|
+
const r = e(o.$store);
|
|
7
|
+
return /* @__PURE__ */ m(
|
|
8
|
+
s,
|
|
9
|
+
{
|
|
10
|
+
hideFriendsRank: !0,
|
|
11
|
+
loading: !(r != null && r.summary),
|
|
12
|
+
...r == null ? void 0 : r.summary,
|
|
13
|
+
successRate: (t = r == null ? void 0 : r.percentage) == null ? void 0 : t.correct
|
|
14
|
+
}
|
|
15
|
+
);
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
n as UserSummary
|
|
18
19
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { AppNodeRef
|
|
1
|
+
import { AppNodeRef } from '../../..';
|
|
2
2
|
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
|
-
import { ScrollStore } from '../../useSdkScroll';
|
|
4
3
|
import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
|
|
5
4
|
export declare const GamificationOverlay: React.FC<{
|
|
6
5
|
gamification: GamificationClass;
|
|
7
6
|
className?: string;
|
|
8
|
-
scrollStore: ScrollStore;
|
|
9
|
-
responsiveStore: ResponsiveStore;
|
|
10
|
-
appNode: AppNodeRef;
|
|
11
|
-
scrollNode: ScrollNodeRef;
|
|
12
7
|
}>;
|
|
13
8
|
/**
|
|
14
9
|
* Standalone version of the gamification overlay
|
|
@@ -1,88 +1,49 @@
|
|
|
1
|
-
import { jsx as n
|
|
2
|
-
import { styled as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { Question as I } from "./Question.js";
|
|
11
|
-
import { Tabs as v } from "./Tabs.js";
|
|
12
|
-
const x = () => y, p = /* @__PURE__ */ m(x())({
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { styled as u } from "@linaria/react";
|
|
3
|
+
import { useHideTransition as c } from "../../../../hooks/showIn.js";
|
|
4
|
+
import { useStore as t } from "@streamlayer/react-polyfills";
|
|
5
|
+
import { ModalPortal as d } from "../../../../ui/modal/index.js";
|
|
6
|
+
import { ShowIn as l } from "../../../../ui/show-in/index.js";
|
|
7
|
+
import { Question as f } from "./Question.js";
|
|
8
|
+
import { Tabs as k } from "./Tabs.js";
|
|
9
|
+
const h = () => l, y = /* @__PURE__ */ u(h())({
|
|
13
10
|
name: "OpenedContainer",
|
|
14
11
|
class: "o1seszvt",
|
|
15
12
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, z = ({
|
|
27
|
-
gamification: e,
|
|
28
|
-
scrollStore: r,
|
|
29
|
-
className: o,
|
|
30
|
-
appNode: i,
|
|
31
|
-
scrollNode: s,
|
|
32
|
-
responsiveStore: t
|
|
33
|
-
}) => /* @__PURE__ */ n(v, {
|
|
34
|
-
appNode: i,
|
|
35
|
-
scrollStore: r,
|
|
36
|
-
scrollNode: s,
|
|
37
|
-
className: o,
|
|
38
|
-
gamification: e,
|
|
39
|
-
responsiveStore: t
|
|
40
|
-
}), E = ({
|
|
41
|
-
gamification: e,
|
|
42
|
-
className: r,
|
|
43
|
-
appNode: o,
|
|
13
|
+
}), A = ({
|
|
14
|
+
gamification: o,
|
|
15
|
+
className: e
|
|
16
|
+
}) => /* @__PURE__ */ n(k, {
|
|
17
|
+
className: e,
|
|
18
|
+
gamification: o
|
|
19
|
+
}), D = ({
|
|
20
|
+
gamification: o,
|
|
21
|
+
className: e,
|
|
22
|
+
appNode: r,
|
|
44
23
|
responsiveStore: i
|
|
45
24
|
}) => {
|
|
46
|
-
const s =
|
|
47
|
-
sdkInDesktopView:
|
|
48
|
-
} =
|
|
25
|
+
const s = t(o.openedQuestion.$store), {
|
|
26
|
+
sdkInDesktopView: m
|
|
27
|
+
} = t(i, {
|
|
49
28
|
keys: ["sdkInDesktopView"]
|
|
50
29
|
}), {
|
|
51
|
-
hiding:
|
|
52
|
-
onAnimationEnd:
|
|
53
|
-
} =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className: r,
|
|
65
|
-
hiding: c,
|
|
66
|
-
onAnimationEnd: l,
|
|
67
|
-
children: /* @__PURE__ */ f(O, {
|
|
68
|
-
children: [/* @__PURE__ */ n(k, {
|
|
69
|
-
label: "Friend's Rank",
|
|
70
|
-
close: e.closeUser
|
|
71
|
-
}), /* @__PURE__ */ n(h, {
|
|
72
|
-
children: /* @__PURE__ */ n(S, {
|
|
73
|
-
...t,
|
|
74
|
-
successRate: b(t)
|
|
75
|
-
})
|
|
76
|
-
})]
|
|
30
|
+
hiding: a,
|
|
31
|
+
onAnimationEnd: p
|
|
32
|
+
} = c();
|
|
33
|
+
return !r.current || !s ? null : /* @__PURE__ */ n(d, {
|
|
34
|
+
container: r,
|
|
35
|
+
useContainer: !m,
|
|
36
|
+
children: /* @__PURE__ */ n(y, {
|
|
37
|
+
className: e,
|
|
38
|
+
hiding: a,
|
|
39
|
+
onAnimationEnd: p,
|
|
40
|
+
children: /* @__PURE__ */ n(f, {
|
|
41
|
+
gamification: o
|
|
42
|
+
})
|
|
77
43
|
})
|
|
78
|
-
}) : null;
|
|
79
|
-
return /* @__PURE__ */ n(U, {
|
|
80
|
-
container: o,
|
|
81
|
-
useContainer: !d,
|
|
82
|
-
children: u
|
|
83
44
|
});
|
|
84
45
|
};
|
|
85
46
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
47
|
+
A as GamificationOverlay,
|
|
48
|
+
D as GamificationOverlayStandalone
|
|
88
49
|
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { AppNodeRef
|
|
1
|
+
import { AppNodeRef } from '../..';
|
|
2
2
|
import { ResponsiveStore } from '../useSdkResponsive';
|
|
3
|
-
import { ScrollStore } from '../useSdkScroll';
|
|
4
3
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
5
4
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
6
5
|
/** render feature by type */
|
|
7
6
|
export declare const ActiveFeature: React.FC<{
|
|
8
7
|
sdk: StreamLayerSDK;
|
|
9
8
|
feature: Features | null;
|
|
10
|
-
scrollStore: ScrollStore;
|
|
11
|
-
responsiveStore: ResponsiveStore;
|
|
12
|
-
appNode: AppNodeRef;
|
|
13
|
-
scrollNode: ScrollNodeRef;
|
|
14
9
|
className?: string;
|
|
15
10
|
}>;
|
|
16
11
|
/** render feature by type */
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { FeatureType as
|
|
4
|
-
import { FeatureProvider as
|
|
5
|
-
import { GamificationOverlayStandalone as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
d,
|
|
9
|
-
{
|
|
10
|
-
appNode: o,
|
|
11
|
-
scrollStore: e,
|
|
12
|
-
scrollNode: a,
|
|
13
|
-
className: n,
|
|
14
|
-
responsiveStore: l,
|
|
15
|
-
gamification: t
|
|
16
|
-
}
|
|
17
|
-
) }) : null, [i, t, n, l, e, a, o]);
|
|
2
|
+
import { lazy as l, useMemo as a, Suspense as m } from "react";
|
|
3
|
+
import { FeatureType as o } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { FeatureProvider as u } from "./FeatureProvider.js";
|
|
5
|
+
import { GamificationOverlayStandalone as f } from "./Gamification/index.js";
|
|
6
|
+
const c = l(() => import("./Gamification/gamification-feature.js")), h = ({ sdk: e, feature: t, className: i }) => {
|
|
7
|
+
const n = a(() => t && t.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(u, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(c, { className: i, gamification: t }) }) : null, [e, t, i]);
|
|
18
8
|
return /* @__PURE__ */ r(
|
|
19
|
-
|
|
9
|
+
m,
|
|
20
10
|
{
|
|
21
11
|
fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
22
|
-
children:
|
|
12
|
+
children: n
|
|
23
13
|
}
|
|
24
14
|
);
|
|
25
|
-
},
|
|
26
|
-
|
|
15
|
+
}, v = ({ feature: e, className: t, appNode: i, responsiveStore: n }) => e && e.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(
|
|
16
|
+
f,
|
|
27
17
|
{
|
|
28
18
|
className: t,
|
|
29
|
-
appNode:
|
|
30
|
-
responsiveStore:
|
|
31
|
-
gamification:
|
|
19
|
+
appNode: i,
|
|
20
|
+
responsiveStore: n,
|
|
21
|
+
gamification: e
|
|
32
22
|
}
|
|
33
23
|
) : null;
|
|
34
24
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
h as ActiveFeature,
|
|
26
|
+
v as StandaloneFeature
|
|
37
27
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cx as a } from "@linaria/core";
|
|
3
|
+
import { styled as s } from "@linaria/react";
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { SvgIcon as c } from "../../../ui/icons/index.js";
|
|
6
|
+
const i = /* @__PURE__ */ s("div")({
|
|
7
|
+
name: "Navigation",
|
|
8
|
+
class: "n1o1tw60",
|
|
9
|
+
propsAsIs: !1
|
|
10
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
11
|
+
name: "Container",
|
|
12
|
+
class: "co2rstw",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
15
|
+
name: "Title",
|
|
16
|
+
class: "t1bqnx9c",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
}), l = () => c, d = /* @__PURE__ */ s(l())({
|
|
19
|
+
name: "HeaderIcon",
|
|
20
|
+
class: "hlc2pcy",
|
|
21
|
+
propsAsIs: !0
|
|
22
|
+
}), f = "h1aqxe8k", g = t(({
|
|
23
|
+
className: o
|
|
24
|
+
}, n) => /* @__PURE__ */ r(i, {
|
|
25
|
+
className: a(o, f),
|
|
26
|
+
children: [/* @__PURE__ */ e(m, {
|
|
27
|
+
children: /* @__PURE__ */ r(p, {
|
|
28
|
+
children: [/* @__PURE__ */ e(d, {
|
|
29
|
+
name: "icon-trivia-transparent"
|
|
30
|
+
}), "Game Center"]
|
|
31
|
+
})
|
|
32
|
+
}), /* @__PURE__ */ e("div", {
|
|
33
|
+
ref: n
|
|
34
|
+
})]
|
|
35
|
+
}));
|
|
36
|
+
export {
|
|
37
|
+
g as SDKHeader
|
|
38
|
+
};
|
|
@@ -3,7 +3,7 @@ import { cx as N } from "@linaria/core";
|
|
|
3
3
|
import { useMastersContext as T } from "../useMastersContext.js";
|
|
4
4
|
import { scrollIntoAppView as q } from "../useSdkScroll.js";
|
|
5
5
|
import { useState as p, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
|
|
6
|
-
import { r as b } from "../../../index-
|
|
6
|
+
import { r as b } from "../../../index-DALxy-8N.js";
|
|
7
7
|
import { useStore as g } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
|
|
9
9
|
import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
|