@streamlayer/react-ui 1.18.1 → 1.19.1
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 +1 -1
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +12 -8
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +42 -14
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +12 -0
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +40 -20
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +8 -4
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +4 -0
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +27 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +21 -19
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +22 -17
- package/lib/app/masters/BetPack/BetPackContent/index.js +88 -62
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/styles.js +8 -7
- package/lib/app/masters/BetPack/index.js +59 -53
- package/lib/app/masters/Features/Gamification/Question.js +3 -3
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -7
- package/lib/app/masters/Features/Gamification/Tabs.js +9 -42
- package/lib/app/masters/Features/Gamification/UserSummary.js +15 -14
- package/lib/app/masters/Features/Gamification/index.d.ts +1 -6
- package/lib/app/masters/Features/Gamification/index.js +37 -76
- package/lib/app/masters/Features/index.d.ts +1 -6
- package/lib/app/masters/Features/index.js +15 -25
- package/lib/app/masters/Header/index.d.ts +3 -0
- package/lib/app/masters/Header/index.js +38 -0
- package/lib/app/masters/Notifications/index.js +1 -1
- package/lib/app/masters/masters.d.ts +1 -0
- package/lib/app/masters/masters.js +75 -92
- package/lib/app/masters/story/index.d.ts +1 -0
- package/lib/app/masters/story/index.js +21 -22
- package/lib/app/masters/styles.d.ts +0 -10
- package/lib/app/masters/styles.js +13 -23
- package/lib/app/masters/useSdkResponsive.js +1 -1
- package/lib/app/masters/useSdkScroll.js +1 -1
- package/lib/app/useClipboardCopy.js +1 -1
- package/lib/app/useSdkResponsive.js +1 -1
- package/lib/app/useSdkScroll.js +1 -1
- package/lib/assets/style.css +1 -1
- package/lib/index-BEm7B1u1.js +72 -0
- package/lib/index-DALxy-8N.js +5437 -0
- package/lib/ui/gamification/user-statistics/index.d.ts +1 -0
- package/lib/ui/gamification/user-statistics/index.js +47 -39
- package/lib/ui/gamification/user-statistics/styles.d.ts +2 -0
- package/lib/ui/gamification/user-statistics/styles.js +34 -24
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/index.js +60 -47
- package/lib/ui/gamification/vote/feedback/styles.d.ts +12 -0
- package/lib/ui/gamification/vote/feedback/styles.js +47 -27
- package/lib/ui/gamification/vote/index.js +145 -136
- package/lib/ui/gamification/vote/styles.d.ts +3 -1
- package/lib/ui/gamification/vote/styles.js +42 -32
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/index.js +59 -60
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +16 -11
- package/lib/ui/icons/index.d.ts +3 -0
- package/lib/ui/icons/index.js +69 -51
- package/lib/ui/loader/index.js +4 -3
- package/lib/ui/modal/index.js +1 -1
- package/lib/ui/theme/masters-theme.js +152 -32
- package/lib/ui/theme/theme.js +66 -20
- package/package.json +16 -15
- package/lib/app/masters/Features/Gamification/Friends.d.ts +0 -3
- package/lib/app/masters/Features/Gamification/Friends.js +0 -19
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -8
- package/lib/app/masters/Features/Gamification/Leaderboard.js +0 -56
- package/lib/index-B1QdimmR.js +0 -19047
- package/lib/index-CZvwzN5o.js +0 -75
- package/lib/index-xuotMAFm.js +0 -118
|
@@ -3,7 +3,7 @@ import { cx as V } from "@linaria/core";
|
|
|
3
3
|
import { useAppContext as O } from "../useAppContext.js";
|
|
4
4
|
import { scrollIntoAppView as T } from "../../useSdkScroll.js";
|
|
5
5
|
import { useState as I, useMemo as D, useEffect as a, useRef as E, useCallback as w } from "react";
|
|
6
|
-
import { r as R } from "../../../index-
|
|
6
|
+
import { r as R } from "../../../index-DALxy-8N.js";
|
|
7
7
|
import { useStore as y } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
|
|
9
9
|
import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
|
|
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" })
|
|
10
|
+
] });
|
|
11
|
+
};
|
|
8
12
|
export {
|
|
9
|
-
|
|
13
|
+
f as EmergencyScreen
|
|
10
14
|
};
|
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a } from "react";
|
|
2
3
|
import { ScreenContainer as c } from "../ScreenContainer/index.js";
|
|
3
|
-
import { ScreenWrap as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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(
|
|
7
|
+
0
|
|
8
|
+
/* FIRST */
|
|
9
|
+
);
|
|
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: [
|
|
15
|
+
"As results come in we’ll send you",
|
|
16
|
+
/* @__PURE__ */ e("br", {}),
|
|
17
|
+
"live updates right here."
|
|
18
|
+
] })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e(
|
|
21
|
+
d,
|
|
22
|
+
{
|
|
23
|
+
onClick: () => {
|
|
24
|
+
l(
|
|
25
|
+
1
|
|
26
|
+
/* LAST */
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
children: "Continue"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
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
|
+
"Look for more live match insights,",
|
|
37
|
+
/* @__PURE__ */ e("br", {}),
|
|
38
|
+
"predictions and more."
|
|
39
|
+
] })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ e(d, { onClick: () => o({ type: "slOpenGameCenter" }), children: "Open Game Center" })
|
|
42
|
+
] }) }) }, "end");
|
|
43
|
+
};
|
|
16
44
|
export {
|
|
17
|
-
|
|
45
|
+
x as EndScreen
|
|
18
46
|
};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
2
|
export declare const SponsorIcon: any;
|
|
3
3
|
export declare const EndScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const EndFirstScreenWrap: {
|
|
5
|
+
__wyw_meta: unknown;
|
|
6
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const EndLastScreenWrap: {
|
|
10
|
+
__wyw_meta: unknown;
|
|
11
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}>;
|
|
4
14
|
export declare const EndScreenMain: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
15
|
export declare const EndScreenTitle: any;
|
|
6
16
|
export declare const EndScreenDescription: any;
|
|
17
|
+
export declare const EndLastScreenDescription: any;
|
|
7
18
|
export declare const EndScreenButton: any;
|
|
19
|
+
export declare const EndScreenMedia: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -1,41 +1,61 @@
|
|
|
1
1
|
import { styled as e } from "@linaria/react";
|
|
2
|
-
import { ScreenTitle as
|
|
3
|
-
import { SvgIcon as
|
|
4
|
-
const
|
|
2
|
+
import { ScreenTitle as r, ScreenDescription as s, ScreenButton as c } from "../../styles.js";
|
|
3
|
+
import { SvgIcon as o } from "../../../../../ui/icons/index.js";
|
|
4
|
+
const u = /* @__PURE__ */ e("div")({
|
|
5
5
|
name: "ScreenWrap",
|
|
6
6
|
class: "s8s3kc9",
|
|
7
7
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
8
|
+
}), t = () => o, A = /* @__PURE__ */ e(t())({
|
|
9
9
|
name: "SponsorIcon",
|
|
10
10
|
class: "s1uswib2",
|
|
11
11
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
12
|
+
}), n = /* @__PURE__ */ e("div")({
|
|
13
13
|
name: "EndScreenWrap",
|
|
14
14
|
class: "el0dbzn",
|
|
15
15
|
propsAsIs: !1
|
|
16
|
-
}),
|
|
17
|
-
name: "
|
|
16
|
+
}), p = () => n, x = /* @__PURE__ */ e(p())({
|
|
17
|
+
name: "EndFirstScreenWrap",
|
|
18
18
|
class: "e11do4i1",
|
|
19
|
+
propsAsIs: !0
|
|
20
|
+
}), a = () => n, f = /* @__PURE__ */ e(a())({
|
|
21
|
+
name: "EndLastScreenWrap",
|
|
22
|
+
class: "ef67yx9",
|
|
23
|
+
propsAsIs: !0
|
|
24
|
+
}), W = /* @__PURE__ */ e("div")({
|
|
25
|
+
name: "EndScreenMain",
|
|
26
|
+
class: "enw6fxs",
|
|
19
27
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
28
|
+
}), i = () => r, _ = /* @__PURE__ */ e(i())({
|
|
21
29
|
name: "EndScreenTitle",
|
|
22
|
-
class: "
|
|
30
|
+
class: "euaws9b",
|
|
23
31
|
propsAsIs: !0
|
|
24
|
-
}),
|
|
32
|
+
}), d = () => s, v = /* @__PURE__ */ e(d())({
|
|
25
33
|
name: "EndScreenDescription",
|
|
26
|
-
class: "
|
|
34
|
+
class: "e9uqaot",
|
|
27
35
|
propsAsIs: !0
|
|
28
|
-
}),
|
|
36
|
+
}), S = () => s, D = /* @__PURE__ */ e(S())({
|
|
37
|
+
name: "EndLastScreenDescription",
|
|
38
|
+
class: "etyeg2m",
|
|
39
|
+
propsAsIs: !0
|
|
40
|
+
}), l = () => c, L = /* @__PURE__ */ e(l())({
|
|
29
41
|
name: "EndScreenButton",
|
|
30
|
-
class: "
|
|
42
|
+
class: "e177v9in",
|
|
31
43
|
propsAsIs: !0
|
|
44
|
+
}), M = /* @__PURE__ */ e("img")({
|
|
45
|
+
name: "EndScreenMedia",
|
|
46
|
+
class: "ehp7lor",
|
|
47
|
+
propsAsIs: !1
|
|
32
48
|
});
|
|
33
49
|
export {
|
|
34
|
-
x as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
x as EndFirstScreenWrap,
|
|
51
|
+
D as EndLastScreenDescription,
|
|
52
|
+
f as EndLastScreenWrap,
|
|
53
|
+
L as EndScreenButton,
|
|
54
|
+
v as EndScreenDescription,
|
|
55
|
+
W as EndScreenMain,
|
|
56
|
+
M as EndScreenMedia,
|
|
57
|
+
_ as EndScreenTitle,
|
|
58
|
+
n as EndScreenWrap,
|
|
59
|
+
u as ScreenWrap,
|
|
60
|
+
A as SponsorIcon
|
|
41
61
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ScreenContainerBox as
|
|
3
|
-
|
|
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 }) });
|
|
7
|
+
};
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
s as ScreenContainer
|
|
6
10
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import a from "lodash.throttle";
|
|
2
|
+
import { useState as d, useRef as T, useEffect as c } from "react";
|
|
3
|
+
const i = "16px", u = 17, O = 21, h = 24, f = (n) => n < 0.9 ? h : n < 1.17 ? O : u, I = (n) => {
|
|
4
|
+
const [E, s] = d(i), r = T(null);
|
|
5
|
+
return c(() => {
|
|
6
|
+
const e = a(() => {
|
|
7
|
+
const { offsetWidth: t, offsetHeight: o } = r.current || {};
|
|
8
|
+
if (!t || !o) return;
|
|
9
|
+
const _ = o / t;
|
|
10
|
+
s(t ? `${t / f(_)}px` : i);
|
|
11
|
+
}, 200);
|
|
12
|
+
return window.screen.orientation.addEventListener("change", e), window.addEventListener("orientationchange", e), window.addEventListener("resize", e), e(), () => {
|
|
13
|
+
window.screen.orientation.removeEventListener("change", e), window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e);
|
|
14
|
+
};
|
|
15
|
+
}, []), c(() => {
|
|
16
|
+
const { offsetWidth: e, offsetHeight: t } = r.current || {};
|
|
17
|
+
if (!e || !t) return;
|
|
18
|
+
const o = t / e;
|
|
19
|
+
s(e ? `${e / f(o)}px` : i);
|
|
20
|
+
}, [n]), {
|
|
21
|
+
container: r,
|
|
22
|
+
fontSize: E
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
I as useDynamicParentFont
|
|
27
|
+
};
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { ScreenContainer as c } from "../ScreenContainer/index.js";
|
|
3
|
-
import { ScreenWrap as s,
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
import { ScreenWrap as s, Main as S, SponsorIcon as a, StartScreenSponsor as l, StartScreenTitle as p, StartScreenDescription as d, StartScreenButton as h, IconArrowRight as m } from "./styles.js";
|
|
4
|
+
const R = ({ height: o, countQuestionsAvailable: n, sliderRef: i }) => /* @__PURE__ */ r(c, { height: o, children: /* @__PURE__ */ e(s, { children: [
|
|
5
|
+
/* @__PURE__ */ e(S, { children: [
|
|
6
|
+
/* @__PURE__ */ r(a, { name: "icon-masters-logo" }),
|
|
7
|
+
/* @__PURE__ */ r(l, { children: "MASTERS PRESENTS" }),
|
|
8
|
+
/* @__PURE__ */ e(p, { children: [
|
|
9
|
+
"Tee time predictions:",
|
|
10
|
+
/* @__PURE__ */ r("br", {}),
|
|
11
|
+
"share your expertise"
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ e(d, { children: [
|
|
14
|
+
"Swipe to answer today’s",
|
|
15
|
+
/* @__PURE__ */ r("br", {}),
|
|
16
|
+
"question cards."
|
|
17
|
+
] })
|
|
16
18
|
] }),
|
|
17
19
|
/* @__PURE__ */ e(
|
|
18
|
-
|
|
20
|
+
h,
|
|
19
21
|
{
|
|
20
22
|
onClick: () => {
|
|
21
|
-
var
|
|
22
|
-
(
|
|
23
|
+
var t;
|
|
24
|
+
(t = i.current) == null || t.slickNext();
|
|
23
25
|
},
|
|
24
26
|
children: [
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ r(
|
|
27
|
+
n ? `${n} questions available` : "See all questions",
|
|
28
|
+
/* @__PURE__ */ r(m, { name: "iconArrowRight" })
|
|
27
29
|
]
|
|
28
30
|
}
|
|
29
31
|
)
|
|
30
32
|
] }) }, "start");
|
|
31
33
|
export {
|
|
32
|
-
|
|
34
|
+
R as StartScreen
|
|
33
35
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const Main: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
3
|
export declare const IconArrowRight: any;
|
|
3
4
|
export declare const SponsorIcon: any;
|
|
4
5
|
export declare const StartScreenSponsor: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -1,41 +1,46 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
import { ScreenTitle as r, ScreenDescription as
|
|
2
|
+
import { ScreenTitle as r, ScreenDescription as n, ScreenButton as t } from "../../styles.js";
|
|
3
3
|
import { SvgIcon as e } from "../../../../../ui/icons/index.js";
|
|
4
4
|
const I = /* @__PURE__ */ s("div")({
|
|
5
5
|
name: "ScreenWrap",
|
|
6
6
|
class: "s991vvm",
|
|
7
7
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
8
|
+
}), u = /* @__PURE__ */ s("div")({
|
|
9
|
+
name: "Main",
|
|
10
|
+
class: "mnbj36g",
|
|
11
|
+
propsAsIs: !1
|
|
12
|
+
}), o = () => e, A = /* @__PURE__ */ s(o())({
|
|
9
13
|
name: "IconArrowRight",
|
|
10
|
-
class: "
|
|
14
|
+
class: "izrvgt",
|
|
11
15
|
propsAsIs: !0
|
|
12
|
-
}), c = () => e,
|
|
16
|
+
}), c = () => e, f = /* @__PURE__ */ s(c())({
|
|
13
17
|
name: "SponsorIcon",
|
|
14
|
-
class: "
|
|
18
|
+
class: "swqs2ju",
|
|
15
19
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
20
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
17
21
|
name: "StartScreenSponsor",
|
|
18
|
-
class: "
|
|
22
|
+
class: "s1oq8jlq",
|
|
19
23
|
propsAsIs: !1
|
|
20
24
|
}), p = () => r, g = /* @__PURE__ */ s(p())({
|
|
21
25
|
name: "StartScreenTitle",
|
|
22
|
-
class: "
|
|
26
|
+
class: "se4nn9a",
|
|
23
27
|
propsAsIs: !0
|
|
24
|
-
}), a = () =>
|
|
28
|
+
}), a = () => n, x = /* @__PURE__ */ s(a())({
|
|
25
29
|
name: "StartScreenDescription",
|
|
26
|
-
class: "
|
|
30
|
+
class: "sofug8s",
|
|
27
31
|
propsAsIs: !0
|
|
28
|
-
}), S = () =>
|
|
32
|
+
}), S = () => t, _ = /* @__PURE__ */ s(S())({
|
|
29
33
|
name: "StartScreenButton",
|
|
30
|
-
class: "
|
|
34
|
+
class: "s18s0pjp",
|
|
31
35
|
propsAsIs: !0
|
|
32
36
|
});
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
A as IconArrowRight,
|
|
39
|
+
u as Main,
|
|
35
40
|
I as ScreenWrap,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
f as SponsorIcon,
|
|
42
|
+
_ as StartScreenButton,
|
|
43
|
+
x as StartScreenDescription,
|
|
44
|
+
v as StartScreenSponsor,
|
|
40
45
|
g as StartScreenTitle
|
|
41
46
|
};
|
|
@@ -1,116 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as i, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { ConnectError as T, Code as N } from "@connectrpc/connect";
|
|
3
|
+
import { cx as w } from "@linaria/core";
|
|
4
|
+
import { useCallback as x, useSyncExternalStore as A, useRef as b, useState as F, useMemo as I, useEffect as v } from "react";
|
|
5
|
+
import { EmergencyScreen as S } from "./EmergencyScreen/index.js";
|
|
6
|
+
import { EndScreen as B } 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 h } from "./constants.js";
|
|
12
|
+
import { Carousel as K, desktopDots as M } from "./styles.js";
|
|
13
|
+
function q(t, n, u) {
|
|
14
|
+
let a = /* @__PURE__ */ new Set([...n, void 0]);
|
|
15
|
+
return t.listen((s, o, p) => {
|
|
16
|
+
a.has(p) && u(s, o, p);
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
(
|
|
19
|
+
function z(t, n = {}) {
|
|
20
|
+
let u = x(
|
|
21
|
+
(s) => n.keys ? q(t, n.keys, s) : t.listen(s),
|
|
20
22
|
[n.keys, t]
|
|
21
|
-
),
|
|
22
|
-
return
|
|
23
|
+
), a = t.get.bind(t);
|
|
24
|
+
return A(u, a, a);
|
|
23
25
|
}
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
+
const re = ({ gamification: t, autoplay: n, swipeable: u, changeHeightOnInit: a, height: s, onEvent: o, centerPadding: p }) => {
|
|
27
|
+
const c = b(), l = b(null), [P, C] = F(!1), { data: r, error: f, loading: y } = z(t.betPack.getStore()), { listOfQuestions: m, countQuestionsAvailable: O } = I(() => {
|
|
26
28
|
const e = r ? Object.values(r) : [];
|
|
27
29
|
return {
|
|
28
30
|
listOfQuestions: e,
|
|
29
|
-
countQuestionsAvailable: e.filter(({ marketClosed:
|
|
31
|
+
countQuestionsAvailable: e.filter(({ marketClosed: d }) => !d).length
|
|
30
32
|
};
|
|
31
33
|
}, [r]);
|
|
32
|
-
|
|
33
|
-
!
|
|
34
|
+
v(() => {
|
|
35
|
+
!f && !y && r !== void 0 && !P && o({
|
|
34
36
|
type: "slBetPackReady",
|
|
35
37
|
payload: {
|
|
36
38
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
39
|
// @ts-expect-error
|
|
38
40
|
next: () => {
|
|
39
41
|
var e;
|
|
40
|
-
return (e =
|
|
42
|
+
return (e = l.current) == null ? void 0 : e.slickNext();
|
|
41
43
|
},
|
|
42
44
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
43
45
|
// @ts-expect-error
|
|
44
46
|
prev: () => {
|
|
45
47
|
var e;
|
|
46
|
-
return (e =
|
|
48
|
+
return (e = l.current) == null ? void 0 : e.slickPrev();
|
|
47
49
|
},
|
|
48
50
|
current: 0,
|
|
49
51
|
canNext: !0,
|
|
50
52
|
canPrev: !1
|
|
51
53
|
}
|
|
52
54
|
});
|
|
53
|
-
}, [r,
|
|
54
|
-
const
|
|
55
|
-
async (e,
|
|
55
|
+
}, [r, f, y, o]);
|
|
56
|
+
const Q = x(
|
|
57
|
+
async (e, d) => {
|
|
56
58
|
try {
|
|
57
|
-
await t.betPackVote(e,
|
|
59
|
+
C(!0), await t.betPackVote(e, d);
|
|
58
60
|
} finally {
|
|
59
|
-
|
|
60
|
-
var
|
|
61
|
-
(
|
|
61
|
+
c.current && clearTimeout(c.current), n && (c.current = setTimeout(() => {
|
|
62
|
+
var k;
|
|
63
|
+
(k = l.current) == null || k.slickNext();
|
|
62
64
|
}, 2e3));
|
|
63
65
|
}
|
|
64
66
|
},
|
|
65
|
-
[t,
|
|
67
|
+
[t, l, n]
|
|
66
68
|
);
|
|
67
|
-
if (
|
|
68
|
-
|
|
69
|
-
}, []),
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
if (
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
69
|
+
if (v(() => () => {
|
|
70
|
+
c.current && clearTimeout(c.current);
|
|
71
|
+
}, []), y)
|
|
72
|
+
return /* @__PURE__ */ i(D, {});
|
|
73
|
+
if (!f && (r == null || !Object.keys(r).length))
|
|
74
|
+
return /* @__PURE__ */ i(
|
|
75
|
+
S,
|
|
74
76
|
{
|
|
75
|
-
actionFn: () =>
|
|
76
|
-
description:
|
|
77
|
+
actionFn: () => o({ type: "slHardRefresh" }),
|
|
78
|
+
description: `It looks like we couldn't
|
|
79
|
+
load the questions.`
|
|
77
80
|
}
|
|
78
81
|
);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
if (f)
|
|
83
|
+
return /* @__PURE__ */ i(
|
|
84
|
+
S,
|
|
85
|
+
{
|
|
86
|
+
actionFn: () => o({ type: "slHardRefresh" }),
|
|
87
|
+
description: f instanceof T && f.code !== N.InvalidArgument ? `The event ID was not
|
|
88
|
+
specified or is invalid.` : `The server is unable to
|
|
89
|
+
handle this request.`
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
const g = (e) => {
|
|
93
|
+
var d;
|
|
94
|
+
if (o({
|
|
82
95
|
type: "slBetPackChangeCard",
|
|
83
96
|
payload: {
|
|
84
97
|
current: e,
|
|
85
98
|
canNext: e < Object.keys(r).length + 1,
|
|
86
99
|
canPrev: e >= 1
|
|
87
100
|
}
|
|
88
|
-
}), e !== 0 && e !== Object.keys(r).length + 1 && ((
|
|
89
|
-
t.openQuestion(
|
|
101
|
+
}), e !== 0 && e !== Object.keys(r).length + 1 && ((d = m[e - 1]) != null && d.id)) {
|
|
102
|
+
t.openQuestion(m[e - 1].id, {
|
|
103
|
+
openedFrom: "list",
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
105
|
+
// @ts-expect-error
|
|
106
|
+
attributes: {
|
|
107
|
+
id: m[e - 1].id,
|
|
108
|
+
type: m[e - 1].type,
|
|
109
|
+
status: m[e - 1].status,
|
|
110
|
+
attributes: {
|
|
111
|
+
case: void 0
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
90
115
|
return;
|
|
91
116
|
}
|
|
92
117
|
t.closeQuestion();
|
|
93
|
-
},
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
118
|
+
}, j = (e) => e ? /* @__PURE__ */ i(L, { height: s, children: /* @__PURE__ */ i(H, { question: e, vote: Q }) }, e.id) : null;
|
|
119
|
+
return /* @__PURE__ */ R(
|
|
120
|
+
K,
|
|
96
121
|
{
|
|
97
|
-
...
|
|
98
|
-
swipe:
|
|
99
|
-
onInit:
|
|
100
|
-
centerPadding:
|
|
101
|
-
afterChange:
|
|
122
|
+
...h,
|
|
123
|
+
swipe: u,
|
|
124
|
+
onInit: a,
|
|
125
|
+
centerPadding: p || h.centerPadding,
|
|
126
|
+
afterChange: g,
|
|
102
127
|
beforeChange: () => {
|
|
103
|
-
|
|
128
|
+
c.current && clearTimeout(c.current);
|
|
104
129
|
},
|
|
105
|
-
ref:
|
|
130
|
+
ref: l,
|
|
131
|
+
className: w(!u && M),
|
|
106
132
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
Object.values(r).map(
|
|
109
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ i(V, { height: s, sliderRef: l, countQuestionsAvailable: O }),
|
|
134
|
+
Object.values(r).map(j),
|
|
135
|
+
/* @__PURE__ */ i(B, { onEvent: o, height: s })
|
|
110
136
|
]
|
|
111
137
|
}
|
|
112
138
|
);
|
|
113
139
|
};
|
|
114
140
|
export {
|
|
115
|
-
|
|
141
|
+
re as BetPackContent
|
|
116
142
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const Carousel: any;
|
|
2
|
+
export declare const desktopDots: import('@linaria/core').LinariaClassName;
|
|
2
3
|
export declare const Dot: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
4
|
export declare const Dots: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import o from "react-slick";
|
|
3
|
-
const
|
|
3
|
+
const t = () => o, p = /* @__PURE__ */ s(t())({
|
|
4
4
|
name: "Carousel",
|
|
5
5
|
class: "c1f9jjsn",
|
|
6
6
|
propsAsIs: !0
|
|
7
|
-
}), l = /* @__PURE__ */ s("div")({
|
|
7
|
+
}), a = "d25r51y", l = /* @__PURE__ */ s("div")({
|
|
8
8
|
name: "Dot",
|
|
9
|
-
class: "
|
|
9
|
+
class: "d1lvrmx8",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
12
12
|
name: "Dots",
|
|
13
|
-
class: "
|
|
13
|
+
class: "d11xps29",
|
|
14
14
|
propsAsIs: !1
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as Carousel,
|
|
18
18
|
l as Dot,
|
|
19
|
-
|
|
19
|
+
c as Dots,
|
|
20
|
+
a as desktopDots
|
|
20
21
|
};
|