@streamlayer/react-ui 1.19.1 → 1.20.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/app/Advertisement/index.js +74 -72
- package/lib/app/app/Points/index.js +21 -14
- package/lib/app/app/index.js +79 -89
- package/lib/app/app/useApp.d.ts +2 -1
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -9
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +22 -18
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +7 -7
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +2 -1
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +31 -22
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +11 -11
- package/lib/app/masters/BetPack/BetPackContent/index.js +45 -37
- package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
- package/lib/app/masters/BetPack/index.js +80 -77
- package/lib/app/masters/Points/index.js +24 -18
- package/lib/app/masters/masters.js +75 -87
- package/lib/app/masters/useSdkResponsive.d.ts +2 -0
- package/lib/app/masters/useSdkResponsive.js +3 -1
- package/lib/app/masters/useSdkScroll.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/hooks/analytics.js +17 -42
- package/lib/index-CLJzLXks.js +64 -0
- package/lib/reset.css +1 -1
- package/lib/ui/advertisement/notification/index.js +8 -8
- package/lib/ui/advertisement/overlay/externalAd/index.js +40306 -94
- package/lib/ui/close-btn/index.d.ts +2 -0
- package/lib/ui/close-btn/index.js +40 -32
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +48 -33
- package/lib/ui/gamification/vote/feedback/index.js +30 -30
- package/lib/ui/gamification/vote/vote-option/index.js +51 -53
- package/lib/ui/icons/index.d.ts +3 -0
- package/lib/ui/icons/index.js +75 -54
- package/lib/ui/modal/index.js +36 -32
- package/lib/ui/show-in/index.js +26 -26
- package/lib/ui/theme/masters-theme.js +12 -4
- package/lib/ui/theme/theme.js +9 -5
- package/package.json +22 -16
- package/lib/index-BEm7B1u1.js +0 -72
|
@@ -1,49 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { CloseTimerAuto as
|
|
5
|
-
import { SvgIcon as
|
|
6
|
-
import { SimpleTimer as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { styled as t } from "@linaria/react";
|
|
3
|
+
import { useState as u, useEffect as I, useCallback as v } from "react";
|
|
4
|
+
import { CloseTimerAuto as x } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { SvgIcon as T } from "../icons/index.js";
|
|
6
|
+
import { SimpleTimer as d } from "../timer/index.js";
|
|
7
|
+
const g = /* @__PURE__ */ t("div")({
|
|
8
8
|
name: "CloseIconWrap",
|
|
9
9
|
class: "c3v6bv6",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), h = /* @__PURE__ */ t("div")({
|
|
12
12
|
name: "TimerWrap",
|
|
13
13
|
class: "teuhmro",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), A = () => T, C = /* @__PURE__ */ t(A())({
|
|
16
16
|
name: "Icon",
|
|
17
17
|
class: "i17rfxv5",
|
|
18
18
|
propsAsIs: !0
|
|
19
|
-
}),
|
|
19
|
+
}), y = ({
|
|
20
20
|
close: r,
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
className: i,
|
|
22
|
+
timerClassName: c,
|
|
23
|
+
skipIcon: o,
|
|
24
|
+
isPlaying: p = !0,
|
|
25
|
+
duration: e = 0,
|
|
26
|
+
autoClose: m
|
|
25
27
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
return
|
|
28
|
+
const [a, n] = u(e === 0);
|
|
29
|
+
I(() => {
|
|
30
|
+
n(!e);
|
|
31
|
+
}, [e]);
|
|
32
|
+
const l = v(() => {
|
|
33
|
+
m === x.ENABLED ? r == null || r() : n(!0);
|
|
34
|
+
}, [m, r]);
|
|
35
|
+
return a ? /* @__PURE__ */ f(g, {
|
|
34
36
|
onClick: r,
|
|
35
|
-
className:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
className: i,
|
|
38
|
+
style: o ? {
|
|
39
|
+
width: "auto"
|
|
40
|
+
} : {},
|
|
41
|
+
children: [o && /* @__PURE__ */ s("span", {
|
|
42
|
+
children: "Skip"
|
|
43
|
+
}), /* @__PURE__ */ s(C, {
|
|
44
|
+
name: o ? "iconSkip" : "icon-cross"
|
|
45
|
+
})]
|
|
46
|
+
}) : /* @__PURE__ */ s(h, {
|
|
47
|
+
children: /* @__PURE__ */ s(d, {
|
|
48
|
+
className: c,
|
|
49
|
+
isPlaying: p,
|
|
50
|
+
duration: e,
|
|
51
|
+
onTimerExpired: l
|
|
44
52
|
})
|
|
45
53
|
});
|
|
46
54
|
};
|
|
47
55
|
export {
|
|
48
|
-
|
|
56
|
+
y as CloseButton
|
|
49
57
|
};
|
|
@@ -1,57 +1,72 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as s } from "@linaria/react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { useState as r, useCallback as u, useMemo as b } from "react";
|
|
4
|
+
import { SvgIcon as a } from "../../../../../icons/index.js";
|
|
5
|
+
const v = /* @__PURE__ */ s("div")({
|
|
5
6
|
name: "Container",
|
|
6
7
|
class: "cef8huz",
|
|
7
8
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
9
|
+
}), C = () => a, k = /* @__PURE__ */ s(C())({
|
|
9
10
|
name: "CheckIcon",
|
|
10
11
|
class: "c1mo15kk",
|
|
11
12
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
13
|
+
}), y = () => a, A = /* @__PURE__ */ s(y())({
|
|
13
14
|
name: "PredictionIcon",
|
|
14
15
|
class: "p16zkqnm",
|
|
15
16
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
17
|
+
}), x = /* @__PURE__ */ s("div")({
|
|
17
18
|
name: "PredictionIconContainer",
|
|
18
19
|
class: "pjszi7a",
|
|
19
20
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
21
|
+
}), z = /* @__PURE__ */ s("div")({
|
|
21
22
|
name: "BodyContainer",
|
|
22
23
|
class: "bftbmo3",
|
|
23
24
|
propsAsIs: !1
|
|
24
|
-
}),
|
|
25
|
+
}), P = /* @__PURE__ */ s("div")({
|
|
25
26
|
name: "Body",
|
|
26
27
|
class: "barrbyu",
|
|
27
28
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
29
|
+
}), B = /* @__PURE__ */ s("div")({
|
|
29
30
|
name: "Subtitle",
|
|
30
31
|
class: "sz7237i",
|
|
31
32
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
33
|
-
step:
|
|
34
|
-
children:
|
|
35
|
-
answer:
|
|
36
|
-
state:
|
|
37
|
-
}) =>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
33
|
+
}), R = ({
|
|
34
|
+
step: d,
|
|
35
|
+
children: p,
|
|
36
|
+
answer: l,
|
|
37
|
+
state: m = "pending"
|
|
38
|
+
}) => {
|
|
39
|
+
const [I, f] = r(0), [o] = r(() => new ResizeObserver((n) => {
|
|
40
|
+
var c, t;
|
|
41
|
+
f((t = (c = n == null ? void 0 : n[0]) == null ? void 0 : c.contentRect) == null ? void 0 : t.width);
|
|
42
|
+
})), h = u((n) => {
|
|
43
|
+
n || o.disconnect(), o.observe(n);
|
|
44
|
+
}, [o]);
|
|
45
|
+
return b(() => () => {
|
|
46
|
+
o.disconnect();
|
|
47
|
+
}, [o]), /* @__PURE__ */ i(v, {
|
|
48
|
+
children: [/* @__PURE__ */ e(x, {
|
|
49
|
+
children: /* @__PURE__ */ e(A, {
|
|
50
|
+
name: "icon-prediction"
|
|
51
|
+
})
|
|
52
|
+
}), /* @__PURE__ */ e(z, {
|
|
53
|
+
style: {
|
|
54
|
+
minWidth: `${I}px`
|
|
55
|
+
},
|
|
56
|
+
children: /* @__PURE__ */ e(P, {
|
|
57
|
+
children: p
|
|
58
|
+
}, d)
|
|
59
|
+
}), /* @__PURE__ */ e(B, {
|
|
60
|
+
ref: h,
|
|
61
|
+
className: m,
|
|
62
|
+
children: /* @__PURE__ */ i("div", {
|
|
63
|
+
children: [/* @__PURE__ */ e(k, {
|
|
64
|
+
name: "icon-check"
|
|
65
|
+
}), "Your Pick: ", l]
|
|
66
|
+
})
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
55
70
|
export {
|
|
56
|
-
|
|
71
|
+
R as Content
|
|
57
72
|
};
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { jsx as i, jsxs as c, Fragment as
|
|
1
|
+
import { jsx as i, jsxs as c, Fragment as Y } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionType as l } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { SvgIcon as m } from "../../../icons/index.js";
|
|
4
|
-
import { ShowInContainer as H, Container as z, FeedbackContainer as
|
|
4
|
+
import { ShowInContainer as H, Container as z, FeedbackContainer as t, IconPrediction as j, FeedbackDescription as F, FeedbackIconWrap as u, FeedbackHeader as x, FeedbackText as T, EarlyFeedbackDescription as G, FeedbackDynamicDescription as J, DynamicWrap as K, FeedbackTitle as U, FeedbackTitleWrap as X, FeedbackResultDescription as Z, FeedbackResultDescriptionWrap as _ } from "./styles.js";
|
|
5
5
|
const s = ({
|
|
6
|
-
feedbackMessages:
|
|
6
|
+
feedbackMessages: h,
|
|
7
7
|
questionVotedCorrectly: R,
|
|
8
|
-
questionVoted:
|
|
8
|
+
questionVoted: k,
|
|
9
9
|
questionType: d,
|
|
10
10
|
hasCorrectAnswer: r,
|
|
11
11
|
showExpiredNotification: f,
|
|
12
12
|
showClosedNotificationTrivia: O,
|
|
13
13
|
votedInCurrentRender: b,
|
|
14
|
-
votedAfterQuestionClosed:
|
|
15
|
-
voteErrorMessage:
|
|
16
|
-
enteredAnActiveQuestion:
|
|
14
|
+
votedAfterQuestionClosed: L,
|
|
15
|
+
voteErrorMessage: n,
|
|
16
|
+
enteredAnActiveQuestion: $,
|
|
17
17
|
marketClosed: y,
|
|
18
18
|
percentsAnimated: B,
|
|
19
19
|
votedAnswer: I,
|
|
20
|
-
isEarlyPrediction:
|
|
20
|
+
isEarlyPrediction: e,
|
|
21
21
|
correctAnswer: o
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
return f || O ||
|
|
25
|
-
|
|
26
|
-
!
|
|
27
|
-
/* @__PURE__ */ i(F, { children:
|
|
23
|
+
const W = k && (d === l.TRIVIA || d === l.PREDICTION), C = d === l.PREDICTION && !r, D = y && d === l.PREDICTION && !k || d === l.PREDICTION && L && b && $, N = W && C, Q = W && r, S = d === l.PREDICTION && k && b && r, P = k && d === l.POLL && b, p = R ? "correct" : "incorrect", a = R ? h == null ? void 0 : h.correctFeedback : h == null ? void 0 : h.incorrectFeedback;
|
|
24
|
+
return f || O || N || Q || D || P || S || n ? /* @__PURE__ */ i(H, { enabled: b, animate: B, children: /* @__PURE__ */ c(z, { "data-prediction": C, children: [
|
|
25
|
+
n && !D && /* @__PURE__ */ c(t, { children: [
|
|
26
|
+
!e && /* @__PURE__ */ i(j, { name: "questionExpired" }),
|
|
27
|
+
/* @__PURE__ */ i(F, { children: n })
|
|
28
28
|
] }),
|
|
29
|
-
!
|
|
30
|
-
!
|
|
29
|
+
!n && f && /* @__PURE__ */ c(t, { children: [
|
|
30
|
+
!e && /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
|
|
31
31
|
/* @__PURE__ */ c("div", { children: [
|
|
32
32
|
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(F, { children: "Question Expired" }) }),
|
|
33
33
|
/* @__PURE__ */ i(T, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
34
34
|
] })
|
|
35
35
|
] }),
|
|
36
|
-
!
|
|
37
|
-
/* @__PURE__ */ i(
|
|
36
|
+
!n && O && /* @__PURE__ */ c(t, { children: [
|
|
37
|
+
/* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
|
|
38
38
|
/* @__PURE__ */ c("div", { children: [
|
|
39
39
|
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(F, { children: "Question Closed" }) }),
|
|
40
40
|
/* @__PURE__ */ i(T, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
41
41
|
] })
|
|
42
42
|
] }),
|
|
43
|
-
D && /* @__PURE__ */ c(
|
|
44
|
-
!
|
|
43
|
+
D && /* @__PURE__ */ c(t, { children: [
|
|
44
|
+
!e && /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
|
|
45
45
|
/* @__PURE__ */ c("div", { children: [
|
|
46
|
-
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(F, { children:
|
|
47
|
-
/* @__PURE__ */ i(T, { children:
|
|
46
|
+
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(F, { children: e ? r ? "The results are already in!" : "Question is Closed" : "Question Closed" }) }),
|
|
47
|
+
/* @__PURE__ */ i(T, { children: e ? /* @__PURE__ */ i(G, { children: r ? `Correct: ${o == null ? void 0 : o.text}` : "Event affecting the outcome has occurred." }) : "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
48
48
|
] })
|
|
49
49
|
] }),
|
|
50
|
-
!
|
|
51
|
-
!
|
|
50
|
+
!n && N && /* @__PURE__ */ c(t, { children: [
|
|
51
|
+
!e && /* @__PURE__ */ i(j, { name: "icon-prediction" }),
|
|
52
52
|
/* @__PURE__ */ c(J, { children: [
|
|
53
53
|
"Your pick has been recorded. ",
|
|
54
54
|
/* @__PURE__ */ i(K, { children: "We’ll notify you of the result." })
|
|
55
55
|
] })
|
|
56
56
|
] }),
|
|
57
|
-
!
|
|
58
|
-
!
|
|
57
|
+
!n && P && /* @__PURE__ */ c(t, { children: [
|
|
58
|
+
!e && /* @__PURE__ */ i(u, { "data-feedback-type": "correct", children: /* @__PURE__ */ i(m, { name: "correct" }) }),
|
|
59
59
|
/* @__PURE__ */ i(F, { children: "Thanks for answering. Please stay tuned for the next question." })
|
|
60
60
|
] }),
|
|
61
|
-
!
|
|
62
|
-
!
|
|
61
|
+
!n && (Q || S) && /* @__PURE__ */ c(t, { children: [
|
|
62
|
+
!e && /* @__PURE__ */ i(u, { "data-feedback-type": p, children: /* @__PURE__ */ i(m, { name: p }) }),
|
|
63
63
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ c(x, { children: [
|
|
64
|
-
|
|
64
|
+
e ? /* @__PURE__ */ i(X, { children: p === "incorrect" ? /* @__PURE__ */ c(Y, { children: [
|
|
65
65
|
/* @__PURE__ */ i("div", { children: "So close!" }),
|
|
66
66
|
/* @__PURE__ */ i("div", { children: "Better luck next time" })
|
|
67
|
-
] }) : /* @__PURE__ */ c(
|
|
67
|
+
] }) : /* @__PURE__ */ c(Y, { children: [
|
|
68
68
|
/* @__PURE__ */ i("div", { children: "That’s correct!" }),
|
|
69
69
|
/* @__PURE__ */ i("div", { children: "You chose wisely." })
|
|
70
70
|
] }) }) : /* @__PURE__ */ i(U, { "data-feedback-type": p, children: a == null ? void 0 : a.title }),
|
|
71
|
-
|
|
71
|
+
e ? /* @__PURE__ */ c(_, { children: [
|
|
72
72
|
/* @__PURE__ */ c("div", { children: [
|
|
73
73
|
"Your pick: ",
|
|
74
74
|
I == null ? void 0 : I.text
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { QuestionImages as a, QuestionType as o, QuestionStatus as
|
|
4
|
-
import { AnimatedCounter as
|
|
5
|
-
import { IconDefault as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useLayoutEffect as y } from "react";
|
|
3
|
+
import { QuestionImages as a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { AnimatedCounter as U } from "../../../animated-counter/index.js";
|
|
5
|
+
import { IconDefault as V, IconContainer as $, IconWrap as F, IconCircle as M, ButtonContainer as z, ButtonPctWrap as G, ButtonPct as H, ButtonBody as J, Title as K, PtsWrap as X, Pts as Y, Indicators as Z, CheckIcon as _, Percentage as q } from "./styles.js";
|
|
6
6
|
const E = {
|
|
7
|
-
[a.CENTERED]: (t) => /* @__PURE__ */ e(
|
|
8
|
-
[a.TRANSPARENT]: (t) => /* @__PURE__ */ e(
|
|
9
|
-
[a.ROUNDED]: (t) => /* @__PURE__ */ e(
|
|
7
|
+
[a.CENTERED]: (t) => /* @__PURE__ */ e(V, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
8
|
+
[a.TRANSPARENT]: (t) => /* @__PURE__ */ e($, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(F, { style: { backgroundImage: `url(${t})` } }) }),
|
|
9
|
+
[a.ROUNDED]: (t) => /* @__PURE__ */ e(M, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
10
10
|
[a.NONE]: () => null,
|
|
11
11
|
[a.UNSET]: () => null
|
|
12
|
-
},
|
|
12
|
+
}, tt = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
|
|
13
13
|
if (t === o.POLL && r)
|
|
14
14
|
return "voted";
|
|
15
15
|
if (t === o.PREDICTION) {
|
|
@@ -21,79 +21,77 @@ const E = {
|
|
|
21
21
|
return "correct";
|
|
22
22
|
}
|
|
23
23
|
return t === o.TRIVIA && i && r ? n ? "correct" : "incorrect" : "unset";
|
|
24
|
-
},
|
|
24
|
+
}, et = ({
|
|
25
25
|
questionType: t,
|
|
26
26
|
questionVoted: c,
|
|
27
27
|
correct: n,
|
|
28
28
|
hasCorrectAnswer: r,
|
|
29
29
|
questionStatus: i
|
|
30
|
-
}) => t === o.TRIVIA ? c && n : t === o.PREDICTION ? c && n && r || i ===
|
|
31
|
-
var
|
|
30
|
+
}) => t === o.TRIVIA ? c && n : t === o.PREDICTION ? c && n && r || i === S.RESOLVED && n : !1, st = (t) => {
|
|
31
|
+
var N;
|
|
32
32
|
const {
|
|
33
33
|
// option props
|
|
34
34
|
id: c,
|
|
35
35
|
icon: n,
|
|
36
36
|
text: r,
|
|
37
37
|
percentageDecimal: i,
|
|
38
|
-
points:
|
|
38
|
+
points: D,
|
|
39
39
|
// extra props
|
|
40
|
-
onVote:
|
|
41
|
-
markThatVoted:
|
|
42
|
-
onPercentsAnimated:
|
|
40
|
+
onVote: O,
|
|
41
|
+
markThatVoted: g,
|
|
42
|
+
onPercentsAnimated: u,
|
|
43
43
|
youSelected: h,
|
|
44
44
|
youVoted: w,
|
|
45
45
|
questionVoted: s,
|
|
46
46
|
imageMode: P,
|
|
47
|
-
answerTimeExpired:
|
|
47
|
+
answerTimeExpired: k,
|
|
48
48
|
questionStatus: C,
|
|
49
|
-
isLoading:
|
|
49
|
+
isLoading: v,
|
|
50
50
|
questionType: d,
|
|
51
|
-
correct:
|
|
52
|
-
hasCorrectAnswer:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
T(0), requestAnimationFrame(() => {
|
|
60
|
-
T(i);
|
|
51
|
+
correct: A,
|
|
52
|
+
hasCorrectAnswer: x,
|
|
53
|
+
marketClosed: f,
|
|
54
|
+
isEarlyPrediction: B
|
|
55
|
+
} = t, [L, R] = j(0), I = tt(t), Q = et({ questionType: d, questionVoted: s, correct: A, hasCorrectAnswer: x, questionStatus: C }), m = f && d === o.PREDICTION, T = s || m, W = d === o.PREDICTION && !s && !f, p = s && !h && I !== "incorrect" && !w;
|
|
56
|
+
return y(() => {
|
|
57
|
+
R(0), requestAnimationFrame(() => {
|
|
58
|
+
R(i);
|
|
61
59
|
});
|
|
62
|
-
}, [i]), /* @__PURE__ */
|
|
63
|
-
|
|
60
|
+
}, [i]), /* @__PURE__ */ l(
|
|
61
|
+
z,
|
|
64
62
|
{
|
|
65
63
|
value: c,
|
|
66
64
|
"data-selected": h,
|
|
67
|
-
"data-answer-state":
|
|
68
|
-
disabled: s ||
|
|
69
|
-
"data-is-not-checked":
|
|
70
|
-
onClick: (
|
|
71
|
-
|
|
72
|
-
d === o.PREDICTION ?
|
|
73
|
-
),
|
|
65
|
+
"data-answer-state": I,
|
|
66
|
+
disabled: s || v || k || m,
|
|
67
|
+
"data-is-not-checked": p,
|
|
68
|
+
onClick: (b) => {
|
|
69
|
+
g(
|
|
70
|
+
d === o.PREDICTION ? f : C === S.RESOLVED
|
|
71
|
+
), O(b);
|
|
74
72
|
},
|
|
75
73
|
children: [
|
|
76
|
-
/* @__PURE__ */ e(
|
|
77
|
-
|
|
74
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
75
|
+
H,
|
|
78
76
|
{
|
|
79
|
-
"data-answer-state":
|
|
80
|
-
"data-is-not-checked":
|
|
81
|
-
style: { width: `${
|
|
77
|
+
"data-answer-state": I,
|
|
78
|
+
"data-is-not-checked": p,
|
|
79
|
+
style: { width: `${T ? L : 0}%` },
|
|
82
80
|
onTransitionEnd: () => {
|
|
83
|
-
|
|
81
|
+
m || u == null || u();
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
) }),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
n && P && ((
|
|
89
|
-
/* @__PURE__ */ e(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/* @__PURE__ */ e(
|
|
85
|
+
/* @__PURE__ */ l(J, { children: [
|
|
86
|
+
n && P && ((N = E[P]) == null ? void 0 : N.call(E, n)),
|
|
87
|
+
/* @__PURE__ */ e(K, { children: r }),
|
|
88
|
+
W && /* @__PURE__ */ l(X, { children: [
|
|
89
|
+
D,
|
|
90
|
+
/* @__PURE__ */ e(Y, { children: "pts" })
|
|
93
91
|
] }),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */ e(
|
|
92
|
+
T && /* @__PURE__ */ l(Z, { children: [
|
|
93
|
+
Q && /* @__PURE__ */ e(_, { name: B ? "selectedBetPack" : "selected" }),
|
|
94
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(U, { value: i, suffix: "%" }) })
|
|
97
95
|
] })
|
|
98
96
|
] })
|
|
99
97
|
]
|
|
@@ -101,5 +99,5 @@ const E = {
|
|
|
101
99
|
);
|
|
102
100
|
};
|
|
103
101
|
export {
|
|
104
|
-
|
|
102
|
+
st as VotingOption
|
|
105
103
|
};
|
package/lib/ui/icons/index.d.ts
CHANGED