@streamlayer/react-ui 1.22.1 → 1.22.2
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 +64 -60
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +3 -2
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -12
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/styles.d.ts +5 -1
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/styles.js +1 -1
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +1 -1
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +20 -28
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +5 -17
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +10 -56
- package/lib/app/masters/BetPack/BetPackContent/LoaderScreen/index.d.ts +3 -1
- package/lib/app/masters/BetPack/BetPackContent/LoaderScreen/index.js +9 -6
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +4 -8
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +2 -3
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +18 -24
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +1 -6
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +14 -40
- package/lib/app/masters/BetPack/BetPackContent/constants.js +1 -1
- package/lib/app/masters/BetPack/BetPackContent/index.d.ts +1 -3
- package/lib/app/masters/BetPack/BetPackContent/index.js +106 -106
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +9 -1
- package/lib/app/masters/BetPack/BetPackContent/styles.js +48 -10
- package/lib/app/masters/BetPack/BetPackOverlay/index.js +2 -3
- package/lib/app/masters/BetPack/index.d.ts +2 -2
- package/lib/app/masters/BetPack/index.js +60 -88
- package/lib/app/masters/BetPack/styles.d.ts +0 -1
- package/lib/app/masters/BetPack/styles.js +7 -12
- package/lib/app/masters/Features/Gamification/Tabs.js +1 -1
- package/lib/app/masters/masters.js +58 -67
- package/lib/app/masters/useSdkResponsive.d.ts +0 -2
- package/lib/app/masters/useSdkResponsive.js +0 -2
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +18 -16
- package/lib/ui/gamification/user-statistics/index.js +27 -25
- package/lib/ui/gamification/vote/index.js +1 -1
- package/lib/ui/theme/masters-theme.js +23 -92
- package/lib/ui/theme/theme.js +5 -5
- package/lib/{useVastAds-Dt_tRbpd.js → useVastAds-Bu_IhLJ2.js} +2 -2
- package/lib/utils/decorators/masters.js +49 -11
- package/package.json +15 -15
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +0 -4
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +0 -33
- package/lib/app/masters/useOrientation.d.ts +0 -3
- package/lib/app/masters/useOrientation.js +0 -12
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const n = /* @__PURE__ */ s("
|
|
3
|
-
name: "ScreenButton",
|
|
4
|
-
class: "s1pdy82n",
|
|
5
|
-
propsAsIs: !1
|
|
6
|
-
}), t = /* @__PURE__ */ s("div")({
|
|
2
|
+
const n = /* @__PURE__ */ s("div")({
|
|
7
3
|
name: "ScreenTitle",
|
|
8
|
-
class: "
|
|
4
|
+
class: "s1pdy82n",
|
|
9
5
|
propsAsIs: !1
|
|
10
6
|
}), c = /* @__PURE__ */ s("div")({
|
|
11
7
|
name: "ScreenDescription",
|
|
12
|
-
class: "
|
|
8
|
+
class: "spc0iwi",
|
|
13
9
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
10
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
15
11
|
name: "BetPackContainer",
|
|
16
|
-
class: "
|
|
12
|
+
class: "b18vssq2",
|
|
17
13
|
propsAsIs: !1
|
|
18
14
|
});
|
|
19
15
|
export {
|
|
20
|
-
|
|
21
|
-
n as ScreenButton,
|
|
16
|
+
i as BetPackContainer,
|
|
22
17
|
c as ScreenDescription,
|
|
23
|
-
|
|
18
|
+
n as ScreenTitle
|
|
24
19
|
};
|
|
@@ -3,7 +3,7 @@ import { TabsContainer as s, SDKWhiteContainer as m, UserSummaryContainer as i,
|
|
|
3
3
|
import { QuestionsList as u } from "./QuestionsList.js";
|
|
4
4
|
import { UserSummary as a } from "./UserSummary.js";
|
|
5
5
|
const h = ({ gamification: r, className: t, style: o }) => /* @__PURE__ */ n(s, { className: t, style: o, children: [
|
|
6
|
-
/* @__PURE__ */ e(m, { style: { paddingTop: "
|
|
6
|
+
/* @__PURE__ */ e(m, { style: { paddingTop: "16px" }, children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(a, { userSummary: r.userSummary }) }) }),
|
|
7
7
|
/* @__PURE__ */ e(p, { style: { flex: 1 }, children: /* @__PURE__ */ e(u, { openQuestion: r.openQuestion, store: r.feedList.getStore() }) })
|
|
8
8
|
] });
|
|
9
9
|
export {
|
|
@@ -1,99 +1,90 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { cx as A } from "@linaria/core";
|
|
3
|
-
import { SDKContainer as
|
|
4
|
-
import { useSdkScroll as
|
|
5
|
-
import { useSdkFeature as
|
|
6
|
-
import { useAnalyticsListener as
|
|
7
|
-
import
|
|
8
|
-
import { useState as b, useMemo as y, useCallback as C, useRef as p, useEffect as S } from "react";
|
|
3
|
+
import { SDKContainer as N, SDKScrollContainer as b } from "./styles.js";
|
|
4
|
+
import { useSdkScroll as h } from "./useSdkScroll.js";
|
|
5
|
+
import { useSdkFeature as x } from "../useSdkFeature.js";
|
|
6
|
+
import { useAnalyticsListener as d, newTabLinkListener as v } from "../../hooks/analytics.js";
|
|
7
|
+
import { useState as y, useMemo as C, useCallback as P, useRef as p, useEffect as S } from "react";
|
|
9
8
|
import { useStore as m } from "@streamlayer/react-polyfills";
|
|
10
|
-
import { FeatureType as
|
|
9
|
+
import { FeatureType as F } from "@streamlayer/sdk-web-types";
|
|
11
10
|
import { resetCss as u } from "../../ui/theme/theme.js";
|
|
12
|
-
import { BetPackOverlay as
|
|
13
|
-
import { ActiveFeature as
|
|
14
|
-
import { SDKHeader as
|
|
15
|
-
import { SDKNotifications as
|
|
16
|
-
import { MastersContext as
|
|
17
|
-
import {
|
|
18
|
-
import { StreamLayerMastersThemeProvider as
|
|
19
|
-
const
|
|
20
|
-
const [,
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
},
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
|
|
11
|
+
import { BetPackOverlay as E } from "./BetPack/index.js";
|
|
12
|
+
import { ActiveFeature as L, StandaloneFeature as M } from "./Features/index.js";
|
|
13
|
+
import { SDKHeader as B } from "./Header/index.js";
|
|
14
|
+
import { SDKNotifications as I } from "./Notifications/index.js";
|
|
15
|
+
import { MastersContext as g } from "./useMastersContext.js";
|
|
16
|
+
import { useSdkResponsive as D } from "./useSdkResponsive.js";
|
|
17
|
+
import { StreamLayerMastersThemeProvider as re } from "../../ui/theme/masters.js";
|
|
18
|
+
const K = ({ sdk: e, className: t }) => {
|
|
19
|
+
const [, n] = x(e);
|
|
20
|
+
return /* @__PURE__ */ o(L, { className: t, feature: n, sdk: e });
|
|
21
|
+
}, w = ({ sdk: e, className: t, appNode: n, responsiveStore: c }) => {
|
|
22
|
+
const l = m(e.featuresList.getStore());
|
|
23
|
+
return l ? Array.from(l, (s) => {
|
|
24
|
+
const a = e.getFeature(s);
|
|
25
|
+
return a ? /* @__PURE__ */ o(
|
|
26
|
+
M,
|
|
28
27
|
{
|
|
29
|
-
responsiveStore:
|
|
28
|
+
responsiveStore: c,
|
|
30
29
|
className: t,
|
|
31
|
-
appNode:
|
|
32
|
-
feature:
|
|
30
|
+
appNode: n,
|
|
31
|
+
feature: a,
|
|
33
32
|
sdk: e
|
|
34
33
|
},
|
|
35
|
-
|
|
34
|
+
s
|
|
36
35
|
) : null;
|
|
37
36
|
}) : null;
|
|
38
|
-
},
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
r(!d(o.size));
|
|
44
|
-
}, 200);
|
|
45
|
-
return window.addEventListener("resize", n), () => {
|
|
46
|
-
window.removeEventListener("resize", n);
|
|
47
|
-
};
|
|
48
|
-
}, []), h(i, { enabled: !0, event: "click", listener: F }), /* @__PURE__ */ a(I, { ref: i, ...e, isMobile: t });
|
|
49
|
-
}, j = ({ sdk: e }) => {
|
|
50
|
-
const t = p(null), r = m(e.status), i = m(e.sdkStore.slStreamId), n = p(null), [o] = K(t), [c, l] = M(t, o), s = r === "ready" && !!i.data;
|
|
37
|
+
}, G = (e) => {
|
|
38
|
+
const t = p(null);
|
|
39
|
+
return d(t, { enabled: !0, event: "click", listener: v }), /* @__PURE__ */ o(E, { ref: t, ...e });
|
|
40
|
+
}, O = ({ sdk: e }) => {
|
|
41
|
+
const t = p(null), n = m(e.status), c = m(e.sdkStore.slStreamId), l = p(null), [s] = D(t), [a, i] = h(t, s), r = n === "ready" && !!c.data;
|
|
51
42
|
return S(() => {
|
|
52
43
|
window.requestAnimationFrame(() => {
|
|
53
44
|
e.initializeApp().then(() => {
|
|
54
|
-
e.openFeature(
|
|
45
|
+
e.openFeature(F.GAMES);
|
|
55
46
|
});
|
|
56
47
|
});
|
|
57
|
-
}, [e]),
|
|
48
|
+
}, [e]), d(t, { enabled: !0, event: "click", listener: v }), S(() => {
|
|
58
49
|
import("./Features/Gamification/gamification-feature.js");
|
|
59
|
-
}, []), /* @__PURE__ */ f(
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ f(
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
}, []), /* @__PURE__ */ f(N, { ref: t, children: [
|
|
51
|
+
/* @__PURE__ */ o(B, { className: A(u), ref: l }),
|
|
52
|
+
/* @__PURE__ */ f(b, { className: "sl-hide-on-modal", ref: a, children: [
|
|
53
|
+
r && /* @__PURE__ */ o(
|
|
54
|
+
I,
|
|
64
55
|
{
|
|
65
56
|
sdk: e,
|
|
66
|
-
scrollNode:
|
|
67
|
-
headerNode:
|
|
57
|
+
scrollNode: a,
|
|
58
|
+
headerNode: l,
|
|
68
59
|
appNode: t,
|
|
69
|
-
scrollStore:
|
|
70
|
-
responsiveStore:
|
|
60
|
+
scrollStore: i,
|
|
61
|
+
responsiveStore: s
|
|
71
62
|
}
|
|
72
63
|
),
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
r && /* @__PURE__ */ o(K, { className: u, sdk: e }),
|
|
65
|
+
r && /* @__PURE__ */ o(w, { responsiveStore: s, appNode: t, className: u, sdk: e })
|
|
75
66
|
] })
|
|
76
67
|
] });
|
|
77
|
-
},
|
|
78
|
-
const [
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
|
|
68
|
+
}, k = ({ sdk: e, betPack: t }) => {
|
|
69
|
+
const [n, c] = y(t), s = !!m(e.userId()), a = C(() => ({ sdk: e }), [e]), i = P(() => {
|
|
70
|
+
c(!1);
|
|
71
|
+
const r = e == null ? void 0 : e.getFeature(F.GAMES);
|
|
72
|
+
r == null || r.closeQuestion();
|
|
82
73
|
}, [e]);
|
|
83
|
-
return /* @__PURE__ */ f(
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
return /* @__PURE__ */ f(g.Provider, { value: a, children: [
|
|
75
|
+
n && s && /* @__PURE__ */ o(
|
|
76
|
+
G,
|
|
86
77
|
{
|
|
87
78
|
sdk: e,
|
|
88
|
-
onEvent: ({ type:
|
|
79
|
+
onEvent: ({ type: r }) => r === "slOpenGameCenter" ? i() : () => {
|
|
89
80
|
},
|
|
90
|
-
close: () =>
|
|
81
|
+
close: () => i()
|
|
91
82
|
}
|
|
92
83
|
),
|
|
93
|
-
!
|
|
84
|
+
!n && /* @__PURE__ */ o(O, { sdk: e })
|
|
94
85
|
] });
|
|
95
86
|
};
|
|
96
87
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
k as MastersApp,
|
|
89
|
+
re as StreamLayerMastersThemeProvider
|
|
99
90
|
};
|
|
@@ -10,8 +10,6 @@ type ResponsiveData = {
|
|
|
10
10
|
sdkInView: boolean;
|
|
11
11
|
sdkInDesktopView: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare const getScreenSize: () => ResponsiveData["screen"];
|
|
14
|
-
export declare const checkSdkInDesktopView: (screenSize: number) => boolean;
|
|
15
13
|
export type ResponsiveStore = MapStore<ResponsiveData>;
|
|
16
14
|
export declare const useSdkResponsive: (appNode: AppNodeRef) => [ResponsiveStore];
|
|
17
15
|
export {};
|