@streamlayer/react-ui 0.97.0 → 0.97.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.
@@ -1,76 +1,76 @@
1
- import { jsx as i, jsxs as n, Fragment as e } from "react/jsx-runtime";
2
- import { useRef as B } from "react";
3
- import { QuestionType as r } from "@streamlayer/sdk-web-types";
4
- import { SvgIcon as h } from "../../../icons/index.js";
5
- import { ShowInContainer as C, Container as K, IconPrediction as W, FeedbackDescription as t, FeedbackIconWrap as a, FeedbackHeader as F, FeedbackText as s, DynamicWrap as z, FeedbackTitle as G } from "./styles.js";
1
+ import { jsx as i, jsxs as n, Fragment as t } from "react/jsx-runtime";
2
+ import { useRef as C } from "react";
3
+ import { QuestionType as d } from "@streamlayer/sdk-web-types";
4
+ import { SvgIcon as a } from "../../../icons/index.js";
5
+ import { ShowInContainer as E, Container as K, IconPrediction as j, FeedbackDescription as l, FeedbackIconWrap as m, FeedbackHeader as F, FeedbackText as I, DynamicWrap as z, FeedbackTitle as G } from "./styles.js";
6
6
  import "@linaria/react";
7
7
  import "../../../show-in/index.js";
8
8
  import "@linaria/core";
9
9
  const V = ({
10
- feedbackMessages: o,
11
- questionVotedCorrectly: I,
12
- questionVoted: m,
13
- questionType: c,
10
+ feedbackMessages: r,
11
+ questionVotedCorrectly: x,
12
+ questionVoted: p,
13
+ questionType: e,
14
14
  hasCorrectAnswer: u,
15
- showExpiredNotification: x,
15
+ showExpiredNotification: w,
16
16
  showClosedNotificationTrivia: P,
17
- votedInCurrentRender: d,
18
- votedAfterQuestionClosed: Q,
19
- voteErrorMessage: p,
20
- enteredAnActiveQuestion: w,
21
- marketClosed: j,
22
- percentsAnimated: H
17
+ votedInCurrentRender: o,
18
+ votedAfterQuestionClosed: H,
19
+ voteErrorMessage: c,
20
+ enteredAnActiveQuestion: y,
21
+ marketClosed: L,
22
+ percentsAnimated: Y
23
23
  }) => {
24
- var S;
25
- const y = m && (c === r.TRIVIA || c === r.PREDICTION), f = c === r.PREDICTION && !u, D = j && c === r.PREDICTION && !m && !w || c === r.PREDICTION && Q && d && w, E = y && f, O = y && u, R = c === r.PREDICTION && m && d && u, T = m && c === r.POLL && d, b = I ? "correct" : "incorrect", l = I ? o == null ? void 0 : o.correctFeedback : o == null ? void 0 : o.incorrectFeedback, L = x || P || E || O || D || T || R || p, N = B(null), Y = (S = N.current) == null ? void 0 : S.getBoundingClientRect().height, k = d && !H;
26
- return L ? /* @__PURE__ */ i(
27
- C,
24
+ var Q;
25
+ const f = p && (e === d.TRIVIA || e === d.PREDICTION), D = e === d.PREDICTION && !u, O = L && e === d.PREDICTION && !p && !y || e === d.PREDICTION && H && o && y, R = f && D, T = f && u, N = e === d.PREDICTION && p && o && u, S = p && e === d.POLL && o, b = x ? "correct" : "incorrect", h = x ? r == null ? void 0 : r.correctFeedback : r == null ? void 0 : r.incorrectFeedback, s = w || P || R || T || O || S || N || c, W = C(null), B = (Q = W.current) == null ? void 0 : Q.getBoundingClientRect().height, k = o && !Y;
26
+ return s ? /* @__PURE__ */ i(
27
+ E,
28
28
  {
29
- enabled: d && !k,
29
+ enabled: o && !k,
30
30
  replayKey: k,
31
- style: d ? { height: k ? 0 : Y } : {},
32
- children: /* @__PURE__ */ n(K, { ref: N, "data-prediction": f, children: [
33
- p && /* @__PURE__ */ n(e, { children: [
34
- /* @__PURE__ */ i(W, { name: "questionExpired" }),
35
- /* @__PURE__ */ i(t, { children: p })
31
+ style: o ? { height: k ? 0 : B } : {},
32
+ children: /* @__PURE__ */ n(K, { ref: W, "data-prediction": D, children: [
33
+ c && /* @__PURE__ */ n(t, { children: [
34
+ /* @__PURE__ */ i(j, { name: "questionExpired" }),
35
+ /* @__PURE__ */ i(l, { children: c })
36
36
  ] }),
37
- x && /* @__PURE__ */ n(e, { children: [
38
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(h, { name: "questionExpired" }) }),
37
+ !c && w && /* @__PURE__ */ n(t, { children: [
38
+ /* @__PURE__ */ i(m, { children: /* @__PURE__ */ i(a, { name: "questionExpired" }) }),
39
39
  /* @__PURE__ */ n("div", { children: [
40
- /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(t, { children: "Question Expired" }) }),
41
- /* @__PURE__ */ i(s, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
40
+ /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(l, { children: "Question Expired" }) }),
41
+ /* @__PURE__ */ i(I, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
42
42
  ] })
43
43
  ] }),
44
- P && /* @__PURE__ */ n(e, { children: [
45
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(h, { name: "questionExpired" }) }),
44
+ !c && P && /* @__PURE__ */ n(t, { children: [
45
+ /* @__PURE__ */ i(m, { children: /* @__PURE__ */ i(a, { name: "questionExpired" }) }),
46
46
  /* @__PURE__ */ n("div", { children: [
47
- /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(t, { children: "Question Closed" }) }),
48
- /* @__PURE__ */ i(s, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
47
+ /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(l, { children: "Question Closed" }) }),
48
+ /* @__PURE__ */ i(I, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
49
49
  ] })
50
50
  ] }),
51
- !p && D && /* @__PURE__ */ n(e, { children: [
52
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(h, { name: "questionExpired" }) }),
51
+ !c && O && /* @__PURE__ */ n(t, { children: [
52
+ /* @__PURE__ */ i(m, { children: /* @__PURE__ */ i(a, { name: "questionExpired" }) }),
53
53
  /* @__PURE__ */ n("div", { children: [
54
- /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(t, { children: "Question Closed" }) }),
55
- /* @__PURE__ */ i(s, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
54
+ /* @__PURE__ */ i(F, { children: /* @__PURE__ */ i(l, { children: "Question Closed" }) }),
55
+ /* @__PURE__ */ i(I, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
56
56
  ] })
57
57
  ] }),
58
- E && /* @__PURE__ */ n(e, { children: [
59
- /* @__PURE__ */ i(W, { name: "icon-prediction" }),
60
- /* @__PURE__ */ n(t, { children: [
58
+ !c && R && /* @__PURE__ */ n(t, { children: [
59
+ /* @__PURE__ */ i(j, { name: "icon-prediction" }),
60
+ /* @__PURE__ */ n(l, { children: [
61
61
  "Your pick has been recorded. ",
62
62
  /* @__PURE__ */ i(z, { children: "We’ll notify you of the result." })
63
63
  ] })
64
64
  ] }),
65
- T && /* @__PURE__ */ n(e, { children: [
66
- /* @__PURE__ */ i(a, { "data-feedback-type": "correct", children: /* @__PURE__ */ i(h, { name: "correct" }) }),
67
- /* @__PURE__ */ i(t, { children: "Thanks for answering. Please stay tuned for the next question." })
65
+ !c && S && /* @__PURE__ */ n(t, { children: [
66
+ /* @__PURE__ */ i(m, { "data-feedback-type": "correct", children: /* @__PURE__ */ i(a, { name: "correct" }) }),
67
+ /* @__PURE__ */ i(l, { children: "Thanks for answering. Please stay tuned for the next question." })
68
68
  ] }),
69
- (O || R) && !P && /* @__PURE__ */ n(e, { children: [
70
- /* @__PURE__ */ i(a, { "data-feedback-type": b, children: /* @__PURE__ */ i(h, { name: b }) }),
69
+ !c && (T || N) && !P && /* @__PURE__ */ n(t, { children: [
70
+ /* @__PURE__ */ i(m, { "data-feedback-type": b, children: /* @__PURE__ */ i(a, { name: b }) }),
71
71
  /* @__PURE__ */ i("div", { children: /* @__PURE__ */ n(F, { children: [
72
- /* @__PURE__ */ i(G, { "data-feedback-type": b, children: l == null ? void 0 : l.title }),
73
- /* @__PURE__ */ i(t, { children: l == null ? void 0 : l.description })
72
+ /* @__PURE__ */ i(G, { "data-feedback-type": b, children: h == null ? void 0 : h.title }),
73
+ /* @__PURE__ */ i(l, { children: h == null ? void 0 : h.description })
74
74
  ] }) })
75
75
  ] })
76
76
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.97.0",
3
+ "version": "0.97.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -45,15 +45,15 @@
45
45
  "react-window": "^1.8.10",
46
46
  "react-window-infinite-loader": "^1.0.9",
47
47
  "@streamlayer/feature-gamification": "^0.39.0",
48
- "@streamlayer/sdk-web-analytics": "^0.1.0",
49
48
  "@streamlayer/sdk-web": "^0.33.0",
49
+ "@streamlayer/sdk-web-analytics": "^0.1.0",
50
50
  "@streamlayer/sdk-web-anonymous-auth": "^0.11.42",
51
51
  "@streamlayer/sdk-web-api": "^0.24.0",
52
52
  "@streamlayer/sdk-web-features": "^0.11.24",
53
- "@streamlayer/sdk-web-logger": "^0.5.18",
54
- "@streamlayer/sdk-web-core": "^0.22.0",
55
53
  "@streamlayer/sdk-web-interfaces": "^0.21.0",
54
+ "@streamlayer/sdk-web-logger": "^0.5.18",
56
55
  "@streamlayer/sdk-web-notifications": "^0.15.0",
56
+ "@streamlayer/sdk-web-core": "^0.22.0",
57
57
  "@streamlayer/sdk-web-storage": "^0.4.5",
58
58
  "@streamlayer/sdk-web-types": "^0.23.0"
59
59
  },
@@ -96,6 +96,6 @@
96
96
  "vite-plugin-svgr": "^4.2.0",
97
97
  "vite-svg-loader": "^5.1.0",
98
98
  "vite-tsconfig-paths": "^4.3.1",
99
- "@streamlayer/react": "^0.41.0"
99
+ "@streamlayer/react": "^0.41.1"
100
100
  }
101
101
  }