@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 { BetPackOverlay as a } from "../index.js";
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
- a as BetPackOverlay
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 b, useState as y, useCallback as I, memo as F, useMemo as H, useEffect as L } from "react";
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 p } from "@streamlayer/sdk-web-types";
5
+ import { FeatureType as A } from "@streamlayer/sdk-web-types";
6
6
  import { BetPackContent as M } from "./BetPackContent/index.js";
7
- import { EmergencyScreen as O } 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 k } from "../../../ui/icons/index.js";
12
- import { Container as G, Header as T, HeaderTitle as z, CloseButton as U, Main as Y, Footer as q, SlideSwitchButton as C, IconArrowPrev as D, buttonAvailable as g, IconArrowNext as J } from "./BetPackOverlay/styles.js";
13
- const nr = b(({ sdk: c, onEvent: a, close: t }, i) => {
14
- const [o, m] = y(), [e, h] = y(), w = I(
15
- (l) => {
16
- if (l.type === "slBetPackReady") {
17
- const { next: s, prev: u, current: f, canNext: N, canPrev: A } = l.payload || {};
18
- m({ next: s, prev: u }), h((n) => ({
19
- current: n != null && n.current ? n == null ? void 0 : n.current : f,
20
- canPrev: n != null && n.current ? n == null ? void 0 : n.canPrev : A,
21
- canNext: N
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 (l.type === "slBetPackChangeCard") {
25
- const { current: s, canNext: u, canPrev: f } = l.payload || {};
26
- h({ current: s, canNext: u, canPrev: f });
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(l);
28
+ a == null || a(i);
29
29
  },
30
30
  [a]
31
31
  );
32
- return /* @__PURE__ */ d(G, { ref: i, children: [
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(k, { name: "fgIcon" }),
39
+ /* @__PURE__ */ r(x, { name: "fgIcon" }),
36
40
  "Featured Groups+"
37
41
  ] }),
38
- /* @__PURE__ */ r(U, { "data-a": "intr", onClick: t, children: /* @__PURE__ */ r(k, { name: "icon-close-btn-gray" }) })
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: c, onEvent: w, overlay: !0 }) }),
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: o == null ? void 0 : o.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(D, { "data-a": "intr", name: "iconArrowPrev", className: P((e == null ? void 0 : e.canPrev) && g) }) }),
43
- /* @__PURE__ */ r(C, { "data-a": "intr", onClick: o == null ? void 0 : o.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(J, { "data-a": "intr", name: "iconArrowPrev", className: P((e == null ? void 0 : e.canNext) && g) }) })
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: c, gamification: a, overlay: t, swipeable: i, onEvent: o }) => c.data ? a ? /* @__PURE__ */ r(M, { overlay: t, gamification: a, onEvent: o, swipeable: i }) : /* @__PURE__ */ r(x, {}) : c.error && !c.loading ? /* @__PURE__ */ r(
47
- O,
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: o,
50
- actionFn: () => o({ type: "slHardRefresh" }),
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(x, {}), Q = F(({ sdk: c, swipeable: a = !0, onEvent: t = j, overlay: i }) => {
55
- const o = B(c.featuresList.getStore()), m = H(() => c.getFeature(p.GAMES), [o]), e = B(c.getUserStore());
56
- return L(() => (c.writeOverlaySessionId(), () => {
57
- c.writeOverlaySessionId("");
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
- R,
63
+ O,
60
64
  {
61
- className: P("SL-BetPack", i && "SL-BetPack--overlay", !i && "SL-BetPack--standalone"),
62
- children: /* @__PURE__ */ r(K, { overlay: i, user: e, gamification: m, onEvent: t, swipeable: a })
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.2",
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.11",
73
- "@streamlayer/react-polyfills": "^0.1.18",
74
- "@streamlayer/sdk-web": "^1.10.11",
75
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.37",
76
- "@streamlayer/sdk-web-analytics": "^1.7.11",
77
- "@streamlayer/sdk-web-core": "^1.11.13",
78
- "@streamlayer/sdk-web-api": "^1.8.11",
79
- "@streamlayer/sdk-web-features": "^1.0.58",
80
- "@streamlayer/sdk-web-interfaces": "^1.5.2",
81
- "@streamlayer/sdk-web-logger": "^1.0.58",
82
- "@streamlayer/sdk-web-storage": "^1.0.58",
83
- "@streamlayer/sdk-web-notifications": "^1.3.20",
84
- "@streamlayer/sdk-web-types": "^1.10.15"
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.2"
124
+ "@streamlayer/react": "^1.15.3"
125
125
  },
126
126
  "dependencies": {
127
127
  "@dailymotion/vast-client": "^6.2.0",