@streamlayer/react-ui 1.19.0 → 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.
Files changed (43) 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 +1 -0
  6. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -9
  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 +45 -37
  16. package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
  17. package/lib/app/masters/BetPack/index.js +80 -77
  18. package/lib/app/masters/Points/index.js +24 -18
  19. package/lib/app/masters/masters.js +75 -87
  20. package/lib/app/masters/useSdkResponsive.d.ts +2 -0
  21. package/lib/app/masters/useSdkResponsive.js +3 -1
  22. package/lib/app/masters/useSdkScroll.js +1 -1
  23. package/lib/app/useSdkResponsive.js +1 -1
  24. package/lib/app/useSdkScroll.js +1 -1
  25. package/lib/assets/style.css +1 -1
  26. package/lib/hooks/analytics.js +17 -42
  27. package/lib/index-CLJzLXks.js +64 -0
  28. package/lib/reset.css +1 -1
  29. package/lib/ui/advertisement/notification/index.js +8 -8
  30. package/lib/ui/advertisement/overlay/externalAd/index.js +40306 -94
  31. package/lib/ui/close-btn/index.d.ts +2 -0
  32. package/lib/ui/close-btn/index.js +40 -32
  33. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +48 -33
  34. package/lib/ui/gamification/vote/feedback/index.js +30 -30
  35. package/lib/ui/gamification/vote/vote-option/index.js +51 -53
  36. package/lib/ui/icons/index.d.ts +3 -0
  37. package/lib/ui/icons/index.js +75 -54
  38. package/lib/ui/modal/index.js +36 -32
  39. package/lib/ui/show-in/index.js +26 -26
  40. package/lib/ui/theme/masters-theme.js +12 -4
  41. package/lib/ui/theme/theme.js +9 -5
  42. package/package.json +22 -16
  43. package/lib/index-BEm7B1u1.js +0 -72
@@ -4,5 +4,7 @@ export declare const CloseButton: React.FC<{
4
4
  duration?: number;
5
5
  autoClose?: CloseTimerAuto;
6
6
  isPlaying?: boolean;
7
+ skipIcon?: boolean;
7
8
  className?: string;
9
+ timerClassName?: string;
8
10
  }>;
@@ -1,49 +1,57 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import { useState as f, useEffect as l, useCallback as a } from "react";
4
- import { CloseTimerAuto as I } from "@streamlayer/sdk-web-types";
5
- import { SvgIcon as u } from "../icons/index.js";
6
- import { SimpleTimer as v } from "../timer/index.js";
7
- const T = /* @__PURE__ */ s("div")({
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
- }), g = /* @__PURE__ */ s("div")({
11
+ }), h = /* @__PURE__ */ t("div")({
12
12
  name: "TimerWrap",
13
13
  class: "teuhmro",
14
14
  propsAsIs: !1
15
- }), x = () => u, A = /* @__PURE__ */ s(x())({
15
+ }), A = () => T, C = /* @__PURE__ */ t(A())({
16
16
  name: "Icon",
17
17
  class: "i17rfxv5",
18
18
  propsAsIs: !0
19
- }), b = ({
19
+ }), y = ({
20
20
  close: r,
21
- className: n,
22
- isPlaying: c = !0,
23
- duration: o = 0,
24
- autoClose: t
21
+ className: i,
22
+ timerClassName: c,
23
+ skipIcon: o,
24
+ isPlaying: p = !0,
25
+ duration: e = 0,
26
+ autoClose: m
25
27
  }) => {
26
- const [i, m] = f(o === 0);
27
- l(() => {
28
- m(!o);
29
- }, [o]);
30
- const p = a(() => {
31
- t === I.ENABLED ? r == null || r() : m(!0);
32
- }, [t, r]);
33
- return i ? /* @__PURE__ */ e(T, {
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: n,
36
- children: /* @__PURE__ */ e(A, {
37
- name: "icon-cross"
38
- })
39
- }) : /* @__PURE__ */ e(g, {
40
- children: /* @__PURE__ */ e(v, {
41
- isPlaying: c,
42
- duration: o,
43
- onTimerExpired: p
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
- b as CloseButton
56
+ y as CloseButton
49
57
  };
@@ -1,57 +1,72 @@
1
- import { jsxs as o, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { styled as s } from "@linaria/react";
3
- import { SvgIcon as e } from "../../../../../icons/index.js";
4
- const a = /* @__PURE__ */ s("div")({
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
- }), p = () => e, d = /* @__PURE__ */ s(p())({
9
+ }), C = () => a, k = /* @__PURE__ */ s(C())({
9
10
  name: "CheckIcon",
10
11
  class: "c1mo15kk",
11
12
  propsAsIs: !0
12
- }), l = () => e, m = /* @__PURE__ */ s(l())({
13
+ }), y = () => a, A = /* @__PURE__ */ s(y())({
13
14
  name: "PredictionIcon",
14
15
  class: "p16zkqnm",
15
16
  propsAsIs: !0
16
- }), I = /* @__PURE__ */ s("div")({
17
+ }), x = /* @__PURE__ */ s("div")({
17
18
  name: "PredictionIconContainer",
18
19
  class: "pjszi7a",
19
20
  propsAsIs: !1
20
- }), f = /* @__PURE__ */ s("div")({
21
+ }), z = /* @__PURE__ */ s("div")({
21
22
  name: "BodyContainer",
22
23
  class: "bftbmo3",
23
24
  propsAsIs: !1
24
- }), h = /* @__PURE__ */ s("div")({
25
+ }), P = /* @__PURE__ */ s("div")({
25
26
  name: "Body",
26
27
  class: "barrbyu",
27
28
  propsAsIs: !1
28
- }), C = /* @__PURE__ */ s("div")({
29
+ }), B = /* @__PURE__ */ s("div")({
29
30
  name: "Subtitle",
30
31
  class: "sz7237i",
31
32
  propsAsIs: !1
32
- }), A = ({
33
- step: c,
34
- children: i,
35
- answer: r,
36
- state: t = "pending"
37
- }) => /* @__PURE__ */ o(a, {
38
- children: [/* @__PURE__ */ n(I, {
39
- children: /* @__PURE__ */ n(m, {
40
- name: "icon-prediction"
41
- })
42
- }), /* @__PURE__ */ n(f, {
43
- children: /* @__PURE__ */ n(h, {
44
- children: i
45
- }, c)
46
- }), /* @__PURE__ */ n(C, {
47
- className: t,
48
- children: /* @__PURE__ */ o("div", {
49
- children: [/* @__PURE__ */ n(d, {
50
- name: "icon-check"
51
- }), "Your Pick: ", r]
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
- A as Content
71
+ R as Content
57
72
  };
@@ -1,74 +1,74 @@
1
- import { jsx as i, jsxs as c, Fragment as j } from "react/jsx-runtime";
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 h, IconPrediction as L, FeedbackDescription as F, FeedbackIconWrap as k, 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";
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: t,
6
+ feedbackMessages: h,
7
7
  questionVotedCorrectly: R,
8
- questionVoted: u,
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: e,
16
- enteredAnActiveQuestion: W,
14
+ votedAfterQuestionClosed: L,
15
+ voteErrorMessage: n,
16
+ enteredAnActiveQuestion: $,
17
17
  marketClosed: y,
18
18
  percentsAnimated: B,
19
19
  votedAnswer: I,
20
- isEarlyPrediction: n,
20
+ isEarlyPrediction: e,
21
21
  correctAnswer: o
22
22
  }) => {
23
- const C = u && (d === l.TRIVIA || d === l.PREDICTION), N = d === l.PREDICTION && !r, D = y && d === l.PREDICTION && !u && !W || d === l.PREDICTION && $ && b && W, S = C && N, P = C && r, Q = d === l.PREDICTION && u && b && r, Y = u && d === l.POLL && b, p = R ? "correct" : "incorrect", a = R ? t == null ? void 0 : t.correctFeedback : t == null ? void 0 : t.incorrectFeedback;
24
- return f || O || S || P || D || Y || Q || e ? /* @__PURE__ */ i(H, { enabled: b, animate: B, children: /* @__PURE__ */ c(z, { "data-prediction": N, children: [
25
- e && !D && /* @__PURE__ */ c(h, { children: [
26
- !n && /* @__PURE__ */ i(L, { name: "questionExpired" }),
27
- /* @__PURE__ */ i(F, { children: e })
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
- !e && f && /* @__PURE__ */ c(h, { children: [
30
- !n && /* @__PURE__ */ i(k, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
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
- !e && O && /* @__PURE__ */ c(h, { children: [
37
- /* @__PURE__ */ i(k, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
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(h, { children: [
44
- !n && /* @__PURE__ */ i(k, { children: /* @__PURE__ */ i(m, { name: "questionExpired" }) }),
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: n ? r ? "The results are already in!" : "Question is Closed" : "Question Closed" }) }),
47
- /* @__PURE__ */ i(T, { children: n ? /* @__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." })
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
- !e && S && /* @__PURE__ */ c(h, { children: [
51
- !n && /* @__PURE__ */ i(L, { name: "icon-prediction" }),
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
- !e && Y && /* @__PURE__ */ c(h, { children: [
58
- !n && /* @__PURE__ */ i(k, { "data-feedback-type": "correct", children: /* @__PURE__ */ i(m, { name: "correct" }) }),
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
- !e && (P || Q) && /* @__PURE__ */ c(h, { children: [
62
- !n && /* @__PURE__ */ i(k, { "data-feedback-type": p, children: /* @__PURE__ */ i(m, { name: p }) }),
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
- n ? /* @__PURE__ */ i(X, { children: p === "incorrect" ? /* @__PURE__ */ c(j, { children: [
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(j, { children: [
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
- n ? /* @__PURE__ */ c(_, { children: [
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 u } from "react/jsx-runtime";
2
- import { useState as U, useLayoutEffect as V } from "react";
3
- import { QuestionImages as a, QuestionType as o, QuestionStatus as D } from "@streamlayer/sdk-web-types";
4
- import { AnimatedCounter as $ } from "../../../animated-counter/index.js";
5
- import { IconDefault as F, IconContainer as M, IconWrap as z, IconCircle as G, ButtonContainer as H, ButtonPctWrap as J, ButtonPct as K, ButtonBody as X, Title as Y, PtsWrap as Z, Pts as _, Indicators as q, CheckIcon as tt, Percentage as et } from "./styles.js";
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(F, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
8
- [a.TRANSPARENT]: (t) => /* @__PURE__ */ e(M, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(z, { style: { backgroundImage: `url(${t})` } }) }),
9
- [a.ROUNDED]: (t) => /* @__PURE__ */ e(G, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
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
- }, nt = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
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
- }, rt = ({
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 === D.RESOLVED && n : !1, dt = (t) => {
31
- var S;
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: O,
38
+ points: D,
39
39
  // extra props
40
- onVote: g,
41
- markThatVoted: v,
42
- onPercentsAnimated: f,
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: A,
47
+ answerTimeExpired: k,
48
48
  questionStatus: C,
49
- isLoading: k,
49
+ isLoading: v,
50
50
  questionType: d,
51
- correct: x,
52
- hasCorrectAnswer: B,
53
- votedAfterQuestionClosed: L,
54
- enteredAnActiveQuestion: R,
55
- marketClosed: I,
56
- isEarlyPrediction: Q
57
- } = t, [W, T] = U(0), m = nt(t), b = rt({ questionType: d, questionVoted: s, correct: x, hasCorrectAnswer: B, questionStatus: C }), l = I && d === o.PREDICTION, p = s || l, j = d === o.PREDICTION && !s && !I, N = s && !h && m !== "incorrect" && !w;
58
- return V(() => {
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__ */ u(
63
- H,
60
+ }, [i]), /* @__PURE__ */ l(
61
+ z,
64
62
  {
65
63
  value: c,
66
64
  "data-selected": h,
67
- "data-answer-state": m,
68
- disabled: s || k || A || l && !R || l && R && L,
69
- "data-is-not-checked": N,
70
- onClick: (y) => {
71
- v(
72
- d === o.PREDICTION ? I : C === D.RESOLVED
73
- ), g(y);
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(J, { children: /* @__PURE__ */ e(
77
- K,
74
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
75
+ H,
78
76
  {
79
- "data-answer-state": m,
80
- "data-is-not-checked": N,
81
- style: { width: `${p ? W : 0}%` },
77
+ "data-answer-state": I,
78
+ "data-is-not-checked": p,
79
+ style: { width: `${T ? L : 0}%` },
82
80
  onTransitionEnd: () => {
83
- l || f == null || f();
81
+ m || u == null || u();
84
82
  }
85
83
  }
86
84
  ) }),
87
- /* @__PURE__ */ u(X, { children: [
88
- n && P && ((S = E[P]) == null ? void 0 : S.call(E, n)),
89
- /* @__PURE__ */ e(Y, { children: r }),
90
- j && /* @__PURE__ */ u(Z, { children: [
91
- O,
92
- /* @__PURE__ */ e(_, { children: "pts" })
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
- p && /* @__PURE__ */ u(q, { children: [
95
- b && /* @__PURE__ */ e(tt, { name: Q ? "selectedBetPack" : "selected" }),
96
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ e($, { value: i, suffix: "%" }) })
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
- dt as VotingOption
102
+ st as VotingOption
105
103
  };
@@ -41,7 +41,10 @@ export declare const icons: {
41
41
  'icon-trophy-bet-pack': any;
42
42
  'icon-trivia-transparent': any;
43
43
  dashboard: any;
44
+ iconMute: any;
45
+ iconUnMute: any;
44
46
  correct: any;
47
+ iconSkip: any;
45
48
  incorrect: any;
46
49
  questionExpired: any;
47
50
  selected: any;