@streamlayer/react-ui 1.19.1 → 1.21.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 +74 -72
- package/lib/app/app/Points/index.js +21 -14
- package/lib/app/app/index.js +79 -89
- package/lib/app/app/useApp.d.ts +2 -1
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +2 -0
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +11 -10
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +22 -18
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +7 -7
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +2 -1
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +31 -22
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +11 -11
- package/lib/app/masters/BetPack/BetPackContent/index.js +61 -49
- package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
- package/lib/app/masters/BetPack/BetPackOverlay/index.js +3 -2
- package/lib/app/masters/BetPack/index.js +80 -75
- package/lib/app/masters/Features/Gamification/index.d.ts +0 -2
- package/lib/app/masters/Features/Gamification/index.js +29 -34
- package/lib/app/masters/Features/index.d.ts +0 -2
- package/lib/app/masters/Features/index.js +4 -12
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +0 -1
- package/lib/app/masters/Notifications/Onboarding/index.js +42 -43
- package/lib/app/masters/Notifications/index.js +50 -55
- package/lib/app/masters/Points/index.js +24 -18
- package/lib/app/masters/masters.js +70 -92
- package/lib/app/masters/useOrientation.d.ts +3 -0
- package/lib/app/masters/useOrientation.js +12 -0
- package/lib/app/masters/useSdkResponsive.d.ts +2 -0
- package/lib/app/masters/useSdkResponsive.js +3 -1
- package/lib/app/masters/useSdkScroll.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/hooks/analytics.js +17 -42
- package/lib/index-CLJzLXks.js +64 -0
- package/lib/reset.css +1 -1
- package/lib/ui/advertisement/notification/index.js +8 -8
- package/lib/ui/advertisement/overlay/externalAd/index.js +40310 -114
- package/lib/ui/advertisement/overlay/externalAd/styles.d.ts +8 -0
- package/lib/ui/advertisement/overlay/externalAd/styles.js +39 -0
- package/lib/ui/close-btn/index.d.ts +2 -0
- package/lib/ui/close-btn/index.js +40 -32
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +48 -33
- package/lib/ui/gamification/vote/feedback/index.js +30 -30
- package/lib/ui/gamification/vote/index.js +43 -43
- package/lib/ui/gamification/vote/vote-option/index.js +51 -53
- package/lib/ui/icons/index.d.ts +3 -0
- package/lib/ui/icons/index.js +75 -54
- package/lib/ui/modal/index.js +36 -32
- package/lib/ui/show-in/index.js +26 -26
- package/lib/ui/theme/masters-theme.js +12 -4
- package/lib/ui/theme/theme.js +9 -5
- package/package.json +22 -16
- package/lib/index-BEm7B1u1.js +0 -72
|
@@ -1,131 +1,133 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cx as b } from "@linaria/core";
|
|
3
3
|
import { styled as L } from "@linaria/react";
|
|
4
4
|
import { useAnalyticsListener as P } from "../../../hooks/analytics.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useStore as
|
|
7
|
-
import { eventBus as
|
|
8
|
-
import { FeatureType as
|
|
9
|
-
import { AdvertisementUI as
|
|
10
|
-
const
|
|
5
|
+
import { useState as w, useEffect as E, useRef as I } from "react";
|
|
6
|
+
import { useStore as S } from "@streamlayer/react-polyfills";
|
|
7
|
+
import { eventBus as h } from "@streamlayer/sdk-web-interfaces";
|
|
8
|
+
import { FeatureType as T, NotificationPromotionMode as U, PromotionType as N } from "@streamlayer/sdk-web-types";
|
|
9
|
+
import { AdvertisementUI as V } from "../../../ui/advertisement/index.js";
|
|
10
|
+
const W = /* @__PURE__ */ L("div")({
|
|
11
11
|
name: "AdvertisementUIWrap",
|
|
12
12
|
class: "aa6pjif",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
15
|
-
const t =
|
|
14
|
+
}), k = (o) => {
|
|
15
|
+
const t = o.target;
|
|
16
16
|
if (t instanceof HTMLAnchorElement && t.target === "_blank") {
|
|
17
|
-
const
|
|
18
|
-
t.getAttribute("data-analytics") === "button" &&
|
|
17
|
+
const r = t.getAttribute("data-promo-id") || "", i = t.getAttribute("data-promo-type") || N.UNSET;
|
|
18
|
+
t.getAttribute("data-analytics") === "button" && h.emit("advertisement", {
|
|
19
19
|
action: "buttonSelect",
|
|
20
20
|
payload: {
|
|
21
|
-
id:
|
|
21
|
+
id: r,
|
|
22
22
|
type: i
|
|
23
23
|
}
|
|
24
|
-
}), t.getAttribute("data-analytics") === "banner" &&
|
|
24
|
+
}), t.getAttribute("data-analytics") === "banner" && h.emit("advertisement", {
|
|
25
25
|
action: "bannerSelect",
|
|
26
26
|
payload: {
|
|
27
|
-
id:
|
|
27
|
+
id: r,
|
|
28
28
|
type: i
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
}, j = ({
|
|
33
|
-
gamification:
|
|
33
|
+
gamification: o,
|
|
34
34
|
layoutMode: t,
|
|
35
|
-
skipAutoClose:
|
|
35
|
+
skipAutoClose: r,
|
|
36
36
|
skipTypeCheck: i,
|
|
37
|
-
sidebar:
|
|
37
|
+
sidebar: s,
|
|
38
38
|
banner: d,
|
|
39
|
-
notification:
|
|
40
|
-
isMobileScreen:
|
|
41
|
-
persistent:
|
|
42
|
-
externalAd:
|
|
43
|
-
controlVideo:
|
|
39
|
+
notification: c,
|
|
40
|
+
isMobileScreen: u,
|
|
41
|
+
persistent: p,
|
|
42
|
+
externalAd: f,
|
|
43
|
+
controlVideo: v
|
|
44
44
|
}) => {
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
P(
|
|
45
|
+
var y, g, A;
|
|
46
|
+
const l = I(null), e = S(o.advertisement.$store);
|
|
47
|
+
P(l, {
|
|
48
48
|
enabled: !!e.data,
|
|
49
49
|
event: "click",
|
|
50
|
-
listener:
|
|
50
|
+
listener: k
|
|
51
51
|
});
|
|
52
|
-
const
|
|
53
|
-
if (e.data === void 0 || !
|
|
52
|
+
const m = !d && !s;
|
|
53
|
+
if (e.data === void 0 || !p && e.isViewed)
|
|
54
54
|
return null;
|
|
55
|
-
const
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
ref:
|
|
55
|
+
const n = ((A = (g = (y = e == null ? void 0 : e.data) == null ? void 0 : y.notification) == null ? void 0 : g.promotion) == null ? void 0 : A.mode) === U.LOWER_THIRD;
|
|
56
|
+
return /* @__PURE__ */ a(W, {
|
|
57
|
+
ref: l,
|
|
58
58
|
style: {
|
|
59
|
-
height:
|
|
59
|
+
height: m ? "auto" : "100%"
|
|
60
60
|
},
|
|
61
|
-
className: b("SL-AdvertisementUIWrap",
|
|
62
|
-
children: /* @__PURE__ */
|
|
61
|
+
className: b("SL-AdvertisementUIWrap", u && "mobile-view", n && "SL-AdvertisementUIWrap--lower-third"),
|
|
62
|
+
children: /* @__PURE__ */ a(V, {
|
|
63
63
|
skipTypeCheck: i,
|
|
64
|
-
sidebar:
|
|
64
|
+
sidebar: s,
|
|
65
65
|
banner: d,
|
|
66
66
|
advertisement: e.data,
|
|
67
67
|
advertisementPaused: e.isPaused,
|
|
68
68
|
togglePause: e.togglePause,
|
|
69
69
|
close: e.close,
|
|
70
|
-
externalAd:
|
|
71
|
-
markAsViewed:
|
|
72
|
-
open:
|
|
70
|
+
externalAd: f ? e.externalAd : void 0,
|
|
71
|
+
markAsViewed: o.advertisement.markAsViewed,
|
|
72
|
+
open: o.advertisement.open,
|
|
73
73
|
layoutMode: t,
|
|
74
|
-
isNotification:
|
|
75
|
-
skipAutoClose:
|
|
76
|
-
controlVideo:
|
|
74
|
+
isNotification: c,
|
|
75
|
+
skipAutoClose: r,
|
|
76
|
+
controlVideo: v
|
|
77
77
|
})
|
|
78
78
|
});
|
|
79
|
-
},
|
|
80
|
-
sdk:
|
|
79
|
+
}, B = ({
|
|
80
|
+
sdk: o,
|
|
81
81
|
sidebar: t,
|
|
82
|
-
externalAd:
|
|
82
|
+
externalAd: r,
|
|
83
83
|
banner: i,
|
|
84
|
-
skipAutoClose:
|
|
84
|
+
skipAutoClose: s,
|
|
85
85
|
skipTypeCheck: d,
|
|
86
|
-
layoutMode:
|
|
87
|
-
isMobileScreen:
|
|
88
|
-
persistent:
|
|
89
|
-
notification:
|
|
86
|
+
layoutMode: c,
|
|
87
|
+
isMobileScreen: u,
|
|
88
|
+
persistent: p,
|
|
89
|
+
notification: f
|
|
90
90
|
}) => {
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
|
|
91
|
+
const v = S(o.featuresList.getStore()), [l, e] = w(!r);
|
|
92
|
+
if (E(() => {
|
|
93
|
+
if (r) {
|
|
94
|
+
const n = document.createElement("script");
|
|
95
|
+
n.async = !0, n.src = "https://imasdk.googleapis.com/pal/sdkloader/pal.js", document.body.appendChild(n), n.onload = () => {
|
|
96
|
+
e(!0);
|
|
97
|
+
};
|
|
96
98
|
}
|
|
97
|
-
}, [
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
+
}, [r]), t && i)
|
|
100
|
+
return /* @__PURE__ */ a("div", {
|
|
99
101
|
style: {
|
|
100
102
|
color: "red"
|
|
101
103
|
},
|
|
102
104
|
children: "define either sidebar or banner, not both."
|
|
103
105
|
});
|
|
104
|
-
if (i &&
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
+
if (i && r)
|
|
107
|
+
return /* @__PURE__ */ a("div", {
|
|
106
108
|
style: {
|
|
107
109
|
color: "red"
|
|
108
110
|
},
|
|
109
111
|
children: "externalAd is not supported with banner"
|
|
110
112
|
});
|
|
111
|
-
if (!
|
|
113
|
+
if (!v)
|
|
112
114
|
return null;
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
gamification:
|
|
115
|
+
const m = o.getFeature(T.GAMES);
|
|
116
|
+
return !m || r && !l ? null : /* @__PURE__ */ a(j, {
|
|
117
|
+
gamification: m,
|
|
116
118
|
sidebar: t,
|
|
117
119
|
banner: i,
|
|
118
|
-
layoutMode:
|
|
119
|
-
isMobileScreen:
|
|
120
|
-
persistent:
|
|
121
|
-
notification:
|
|
120
|
+
layoutMode: c,
|
|
121
|
+
isMobileScreen: u,
|
|
122
|
+
persistent: p,
|
|
123
|
+
notification: f,
|
|
122
124
|
skipTypeCheck: d,
|
|
123
|
-
skipAutoClose:
|
|
124
|
-
externalAd:
|
|
125
|
-
controlVideo:
|
|
126
|
-
})
|
|
125
|
+
skipAutoClose: s,
|
|
126
|
+
externalAd: r,
|
|
127
|
+
controlVideo: o.controlVideoPlayer
|
|
128
|
+
});
|
|
127
129
|
};
|
|
128
130
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
W as AdvertisementUIWrap,
|
|
132
|
+
B as StreamLayerSDKAdvertisement
|
|
131
133
|
};
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useEffect as c } from "react";
|
|
3
3
|
import { useStore as l } from "@streamlayer/react-polyfills";
|
|
4
|
-
import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
-
import { FeatureType as
|
|
4
|
+
import { FeatureStatus as u, eventBus as i } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
import { FeatureType as f } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { Points as S } from "../../../ui/gamification/points/index.js";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const y = ({ gamification: e }) => {
|
|
8
|
+
const o = e.userSummary.$store, [t, p] = a(0);
|
|
9
9
|
return c(() => {
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
(
|
|
10
|
+
const r = o.subscribe((s) => {
|
|
11
|
+
var n;
|
|
12
|
+
(n = s == null ? void 0 : s.summary) != null && n.points && p(s.summary.points);
|
|
13
13
|
});
|
|
14
14
|
return () => {
|
|
15
|
-
|
|
15
|
+
r();
|
|
16
16
|
};
|
|
17
|
-
}, [
|
|
18
|
-
|
|
17
|
+
}, [o]), /* @__PURE__ */ m(S, { points: t, onClick: () => {
|
|
18
|
+
const r = e.status.get();
|
|
19
|
+
r === u.Suspended ? (e.openFeature(), i.emit("app", {
|
|
20
|
+
action: "open",
|
|
21
|
+
payload: {}
|
|
22
|
+
})) : r === u.Ready && (e.closeFeature(!1), i.emit("app", {
|
|
23
|
+
action: "close",
|
|
24
|
+
payload: {}
|
|
25
|
+
}));
|
|
19
26
|
} });
|
|
20
27
|
}, k = ({ sdk: e }) => {
|
|
21
28
|
if (!l(e.featuresList.getStore()))
|
|
22
29
|
return null;
|
|
23
|
-
const
|
|
24
|
-
return
|
|
30
|
+
const t = e.getFeature(f.GAMES);
|
|
31
|
+
return t ? /* @__PURE__ */ m(y, { gamification: t }) : null;
|
|
25
32
|
};
|
|
26
33
|
export {
|
|
27
34
|
k as StreamLayerSDKPoints
|
package/lib/app/app/index.js
CHANGED
|
@@ -1,122 +1,112 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { SDKContainer as
|
|
4
|
-
import { useSdkFeature as
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { cx as h } from "@linaria/core";
|
|
3
|
+
import { SDKContainer as A, SDKScrollContainer as F } from "./styles.js";
|
|
4
|
+
import { useSdkFeature as v } from "../useSdkFeature.js";
|
|
5
5
|
import { useSdkResponsive as x } from "../useSdkResponsive.js";
|
|
6
|
-
import { useSdkScroll as
|
|
7
|
-
import { useAnalyticsListener as
|
|
8
|
-
import { useRef as
|
|
6
|
+
import { useSdkScroll as N } from "../useSdkScroll.js";
|
|
7
|
+
import { useAnalyticsListener as g, newTabLinkListener as y } from "../../hooks/analytics.js";
|
|
8
|
+
import { useRef as f, useMemo as C, useEffect as D } from "react";
|
|
9
9
|
import { useStore as K } from "@streamlayer/react-polyfills";
|
|
10
|
-
import { resetCss as
|
|
11
|
-
import { ActiveFeature as
|
|
12
|
-
import { SDKNavigation as
|
|
13
|
-
import { SDKNotifications as
|
|
14
|
-
import { useAppApp as
|
|
15
|
-
import { AppContext as
|
|
16
|
-
const
|
|
10
|
+
import { resetCss as m } from "../../ui/theme/theme.js";
|
|
11
|
+
import { ActiveFeature as L, StandaloneFeature as b } from "./Features/index.js";
|
|
12
|
+
import { SDKNavigation as j, SDKHeader as R } from "./Navigation/index.js";
|
|
13
|
+
import { SDKNotifications as w } from "./Notifications/index.js";
|
|
14
|
+
import { useAppApp as E } from "./useApp.js";
|
|
15
|
+
import { AppContext as H } from "./useAppContext.js";
|
|
16
|
+
const I = ({
|
|
17
17
|
sdk: e,
|
|
18
|
-
className:
|
|
18
|
+
className: t,
|
|
19
19
|
scrollStore: r,
|
|
20
|
-
appNode:
|
|
21
|
-
scrollNode:
|
|
22
|
-
responsiveStore:
|
|
20
|
+
appNode: l,
|
|
21
|
+
scrollNode: o,
|
|
22
|
+
responsiveStore: s
|
|
23
23
|
}) => {
|
|
24
|
-
const [,
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
-
scrollNode:
|
|
28
|
-
appNode:
|
|
24
|
+
const [, i] = v(e);
|
|
25
|
+
return /* @__PURE__ */ n(L, {
|
|
26
|
+
className: t,
|
|
27
|
+
scrollNode: o,
|
|
28
|
+
appNode: l,
|
|
29
29
|
scrollStore: r,
|
|
30
|
-
feature:
|
|
31
|
-
responsiveStore:
|
|
30
|
+
feature: i,
|
|
31
|
+
responsiveStore: s,
|
|
32
32
|
sdk: e
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, M = ({
|
|
35
35
|
sdk: e,
|
|
36
|
-
className:
|
|
36
|
+
className: t,
|
|
37
37
|
appNode: r,
|
|
38
|
-
responsiveStore:
|
|
38
|
+
responsiveStore: l
|
|
39
39
|
}) => {
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
className:
|
|
40
|
+
const o = K(e.featuresList.getStore());
|
|
41
|
+
return o ? Array.from(o, (s) => {
|
|
42
|
+
const i = e.getFeature(s);
|
|
43
|
+
return i ? /* @__PURE__ */ n(b, {
|
|
44
|
+
className: t,
|
|
45
45
|
appNode: r,
|
|
46
|
-
feature:
|
|
47
|
-
responsiveStore:
|
|
46
|
+
feature: i,
|
|
47
|
+
responsiveStore: l,
|
|
48
48
|
sdk: e
|
|
49
|
-
},
|
|
49
|
+
}, s) : null;
|
|
50
50
|
}) : null;
|
|
51
|
-
},
|
|
51
|
+
}, _ = ({
|
|
52
52
|
sdk: e,
|
|
53
|
-
topNavigation:
|
|
53
|
+
topNavigation: t
|
|
54
54
|
}) => {
|
|
55
|
-
const r =
|
|
56
|
-
sdkReady:
|
|
57
|
-
activeFeature:
|
|
58
|
-
isLogged:
|
|
59
|
-
} =
|
|
60
|
-
|
|
61
|
-
enabled:
|
|
55
|
+
const r = f(null), l = f(null), [o] = x(r), [s, i] = N(r, o), {
|
|
56
|
+
sdkReady: p,
|
|
57
|
+
activeFeature: c,
|
|
58
|
+
isLogged: d
|
|
59
|
+
} = E(e), a = !!p;
|
|
60
|
+
g(r, {
|
|
61
|
+
enabled: a,
|
|
62
62
|
event: "click",
|
|
63
|
-
listener:
|
|
64
|
-
}), u(t, {
|
|
65
|
-
enabled: o,
|
|
66
|
-
event: "scrollend",
|
|
67
|
-
listener: g,
|
|
68
|
-
useDomNode: !0
|
|
69
|
-
}), u(t, {
|
|
70
|
-
enabled: o,
|
|
71
|
-
event: "click",
|
|
72
|
-
listener: C,
|
|
73
|
-
useDomNode: !0
|
|
63
|
+
listener: y
|
|
74
64
|
});
|
|
75
|
-
const
|
|
65
|
+
const S = C(() => ({
|
|
76
66
|
sdk: e,
|
|
77
|
-
topNavigation:
|
|
78
|
-
}), [e,
|
|
79
|
-
return
|
|
67
|
+
topNavigation: t
|
|
68
|
+
}), [e, t]);
|
|
69
|
+
return D(() => {
|
|
80
70
|
import("./Features/Gamification/gamification-feature.js");
|
|
81
|
-
}, []), /* @__PURE__ */
|
|
82
|
-
value:
|
|
83
|
-
children: /* @__PURE__ */
|
|
71
|
+
}, []), /* @__PURE__ */ n(H.Provider, {
|
|
72
|
+
value: S,
|
|
73
|
+
children: /* @__PURE__ */ u(A, {
|
|
84
74
|
ref: r,
|
|
85
|
-
className:
|
|
86
|
-
children: [
|
|
87
|
-
className:
|
|
75
|
+
className: t ? "" : "c10llmat",
|
|
76
|
+
children: [a && t && /* @__PURE__ */ n(j, {
|
|
77
|
+
className: m,
|
|
88
78
|
sdk: e,
|
|
89
|
-
ref:
|
|
90
|
-
}),
|
|
91
|
-
className:
|
|
79
|
+
ref: l
|
|
80
|
+
}), a && !t && !!c && /* @__PURE__ */ n(R, {
|
|
81
|
+
className: h(m, "sl-hide-on-modal"),
|
|
92
82
|
sdk: e,
|
|
93
|
-
ref:
|
|
94
|
-
}), /* @__PURE__ */
|
|
83
|
+
ref: l
|
|
84
|
+
}), /* @__PURE__ */ u(F, {
|
|
95
85
|
className: "sl-hide-on-modal",
|
|
96
|
-
ref:
|
|
97
|
-
"data-nav": (!!
|
|
98
|
-
children: [
|
|
86
|
+
ref: s,
|
|
87
|
+
"data-nav": (!!c && a).toString(),
|
|
88
|
+
children: [a && /* @__PURE__ */ n(w, {
|
|
99
89
|
sdk: e,
|
|
100
|
-
scrollNode:
|
|
101
|
-
headerNode:
|
|
90
|
+
scrollNode: s,
|
|
91
|
+
headerNode: l,
|
|
102
92
|
appNode: r,
|
|
103
|
-
scrollStore:
|
|
104
|
-
responsiveStore:
|
|
105
|
-
hasActiveFeature: !!
|
|
106
|
-
}),
|
|
107
|
-
scrollStore:
|
|
108
|
-
responsiveStore:
|
|
109
|
-
scrollNode:
|
|
93
|
+
scrollStore: i,
|
|
94
|
+
responsiveStore: o,
|
|
95
|
+
hasActiveFeature: !!c
|
|
96
|
+
}), a && /* @__PURE__ */ n(I, {
|
|
97
|
+
scrollStore: i,
|
|
98
|
+
responsiveStore: o,
|
|
99
|
+
scrollNode: s,
|
|
110
100
|
appNode: r,
|
|
111
|
-
className:
|
|
101
|
+
className: m,
|
|
112
102
|
sdk: e
|
|
113
|
-
}),
|
|
114
|
-
responsiveStore:
|
|
103
|
+
}), a && /* @__PURE__ */ n(M, {
|
|
104
|
+
responsiveStore: o,
|
|
115
105
|
appNode: r,
|
|
116
|
-
className:
|
|
106
|
+
className: m,
|
|
117
107
|
sdk: e
|
|
118
108
|
})]
|
|
119
|
-
}),
|
|
109
|
+
}), a && !d && /* @__PURE__ */ n("div", {
|
|
120
110
|
style: {
|
|
121
111
|
display: "flex",
|
|
122
112
|
alignItems: "center",
|
|
@@ -130,5 +120,5 @@ const M = ({
|
|
|
130
120
|
});
|
|
131
121
|
};
|
|
132
122
|
export {
|
|
133
|
-
|
|
123
|
+
_ as App
|
|
134
124
|
};
|
package/lib/app/app/useApp.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
2
3
|
export declare const useAppApp: (sdk: StreamLayerSDK) => {
|
|
3
4
|
sdkReady: boolean;
|
|
4
|
-
activeFeature:
|
|
5
|
+
activeFeature: FeatureType | undefined;
|
|
5
6
|
isLogged: boolean;
|
|
6
7
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/* @__PURE__ */ e(
|
|
9
|
-
/* @__PURE__ */ e(y, {
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cx as s } from "@linaria/core";
|
|
3
|
+
import { useDynamicParentFont as a } from "../ScreenContainer/useDynamicParentFont.js";
|
|
4
|
+
import { EmergencyContainer as g, EmergencyScreenTitle as l, EmergencyScreenDescription as y, EmergencyScreenButton as f } from "./styles.js";
|
|
5
|
+
const d = ({ actionFn: r, description: c, isMobile: n, height: t }) => {
|
|
6
|
+
const { container: o, fontSize: i } = a(t, n);
|
|
7
|
+
return /* @__PURE__ */ m(g, { style: { fontSize: i }, ref: o, className: s("betPack", !!n && "isMobile"), children: [
|
|
8
|
+
/* @__PURE__ */ e(l, { children: "Something went wrong." }),
|
|
9
|
+
/* @__PURE__ */ e(y, { children: c }),
|
|
10
|
+
/* @__PURE__ */ e(f, { onClick: r, children: "Try again" })
|
|
10
11
|
] });
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
d as EmergencyScreen
|
|
14
15
|
};
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ScreenContainer as
|
|
4
|
-
import { ScreenWrap as
|
|
5
|
-
const
|
|
6
|
-
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { ScreenContainer as i } from "../ScreenContainer/index.js";
|
|
4
|
+
import { ScreenWrap as t, EndFirstScreenWrap as m, EndScreenMain as d, SponsorIcon as h, EndScreenTitle as S, EndScreenDescription as u, EndScreenButton as o, EndLastScreenWrap as E, EndScreenMedia as b, EndLastScreenDescription as f } from "./styles.js";
|
|
5
|
+
const y = ({
|
|
6
|
+
height: r,
|
|
7
|
+
onEvent: s,
|
|
8
|
+
swipeable: c
|
|
9
|
+
}) => {
|
|
10
|
+
const [l, a] = p(
|
|
7
11
|
0
|
|
8
12
|
/* FIRST */
|
|
9
13
|
);
|
|
10
|
-
return
|
|
11
|
-
/* @__PURE__ */ n(
|
|
12
|
-
/* @__PURE__ */ e(
|
|
13
|
-
/* @__PURE__ */ e(
|
|
14
|
-
/* @__PURE__ */ n(
|
|
14
|
+
return l === 0 ? /* @__PURE__ */ e(i, { height: r, swipeable: c, children: /* @__PURE__ */ e(t, { children: /* @__PURE__ */ n(m, { children: [
|
|
15
|
+
/* @__PURE__ */ n(d, { children: [
|
|
16
|
+
/* @__PURE__ */ e(h, { name: "icon-masters-logo" }),
|
|
17
|
+
/* @__PURE__ */ e(S, { children: "Great picks!" }),
|
|
18
|
+
/* @__PURE__ */ n(u, { children: [
|
|
15
19
|
"As results come in we’ll send you",
|
|
16
20
|
/* @__PURE__ */ e("br", {}),
|
|
17
21
|
"live updates right here."
|
|
18
22
|
] })
|
|
19
23
|
] }),
|
|
20
24
|
/* @__PURE__ */ e(
|
|
21
|
-
|
|
25
|
+
o,
|
|
22
26
|
{
|
|
23
27
|
onClick: () => {
|
|
24
|
-
|
|
28
|
+
a(
|
|
25
29
|
1
|
|
26
30
|
/* LAST */
|
|
27
31
|
);
|
|
@@ -29,18 +33,18 @@ const x = ({ height: r, onEvent: o }) => {
|
|
|
29
33
|
children: "Continue"
|
|
30
34
|
}
|
|
31
35
|
)
|
|
32
|
-
] }) }) }, "end") : /* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ n(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
/* @__PURE__ */ n(
|
|
36
|
+
] }) }) }, "end") : /* @__PURE__ */ e(i, { height: r, swipeable: c, children: /* @__PURE__ */ e(t, { children: /* @__PURE__ */ n(E, { children: [
|
|
37
|
+
/* @__PURE__ */ n(d, { children: [
|
|
38
|
+
/* @__PURE__ */ e(b, { src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/bet_pack_end_screen.png" }),
|
|
39
|
+
/* @__PURE__ */ n(f, { children: [
|
|
36
40
|
"Look for more live match insights,",
|
|
37
41
|
/* @__PURE__ */ e("br", {}),
|
|
38
42
|
"predictions and more."
|
|
39
43
|
] })
|
|
40
44
|
] }),
|
|
41
|
-
/* @__PURE__ */ e(
|
|
45
|
+
/* @__PURE__ */ e(o, { onClick: () => s({ type: "slOpenGameCenter" }), children: "Open Game Center" })
|
|
42
46
|
] }) }) }, "end");
|
|
43
47
|
};
|
|
44
48
|
export {
|
|
45
|
-
|
|
49
|
+
y as EndScreen
|
|
46
50
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ScreenContainerBox as
|
|
3
|
-
import { useDynamicParentFont as
|
|
4
|
-
const
|
|
5
|
-
const { container:
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ScreenContainerBox as m } from "./styles.js";
|
|
3
|
+
import { useDynamicParentFont as a } from "./useDynamicParentFont.js";
|
|
4
|
+
const p = ({ children: r, height: n, swipeable: t }) => {
|
|
5
|
+
const { container: o, fontSize: i, calcHeight: c } = a(n, t);
|
|
6
|
+
return /* @__PURE__ */ e(m, { style: { height: c, fontSize: i }, ref: o, children: /* @__PURE__ */ e("div", { children: r }) });
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
p as ScreenContainer
|
|
10
10
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const useDynamicParentFont: (height?: number) => {
|
|
1
|
+
export declare const useDynamicParentFont: (height?: number, swipeable?: boolean) => {
|
|
2
2
|
container: import('react').MutableRefObject<HTMLDivElement | null>;
|
|
3
3
|
fontSize: string;
|
|
4
|
+
calcHeight: number | undefined;
|
|
4
5
|
};
|