@streamlayer/react-ui 1.23.2 → 1.23.3
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@linaria/core";
|
|
3
3
|
import "react";
|
|
4
|
-
import
|
|
4
|
+
import "@streamlayer/sdk-web-types";
|
|
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,65 +1,69 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cx as P } from "@linaria/core";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as I, useState as y, useCallback as H, useEffect as w, memo as L, useMemo as p } from "react";
|
|
4
4
|
import { useStore as B } from "@streamlayer/react-polyfills";
|
|
5
|
-
import { FeatureType as
|
|
5
|
+
import { FeatureType as A } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { BetPackContent as M } from "./BetPackContent/index.js";
|
|
7
|
-
import { EmergencyScreen as
|
|
8
|
-
import { LoaderScreen as
|
|
9
|
-
import { BetPackContainer as
|
|
10
|
-
import { defaultEventHandler as
|
|
11
|
-
import { SvgIcon as
|
|
12
|
-
import { Container as
|
|
13
|
-
const nr =
|
|
14
|
-
const [
|
|
15
|
-
(
|
|
16
|
-
if (
|
|
17
|
-
const { next:
|
|
18
|
-
|
|
19
|
-
current:
|
|
20
|
-
canPrev:
|
|
21
|
-
canNext:
|
|
7
|
+
import { EmergencyScreen as G } from "./BetPackContent/EmergencyScreen/index.js";
|
|
8
|
+
import { LoaderScreen as g } from "./BetPackContent/LoaderScreen/index.js";
|
|
9
|
+
import { BetPackContainer as O } from "./styles.js";
|
|
10
|
+
import { defaultEventHandler as R } from "./utils.js";
|
|
11
|
+
import { SvgIcon as x } from "../../../ui/icons/index.js";
|
|
12
|
+
import { Container as j, Header as T, HeaderTitle as z, CloseButton as U, Main as Y, Footer as q, SlideSwitchButton as C, IconArrowPrev as D, buttonAvailable as k, IconArrowNext as J } from "./BetPackOverlay/styles.js";
|
|
13
|
+
const nr = I(({ sdk: o, onEvent: a, close: m }, t) => {
|
|
14
|
+
const [n, u] = y(), [e, h] = y(), N = H(
|
|
15
|
+
(i) => {
|
|
16
|
+
if (i.type === "slBetPackReady") {
|
|
17
|
+
const { next: l, prev: s, current: f, canNext: b, canPrev: F } = i.payload || {};
|
|
18
|
+
u({ next: l, prev: s }), 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 : F,
|
|
21
|
+
canNext: b
|
|
22
22
|
}));
|
|
23
23
|
}
|
|
24
|
-
if (
|
|
25
|
-
const { current:
|
|
26
|
-
h({ current:
|
|
24
|
+
if (i.type === "slBetPackChangeCard") {
|
|
25
|
+
const { current: l, canNext: s, canPrev: f } = i.payload || {};
|
|
26
|
+
h({ current: l, canNext: s, canPrev: f });
|
|
27
27
|
}
|
|
28
|
-
a == null || a(
|
|
28
|
+
a == null || a(i);
|
|
29
29
|
},
|
|
30
30
|
[a]
|
|
31
31
|
);
|
|
32
|
-
return
|
|
32
|
+
return w(() => () => {
|
|
33
|
+
var l;
|
|
34
|
+
const i = o.getFeature(A.GAMES);
|
|
35
|
+
i && ((l = i.betPack) == null || l.off());
|
|
36
|
+
}, [o]), /* @__PURE__ */ d(j, { ref: t, children: [
|
|
33
37
|
/* @__PURE__ */ d(T, { children: [
|
|
34
38
|
/* @__PURE__ */ d(z, { children: [
|
|
35
|
-
/* @__PURE__ */ r(
|
|
39
|
+
/* @__PURE__ */ r(x, { name: "fgIcon" }),
|
|
36
40
|
"Featured Groups+"
|
|
37
41
|
] }),
|
|
38
|
-
/* @__PURE__ */ r(U, { "data-a": "intr", onClick:
|
|
42
|
+
/* @__PURE__ */ r(U, { "data-a": "intr", onClick: m, children: /* @__PURE__ */ r(x, { name: "icon-close-btn-gray" }) })
|
|
39
43
|
] }),
|
|
40
|
-
/* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Q, { sdk:
|
|
44
|
+
/* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Q, { sdk: o, onEvent: N, overlay: !0 }) }),
|
|
41
45
|
/* @__PURE__ */ d(q, { children: [
|
|
42
|
-
/* @__PURE__ */ r(C, { "data-a": "intr", onClick:
|
|
43
|
-
/* @__PURE__ */ r(C, { "data-a": "intr", onClick:
|
|
46
|
+
/* @__PURE__ */ r(C, { "data-a": "intr", onClick: n == null ? void 0 : n.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(D, { "data-a": "intr", name: "iconArrowPrev", className: P((e == null ? void 0 : e.canPrev) && k) }) }),
|
|
47
|
+
/* @__PURE__ */ r(C, { "data-a": "intr", onClick: n == null ? void 0 : n.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(J, { "data-a": "intr", name: "iconArrowPrev", className: P((e == null ? void 0 : e.canNext) && k) }) })
|
|
44
48
|
] })
|
|
45
49
|
] });
|
|
46
|
-
}), K = ({ user:
|
|
47
|
-
|
|
50
|
+
}), K = ({ user: o, gamification: a, overlay: m, swipeable: t, onEvent: n }) => o.data ? a ? /* @__PURE__ */ r(M, { overlay: m, gamification: a, onEvent: n, swipeable: t }) : /* @__PURE__ */ r(g, {}) : o.error && !o.loading ? /* @__PURE__ */ r(
|
|
51
|
+
G,
|
|
48
52
|
{
|
|
49
|
-
onEvent:
|
|
50
|
-
actionFn: () =>
|
|
53
|
+
onEvent: n,
|
|
54
|
+
actionFn: () => n({ type: "slHardRefresh" }),
|
|
51
55
|
description: `You are not authorized to
|
|
52
56
|
view this resource.`
|
|
53
57
|
}
|
|
54
|
-
) : /* @__PURE__ */ r(
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
+
) : /* @__PURE__ */ r(g, {}), Q = L(({ sdk: o, swipeable: a = !0, onEvent: m = R, overlay: t }) => {
|
|
59
|
+
const n = B(o.featuresList.getStore()), u = p(() => o.getFeature(A.GAMES), [n]), e = B(o.getUserStore());
|
|
60
|
+
return w(() => (o.writeOverlaySessionId(), () => {
|
|
61
|
+
o.writeOverlaySessionId("");
|
|
58
62
|
}), []), /* @__PURE__ */ r(
|
|
59
|
-
|
|
63
|
+
O,
|
|
60
64
|
{
|
|
61
|
-
className: P("SL-BetPack",
|
|
62
|
-
children: /* @__PURE__ */ r(K, { overlay:
|
|
65
|
+
className: P("SL-BetPack", t && "SL-BetPack--overlay", !t && "SL-BetPack--standalone"),
|
|
66
|
+
children: /* @__PURE__ */ r(K, { overlay: t, user: e, gamification: u, onEvent: m, swipeable: a })
|
|
63
67
|
}
|
|
64
68
|
);
|
|
65
69
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
"react-window": "^1.8.10",
|
|
70
70
|
"react-window-infinite-loader": "^1.0.9",
|
|
71
71
|
"uuid": "^11.1.0",
|
|
72
|
-
"@streamlayer/feature-gamification": "^1.16.
|
|
73
|
-
"@streamlayer/react-polyfills": "^0.1.
|
|
74
|
-
"@streamlayer/sdk-web": "^1.10.
|
|
75
|
-
"@streamlayer/sdk-web-
|
|
76
|
-
"@streamlayer/sdk-web-
|
|
77
|
-
"@streamlayer/sdk-web-
|
|
78
|
-
"@streamlayer/sdk-web-
|
|
79
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
80
|
-
"@streamlayer/sdk-web-interfaces": "^1.5.
|
|
81
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
82
|
-
"@streamlayer/sdk-web-
|
|
83
|
-
"@streamlayer/sdk-web-
|
|
84
|
-
"@streamlayer/sdk-web-types": "^1.10.
|
|
72
|
+
"@streamlayer/feature-gamification": "^1.16.12",
|
|
73
|
+
"@streamlayer/react-polyfills": "^0.1.19",
|
|
74
|
+
"@streamlayer/sdk-web": "^1.10.12",
|
|
75
|
+
"@streamlayer/sdk-web-analytics": "^1.7.12",
|
|
76
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.1.38",
|
|
77
|
+
"@streamlayer/sdk-web-api": "^1.8.12",
|
|
78
|
+
"@streamlayer/sdk-web-core": "^1.11.14",
|
|
79
|
+
"@streamlayer/sdk-web-features": "^1.0.59",
|
|
80
|
+
"@streamlayer/sdk-web-interfaces": "^1.5.3",
|
|
81
|
+
"@streamlayer/sdk-web-logger": "^1.0.59",
|
|
82
|
+
"@streamlayer/sdk-web-notifications": "^1.3.21",
|
|
83
|
+
"@streamlayer/sdk-web-storage": "^1.0.59",
|
|
84
|
+
"@streamlayer/sdk-web-types": "^1.10.16"
|
|
85
85
|
},
|
|
86
86
|
"nx": {
|
|
87
87
|
"implicitDependencies": [
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"vite-plugin-svgr": "^4.2.0",
|
|
122
122
|
"vite-svg-loader": "^5.1.0",
|
|
123
123
|
"vite-tsconfig-paths": "^5.0.1",
|
|
124
|
-
"@streamlayer/react": "^1.15.
|
|
124
|
+
"@streamlayer/react": "^1.15.3"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@dailymotion/vast-client": "^6.2.0",
|