@streamlayer/react-ui 1.20.0 → 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/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -10
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +12 -12
- package/lib/app/masters/BetPack/BetPackContent/index.js +50 -46
- package/lib/app/masters/BetPack/BetPackOverlay/index.js +3 -2
- package/lib/app/masters/BetPack/index.js +61 -59
- 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/masters.js +21 -31
- package/lib/app/masters/useOrientation.d.ts +3 -0
- package/lib/app/masters/useOrientation.js +12 -0
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/overlay/externalAd/index.js +2973 -2989
- package/lib/ui/advertisement/overlay/externalAd/styles.d.ts +8 -0
- package/lib/ui/advertisement/overlay/externalAd/styles.js +39 -0
- package/lib/ui/gamification/vote/index.js +43 -43
- package/package.json +15 -15
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useDynamicParentFont as
|
|
4
|
-
import { EmergencyContainer as
|
|
5
|
-
const
|
|
6
|
-
const { container: o, fontSize:
|
|
7
|
-
return /* @__PURE__ */
|
|
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
8
|
/* @__PURE__ */ e(l, { children: "Something went wrong." }),
|
|
9
|
-
/* @__PURE__ */ e(
|
|
10
|
-
/* @__PURE__ */ e(
|
|
9
|
+
/* @__PURE__ */ e(y, { children: c }),
|
|
10
|
+
/* @__PURE__ */ e(f, { onClick: r, children: "Try again" })
|
|
11
11
|
] });
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
d as EmergencyScreen
|
|
15
15
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { useState as T, useRef as
|
|
2
|
-
const
|
|
3
|
-
const [v, a] = T(
|
|
4
|
-
return
|
|
1
|
+
import { useState as T, useRef as h, useEffect as p } from "react";
|
|
2
|
+
const m = "16px", g = 17, f = 21, S = 24, w = (r) => r < 0.9 ? S : r < 1.17 ? f : g, C = (r, E) => {
|
|
3
|
+
const [v, a] = T(m), [_, u] = T(""), c = h(null), e = h();
|
|
4
|
+
return p(() => {
|
|
5
5
|
const t = c.current, n = () => {
|
|
6
6
|
e.current && (clearTimeout(e.current), e.current = void 0), e.current = setTimeout(() => {
|
|
7
7
|
if (t) {
|
|
8
|
-
const
|
|
8
|
+
const i = getComputedStyle(t), d = +i.width.replace("px", ""), O = +i.height.replace("px", "") / d, l = d / w(O);
|
|
9
9
|
a(`${l < 20 ? l : 20}px`);
|
|
10
10
|
}
|
|
11
11
|
e.current = void 0;
|
|
12
12
|
}, 200);
|
|
13
13
|
}, s = () => {
|
|
14
|
-
window.screen.orientation.type.includes("landscape") ||
|
|
15
|
-
},
|
|
14
|
+
window.screen.orientation.type.includes("landscape") || Math.abs(window.orientation) === 90 ? u("landscape") : u("portrait");
|
|
15
|
+
}, o = () => {
|
|
16
16
|
s(), n();
|
|
17
17
|
};
|
|
18
|
-
return window.screen.orientation.addEventListener("change",
|
|
19
|
-
window.screen.orientation.removeEventListener("change",
|
|
18
|
+
return window.screen.orientation.addEventListener("change", o), window.addEventListener("orientationchange", o), window.addEventListener("resize", n), t == null || t.addEventListener("transitionend", n, !1), s(), n(), () => {
|
|
19
|
+
window.screen.orientation.removeEventListener("change", o), window.removeEventListener("orientationchange", o), window.removeEventListener("resize", n), t == null || t.removeEventListener("transitionend", n), e.current && clearTimeout(e.current);
|
|
20
20
|
};
|
|
21
|
-
}, []),
|
|
21
|
+
}, []), p(() => (e.current && (clearTimeout(e.current), e.current = void 0), e.current = setTimeout(() => {
|
|
22
22
|
if (c.current) {
|
|
23
|
-
const t = getComputedStyle(c.current), n = +t.width.replace("px", ""),
|
|
24
|
-
a(`${
|
|
23
|
+
const t = getComputedStyle(c.current), n = +t.width.replace("px", ""), o = +t.height.replace("px", "") / n, i = n / w(o);
|
|
24
|
+
a(`${i < 20 ? i : 20}px`), e.current = void 0;
|
|
25
25
|
}
|
|
26
26
|
}, 200), () => {
|
|
27
27
|
e.current && clearTimeout(e.current);
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsx as u, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import { ConnectError as T, Code as N } from "@connectrpc/connect";
|
|
3
3
|
import { cx as A } from "@linaria/core";
|
|
4
|
-
import { useCallback as
|
|
4
|
+
import { useCallback as P, useSyncExternalStore as F, useRef as b, useState as I, useMemo as B, useEffect as v } from "react";
|
|
5
5
|
import { EmergencyScreen as S } from "./EmergencyScreen/index.js";
|
|
6
|
-
import { EndScreen as
|
|
7
|
-
import { LoaderScreen as
|
|
8
|
-
import { QuestionScreen as
|
|
9
|
-
import { ScreenContainer as
|
|
10
|
-
import { StartScreen as
|
|
11
|
-
import { settings as
|
|
12
|
-
import { Carousel as K, desktopDots as
|
|
13
|
-
function
|
|
14
|
-
let a = new Set(
|
|
15
|
-
return t.listen((
|
|
16
|
-
a.has(p) &&
|
|
6
|
+
import { EndScreen as M } from "./EndScreen/index.js";
|
|
7
|
+
import { LoaderScreen as D } from "./LoaderScreen/index.js";
|
|
8
|
+
import { QuestionScreen as H } from "./QuestionScreen/index.js";
|
|
9
|
+
import { ScreenContainer as L } from "./ScreenContainer/index.js";
|
|
10
|
+
import { StartScreen as V } from "./StartScreen/index.js";
|
|
11
|
+
import { settings as x } from "./constants.js";
|
|
12
|
+
import { Carousel as K, desktopDots as q } from "./styles.js";
|
|
13
|
+
function z(t, s, r) {
|
|
14
|
+
let a = new Set(s).add(void 0);
|
|
15
|
+
return t.listen((o, c, p) => {
|
|
16
|
+
a.has(p) && r(o, c, p);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
-
(
|
|
22
|
-
[
|
|
19
|
+
function E(t, s = {}) {
|
|
20
|
+
let r = P(
|
|
21
|
+
(o) => s.keys ? z(t, s.keys, o) : t.listen(o),
|
|
22
|
+
[s.keys, t]
|
|
23
23
|
), a = t.get.bind(t);
|
|
24
|
-
return F(
|
|
24
|
+
return F(r, a, a);
|
|
25
25
|
}
|
|
26
|
-
const re = ({ gamification: t, autoplay:
|
|
27
|
-
const i = b(), l = b(null), [
|
|
28
|
-
const e =
|
|
26
|
+
const re = ({ gamification: t, autoplay: s, swipeable: r, changeHeightOnInit: a, height: o, onEvent: c, centerPadding: p }) => {
|
|
27
|
+
const i = b(), l = b(null), [C, O] = I(!1), { data: n, error: f, loading: y } = E(t.betPack.getStore()), { listOfQuestions: m, countQuestionsAvailable: Q } = B(() => {
|
|
28
|
+
const e = n ? Object.values(n) : [];
|
|
29
29
|
return {
|
|
30
30
|
listOfQuestions: e,
|
|
31
31
|
countQuestionsAvailable: e.filter(({ marketClosed: d }) => !d).length
|
|
32
32
|
};
|
|
33
|
-
}, [
|
|
33
|
+
}, [n]);
|
|
34
34
|
v(() => {
|
|
35
|
-
!f && !y &&
|
|
35
|
+
!f && !y && n !== void 0 && !C && c({
|
|
36
36
|
type: "slBetPackReady",
|
|
37
37
|
payload: {
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -52,31 +52,33 @@ const re = ({ gamification: t, autoplay: o, swipeable: n, changeHeightOnInit: a,
|
|
|
52
52
|
canPrev: !1
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
}, [
|
|
56
|
-
const
|
|
55
|
+
}, [n, f, y, c]);
|
|
56
|
+
const h = P(
|
|
57
57
|
async (e, d) => {
|
|
58
58
|
try {
|
|
59
|
-
|
|
59
|
+
O(!0), await t.betPackVote(e, d);
|
|
60
60
|
} finally {
|
|
61
|
-
i.current && clearTimeout(i.current),
|
|
61
|
+
i.current && clearTimeout(i.current), s && (i.current = setTimeout(() => {
|
|
62
62
|
var k;
|
|
63
63
|
(k = l.current) == null || k.slickNext();
|
|
64
64
|
}, 2e3));
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
[t, l,
|
|
67
|
+
[t, l, s]
|
|
68
68
|
);
|
|
69
69
|
if (v(() => () => {
|
|
70
70
|
i.current && clearTimeout(i.current);
|
|
71
71
|
}, []), y)
|
|
72
|
-
return /* @__PURE__ */ u(
|
|
73
|
-
if (!f && (
|
|
72
|
+
return /* @__PURE__ */ u(D, {});
|
|
73
|
+
if (!f && (n == null || !Object.keys(n).length))
|
|
74
74
|
return /* @__PURE__ */ u(
|
|
75
75
|
S,
|
|
76
76
|
{
|
|
77
77
|
actionFn: () => c({ type: "slHardRefresh" }),
|
|
78
78
|
description: `It looks like we couldn't
|
|
79
|
-
load the questions
|
|
79
|
+
load the questions.`,
|
|
80
|
+
isMobile: r,
|
|
81
|
+
height: o
|
|
80
82
|
}
|
|
81
83
|
);
|
|
82
84
|
if (f)
|
|
@@ -86,19 +88,21 @@ const re = ({ gamification: t, autoplay: o, swipeable: n, changeHeightOnInit: a,
|
|
|
86
88
|
actionFn: () => c({ type: "slHardRefresh" }),
|
|
87
89
|
description: f instanceof T && f.code !== N.InvalidArgument ? `The event ID was not
|
|
88
90
|
specified or is invalid.` : `The server is unable to
|
|
89
|
-
handle this request
|
|
91
|
+
handle this request.`,
|
|
92
|
+
isMobile: r,
|
|
93
|
+
height: o
|
|
90
94
|
}
|
|
91
95
|
);
|
|
92
|
-
const
|
|
96
|
+
const j = (e) => {
|
|
93
97
|
var d;
|
|
94
98
|
if (c({
|
|
95
99
|
type: "slBetPackChangeCard",
|
|
96
100
|
payload: {
|
|
97
101
|
current: e,
|
|
98
|
-
canNext: e < Object.keys(
|
|
102
|
+
canNext: e < Object.keys(n).length + 1,
|
|
99
103
|
canPrev: e >= 1
|
|
100
104
|
}
|
|
101
|
-
}), e !== 0 && e !== Object.keys(
|
|
105
|
+
}), e !== 0 && e !== Object.keys(n).length + 1 && ((d = m[e - 1]) != null && d.id)) {
|
|
102
106
|
t.openQuestion(m[e - 1].id, {
|
|
103
107
|
openedFrom: "bet-pack",
|
|
104
108
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -115,32 +119,32 @@ handle this request.`
|
|
|
115
119
|
return;
|
|
116
120
|
}
|
|
117
121
|
t.closeQuestion();
|
|
118
|
-
},
|
|
122
|
+
}, g = (e) => e ? /* @__PURE__ */ u(L, { height: o, swipeable: r, children: /* @__PURE__ */ u(H, { question: e, vote: h }) }, e.id) : null;
|
|
119
123
|
return /* @__PURE__ */ R(
|
|
120
124
|
K,
|
|
121
125
|
{
|
|
122
|
-
...
|
|
123
|
-
swipe:
|
|
126
|
+
...x,
|
|
127
|
+
swipe: r,
|
|
124
128
|
onInit: a,
|
|
125
|
-
centerPadding: p ||
|
|
126
|
-
afterChange:
|
|
129
|
+
centerPadding: p || x.centerPadding,
|
|
130
|
+
afterChange: j,
|
|
127
131
|
beforeChange: () => {
|
|
128
132
|
i.current && clearTimeout(i.current);
|
|
129
133
|
},
|
|
130
134
|
ref: l,
|
|
131
|
-
className: A(!
|
|
135
|
+
className: A(!r && q),
|
|
132
136
|
children: [
|
|
133
137
|
/* @__PURE__ */ u(
|
|
134
|
-
|
|
138
|
+
V,
|
|
135
139
|
{
|
|
136
|
-
height:
|
|
140
|
+
height: o,
|
|
137
141
|
sliderRef: l,
|
|
138
|
-
countQuestionsAvailable:
|
|
139
|
-
swipeable:
|
|
142
|
+
countQuestionsAvailable: Q,
|
|
143
|
+
swipeable: r
|
|
140
144
|
}
|
|
141
145
|
),
|
|
142
|
-
Object.values(
|
|
143
|
-
/* @__PURE__ */ u(
|
|
146
|
+
Object.values(n).map(g),
|
|
147
|
+
/* @__PURE__ */ u(M, { onEvent: c, height: o, swipeable: r })
|
|
144
148
|
]
|
|
145
149
|
}
|
|
146
150
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@linaria/core";
|
|
3
|
+
import "../../useOrientation.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { BetPackOverlay as
|
|
5
|
+
import { BetPackOverlay as c } from "../index.js";
|
|
5
6
|
import "../../../../ui/icons/index.js";
|
|
6
7
|
import "./styles.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
c as BetPackOverlay
|
|
9
10
|
};
|
|
@@ -1,93 +1,95 @@
|
|
|
1
1
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { cx as
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { FeatureType as
|
|
7
|
-
import { BetPackContent as
|
|
2
|
+
import { cx as y } from "@linaria/core";
|
|
3
|
+
import R from "lodash.throttle";
|
|
4
|
+
import { forwardRef as z, useState as k, useCallback as N, useMemo as A, memo as F, useRef as I, useEffect as O } from "react";
|
|
5
|
+
import { useStore as w } from "@streamlayer/react-polyfills";
|
|
6
|
+
import { FeatureType as j } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { BetPackContent as E } from "./BetPackContent/index.js";
|
|
8
8
|
import { EmergencyScreen as M } from "./BetPackContent/EmergencyScreen/index.js";
|
|
9
|
-
import { LoaderScreen as
|
|
10
|
-
import { BetPackContainer as
|
|
11
|
-
import { defaultEventHandler as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
import { LoaderScreen as T } from "./BetPackContent/LoaderScreen/index.js";
|
|
10
|
+
import { BetPackContainer as G } from "./styles.js";
|
|
11
|
+
import { defaultEventHandler as U } from "./utils.js";
|
|
12
|
+
import { useOrientation as Y } from "../useOrientation.js";
|
|
13
|
+
import { SvgIcon as C } from "../../../ui/icons/index.js";
|
|
14
|
+
import { Container as q, Header as D, HeaderTitle as J, CloseButton as K, Main as Q, Footer as V, SlideSwitchButton as H, IconArrowPrev as W, buttonAvailable as B, IconArrowNext as X } from "./BetPackOverlay/styles.js";
|
|
15
|
+
const ur = z(
|
|
16
|
+
({ sdk: m, onEvent: o, close: u, isMobile: c }, h) => {
|
|
17
|
+
const [i, d] = k(), [r, t] = k(), { orientation: s } = Y(), l = N(
|
|
18
|
+
(a) => {
|
|
19
|
+
if (a.type === "slBetPackReady") {
|
|
20
|
+
const { next: P, prev: x, current: p, canNext: b, canPrev: L } = a.payload || {};
|
|
21
|
+
d({ next: P, prev: x }), t((n) => ({
|
|
22
|
+
current: n != null && n.current ? n == null ? void 0 : n.current : p,
|
|
23
|
+
canPrev: n != null && n.current ? n == null ? void 0 : n.canPrev : L,
|
|
24
|
+
canNext: b
|
|
24
25
|
}));
|
|
25
26
|
}
|
|
26
|
-
if (
|
|
27
|
-
const { current:
|
|
28
|
-
|
|
27
|
+
if (a.type === "slBetPackChangeCard") {
|
|
28
|
+
const { current: P, canNext: x, canPrev: p } = a.payload || {};
|
|
29
|
+
t({ current: P, canNext: x, canPrev: p });
|
|
29
30
|
}
|
|
30
|
-
o == null || o(
|
|
31
|
+
o == null || o(a);
|
|
31
32
|
},
|
|
32
33
|
[o]
|
|
33
|
-
);
|
|
34
|
-
return /* @__PURE__ */ f(
|
|
35
|
-
/* @__PURE__ */ f(
|
|
36
|
-
/* @__PURE__ */ f(
|
|
37
|
-
/* @__PURE__ */ e(
|
|
34
|
+
), g = A(() => c ? s === "landscape" ? "60px" : "18px" : "30px", [c, s]);
|
|
35
|
+
return /* @__PURE__ */ f(q, { ref: h, children: [
|
|
36
|
+
/* @__PURE__ */ f(D, { children: [
|
|
37
|
+
/* @__PURE__ */ f(J, { children: [
|
|
38
|
+
/* @__PURE__ */ e(C, { name: "icon-trophy-bet-pack" }),
|
|
38
39
|
"LiveMatch Experience",
|
|
39
40
|
" "
|
|
40
41
|
] }),
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
+
/* @__PURE__ */ e(K, { onClick: u, children: /* @__PURE__ */ e(C, { name: "icon-close-btn-gray" }) })
|
|
42
43
|
] }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
|
|
44
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(
|
|
45
|
+
Z,
|
|
45
46
|
{
|
|
46
47
|
sdk: m,
|
|
47
|
-
onEvent:
|
|
48
|
-
swipeable: !!
|
|
49
|
-
centerPadding:
|
|
50
|
-
heightOffset:
|
|
48
|
+
onEvent: l,
|
|
49
|
+
swipeable: !!c,
|
|
50
|
+
centerPadding: g,
|
|
51
|
+
heightOffset: c ? 0 : 48
|
|
51
52
|
}
|
|
52
53
|
) }),
|
|
53
|
-
!
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
-
/* @__PURE__ */ e(
|
|
54
|
+
!c && /* @__PURE__ */ f(V, { children: [
|
|
55
|
+
/* @__PURE__ */ e(H, { onClick: i == null ? void 0 : i.prev, disabled: !(r != null && r.canPrev), children: /* @__PURE__ */ e(W, { name: "iconArrowPrev", className: y((r == null ? void 0 : r.canPrev) && B) }) }),
|
|
56
|
+
/* @__PURE__ */ e(H, { onClick: i == null ? void 0 : i.next, disabled: !(r != null && r.canNext), children: /* @__PURE__ */ e(X, { name: "iconArrowPrev", className: y((r == null ? void 0 : r.canNext) && B) }) })
|
|
56
57
|
] })
|
|
57
58
|
] });
|
|
58
59
|
}
|
|
59
|
-
),
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
), Z = F(({ sdk: m, swipeable: o = !0, heightOffset: u = 65, onEvent: c = U, centerPadding: h }) => {
|
|
61
|
+
const i = w(m.featuresList.getStore()), d = A(() => m.getFeature(j.GAMES), [i]), r = w(m.getUserStore()), t = I(null), [s, l] = k(), g = N(() => {
|
|
62
|
+
t.current && l(t.current.clientHeight);
|
|
62
63
|
}, []);
|
|
63
|
-
return
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
return O(() => {
|
|
65
|
+
const a = R(() => {
|
|
66
|
+
t.current && l(t.current.clientHeight);
|
|
66
67
|
}, 200);
|
|
67
|
-
return window.addEventListener("resize",
|
|
68
|
-
window.removeEventListener("resize",
|
|
68
|
+
return window.addEventListener("resize", a), () => {
|
|
69
|
+
window.removeEventListener("resize", a);
|
|
69
70
|
};
|
|
70
|
-
}, []), r.data ? d ? /* @__PURE__ */ e(
|
|
71
|
-
|
|
71
|
+
}, []), r.data ? d ? /* @__PURE__ */ e(G, { ref: t, className: y("betPack", o && "isMobile"), children: /* @__PURE__ */ e(
|
|
72
|
+
E,
|
|
72
73
|
{
|
|
73
74
|
gamification: d,
|
|
74
|
-
onEvent:
|
|
75
|
+
onEvent: c,
|
|
75
76
|
swipeable: o,
|
|
76
|
-
centerPadding:
|
|
77
|
-
changeHeightOnInit:
|
|
78
|
-
height:
|
|
77
|
+
centerPadding: h,
|
|
78
|
+
changeHeightOnInit: g,
|
|
79
|
+
height: s ? s - u : void 0
|
|
79
80
|
}
|
|
80
81
|
) }) : /* @__PURE__ */ e("div", { children: "no gamification" }) : r.error && !r.loading ? /* @__PURE__ */ e(
|
|
81
82
|
M,
|
|
82
83
|
{
|
|
83
|
-
actionFn: () =>
|
|
84
|
+
actionFn: () => c({ type: "slHardRefresh" }),
|
|
84
85
|
description: `You are not authorized to
|
|
85
86
|
view this resource.`,
|
|
86
|
-
isMobile: o
|
|
87
|
+
isMobile: o,
|
|
88
|
+
height: s ? s - u : void 0
|
|
87
89
|
}
|
|
88
|
-
) : /* @__PURE__ */ e(
|
|
90
|
+
) : /* @__PURE__ */ e(T, {});
|
|
89
91
|
});
|
|
90
92
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
Z as BetPack,
|
|
94
|
+
ur as BetPackOverlay
|
|
93
95
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AppNodeRef } from '../../..';
|
|
2
|
-
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
2
|
import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
|
|
4
3
|
export declare const GamificationOverlay: React.FC<{
|
|
5
4
|
gamification: GamificationClass;
|
|
@@ -12,6 +11,5 @@ export declare const GamificationOverlay: React.FC<{
|
|
|
12
11
|
export declare const GamificationOverlayStandalone: React.FC<{
|
|
13
12
|
gamification: GamificationClass;
|
|
14
13
|
className?: string;
|
|
15
|
-
responsiveStore: ResponsiveStore;
|
|
16
14
|
appNode: AppNodeRef;
|
|
17
15
|
}>;
|
|
@@ -1,49 +1,44 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useHideTransition as
|
|
4
|
-
import { useStore as
|
|
5
|
-
import { ModalPortal as
|
|
6
|
-
import { ShowIn as
|
|
7
|
-
import { Question as
|
|
8
|
-
import { Tabs as
|
|
9
|
-
const
|
|
2
|
+
import { styled as m } from "@linaria/react";
|
|
3
|
+
import { useHideTransition as a } from "../../../../hooks/showIn.js";
|
|
4
|
+
import { useStore as l } from "@streamlayer/react-polyfills";
|
|
5
|
+
import { ModalPortal as p } from "../../../../ui/modal/index.js";
|
|
6
|
+
import { ShowIn as u } from "../../../../ui/show-in/index.js";
|
|
7
|
+
import { Question as c } from "./Question.js";
|
|
8
|
+
import { Tabs as f } from "./Tabs.js";
|
|
9
|
+
const d = () => u, h = /* @__PURE__ */ m(d())({
|
|
10
10
|
name: "OpenedContainer",
|
|
11
11
|
class: "o1seszvt",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
-
}),
|
|
13
|
+
}), G = ({
|
|
14
14
|
gamification: o,
|
|
15
|
-
className:
|
|
16
|
-
}) => /* @__PURE__ */ n(
|
|
17
|
-
className:
|
|
15
|
+
className: r
|
|
16
|
+
}) => /* @__PURE__ */ n(f, {
|
|
17
|
+
className: r,
|
|
18
18
|
gamification: o
|
|
19
|
-
}),
|
|
19
|
+
}), I = ({
|
|
20
20
|
gamification: o,
|
|
21
|
-
className:
|
|
22
|
-
appNode:
|
|
23
|
-
responsiveStore: i
|
|
21
|
+
className: r,
|
|
22
|
+
appNode: e
|
|
24
23
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
className: e,
|
|
38
|
-
hiding: a,
|
|
39
|
-
onAnimationEnd: p,
|
|
40
|
-
children: /* @__PURE__ */ n(f, {
|
|
24
|
+
const t = l(o.openedQuestion.$store), {
|
|
25
|
+
hiding: i,
|
|
26
|
+
onAnimationEnd: s
|
|
27
|
+
} = a();
|
|
28
|
+
return !e.current || !t ? null : /* @__PURE__ */ n(p, {
|
|
29
|
+
container: e,
|
|
30
|
+
useContainer: !1,
|
|
31
|
+
children: /* @__PURE__ */ n(h, {
|
|
32
|
+
className: r,
|
|
33
|
+
hiding: i,
|
|
34
|
+
onAnimationEnd: s,
|
|
35
|
+
children: /* @__PURE__ */ n(c, {
|
|
41
36
|
gamification: o
|
|
42
37
|
})
|
|
43
38
|
})
|
|
44
39
|
});
|
|
45
40
|
};
|
|
46
41
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
G as GamificationOverlay,
|
|
43
|
+
I as GamificationOverlayStandalone
|
|
49
44
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AppNodeRef } from '../..';
|
|
2
|
-
import { ResponsiveStore } from '../useSdkResponsive';
|
|
3
2
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
4
3
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
5
4
|
/** render feature by type */
|
|
@@ -12,7 +11,6 @@ export declare const ActiveFeature: React.FC<{
|
|
|
12
11
|
export declare const StandaloneFeature: React.FC<{
|
|
13
12
|
sdk: StreamLayerSDK;
|
|
14
13
|
feature: Features | null;
|
|
15
|
-
responsiveStore: ResponsiveStore;
|
|
16
14
|
appNode: AppNodeRef;
|
|
17
15
|
className?: string;
|
|
18
16
|
}>;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as l, useMemo as a, Suspense as m } from "react";
|
|
3
|
-
import { FeatureType as
|
|
3
|
+
import { FeatureType as n } from "@streamlayer/sdk-web-types";
|
|
4
4
|
import { FeatureProvider as u } from "./FeatureProvider.js";
|
|
5
5
|
import { GamificationOverlayStandalone as f } from "./Gamification/index.js";
|
|
6
6
|
const c = l(() => import("./Gamification/gamification-feature.js")), h = ({ sdk: e, feature: t, className: i }) => {
|
|
7
|
-
const
|
|
7
|
+
const o = a(() => t && t.featureConfig.get().type === n.GAMES ? /* @__PURE__ */ r(u, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(c, { className: i, gamification: t }) }) : null, [e, t, i]);
|
|
8
8
|
return /* @__PURE__ */ r(
|
|
9
9
|
m,
|
|
10
10
|
{
|
|
11
11
|
fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
12
|
-
children:
|
|
12
|
+
children: o
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
}, v = ({ feature: e, className: t, appNode: i
|
|
16
|
-
f,
|
|
17
|
-
{
|
|
18
|
-
className: t,
|
|
19
|
-
appNode: i,
|
|
20
|
-
responsiveStore: n,
|
|
21
|
-
gamification: e
|
|
22
|
-
}
|
|
23
|
-
) : null;
|
|
15
|
+
}, v = ({ feature: e, className: t, appNode: i }) => e && e.featureConfig.get().type === n.GAMES ? /* @__PURE__ */ r(f, { className: t, appNode: i, gamification: e }) : null;
|
|
24
16
|
export {
|
|
25
17
|
h as ActiveFeature,
|
|
26
18
|
v as StandaloneFeature
|