@streamlayer/react-ui 1.22.6 → 1.23.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 +11 -11
- package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
- package/lib/app/app/Navigation/index.js +1 -0
- package/lib/app/app/Notifications/Onboarding/Notification/index.js +12 -12
- package/lib/app/app/Notifications/index.js +31 -30
- package/lib/app/app/Points/index.js +19 -13
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +2 -1
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +5 -4
- package/lib/app/masters/BetPack/index.js +38 -36
- package/lib/assets/style.css +1 -1
- package/lib/hooks/analytics.js +12 -9
- package/lib/ui/advertisement/banner/index.js +3 -3
- package/lib/ui/advertisement/overlay/externalAd/index.js +7 -7
- package/lib/ui/advertisement/overlay/index.js +10 -10
- package/lib/ui/button/index.js +2 -2
- package/lib/ui/close-btn/index.js +23 -20
- package/lib/ui/gamification/detail/header/index.js +8 -8
- package/lib/ui/gamification/insight/index.js +6 -6
- package/lib/ui/gamification/invite-link/index.js +1 -1
- package/lib/ui/gamification/leaderboard/static.js +14 -13
- package/lib/ui/gamification/onboarding/index.js +15 -15
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +10 -10
- package/lib/ui/gamification/question/inapp/notification/index.js +1 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.js +10 -9
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +27 -27
- package/lib/ui/gamification/question/index.js +23 -23
- package/lib/ui/gamification/question/insight/index.js +6 -6
- package/lib/ui/gamification/question/list/index.js +9 -9
- package/lib/ui/gamification/question/notification/index.js +13 -12
- package/lib/ui/gamification/question/notification/insight/index.js +11 -11
- package/lib/ui/gamification/question/notification/pill/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/index.js +32 -32
- package/lib/ui/gamification/question/notification/tweet/index.js +3 -3
- package/lib/ui/gamification/question/twitter/index.js +4 -4
- package/lib/ui/gamification/tabs/index.js +8 -8
- package/lib/ui/gamification/vote/insight-details/index.js +6 -6
- package/lib/ui/gamification/vote/vote-option/index.js +20 -19
- package/lib/ui/navigation/button/index.js +9 -8
- package/lib/ui/theme/constants.d.ts +1 -0
- package/lib/ui/theme/constants.js +2 -1
- package/lib/ui/video-player/index.js +1 -0
- package/package.json +15 -15
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Button as d, Title as i, Container as l, STabs as h } from "./styles.js";
|
|
3
3
|
var m = /* @__PURE__ */ ((r) => (r.HOME = "home", r.LEADERBOARD = "leaderboard", r))(m || {});
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
4
|
+
const o = ({ title: r, active: e, onClick: n }) => /* @__PURE__ */ t(d, { "data-a": "intr", onClick: n, "data-selected": e, children: /* @__PURE__ */ t(i, { "data-a": "intr", children: r }) }), b = ({ activePage: r = "home", toggleActivePage: e }) => /* @__PURE__ */ t(l, { children: /* @__PURE__ */ a(h, { "data-position": r === "home" ? "left" : "right", children: [
|
|
5
|
+
/* @__PURE__ */ t(o, { title: "Home", active: r === "home", onClick: () => e(
|
|
6
6
|
"home"
|
|
7
7
|
/* HOME */
|
|
8
8
|
) }),
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
/* @__PURE__ */ t(
|
|
10
|
+
o,
|
|
11
11
|
{
|
|
12
12
|
title: "Friends",
|
|
13
13
|
active: r === "leaderboard",
|
|
14
|
-
onClick: () =>
|
|
14
|
+
onClick: () => e(
|
|
15
15
|
"leaderboard"
|
|
16
16
|
/* LEADERBOARD */
|
|
17
17
|
)
|
|
@@ -20,6 +20,6 @@ const t = ({ title: r, active: o, onClick: n }) => /* @__PURE__ */ e(i, { onClic
|
|
|
20
20
|
] }) });
|
|
21
21
|
export {
|
|
22
22
|
m as ActivePages,
|
|
23
|
-
|
|
23
|
+
o as Tab,
|
|
24
24
|
b as Tabs
|
|
25
25
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { InsightContent as k } from "../../../questions/insight/index.js";
|
|
3
|
-
import { Container as m, WebLinkBtn as
|
|
4
|
-
const p = ({ instantView: r, ...b }) => /* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
(r == null ? void 0 : r.webLink) && /* @__PURE__ */
|
|
3
|
+
import { Container as m, WebLinkBtn as e, WebLinkIcon as c } from "./styles.js";
|
|
4
|
+
const p = ({ instantView: r, ...b }) => /* @__PURE__ */ o(m, { children: [
|
|
5
|
+
/* @__PURE__ */ l(k, { instantView: r, ...b, isDetail: !0 }),
|
|
6
|
+
(r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(e, { href: r == null ? void 0 : r.webLink.url, target: "_blank", "data-a": "web-link", children: [
|
|
7
7
|
r == null ? void 0 : r.webLink.label,
|
|
8
|
-
/* @__PURE__ */
|
|
8
|
+
/* @__PURE__ */ l(c, { name: "icon-external-link" })
|
|
9
9
|
] })
|
|
10
10
|
] });
|
|
11
11
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as j, useLayoutEffect as y } from "react";
|
|
3
|
-
import { QuestionImages as
|
|
3
|
+
import { QuestionImages as s, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
|
|
4
4
|
import { AnimatedCounter as U } from "../../../animated-counter/index.js";
|
|
5
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
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
}, tt = ({ questionType: t, hasCorrectAnswer:
|
|
7
|
+
[s.CENTERED]: (t) => /* @__PURE__ */ e(V, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
8
|
+
[s.TRANSPARENT]: (t) => /* @__PURE__ */ e($, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(F, { style: { backgroundImage: `url(${t})` } }) }),
|
|
9
|
+
[s.ROUNDED]: (t) => /* @__PURE__ */ e(M, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
10
|
+
[s.NONE]: () => null,
|
|
11
|
+
[s.UNSET]: () => null
|
|
12
|
+
}, tt = ({ questionType: t, hasCorrectAnswer: a, correct: n, youVoted: r, questionVoted: i }) => {
|
|
13
13
|
if (t === o.POLL && r)
|
|
14
14
|
return "voted";
|
|
15
15
|
if (t === o.PREDICTION) {
|
|
16
|
-
if (!
|
|
16
|
+
if (!a && i)
|
|
17
17
|
return r ? "voted" : "unset";
|
|
18
|
-
if (
|
|
18
|
+
if (a && i)
|
|
19
19
|
return r ? n ? "correct" : "incorrect" : "unset";
|
|
20
20
|
if (r)
|
|
21
21
|
return "correct";
|
|
@@ -23,15 +23,15 @@ const E = {
|
|
|
23
23
|
return t === o.TRIVIA && i && r ? n ? "correct" : "incorrect" : "unset";
|
|
24
24
|
}, et = ({
|
|
25
25
|
questionType: t,
|
|
26
|
-
questionVoted:
|
|
26
|
+
questionVoted: a,
|
|
27
27
|
correct: n,
|
|
28
28
|
hasCorrectAnswer: r,
|
|
29
29
|
questionStatus: i
|
|
30
|
-
}) => t === o.TRIVIA ?
|
|
30
|
+
}) => t === o.TRIVIA ? a && n : t === o.PREDICTION ? a && n && r || i === S.RESOLVED && n : !1, ct = (t) => {
|
|
31
31
|
var N;
|
|
32
32
|
const {
|
|
33
33
|
// option props
|
|
34
|
-
id:
|
|
34
|
+
id: a,
|
|
35
35
|
icon: n,
|
|
36
36
|
text: r,
|
|
37
37
|
percentageDecimal: i,
|
|
@@ -42,7 +42,7 @@ const E = {
|
|
|
42
42
|
onPercentsAnimated: u,
|
|
43
43
|
youSelected: h,
|
|
44
44
|
youVoted: w,
|
|
45
|
-
questionVoted:
|
|
45
|
+
questionVoted: c,
|
|
46
46
|
imageMode: P,
|
|
47
47
|
answerTimeExpired: k,
|
|
48
48
|
questionStatus: C,
|
|
@@ -52,7 +52,7 @@ const E = {
|
|
|
52
52
|
hasCorrectAnswer: x,
|
|
53
53
|
marketClosed: f,
|
|
54
54
|
isEarlyPrediction: B
|
|
55
|
-
} = t, [L, R] = j(0), I = tt(t), Q = et({ questionType: d, questionVoted:
|
|
55
|
+
} = t, [L, R] = j(0), I = tt(t), Q = et({ questionType: d, questionVoted: c, correct: A, hasCorrectAnswer: x, questionStatus: C }), m = f && d === o.PREDICTION, T = c || m, W = d === o.PREDICTION && !c && !f, p = c && !h && I !== "incorrect" && !w;
|
|
56
56
|
return y(() => {
|
|
57
57
|
R(0), requestAnimationFrame(() => {
|
|
58
58
|
R(i);
|
|
@@ -60,11 +60,12 @@ const E = {
|
|
|
60
60
|
}, [i]), /* @__PURE__ */ l(
|
|
61
61
|
z,
|
|
62
62
|
{
|
|
63
|
-
value:
|
|
63
|
+
value: a,
|
|
64
64
|
"data-selected": h,
|
|
65
65
|
"data-answer-state": I,
|
|
66
|
-
disabled:
|
|
66
|
+
disabled: c || v || k || m,
|
|
67
67
|
"data-is-not-checked": p,
|
|
68
|
+
"data-a": "intr",
|
|
68
69
|
onClick: (b) => {
|
|
69
70
|
g(
|
|
70
71
|
d === o.PREDICTION ? f : C === S.RESOLVED
|
|
@@ -82,9 +83,9 @@ const E = {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
) }),
|
|
85
|
-
/* @__PURE__ */ l(J, { children: [
|
|
86
|
+
/* @__PURE__ */ l(J, { "data-a": "intr", children: [
|
|
86
87
|
n && P && ((N = E[P]) == null ? void 0 : N.call(E, n)),
|
|
87
|
-
/* @__PURE__ */ e(K, { children: r }),
|
|
88
|
+
/* @__PURE__ */ e(K, { "data-a": "intr", children: r }),
|
|
88
89
|
W && /* @__PURE__ */ l(X, { children: [
|
|
89
90
|
D,
|
|
90
91
|
/* @__PURE__ */ e(Y, { children: "pts" })
|
|
@@ -99,5 +100,5 @@ const E = {
|
|
|
99
100
|
);
|
|
100
101
|
};
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
ct as VotingOption
|
|
103
104
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as l } from "react/jsx-runtime";
|
|
2
2
|
import { cx as m } from "@linaria/core";
|
|
3
3
|
import { SButton as s, SelectedButton as u, HoverIconState as h, HoverIconLeaderboardState as p, ButtonIcon as B, ButtonLabel as f } from "./styles.js";
|
|
4
|
-
const
|
|
4
|
+
const i = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: t }) => /* @__PURE__ */ e(
|
|
5
5
|
s,
|
|
6
6
|
{
|
|
7
7
|
onClick: a,
|
|
8
|
+
"data-a": "intr",
|
|
8
9
|
disabled: n,
|
|
9
10
|
className: m(
|
|
10
11
|
r && u,
|
|
11
|
-
!r && (
|
|
12
|
-
!r &&
|
|
12
|
+
!r && (t === "channels" || t === "featuredGroups") && h,
|
|
13
|
+
!r && t === "leaderboard" && p
|
|
13
14
|
),
|
|
14
|
-
children: /* @__PURE__ */ l
|
|
15
|
-
o && /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ d(l, { children: [
|
|
16
|
+
o && /* @__PURE__ */ e(B, { children: o }),
|
|
17
|
+
/* @__PURE__ */ e(f, { children: c })
|
|
17
18
|
] })
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
i as Button
|
|
22
23
|
};
|
|
@@ -11,6 +11,7 @@ const R = {
|
|
|
11
11
|
PRIMARY_TEXT: "#090E13",
|
|
12
12
|
SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
|
|
13
13
|
QUESTION_TYPE_ICON: "#1D7BFF",
|
|
14
|
+
QUESTION_BODY_TEXT: "#090E13",
|
|
14
15
|
SUCCESS: "#107D57",
|
|
15
16
|
UNSUCCESS: "#DF2F3B",
|
|
16
17
|
SECONDARY_RED1: "#DF2F3B",
|
|
@@ -87,7 +88,7 @@ const R = {
|
|
|
87
88
|
SIZE_DEFAULT1: "14px",
|
|
88
89
|
SIZE_DEFAULT2: "12px",
|
|
89
90
|
LINE_HEIGHT: "24px",
|
|
90
|
-
MARGIN_TITLE_DEFAULT: "
|
|
91
|
+
MARGIN_TITLE_DEFAULT: "0px 0px 12px"
|
|
91
92
|
}, A = {
|
|
92
93
|
xs: 324,
|
|
93
94
|
sm: 576,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
"react-window": "^1.8.10",
|
|
70
70
|
"react-window-infinite-loader": "^1.0.9",
|
|
71
71
|
"uuid": "^11.1.0",
|
|
72
|
-
"@streamlayer/feature-gamification": "^1.16.
|
|
73
|
-
"@streamlayer/react-polyfills": "^0.1.
|
|
74
|
-
"@streamlayer/sdk-web": "^1.10.
|
|
75
|
-
"@streamlayer/sdk-web-analytics": "^1.7.
|
|
76
|
-
"@streamlayer/sdk-web-anonymous-auth": "^1.1.
|
|
77
|
-
"@streamlayer/sdk-web-api": "^1.8.
|
|
78
|
-
"@streamlayer/sdk-web-core": "^1.11.
|
|
79
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
80
|
-
"@streamlayer/sdk-web-interfaces": "^1.
|
|
81
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
82
|
-
"@streamlayer/sdk-web-notifications": "^1.3.
|
|
83
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
84
|
-
"@streamlayer/sdk-web-types": "^1.10.
|
|
72
|
+
"@streamlayer/feature-gamification": "^1.16.9",
|
|
73
|
+
"@streamlayer/react-polyfills": "^0.1.16",
|
|
74
|
+
"@streamlayer/sdk-web": "^1.10.9",
|
|
75
|
+
"@streamlayer/sdk-web-analytics": "^1.7.9",
|
|
76
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.1.35",
|
|
77
|
+
"@streamlayer/sdk-web-api": "^1.8.9",
|
|
78
|
+
"@streamlayer/sdk-web-core": "^1.11.11",
|
|
79
|
+
"@streamlayer/sdk-web-features": "^1.0.56",
|
|
80
|
+
"@streamlayer/sdk-web-interfaces": "^1.5.0",
|
|
81
|
+
"@streamlayer/sdk-web-logger": "^1.0.56",
|
|
82
|
+
"@streamlayer/sdk-web-notifications": "^1.3.18",
|
|
83
|
+
"@streamlayer/sdk-web-storage": "^1.0.56",
|
|
84
|
+
"@streamlayer/sdk-web-types": "^1.10.13"
|
|
85
85
|
},
|
|
86
86
|
"nx": {
|
|
87
87
|
"implicitDependencies": [
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"vite-plugin-svgr": "^4.2.0",
|
|
122
122
|
"vite-svg-loader": "^5.1.0",
|
|
123
123
|
"vite-tsconfig-paths": "^5.0.1",
|
|
124
|
-
"@streamlayer/react": "^1.
|
|
124
|
+
"@streamlayer/react": "^1.15.0"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@dailymotion/vast-client": "^6.2.0",
|