@streamlayer/react-ui 0.81.0 → 0.81.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/ui/gamification/vote/feedback/index.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/index.js +33 -32
- package/lib/ui/gamification/vote/index.js +73 -71
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/index.js +53 -50
- package/package.json +2 -2
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as
|
|
2
|
-
import { QuestionType as
|
|
1
|
+
import { jsxs as r, Fragment as t, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as n, QuestionStatus as Q } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { SvgIcon as l } from "../../../icons/index.js";
|
|
4
|
-
import { Container as
|
|
4
|
+
import { Container as f, FeedbackIconWrap as h, FeedbackHeader as p, FeedbackDescription as d, FeedbackText as s, IconPrediction as L, FeedbackTitle as j } from "./styles.js";
|
|
5
5
|
import "@linaria/react";
|
|
6
6
|
import "react";
|
|
7
|
-
const
|
|
7
|
+
const B = ({
|
|
8
8
|
feedbackMessages: e,
|
|
9
|
-
questionVotedCorrectly:
|
|
10
|
-
questionVoted:
|
|
11
|
-
questionType:
|
|
12
|
-
hasCorrectAnswer:
|
|
13
|
-
questionStatus:
|
|
14
|
-
showExpiredNotification:
|
|
9
|
+
questionVotedCorrectly: I,
|
|
10
|
+
questionVoted: a,
|
|
11
|
+
questionType: c,
|
|
12
|
+
hasCorrectAnswer: F,
|
|
13
|
+
questionStatus: S,
|
|
14
|
+
showExpiredNotification: u,
|
|
15
15
|
showClosedNotificationTrivia: w,
|
|
16
|
-
votedInCurrentRender:
|
|
17
|
-
votedAfterQuestionClosed:
|
|
18
|
-
enteredAnActiveQuestion:
|
|
16
|
+
votedInCurrentRender: m,
|
|
17
|
+
votedAfterQuestionClosed: y,
|
|
18
|
+
enteredAnActiveQuestion: E,
|
|
19
|
+
marketClosed: N
|
|
19
20
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
21
|
+
const b = a && (c === n.TRIVIA || c === n.PREDICTION) && m && S !== Q.RESOLVED, x = c === n.PREDICTION && !F, T = N && c === n.PREDICTION && !a && !E || c === n.PREDICTION && y && m && E, k = b && x, D = b && F, O = c === n.PREDICTION && a && m && F, R = a && c === n.POLL && m;
|
|
22
|
+
if (!u && !w && !k && !D && !T && !R && !O)
|
|
22
23
|
return null;
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */ r(
|
|
25
|
-
|
|
24
|
+
const P = I ? "correct" : "incorrect", o = I ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
25
|
+
return /* @__PURE__ */ r(f, { "data-isPrediction": x, children: [
|
|
26
|
+
u && /* @__PURE__ */ r(t, { children: [
|
|
26
27
|
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(l, { name: "questionExpired" }) }),
|
|
27
28
|
/* @__PURE__ */ r("div", { children: [
|
|
28
|
-
/* @__PURE__ */ i(
|
|
29
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(d, { children: "Question Expired" }) }),
|
|
29
30
|
/* @__PURE__ */ i(s, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
30
31
|
] })
|
|
31
32
|
] }),
|
|
32
|
-
w && /* @__PURE__ */ r(
|
|
33
|
+
w && /* @__PURE__ */ r(t, { children: [
|
|
33
34
|
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(l, { name: "questionExpired" }) }),
|
|
34
35
|
/* @__PURE__ */ r("div", { children: [
|
|
35
|
-
/* @__PURE__ */ i(
|
|
36
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(d, { children: "Question Closed" }) }),
|
|
36
37
|
/* @__PURE__ */ i(s, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
37
38
|
] })
|
|
38
39
|
] }),
|
|
39
|
-
|
|
40
|
+
T && /* @__PURE__ */ r(t, { children: [
|
|
40
41
|
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(l, { name: "questionExpired" }) }),
|
|
41
42
|
/* @__PURE__ */ r("div", { children: [
|
|
42
|
-
/* @__PURE__ */ i(
|
|
43
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(d, { children: "Question Closed" }) }),
|
|
43
44
|
/* @__PURE__ */ i(s, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
44
45
|
] })
|
|
45
46
|
] }),
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */ i(
|
|
47
|
+
k && /* @__PURE__ */ r(t, { children: [
|
|
48
|
+
/* @__PURE__ */ i(L, { name: "icon-prediction" }),
|
|
48
49
|
/* @__PURE__ */ i(d, { children: "Stay tuned to see if your prediction was correct." })
|
|
49
50
|
] }),
|
|
50
|
-
|
|
51
|
+
R && /* @__PURE__ */ r(t, { children: [
|
|
51
52
|
/* @__PURE__ */ i(h, { "data-feedbackType": "correct", children: /* @__PURE__ */ i(l, { name: "correct" }) }),
|
|
52
53
|
/* @__PURE__ */ i(d, { children: "That's for answering. Please stay tuned for the next question." })
|
|
53
54
|
] }),
|
|
54
|
-
O && /* @__PURE__ */ r(
|
|
55
|
-
/* @__PURE__ */ i(h, { "data-feedbackType":
|
|
56
|
-
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ r(
|
|
57
|
-
/* @__PURE__ */ i(
|
|
58
|
-
/* @__PURE__ */ i(d, { children:
|
|
55
|
+
(D || O) && /* @__PURE__ */ r(t, { children: [
|
|
56
|
+
/* @__PURE__ */ i(h, { "data-feedbackType": P, children: /* @__PURE__ */ i(l, { name: P }) }),
|
|
57
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ r(p, { children: [
|
|
58
|
+
/* @__PURE__ */ i(j, { "data-feedbackType": P, children: o == null ? void 0 : o.title }),
|
|
59
|
+
/* @__PURE__ */ i(d, { children: o == null ? void 0 : o.description })
|
|
59
60
|
] }) })
|
|
60
61
|
] })
|
|
61
62
|
] });
|
|
62
63
|
};
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
B as Feedback
|
|
65
66
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import { SDKScrollContainer as
|
|
5
|
-
import { ExpiredAlert as
|
|
6
|
-
import { Feedback as
|
|
7
|
-
import { Container as
|
|
8
|
-
import { VotingOption as
|
|
9
|
-
import { WinBar as
|
|
1
|
+
import { jsx as a, jsxs as g, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as T, useEffect as z, useCallback as A, useMemo as o } from "react";
|
|
3
|
+
import { QuestionType as c, QuestionStatus as w } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { SDKScrollContainer as G } from "../../app/styles.js";
|
|
5
|
+
import { ExpiredAlert as J } from "./expired-alert/index.js";
|
|
6
|
+
import { Feedback as U } from "./feedback/index.js";
|
|
7
|
+
import { Container as X, Content as Z, Title as _, Options as $ } from "./styles.js";
|
|
8
|
+
import { VotingOption as Q } from "./vote-option/index.js";
|
|
9
|
+
import { WinBar as tt } from "./win-bar/index.js";
|
|
10
10
|
import "@linaria/react";
|
|
11
11
|
import "../../icons/index.js";
|
|
12
12
|
import "./expired-alert/styles.js";
|
|
@@ -18,104 +18,106 @@ import "../../timer/index.js";
|
|
|
18
18
|
import "react-countdown-circle-timer";
|
|
19
19
|
import "../../theme/constants.js";
|
|
20
20
|
import "./win-bar/styles.js";
|
|
21
|
-
const
|
|
22
|
-
var
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const At = ({ openedQuestion: t, isLoading: I, vote: v, close: p }) => {
|
|
22
|
+
var D, k;
|
|
23
|
+
const N = t.subject, l = t.type, e = t.status, E = (D = t.options) == null ? void 0 : D.options, V = t.marketClosed, [R, P] = T(!1), [y, b] = T(!1), [n, u] = T(!0), [s, L] = T(!1), [x, O] = T(""), d = t == null ? void 0 : t.id;
|
|
24
|
+
z(() => {
|
|
25
|
+
l === c.PREDICTION ? V && u(!1) : e === w.RESOLVED && u(!1);
|
|
26
26
|
}, []);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
}, []),
|
|
27
|
+
const M = A((i) => {
|
|
28
|
+
b(i), P(!0);
|
|
29
|
+
}, []), q = A(
|
|
30
30
|
async (i) => {
|
|
31
|
-
if (
|
|
31
|
+
if (d) {
|
|
32
32
|
const f = i.currentTarget.value;
|
|
33
|
-
|
|
33
|
+
O(f), await v(d, f);
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
[
|
|
37
|
-
),
|
|
38
|
-
|
|
39
|
-
}, [
|
|
36
|
+
[d, O, v]
|
|
37
|
+
), j = A(() => {
|
|
38
|
+
L(!0), setTimeout(p, 3e3);
|
|
39
|
+
}, [p]), r = o(
|
|
40
40
|
() => t == null ? void 0 : t.answers.find((i) => i.youVoted === !0),
|
|
41
41
|
[t]
|
|
42
|
-
),
|
|
42
|
+
), h = o(
|
|
43
43
|
() => !!(t != null && t.answers.find((i) => i.correct === !0)),
|
|
44
44
|
[t]
|
|
45
|
-
),
|
|
45
|
+
), C = o(
|
|
46
46
|
() => t == null ? void 0 : t.answers.find((i) => i.correct === !0),
|
|
47
47
|
[t]
|
|
48
|
-
),
|
|
48
|
+
), B = o(() => t ? t.answers.map((i) => {
|
|
49
49
|
var f;
|
|
50
50
|
return {
|
|
51
51
|
...i,
|
|
52
52
|
questionVoted: !!r,
|
|
53
|
-
youSelected:
|
|
54
|
-
isLoading:
|
|
55
|
-
hasCorrectAnswer:
|
|
53
|
+
youSelected: x === i.id,
|
|
54
|
+
isLoading: I,
|
|
55
|
+
hasCorrectAnswer: h,
|
|
56
56
|
questionType: t.type,
|
|
57
|
-
answerTimeExpired:
|
|
58
|
-
questionStatus:
|
|
57
|
+
answerTimeExpired: s,
|
|
58
|
+
questionStatus: e,
|
|
59
59
|
imageMode: (f = t.appearance) == null ? void 0 : f.images,
|
|
60
|
-
onVote:
|
|
60
|
+
onVote: q
|
|
61
61
|
};
|
|
62
62
|
}) : [], [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
h,
|
|
64
|
+
s,
|
|
65
|
+
I,
|
|
66
66
|
t,
|
|
67
67
|
r,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
]),
|
|
72
|
-
if (!(
|
|
73
|
-
return
|
|
74
|
-
}, [
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
68
|
+
e,
|
|
69
|
+
q,
|
|
70
|
+
x
|
|
71
|
+
]), F = E && (E.case === "trivia" || E.case === "prediction") ? E.value : void 0, m = e === w.RESOLVED && l === c.TRIVIA && !r && !n, S = l === c.TRIVIA && y && R && n, W = o(() => {
|
|
72
|
+
if (!(m || s))
|
|
73
|
+
return e === w.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : C == null ? void 0 : C.points;
|
|
74
|
+
}, [s, r, C, e, m]), H = o(() => m || s ? "Time expired" : t.type === c.POLL ? "Time remaining" : r ? "You won" : "To win", [s, t.type, r, m]), K = r || m || S || l === c.TRIVIA && e === w.RESOLVED && n;
|
|
75
|
+
return /* @__PURE__ */ a(G, { "data-question-header": "true", children: /* @__PURE__ */ a(X, { children: /* @__PURE__ */ g(Z, { children: [
|
|
76
|
+
/* @__PURE__ */ a(
|
|
77
|
+
U,
|
|
78
78
|
{
|
|
79
|
-
feedbackMessages:
|
|
79
|
+
feedbackMessages: F,
|
|
80
80
|
questionVoted: !!r,
|
|
81
81
|
questionVotedCorrectly: r == null ? void 0 : r.correct,
|
|
82
|
-
questionType:
|
|
83
|
-
hasCorrectAnswer:
|
|
84
|
-
questionStatus:
|
|
85
|
-
showExpiredNotification:
|
|
86
|
-
showClosedNotificationTrivia:
|
|
87
|
-
votedInCurrentRender:
|
|
88
|
-
votedAfterQuestionClosed:
|
|
89
|
-
enteredAnActiveQuestion: n
|
|
82
|
+
questionType: l,
|
|
83
|
+
hasCorrectAnswer: h,
|
|
84
|
+
questionStatus: e,
|
|
85
|
+
showExpiredNotification: m,
|
|
86
|
+
showClosedNotificationTrivia: S,
|
|
87
|
+
votedInCurrentRender: R,
|
|
88
|
+
votedAfterQuestionClosed: y,
|
|
89
|
+
enteredAnActiveQuestion: n,
|
|
90
|
+
marketClosed: V
|
|
90
91
|
}
|
|
91
92
|
),
|
|
92
|
-
t.type !==
|
|
93
|
-
|
|
93
|
+
t.type !== c.PREDICTION && /* @__PURE__ */ a(
|
|
94
|
+
tt,
|
|
94
95
|
{
|
|
95
|
-
title:
|
|
96
|
-
points:
|
|
97
|
-
onTimerExpired:
|
|
96
|
+
title: H,
|
|
97
|
+
points: W,
|
|
98
|
+
onTimerExpired: j,
|
|
98
99
|
questionType: t.type,
|
|
99
|
-
isTimer: !
|
|
100
|
+
isTimer: !I,
|
|
100
101
|
isPlayingTimer: !r,
|
|
101
|
-
timerDuration:
|
|
102
|
+
timerDuration: K ? 0 : Number(((k = t == null ? void 0 : t.appearance) == null ? void 0 : k.autoHideInterval) || "30")
|
|
102
103
|
}
|
|
103
104
|
),
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
s ? /* @__PURE__ */ a(
|
|
106
|
+
J,
|
|
106
107
|
{
|
|
107
108
|
title: "More to come...",
|
|
108
109
|
description: "Watch for additional enhanced stream interactive experience."
|
|
109
110
|
}
|
|
110
|
-
) : /* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
111
|
+
) : /* @__PURE__ */ g(Y, { children: [
|
|
112
|
+
/* @__PURE__ */ a(_, { "data-isPrediction": t.type === c.PREDICTION, children: N }),
|
|
113
|
+
/* @__PURE__ */ a($, { children: B.map((i) => /* @__PURE__ */ a(
|
|
114
|
+
Q,
|
|
114
115
|
{
|
|
115
116
|
...i,
|
|
116
|
-
markThatVoted:
|
|
117
|
-
votedAfterQuestionClosed:
|
|
118
|
-
enteredAnActiveQuestion: n
|
|
117
|
+
markThatVoted: M,
|
|
118
|
+
votedAfterQuestionClosed: y,
|
|
119
|
+
enteredAnActiveQuestion: n,
|
|
120
|
+
marketClosed: V
|
|
119
121
|
},
|
|
120
122
|
i.id
|
|
121
123
|
)) })
|
|
@@ -123,5 +125,5 @@ const pt = ({ openedQuestion: t, isLoading: y, vote: v, close: C }) => {
|
|
|
123
125
|
] }) }) });
|
|
124
126
|
};
|
|
125
127
|
export {
|
|
126
|
-
|
|
128
|
+
At as Vote
|
|
127
129
|
};
|
|
@@ -11,6 +11,7 @@ export type VotingOptionProps = ExtendedQuestionAnswer & {
|
|
|
11
11
|
questionStatus: QuestionStatus;
|
|
12
12
|
votedAfterQuestionClosed: boolean;
|
|
13
13
|
enteredAnActiveQuestion: boolean;
|
|
14
|
+
marketClosed: boolean;
|
|
14
15
|
onVote: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
15
16
|
markThatVoted: (votedAfterQuestionClosed: boolean) => void;
|
|
16
17
|
};
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { QuestionImages as s,
|
|
3
|
-
import { AnimatedCounter as
|
|
4
|
-
import { IconDefault as
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionImages as s, QuestionType as i, QuestionStatus as p } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { AnimatedCounter as L } from "../../../animated-counter/index.js";
|
|
4
|
+
import { IconDefault as Q, IconContainer as v, IconWrap as B, IconCircle as V, ButtonContainer as b, ButtonPct as j, ButtonBody as U, Title as $, Indicators as M, CheckIcon as W, Percentage as y } from "./styles.js";
|
|
5
5
|
import "react-countup";
|
|
6
6
|
import "@linaria/react";
|
|
7
7
|
import "../../../icons/index.js";
|
|
8
8
|
import "react";
|
|
9
|
-
const
|
|
10
|
-
[s.CENTERED]: (t) => /* @__PURE__ */
|
|
11
|
-
[s.TRANSPARENT]: (t) => /* @__PURE__ */
|
|
12
|
-
[s.ROUNDED]: (t) => /* @__PURE__ */
|
|
9
|
+
const I = {
|
|
10
|
+
[s.CENTERED]: (t) => /* @__PURE__ */ r(Q, { alt: "option-icon", src: t }),
|
|
11
|
+
[s.TRANSPARENT]: (t) => /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(B, { style: { backgroundImage: `url(${t})` } }) }),
|
|
12
|
+
[s.ROUNDED]: (t) => /* @__PURE__ */ r(V, { alt: "option-icon", src: t }),
|
|
13
13
|
[s.NONE]: () => null,
|
|
14
14
|
[s.UNSET]: () => null
|
|
15
|
-
},
|
|
16
|
-
if (t ===
|
|
15
|
+
}, z = ({ questionType: t, hasCorrectAnswer: c, correct: e, youVoted: n, questionVoted: o }) => {
|
|
16
|
+
if (t === i.POLL && n)
|
|
17
17
|
return "correct";
|
|
18
|
-
if (t ===
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
21
|
-
if (
|
|
18
|
+
if (t === i.PREDICTION) {
|
|
19
|
+
if (c && o)
|
|
20
|
+
return n ? e ? "correct" : "incorrect" : "unset";
|
|
21
|
+
if (n)
|
|
22
22
|
return "correct";
|
|
23
23
|
}
|
|
24
|
-
return t ===
|
|
25
|
-
},
|
|
24
|
+
return t === i.TRIVIA && o && n ? e ? "correct" : "incorrect" : "unset";
|
|
25
|
+
}, F = ({
|
|
26
26
|
questionType: t,
|
|
27
|
-
questionVoted:
|
|
27
|
+
questionVoted: c,
|
|
28
28
|
correct: e,
|
|
29
|
-
hasCorrectAnswer:
|
|
29
|
+
hasCorrectAnswer: n,
|
|
30
30
|
questionStatus: o
|
|
31
|
-
}) => t ===
|
|
32
|
-
var
|
|
31
|
+
}) => t === i.TRIVIA ? c && e : t === i.PREDICTION ? c && e && n || o === p.RESOLVED && e : !1, tt = (t) => {
|
|
32
|
+
var S;
|
|
33
33
|
const {
|
|
34
34
|
// option props
|
|
35
|
-
id:
|
|
35
|
+
id: c,
|
|
36
36
|
icon: e,
|
|
37
|
-
text:
|
|
37
|
+
text: n,
|
|
38
38
|
percentageDecimal: o,
|
|
39
39
|
// extra props
|
|
40
|
-
onVote:
|
|
40
|
+
onVote: T,
|
|
41
41
|
markThatVoted: D,
|
|
42
|
-
youSelected:
|
|
42
|
+
youSelected: f,
|
|
43
43
|
questionVoted: a,
|
|
44
44
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
45
|
-
imageMode:
|
|
46
|
-
answerTimeExpired:
|
|
47
|
-
questionStatus:
|
|
48
|
-
isLoading:
|
|
49
|
-
questionType:
|
|
50
|
-
correct:
|
|
51
|
-
hasCorrectAnswer:
|
|
52
|
-
votedAfterQuestionClosed:
|
|
53
|
-
enteredAnActiveQuestion:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
imageMode: C,
|
|
46
|
+
answerTimeExpired: g,
|
|
47
|
+
questionStatus: h,
|
|
48
|
+
isLoading: w,
|
|
49
|
+
questionType: d,
|
|
50
|
+
correct: A,
|
|
51
|
+
hasCorrectAnswer: O,
|
|
52
|
+
votedAfterQuestionClosed: P,
|
|
53
|
+
enteredAnActiveQuestion: E,
|
|
54
|
+
marketClosed: N
|
|
55
|
+
} = t, l = z(t), k = F({ questionType: d, questionVoted: a, correct: A, hasCorrectAnswer: O, questionStatus: h }), u = N && d === i.PREDICTION, R = a || u;
|
|
56
|
+
return /* @__PURE__ */ m(
|
|
57
|
+
b,
|
|
57
58
|
{
|
|
58
|
-
value:
|
|
59
|
-
"data-selected":
|
|
59
|
+
value: c,
|
|
60
|
+
"data-selected": f,
|
|
60
61
|
"data-answerState": l,
|
|
61
|
-
disabled: a ||
|
|
62
|
-
"data-isNotChecked": a && !
|
|
63
|
-
onClick: (
|
|
64
|
-
D(
|
|
62
|
+
disabled: a || w || g || u && !E || u && E && P,
|
|
63
|
+
"data-isNotChecked": a && !f && l !== "incorrect",
|
|
64
|
+
onClick: (x) => {
|
|
65
|
+
D(
|
|
66
|
+
d === i.PREDICTION ? N : h === p.RESOLVED
|
|
67
|
+
), T(x);
|
|
65
68
|
},
|
|
66
69
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
e &&
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ r(j, { "data-answerState": l, style: { width: `${R ? o : 0}%` } }),
|
|
71
|
+
/* @__PURE__ */ m(U, { children: [
|
|
72
|
+
e && C && ((S = I[C]) == null ? void 0 : S.call(I, e)),
|
|
73
|
+
/* @__PURE__ */ r($, { children: n }),
|
|
74
|
+
R && /* @__PURE__ */ m(M, { children: [
|
|
75
|
+
k && /* @__PURE__ */ r(W, { name: "selected" }),
|
|
76
|
+
/* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(L, { value: o, suffix: "%" }) })
|
|
74
77
|
] })
|
|
75
78
|
] })
|
|
76
79
|
]
|
|
@@ -78,5 +81,5 @@ const m = {
|
|
|
78
81
|
);
|
|
79
82
|
};
|
|
80
83
|
export {
|
|
81
|
-
|
|
84
|
+
tt as VotingOption
|
|
82
85
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"vite-plugin-svgr": "^4.1.0",
|
|
93
93
|
"vite-svg-loader": "^4.0.0",
|
|
94
94
|
"vite-tsconfig-paths": "^4.2.1",
|
|
95
|
-
"@streamlayer/react": "^0.33.
|
|
95
|
+
"@streamlayer/react": "^0.33.1"
|
|
96
96
|
}
|
|
97
97
|
}
|