@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,51 +1,25 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class: "s991vvm",
|
|
2
|
+
import { SvgIcon as t } from "../../../../../ui/icons/index.js";
|
|
3
|
+
const n = /* @__PURE__ */ s("span")({
|
|
4
|
+
name: "NextButton",
|
|
5
|
+
class: "n991vvm",
|
|
7
6
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
9
|
-
name: "Main",
|
|
10
|
-
class: "mnbj36g",
|
|
11
|
-
propsAsIs: !1
|
|
12
|
-
}), o = () => e, u = /* @__PURE__ */ s(o())({
|
|
7
|
+
}), o = () => t, a = /* @__PURE__ */ s(o())({
|
|
13
8
|
name: "IconArrowRight",
|
|
14
|
-
class: "
|
|
15
|
-
propsAsIs: !0
|
|
16
|
-
}), c = () => e, f = /* @__PURE__ */ s(c())({
|
|
17
|
-
name: "SponsorIcon",
|
|
18
|
-
class: "swqs2ju",
|
|
9
|
+
class: "inbj36g",
|
|
19
10
|
propsAsIs: !0
|
|
20
|
-
}),
|
|
11
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
21
12
|
name: "StartScreenSponsor",
|
|
22
|
-
class: "
|
|
13
|
+
class: "szrvgt",
|
|
23
14
|
propsAsIs: !1
|
|
24
|
-
}), p =
|
|
25
|
-
name: "StartScreenTitle",
|
|
26
|
-
class: "se4nn9a",
|
|
27
|
-
propsAsIs: !0
|
|
28
|
-
}), a = () => r, x = /* @__PURE__ */ s(a())({
|
|
29
|
-
name: "StartScreenDescription",
|
|
30
|
-
class: "sofug8s",
|
|
31
|
-
propsAsIs: !0
|
|
32
|
-
}), S = () => n, d = /* @__PURE__ */ s(S())({
|
|
33
|
-
name: "StartScreenButton",
|
|
34
|
-
class: "s18s0pjp",
|
|
35
|
-
propsAsIs: !0
|
|
36
|
-
}), _ = /* @__PURE__ */ s("div")({
|
|
15
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
37
16
|
name: "StartScreenNote",
|
|
38
|
-
class: "
|
|
17
|
+
class: "swqs2ju",
|
|
39
18
|
propsAsIs: !1
|
|
40
19
|
});
|
|
41
20
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
d as StartScreenButton,
|
|
47
|
-
x as StartScreenDescription,
|
|
48
|
-
_ as StartScreenNote,
|
|
49
|
-
v as StartScreenSponsor,
|
|
50
|
-
g as StartScreenTitle
|
|
21
|
+
a as IconArrowRight,
|
|
22
|
+
n as NextButton,
|
|
23
|
+
p as StartScreenNote,
|
|
24
|
+
c as StartScreenSponsor
|
|
51
25
|
};
|
|
@@ -2,10 +2,8 @@ import { Gamification } from '@streamlayer/feature-gamification';
|
|
|
2
2
|
import { BetPackEventCb } from '../';
|
|
3
3
|
export declare const BetPackContent: React.FC<{
|
|
4
4
|
gamification: Gamification;
|
|
5
|
-
height?: number;
|
|
6
5
|
swipeable?: boolean;
|
|
7
6
|
autoplay?: boolean;
|
|
8
|
-
|
|
9
|
-
changeHeightOnInit: () => void;
|
|
7
|
+
overlay?: boolean;
|
|
10
8
|
onEvent: BetPackEventCb;
|
|
11
9
|
}>;
|
|
@@ -1,115 +1,86 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ConnectError as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
l.has(p) && c(n, s, p);
|
|
1
|
+
import { jsx as u, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { ConnectError as P, Code as Q } from "@connectrpc/connect";
|
|
3
|
+
import { useCallback as k, useSyncExternalStore as j, useRef as p, useState as R, useMemo as T, useEffect as y } from "react";
|
|
4
|
+
import { EmergencyScreen as b } from "./EmergencyScreen/index.js";
|
|
5
|
+
import { EndScreen as v } from "./EndScreen/index.js";
|
|
6
|
+
import { LoaderScreen as w } from "./LoaderScreen/index.js";
|
|
7
|
+
import { QuestionScreen as F } from "./QuestionScreen/index.js";
|
|
8
|
+
import { ScreenContainer as H } from "./ScreenContainer/index.js";
|
|
9
|
+
import { StartScreen as A } from "./StartScreen/index.js";
|
|
10
|
+
import { settings as B } from "./constants.js";
|
|
11
|
+
import { Carousel as N } from "./styles.js";
|
|
12
|
+
function V(t, s, c) {
|
|
13
|
+
let o = new Set(s).add(void 0);
|
|
14
|
+
return t.listen((n, a, r) => {
|
|
15
|
+
o.has(r) && c(n, a, r);
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function
|
|
20
|
-
let c =
|
|
21
|
-
(n) =>
|
|
22
|
-
[
|
|
23
|
-
),
|
|
24
|
-
return
|
|
18
|
+
function D(t, s = {}) {
|
|
19
|
+
let c = k(
|
|
20
|
+
(n) => s.keys ? V(t, s.keys, n) : t.listen(n),
|
|
21
|
+
[s.keys, t]
|
|
22
|
+
), o = t.get.bind(t);
|
|
23
|
+
return j(c, o, o);
|
|
25
24
|
}
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const e =
|
|
25
|
+
const I = ({ data: t, gamification: s, onEvent: c, swipeable: o, overlay: n, autoplay: a }) => {
|
|
26
|
+
const r = p(), l = p(null), i = p(null), [d, S] = R(0), { listOfQuestions: m, countQuestionsAvailable: g } = T(() => {
|
|
27
|
+
const e = t ? Object.values(t) : [];
|
|
29
28
|
return {
|
|
30
29
|
listOfQuestions: e,
|
|
31
|
-
countQuestionsAvailable: e.filter(({ marketClosed:
|
|
30
|
+
countQuestionsAvailable: e.filter(({ marketClosed: f }) => !f).length
|
|
32
31
|
};
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
!f && !y && r !== void 0 && !C && s({
|
|
36
|
-
type: "slBetPackReady",
|
|
37
|
-
payload: {
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
next: () => {
|
|
41
|
-
var e;
|
|
42
|
-
return (e = d.current) == null ? void 0 : e.slickNext();
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
45
|
-
// @ts-expect-error
|
|
46
|
-
prev: () => {
|
|
47
|
-
var e;
|
|
48
|
-
return (e = d.current) == null ? void 0 : e.slickPrev();
|
|
49
|
-
},
|
|
50
|
-
current: 0,
|
|
51
|
-
canNext: !0,
|
|
52
|
-
canPrev: !1
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}, [r, f, y, s]);
|
|
56
|
-
const h = P(
|
|
57
|
-
async (e, u) => {
|
|
32
|
+
}, [t]), x = k(
|
|
33
|
+
async (e, f) => {
|
|
58
34
|
try {
|
|
59
|
-
|
|
35
|
+
await s.betPackVote(e, f), c({
|
|
60
36
|
type: "slVoted",
|
|
61
37
|
payload: {
|
|
62
38
|
questionId: e,
|
|
63
|
-
answerId:
|
|
39
|
+
answerId: f
|
|
64
40
|
}
|
|
65
41
|
});
|
|
66
42
|
} finally {
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
(
|
|
43
|
+
r.current && clearTimeout(r.current), a && (r.current = setTimeout(() => {
|
|
44
|
+
var h;
|
|
45
|
+
(h = l.current) == null || h.slickNext();
|
|
70
46
|
}, 2e3));
|
|
71
47
|
}
|
|
72
48
|
},
|
|
73
|
-
[
|
|
49
|
+
[s, c, a]
|
|
74
50
|
);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
const j = (e) => {
|
|
103
|
-
var u;
|
|
104
|
-
if (s({
|
|
51
|
+
y(() => (c({
|
|
52
|
+
type: "slBetPackReady",
|
|
53
|
+
payload: {
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
55
|
+
// @ts-expect-error
|
|
56
|
+
next: () => {
|
|
57
|
+
var e;
|
|
58
|
+
return (e = l.current) == null ? void 0 : e.slickNext();
|
|
59
|
+
},
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61
|
+
// @ts-expect-error
|
|
62
|
+
prev: () => {
|
|
63
|
+
var e;
|
|
64
|
+
return (e = l.current) == null ? void 0 : e.slickPrev();
|
|
65
|
+
},
|
|
66
|
+
current: 0,
|
|
67
|
+
canNext: !0,
|
|
68
|
+
canPrev: !1
|
|
69
|
+
}
|
|
70
|
+
}), () => {
|
|
71
|
+
r.current && clearTimeout(r.current);
|
|
72
|
+
}), [c]);
|
|
73
|
+
const C = (e) => {
|
|
74
|
+
var f;
|
|
75
|
+
if (c({
|
|
105
76
|
type: "slBetPackChangeCard",
|
|
106
77
|
payload: {
|
|
107
78
|
current: e,
|
|
108
|
-
canNext: e < Object.keys(
|
|
79
|
+
canNext: e < Object.keys(t).length + 1,
|
|
109
80
|
canPrev: e >= 1
|
|
110
81
|
}
|
|
111
|
-
}), e !== 0 && e !== Object.keys(
|
|
112
|
-
|
|
82
|
+
}), e !== 0 && e !== Object.keys(t).length + 1 && ((f = m[e - 1]) != null && f.id)) {
|
|
83
|
+
s.openQuestion(m[e - 1].id, {
|
|
113
84
|
openedFrom: "bet-pack",
|
|
114
85
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
115
86
|
// @ts-expect-error
|
|
@@ -124,29 +95,58 @@ handle this request.`,
|
|
|
124
95
|
});
|
|
125
96
|
return;
|
|
126
97
|
}
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
return
|
|
130
|
-
|
|
98
|
+
s.closeQuestion();
|
|
99
|
+
};
|
|
100
|
+
return y(() => {
|
|
101
|
+
n && i.current && S(i.current.clientHeight);
|
|
102
|
+
}, [n]), /* @__PURE__ */ O(
|
|
103
|
+
N,
|
|
131
104
|
{
|
|
132
|
-
...
|
|
133
|
-
swipe:
|
|
134
|
-
|
|
135
|
-
centerPadding: p || x.centerPadding,
|
|
136
|
-
afterChange: j,
|
|
105
|
+
...B,
|
|
106
|
+
swipe: o,
|
|
107
|
+
afterChange: C,
|
|
137
108
|
beforeChange: () => {
|
|
138
|
-
|
|
109
|
+
r.current && clearTimeout(r.current);
|
|
139
110
|
},
|
|
140
|
-
ref:
|
|
141
|
-
className: A(!c && K),
|
|
111
|
+
ref: l,
|
|
142
112
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ u(A, { ref: i, sliderRef: l, countQuestionsAvailable: g }),
|
|
114
|
+
m.map((e) => e ? /* @__PURE__ */ u(H, { height: d, children: /* @__PURE__ */ u(F, { question: e, vote: x }) }, e.id) : null),
|
|
115
|
+
/* @__PURE__ */ u(v, { height: d, onEvent: c })
|
|
146
116
|
]
|
|
147
117
|
}
|
|
148
118
|
);
|
|
119
|
+
}, _ = ({ gamification: t, autoplay: s, overlay: c, swipeable: o, onEvent: n }) => {
|
|
120
|
+
const a = D(t.betPack.getStore()), { error: r, loading: l, data: i } = a;
|
|
121
|
+
return l || !Object.hasOwn(a, "data") ? /* @__PURE__ */ u(w, {}) : r ? /* @__PURE__ */ u(
|
|
122
|
+
b,
|
|
123
|
+
{
|
|
124
|
+
onEvent: n,
|
|
125
|
+
actionFn: () => n({ type: "slHardRefresh" }),
|
|
126
|
+
description: r instanceof P && r.code !== Q.InvalidArgument ? `The event ID was not
|
|
127
|
+
specified or is invalid.` : `The server is unable to
|
|
128
|
+
handle this request.`
|
|
129
|
+
}
|
|
130
|
+
) : !i || !i.timestamp || !i.data || !Object.keys(i.data).length ? /* @__PURE__ */ u(
|
|
131
|
+
b,
|
|
132
|
+
{
|
|
133
|
+
onEvent: n,
|
|
134
|
+
actionFn: () => n({ type: "slHardRefresh" }),
|
|
135
|
+
description: `It looks like we couldn't
|
|
136
|
+
load the questions.`
|
|
137
|
+
}
|
|
138
|
+
) : /* @__PURE__ */ u(
|
|
139
|
+
I,
|
|
140
|
+
{
|
|
141
|
+
data: i.data,
|
|
142
|
+
gamification: t,
|
|
143
|
+
onEvent: n,
|
|
144
|
+
swipeable: o,
|
|
145
|
+
autoplay: s,
|
|
146
|
+
overlay: c
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
149
|
};
|
|
150
150
|
export {
|
|
151
|
-
|
|
151
|
+
_ as BetPackContent
|
|
152
152
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare const Carousel: any;
|
|
2
|
-
export declare const desktopDots: import('@linaria/core').LinariaClassName;
|
|
3
2
|
export declare const Dot: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
3
|
export declare const Dots: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const SponsorIcon: React.FC<{
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ScreenTextBlock: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
|
+
export declare const ScreenTitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
11
|
+
export declare const ScreenDescription: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
12
|
+
export declare const ScreenButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
@@ -1,21 +1,59 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
1
2
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
import
|
|
3
|
-
|
|
3
|
+
import r from "react-slick";
|
|
4
|
+
import { SvgIcon as c } from "../../../../ui/icons/index.js";
|
|
5
|
+
const t = () => r, S = /* @__PURE__ */ s(t())({
|
|
4
6
|
name: "Carousel",
|
|
5
7
|
class: "c1f9jjsn",
|
|
6
8
|
propsAsIs: !0
|
|
7
|
-
}),
|
|
9
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
8
10
|
name: "Dot",
|
|
9
|
-
class: "
|
|
11
|
+
class: "d25r51y",
|
|
10
12
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
13
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
12
14
|
name: "Dots",
|
|
13
|
-
class: "
|
|
15
|
+
class: "d1lvrmx8",
|
|
16
|
+
propsAsIs: !1
|
|
17
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
18
|
+
name: "ScreenWrap",
|
|
19
|
+
class: "s11xps29",
|
|
20
|
+
propsAsIs: !1
|
|
21
|
+
}), p = () => c, a = /* @__PURE__ */ s(p())({
|
|
22
|
+
name: "SponsorIconI",
|
|
23
|
+
class: "s14qstuv",
|
|
24
|
+
propsAsIs: !0
|
|
25
|
+
}), A = ({
|
|
26
|
+
style: o,
|
|
27
|
+
className: e
|
|
28
|
+
}) => /* @__PURE__ */ n(a, {
|
|
29
|
+
className: e,
|
|
30
|
+
style: o,
|
|
31
|
+
name: "icon-masters-logo"
|
|
32
|
+
}), u = /* @__PURE__ */ s("div")({
|
|
33
|
+
name: "ScreenTextBlock",
|
|
34
|
+
class: "s14mdh2e",
|
|
35
|
+
propsAsIs: !1
|
|
36
|
+
}), x = /* @__PURE__ */ s("div")({
|
|
37
|
+
name: "ScreenTitle",
|
|
38
|
+
class: "sqtjig9",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), D = /* @__PURE__ */ s("div")({
|
|
41
|
+
name: "ScreenDescription",
|
|
42
|
+
class: "ss0mt",
|
|
43
|
+
propsAsIs: !1
|
|
44
|
+
}), j = /* @__PURE__ */ s("button")({
|
|
45
|
+
name: "ScreenButton",
|
|
46
|
+
class: "s10dmski",
|
|
14
47
|
propsAsIs: !1
|
|
15
48
|
});
|
|
16
49
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
50
|
+
S as Carousel,
|
|
51
|
+
d as Dot,
|
|
52
|
+
f as Dots,
|
|
53
|
+
j as ScreenButton,
|
|
54
|
+
D as ScreenDescription,
|
|
55
|
+
u as ScreenTextBlock,
|
|
56
|
+
x as ScreenTitle,
|
|
57
|
+
v as ScreenWrap,
|
|
58
|
+
A as SponsorIcon
|
|
21
59
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@linaria/core";
|
|
3
|
-
import "../../useOrientation.js";
|
|
4
3
|
import "react";
|
|
5
|
-
import { BetPackOverlay as
|
|
4
|
+
import { BetPackOverlay as a } from "../index.js";
|
|
6
5
|
import "../../../../ui/icons/index.js";
|
|
7
6
|
import "./styles.js";
|
|
8
7
|
export {
|
|
9
|
-
|
|
8
|
+
a as BetPackOverlay
|
|
10
9
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
3
|
import { AllowedMessageType } from './utils';
|
|
3
4
|
export { BetPackOverlay, type BetPackOverlayProps } from './BetPackOverlay';
|
|
@@ -7,8 +8,7 @@ export type BetPackEventCb = (event: {
|
|
|
7
8
|
}) => void;
|
|
8
9
|
export declare const BetPack: React.FC<{
|
|
9
10
|
sdk: StreamLayerSDK;
|
|
10
|
-
heightOffset?: number;
|
|
11
11
|
onEvent?: BetPackEventCb;
|
|
12
12
|
swipeable?: boolean;
|
|
13
|
-
|
|
13
|
+
overlay?: boolean;
|
|
14
14
|
}>;
|
|
@@ -1,95 +1,67 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/* @__PURE__ */ f(J, { children: [
|
|
38
|
-
/* @__PURE__ */ e(k, { name: "fgIcon" }),
|
|
39
|
-
"Featured Groups+",
|
|
40
|
-
" "
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ e(K, { onClick: u, children: /* @__PURE__ */ e(k, { name: "icon-close-btn-gray" }) })
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cx as P } from "@linaria/core";
|
|
3
|
+
import { forwardRef as b, useState as B, useCallback as F, memo as H, useMemo as L } from "react";
|
|
4
|
+
import { useStore as k } from "@streamlayer/react-polyfills";
|
|
5
|
+
import { FeatureType as p } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { BetPackContent as I } from "./BetPackContent/index.js";
|
|
7
|
+
import { EmergencyScreen as M } from "./BetPackContent/EmergencyScreen/index.js";
|
|
8
|
+
import { LoaderScreen as x } from "./BetPackContent/LoaderScreen/index.js";
|
|
9
|
+
import { BetPackContainer as R } from "./styles.js";
|
|
10
|
+
import { defaultEventHandler as j } from "./utils.js";
|
|
11
|
+
import { SvgIcon as y } from "../../../ui/icons/index.js";
|
|
12
|
+
import { Container as G, Header as T, HeaderTitle as z, CloseButton as O, Main as U, Footer as Y, SlideSwitchButton as C, IconArrowPrev as q, buttonAvailable as g, IconArrowNext as D } from "./BetPackOverlay/styles.js";
|
|
13
|
+
const er = b(({ sdk: n, onEvent: i, close: t }, a) => {
|
|
14
|
+
const [e, d] = B(), [o, h] = B(), N = F(
|
|
15
|
+
(l) => {
|
|
16
|
+
if (l.type === "slBetPackReady") {
|
|
17
|
+
const { next: s, prev: u, current: f, canNext: w, canPrev: A } = l.payload || {};
|
|
18
|
+
d({ next: s, prev: u }), h((c) => ({
|
|
19
|
+
current: c != null && c.current ? c == null ? void 0 : c.current : f,
|
|
20
|
+
canPrev: c != null && c.current ? c == null ? void 0 : c.canPrev : A,
|
|
21
|
+
canNext: w
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
if (l.type === "slBetPackChangeCard") {
|
|
25
|
+
const { current: s, canNext: u, canPrev: f } = l.payload || {};
|
|
26
|
+
h({ current: s, canNext: u, canPrev: f });
|
|
27
|
+
}
|
|
28
|
+
i == null || i(l);
|
|
29
|
+
},
|
|
30
|
+
[i]
|
|
31
|
+
);
|
|
32
|
+
return /* @__PURE__ */ m(G, { ref: a, children: [
|
|
33
|
+
/* @__PURE__ */ m(T, { children: [
|
|
34
|
+
/* @__PURE__ */ m(z, { children: [
|
|
35
|
+
/* @__PURE__ */ r(y, { name: "fgIcon" }),
|
|
36
|
+
"Featured Groups+"
|
|
43
37
|
] }),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
/* @__PURE__ */ r(O, { onClick: t, children: /* @__PURE__ */ r(y, { name: "icon-close-btn-gray" }) })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(K, { sdk: n, onEvent: N, overlay: !0 }) }),
|
|
41
|
+
/* @__PURE__ */ m(Y, { children: [
|
|
42
|
+
/* @__PURE__ */ r(C, { onClick: e == null ? void 0 : e.prev, disabled: !(o != null && o.canPrev), children: /* @__PURE__ */ r(q, { name: "iconArrowPrev", className: P((o == null ? void 0 : o.canPrev) && g) }) }),
|
|
43
|
+
/* @__PURE__ */ r(C, { onClick: e == null ? void 0 : e.next, disabled: !(o != null && o.canNext), children: /* @__PURE__ */ r(D, { name: "iconArrowPrev", className: P((o == null ? void 0 : o.canNext) && g) }) })
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
}), J = ({ user: n, gamification: i, overlay: t, swipeable: a, onEvent: e }) => n.data ? i ? /* @__PURE__ */ r(I, { overlay: t, gamification: i, onEvent: e, swipeable: a }) : /* @__PURE__ */ r(x, {}) : n.error && !n.loading ? /* @__PURE__ */ r(
|
|
47
|
+
M,
|
|
48
|
+
{
|
|
49
|
+
onEvent: e,
|
|
50
|
+
actionFn: () => e({ type: "slHardRefresh" }),
|
|
51
|
+
description: `You are not authorized to
|
|
52
|
+
view this resource.`
|
|
59
53
|
}
|
|
60
|
-
),
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return O(() => {
|
|
65
|
-
const a = R(() => {
|
|
66
|
-
t.current && l(t.current.clientHeight);
|
|
67
|
-
}, 200);
|
|
68
|
-
return window.addEventListener("resize", a), () => {
|
|
69
|
-
window.removeEventListener("resize", a);
|
|
70
|
-
};
|
|
71
|
-
}, []), r.data ? d ? /* @__PURE__ */ e(M, { ref: t, className: y("betPack", o && "isMobile"), children: /* @__PURE__ */ e(
|
|
72
|
-
G,
|
|
54
|
+
) : /* @__PURE__ */ r(x, {}), K = H(({ sdk: n, swipeable: i = !0, onEvent: t = j, overlay: a }) => {
|
|
55
|
+
const e = k(n.featuresList.getStore()), d = L(() => n.getFeature(p.GAMES), [e]), o = k(n.getUserStore());
|
|
56
|
+
return /* @__PURE__ */ r(
|
|
57
|
+
R,
|
|
73
58
|
{
|
|
74
|
-
|
|
75
|
-
onEvent:
|
|
76
|
-
swipeable: o,
|
|
77
|
-
centerPadding: h,
|
|
78
|
-
changeHeightOnInit: g,
|
|
79
|
-
height: s ? s - u : void 0
|
|
59
|
+
className: P("SL-BetPack", a && "SL-BetPack--overlay", !a && "SL-BetPack--standalone"),
|
|
60
|
+
children: /* @__PURE__ */ r(J, { overlay: a, user: o, gamification: d, onEvent: t, swipeable: i })
|
|
80
61
|
}
|
|
81
|
-
)
|
|
82
|
-
T,
|
|
83
|
-
{
|
|
84
|
-
actionFn: () => c({ type: "slHardRefresh" }),
|
|
85
|
-
description: `You are not authorized to
|
|
86
|
-
view this resource.`,
|
|
87
|
-
isMobile: o,
|
|
88
|
-
height: s ? s - u : void 0
|
|
89
|
-
}
|
|
90
|
-
) : /* @__PURE__ */ e(E, {});
|
|
62
|
+
);
|
|
91
63
|
});
|
|
92
64
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
65
|
+
K as BetPack,
|
|
66
|
+
er as BetPackOverlay
|
|
95
67
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const ScreenButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
2
1
|
export declare const ScreenTitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
2
|
export declare const ScreenDescription: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
3
|
export declare const BetPackContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|