@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.
Files changed (43) hide show
  1. package/lib/app/app/Advertisement/index.js +11 -11
  2. package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
  3. package/lib/app/app/Navigation/index.js +1 -0
  4. package/lib/app/app/Notifications/Onboarding/Notification/index.js +12 -12
  5. package/lib/app/app/Notifications/index.js +31 -30
  6. package/lib/app/app/Points/index.js +19 -13
  7. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +2 -1
  8. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +5 -4
  9. package/lib/app/masters/BetPack/index.js +38 -36
  10. package/lib/assets/style.css +1 -1
  11. package/lib/hooks/analytics.js +12 -9
  12. package/lib/ui/advertisement/banner/index.js +3 -3
  13. package/lib/ui/advertisement/overlay/externalAd/index.js +7 -7
  14. package/lib/ui/advertisement/overlay/index.js +10 -10
  15. package/lib/ui/button/index.js +2 -2
  16. package/lib/ui/close-btn/index.js +23 -20
  17. package/lib/ui/gamification/detail/header/index.js +8 -8
  18. package/lib/ui/gamification/insight/index.js +6 -6
  19. package/lib/ui/gamification/invite-link/index.js +1 -1
  20. package/lib/ui/gamification/leaderboard/static.js +14 -13
  21. package/lib/ui/gamification/onboarding/index.js +15 -15
  22. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
  23. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +10 -10
  24. package/lib/ui/gamification/question/inapp/notification/index.js +1 -1
  25. package/lib/ui/gamification/question/inapp/onboarding/index.js +10 -9
  26. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +27 -27
  27. package/lib/ui/gamification/question/index.js +23 -23
  28. package/lib/ui/gamification/question/insight/index.js +6 -6
  29. package/lib/ui/gamification/question/list/index.js +9 -9
  30. package/lib/ui/gamification/question/notification/index.js +13 -12
  31. package/lib/ui/gamification/question/notification/insight/index.js +11 -11
  32. package/lib/ui/gamification/question/notification/pill/index.js +5 -5
  33. package/lib/ui/gamification/question/notification/prediction-result/index.js +32 -32
  34. package/lib/ui/gamification/question/notification/tweet/index.js +3 -3
  35. package/lib/ui/gamification/question/twitter/index.js +4 -4
  36. package/lib/ui/gamification/tabs/index.js +8 -8
  37. package/lib/ui/gamification/vote/insight-details/index.js +6 -6
  38. package/lib/ui/gamification/vote/vote-option/index.js +20 -19
  39. package/lib/ui/navigation/button/index.js +9 -8
  40. package/lib/ui/theme/constants.d.ts +1 -0
  41. package/lib/ui/theme/constants.js +2 -1
  42. package/lib/ui/video-player/index.js +1 -0
  43. package/package.json +15 -15
@@ -1,17 +1,17 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { Button as i, Title as l, Container as a, STabs as h } from "./styles.js";
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 t = ({ title: r, active: o, onClick: n }) => /* @__PURE__ */ e(i, { onClick: n, "data-selected": o, children: /* @__PURE__ */ e(l, { children: r }) }), b = ({ activePage: r = "home", toggleActivePage: o }) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ d(h, { "data-position": r === "home" ? "left" : "right", children: [
5
- /* @__PURE__ */ e(t, { title: "Home", active: r === "home", onClick: () => o(
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__ */ e(
10
- t,
9
+ /* @__PURE__ */ t(
10
+ o,
11
11
  {
12
12
  title: "Friends",
13
13
  active: r === "leaderboard",
14
- onClick: () => o(
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
- t as Tab,
23
+ o as Tab,
24
24
  b as Tabs
25
25
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
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 c, WebLinkIcon as e } from "./styles.js";
4
- const p = ({ instantView: r, ...b }) => /* @__PURE__ */ l(m, { children: [
5
- /* @__PURE__ */ o(k, { instantView: r, ...b, isDetail: !0 }),
6
- (r == null ? void 0 : r.webLink) && /* @__PURE__ */ l(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", "data-analytics": "web-link", children: [
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__ */ o(e, { name: "icon-external-link" })
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 a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
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
- [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
- [a.NONE]: () => null,
11
- [a.UNSET]: () => null
12
- }, tt = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
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 (!c && i)
16
+ if (!a && i)
17
17
  return r ? "voted" : "unset";
18
- if (c && i)
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: c,
26
+ questionVoted: a,
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 === S.RESOLVED && n : !1, st = (t) => {
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: c,
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: s,
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: 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;
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: c,
63
+ value: a,
64
64
  "data-selected": h,
65
65
  "data-answer-state": I,
66
- disabled: s || v || k || m,
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
- st as VotingOption
103
+ ct as VotingOption
103
104
  };
@@ -1,22 +1,23 @@
1
- import { jsx as t, jsxs as l, Fragment as d } from "react/jsx-runtime";
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 I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: e }) => /* @__PURE__ */ t(
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 && (e === "channels" || e === "featuredGroups") && h,
12
- !r && e === "leaderboard" && p
12
+ !r && (t === "channels" || t === "featuredGroups") && h,
13
+ !r && t === "leaderboard" && p
13
14
  ),
14
- children: /* @__PURE__ */ l(d, { children: [
15
- o && /* @__PURE__ */ t(B, { children: o }),
16
- /* @__PURE__ */ t(f, { children: c })
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
- I as Button
22
+ i as Button
22
23
  };
@@ -9,6 +9,7 @@ export declare const COLORS: {
9
9
  PRIMARY_TEXT: string;
10
10
  SECONDARY_TEXT: string;
11
11
  QUESTION_TYPE_ICON: string;
12
+ QUESTION_BODY_TEXT: string;
12
13
  SUCCESS: string;
13
14
  UNSUCCESS: string;
14
15
  SECONDARY_RED1: string;
@@ -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: "24px 0px"
91
+ MARGIN_TITLE_DEFAULT: "0px 0px 12px"
91
92
  }, A = {
92
93
  xs: 324,
93
94
  sm: 576,
@@ -64,6 +64,7 @@ const G = (s) => {
64
64
  B,
65
65
  {
66
66
  onClick: b ? void 0 : S,
67
+ "data-a": "intr",
67
68
  className: C(d && N, b && q, M),
68
69
  style: y ? { aspectRatio: y } : {},
69
70
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.22.6",
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.8",
73
- "@streamlayer/react-polyfills": "^0.1.15",
74
- "@streamlayer/sdk-web": "^1.10.8",
75
- "@streamlayer/sdk-web-analytics": "^1.7.8",
76
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.34",
77
- "@streamlayer/sdk-web-api": "^1.8.8",
78
- "@streamlayer/sdk-web-core": "^1.11.10",
79
- "@streamlayer/sdk-web-features": "^1.0.55",
80
- "@streamlayer/sdk-web-interfaces": "^1.4.21",
81
- "@streamlayer/sdk-web-logger": "^1.0.55",
82
- "@streamlayer/sdk-web-notifications": "^1.3.17",
83
- "@streamlayer/sdk-web-storage": "^1.0.55",
84
- "@streamlayer/sdk-web-types": "^1.10.12"
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.14.8"
124
+ "@streamlayer/react": "^1.15.0"
125
125
  },
126
126
  "dependencies": {
127
127
  "@dailymotion/vast-client": "^6.2.0",