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