@streamlayer/react-ui 0.98.1 → 0.100.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 (129) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/showIn.js +45 -0
  3. package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
  4. package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
  5. package/lib/index.js +4 -8
  6. package/lib/ui/app/Features/Gamification/Friends.js +10 -23
  7. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
  8. package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
  9. package/lib/ui/app/Features/Gamification/Question.js +33 -65
  10. package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
  11. package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
  12. package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
  13. package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
  14. package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
  15. package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
  16. package/lib/ui/app/Features/Gamification/index.js +68 -143
  17. package/lib/ui/app/Features/index.d.ts +1 -2
  18. package/lib/ui/app/Features/index.js +20 -109
  19. package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
  20. package/lib/ui/app/Navigation/index.js +9 -12
  21. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
  22. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
  23. package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
  24. package/lib/ui/app/Notifications/index.js +96 -148
  25. package/lib/ui/app/Notifications/styles.js +10 -15
  26. package/lib/ui/app/Points/index.js +18 -26
  27. package/lib/ui/app/masters.js +71 -190
  28. package/lib/ui/app/useClipboardCopy.js +11 -15
  29. package/lib/ui/app/useMastersApp.js +34 -44
  30. package/lib/ui/app/useSdkResponsive.js +18 -19
  31. package/lib/ui/app/useSdkScroll.js +28 -26
  32. package/lib/ui/button/index.js +3 -4
  33. package/lib/ui/gamification/copyNotification/index.js +5 -7
  34. package/lib/ui/gamification/detail/header/index.js +15 -18
  35. package/lib/ui/gamification/detail/header/styles.js +12 -14
  36. package/lib/ui/gamification/detail/sponsor/index.js +2 -3
  37. package/lib/ui/gamification/insight/index.js +5 -6
  38. package/lib/ui/gamification/insight-list/index.js +3 -6
  39. package/lib/ui/gamification/invite-link/index.js +11 -17
  40. package/lib/ui/gamification/invite-link/styles.js +13 -15
  41. package/lib/ui/gamification/leaderboard/index.js +21 -28
  42. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
  43. package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
  44. package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
  45. package/lib/ui/gamification/leaderboard/static.js +34 -31
  46. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  47. package/lib/ui/gamification/onboarding/index.js +51 -73
  48. package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
  49. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
  50. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
  51. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
  52. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
  53. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
  54. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
  55. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
  56. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
  57. package/lib/ui/gamification/onboarding/styles.js +14 -17
  58. package/lib/ui/gamification/points/index.js +9 -15
  59. package/lib/ui/gamification/points/styles.js +12 -14
  60. package/lib/ui/gamification/question/index.d.ts +1 -3
  61. package/lib/ui/gamification/question/index.js +29 -34
  62. package/lib/ui/gamification/question/insight/index.d.ts +0 -1
  63. package/lib/ui/gamification/question/insight/index.js +7 -15
  64. package/lib/ui/gamification/question/list/index.js +20 -57
  65. package/lib/ui/gamification/question/notification/index.js +22 -35
  66. package/lib/ui/gamification/question/notification/insight/index.js +12 -17
  67. package/lib/ui/gamification/question/notification/pill/index.js +7 -9
  68. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
  69. package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
  70. package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
  71. package/lib/ui/gamification/question/notification/styles.js +17 -19
  72. package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
  73. package/lib/ui/gamification/question/styles.js +32 -34
  74. package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
  75. package/lib/ui/gamification/question/twitter/index.js +8 -20
  76. package/lib/ui/gamification/question/twitter/styles.js +4 -6
  77. package/lib/ui/gamification/tabs/index.js +6 -7
  78. package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
  79. package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
  80. package/lib/ui/gamification/user-statistics/index.js +2 -6
  81. package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
  82. package/lib/ui/gamification/vote/alert/index.js +11 -0
  83. package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
  84. package/lib/ui/gamification/vote/feedback/index.js +29 -33
  85. package/lib/ui/gamification/vote/feedback/styles.js +20 -23
  86. package/lib/ui/gamification/vote/index.d.ts +1 -0
  87. package/lib/ui/gamification/vote/index.js +123 -117
  88. package/lib/ui/gamification/vote/insight-details/index.js +9 -16
  89. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  90. package/lib/ui/gamification/vote/styles.js +14 -8
  91. package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
  92. package/lib/ui/gamification/vote/vote-option/index.js +38 -41
  93. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  94. package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
  95. package/lib/ui/gamification/vote/win-bar/index.js +29 -37
  96. package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
  97. package/lib/ui/login/demo.d.ts +1 -0
  98. package/lib/ui/login/demo.js +5 -17
  99. package/lib/ui/login/index.js +29 -35
  100. package/lib/ui/modal/index.js +31 -32
  101. package/lib/ui/navigation/button/Channels.js +5 -8
  102. package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
  103. package/lib/ui/navigation/button/LeaderBoard.js +8 -11
  104. package/lib/ui/navigation/button/index.js +10 -11
  105. package/lib/ui/navigation/masters.js +2 -3
  106. package/lib/ui/questions/insight/index.js +14 -19
  107. package/lib/ui/questions/twitter/account/index.js +13 -15
  108. package/lib/ui/questions/twitter/account/styles.js +14 -16
  109. package/lib/ui/questions/twitter/index.js +31 -38
  110. package/lib/ui/show-in/index.d.ts +1 -0
  111. package/lib/ui/show-in/index.js +12 -10
  112. package/lib/ui/skeleton/index.js +3 -4
  113. package/lib/ui/theme/index.js +3 -5
  114. package/lib/ui/video-player/index.js +44 -38
  115. package/lib/utils/createDemo.js +18 -28
  116. package/lib/utils/debug/components/copyLogs.js +2 -3
  117. package/lib/utils/debug/components/developer.js +20 -24
  118. package/lib/utils/debug/components/eventInput.js +9 -10
  119. package/lib/utils/debug/components/sdkKey.js +9 -10
  120. package/lib/utils/debug/index.js +17 -28
  121. package/lib/utils/debug/storage.js +32 -14
  122. package/lib/utils/decorators/container.js +5 -9
  123. package/lib/utils/storage.js +32 -14
  124. package/package.json +25 -26
  125. package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
  126. package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
  127. /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
  128. /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
  129. /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
@@ -1,44 +1,41 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { Button as o } from "../../button/index.js";
3
3
  import { SvgIcon as n } from "../../icons/index.js";
4
- import "react/jsx-runtime";
5
- import "../../button/styles.js";
6
- import "react";
7
- const m = /* @__PURE__ */ s("div")({
4
+ const i = /* @__PURE__ */ s("div")({
8
5
  name: "Container",
9
6
  class: "c18uddbs",
10
7
  propsAsIs: !1
11
- }), d = /* @__PURE__ */ s("div")({
8
+ }), p = /* @__PURE__ */ s("div")({
12
9
  name: "Content",
13
10
  class: "cvcfjf6",
14
11
  propsAsIs: !1
15
- }), f = /* @__PURE__ */ s("div")({
12
+ }), l = /* @__PURE__ */ s("div")({
16
13
  name: "OnboardingHeader",
17
14
  class: "o1ie27lw",
18
15
  propsAsIs: !1
19
- }), I = /* @__PURE__ */ s("button")({
16
+ }), d = /* @__PURE__ */ s("button")({
20
17
  name: "CloseBtn",
21
18
  class: "c15cjkwi",
22
19
  propsAsIs: !1
23
- }), t = () => n, A = /* @__PURE__ */ s(t())({
20
+ }), t = () => n, m = /* @__PURE__ */ s(t())({
24
21
  name: "IconClose",
25
22
  class: "i1mavjt2",
26
23
  propsAsIs: !0
27
- }), b = /* @__PURE__ */ s("div")({
24
+ }), f = /* @__PURE__ */ s("div")({
28
25
  name: "OnboardingFooter",
29
26
  class: "o1x0dyzv",
30
27
  propsAsIs: !1
31
- }), e = () => o, v = /* @__PURE__ */ s(e())({
28
+ }), e = () => o, I = /* @__PURE__ */ s(e())({
32
29
  name: "OnboardingActionBtn",
33
30
  class: "o1jfi9c3",
34
31
  propsAsIs: !0
35
32
  });
36
33
  export {
37
- I as CloseBtn,
38
- m as Container,
39
- d as Content,
40
- A as IconClose,
41
- v as OnboardingActionBtn,
42
- b as OnboardingFooter,
43
- f as OnboardingHeader
34
+ d as CloseBtn,
35
+ i as Container,
36
+ p as Content,
37
+ m as IconClose,
38
+ I as OnboardingActionBtn,
39
+ f as OnboardingFooter,
40
+ l as OnboardingHeader
44
41
  };
@@ -1,20 +1,14 @@
1
- import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
- import { AnimatedCounter as n } from "../../animated-counter/index.js";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { AnimatedCounter as r } from "../../animated-counter/index.js";
3
3
  import { resetCss as e } from "../../theme/theme.js";
4
- import { PointsContainer as m, PointsIcon as s, PointsSvg as p, PointsBody as l, PointsTitle as c, PointsValue as a } from "./styles.js";
5
- import "react-countup";
6
- import "../../theme/breakpoints.js";
7
- import "../../theme/constants.js";
8
- import "@linaria/react";
9
- import "../../icons/index.js";
10
- import "react";
11
- const T = ({ points: i, onClick: r }) => /* @__PURE__ */ t(m, { className: e, onClick: r, children: [
12
- /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(p, { name: "icon-trophy" }) }),
13
- /* @__PURE__ */ t(l, { children: [
14
- /* @__PURE__ */ o(c, { children: "Total points" }),
15
- /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(n, { value: i }) })
4
+ import { PointsContainer as s, PointsIcon as m, PointsSvg as l, PointsBody as c, PointsTitle as a, PointsValue as d } from "./styles.js";
5
+ const u = ({ points: t, onClick: i }) => /* @__PURE__ */ n(s, { className: e, onClick: i, children: [
6
+ /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(l, { name: "icon-trophy" }) }),
7
+ /* @__PURE__ */ n(c, { children: [
8
+ /* @__PURE__ */ o(a, { children: "Total points" }),
9
+ /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(r, { value: t }) })
16
10
  ] })
17
11
  ] });
18
12
  export {
19
- T as Points
13
+ u as Points
20
14
  };
@@ -1,37 +1,35 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as o } from "../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const a = /* @__PURE__ */ s("div")({
3
+ const e = /* @__PURE__ */ s("div")({
6
4
  name: "PointsContainer",
7
5
  class: "psiob9b",
8
6
  propsAsIs: !1
9
- }), l = /* @__PURE__ */ s("div")({
7
+ }), p = /* @__PURE__ */ s("div")({
10
8
  name: "PointsIcon",
11
9
  class: "p1gqe4lh",
12
10
  propsAsIs: !1
13
- }), n = () => o, r = /* @__PURE__ */ s(n())({
11
+ }), n = () => o, a = /* @__PURE__ */ s(n())({
14
12
  name: "PointsSvg",
15
13
  class: "p15syg2y",
16
14
  propsAsIs: !0
17
- }), c = /* @__PURE__ */ s("div")({
15
+ }), l = /* @__PURE__ */ s("div")({
18
16
  name: "PointsBody",
19
17
  class: "p12n4f2h",
20
18
  propsAsIs: !1
21
- }), m = /* @__PURE__ */ s("div")({
19
+ }), c = /* @__PURE__ */ s("div")({
22
20
  name: "PointsTitle",
23
21
  class: "poqmx89",
24
22
  propsAsIs: !1
25
- }), P = /* @__PURE__ */ s("div")({
23
+ }), r = /* @__PURE__ */ s("div")({
26
24
  name: "PointsValue",
27
25
  class: "prj9b3v",
28
26
  propsAsIs: !1
29
27
  });
30
28
  export {
31
- c as PointsBody,
32
- a as PointsContainer,
33
- l as PointsIcon,
34
- r as PointsSvg,
35
- m as PointsTitle,
36
- P as PointsValue
29
+ l as PointsBody,
30
+ e as PointsContainer,
31
+ p as PointsIcon,
32
+ a as PointsSvg,
33
+ c as PointsTitle,
34
+ r as PointsValue
37
35
  };
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type PickHistory } from '@streamlayer/sdk-web-types';
3
3
  export declare const QuestionSkeleton: React.FC;
4
- export declare const Question: React.FC<{
5
- openQuestion?: (questionId: string) => void;
6
- } & PickHistory>;
4
+ export declare const Question: React.FC<PickHistory>;
@@ -1,53 +1,48 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as y } from "@streamlayer/sdk-web-types";
3
- import { QuestionTypeData as Q } from "../constants.js";
4
- import { Skeleton as l } from "../../skeleton/index.js";
5
- import { QuestionActionIcon as i, SkeletonContainer as I, SkeletonButton as S, QuestionItem as k, QuestionContent as f, QuestionCaption as A, QuestionTypeIcon as T, QuestionTypeLabel as L, QuestionBody as P, QuestionAction as w, PlayButton as x } from "./styles.js";
6
- import "../../skeleton/styles.js";
7
- import "@linaria/react";
8
- import "../../icons/index.js";
9
- import "react";
10
- const C = {
1
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as p } from "@streamlayer/sdk-web-types";
3
+ import { QuestionTypeData as h } from "../constants.js";
4
+ import { Skeleton as c } from "../../skeleton/index.js";
5
+ import { QuestionActionIcon as i, SkeletonContainer as y, SkeletonButton as I, QuestionItem as S, QuestionContent as f, QuestionCaption as k, QuestionTypeIcon as A, QuestionTypeLabel as T, QuestionBody as L, QuestionAction as P, PlayButton as w } from "./styles.js";
6
+ const x = {
11
7
  [e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
12
8
  [e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
13
9
  [e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
14
10
  [e.DNP]: /* @__PURE__ */ t(i, { name: "icon-arrow" })
15
- }, j = () => /* @__PURE__ */ o(I, { children: [
16
- /* @__PURE__ */ t(l, { loading: !0, style: { width: "35%" } }),
17
- /* @__PURE__ */ t(l, { loading: !0, style: { width: "70%" } }),
18
- /* @__PURE__ */ t(S, {})
19
- ] }), v = ({
11
+ }, B = () => /* @__PURE__ */ n(y, { children: [
12
+ /* @__PURE__ */ t(c, { loading: !0, style: { width: "35%" } }),
13
+ /* @__PURE__ */ t(c, { loading: !0, style: { width: "70%" } }),
14
+ /* @__PURE__ */ t(I, {})
15
+ ] }), C = ({
20
16
  questionId: s,
21
- questionType: n,
22
- questionStatus: m,
17
+ questionType: o,
18
+ questionStatus: l,
23
19
  subject: u,
24
20
  openForVoting: d,
25
- openQuestion: r,
26
- status: p
21
+ status: m
27
22
  }) => {
28
- const c = Q[n], h = C[p];
29
- return c ? /* @__PURE__ */ o(k, { onClick: () => r == null ? void 0 : r(s), children: [
30
- /* @__PURE__ */ o(f, { children: [
31
- /* @__PURE__ */ o(A, { children: [
23
+ const r = h[o], Q = x[m];
24
+ return r ? /* @__PURE__ */ n(S, { "data-name": s, children: [
25
+ /* @__PURE__ */ n(f, { children: [
26
+ /* @__PURE__ */ n(k, { children: [
32
27
  /* @__PURE__ */ t(
33
- T,
28
+ A,
34
29
  {
35
- "data-type-trivia": n === a.TRIVIA,
36
- "data-type-poll": n === a.POLL,
37
- name: c.iconName
30
+ "data-type-trivia": o === a.TRIVIA,
31
+ "data-type-poll": o === a.POLL,
32
+ name: r.iconName
38
33
  }
39
34
  ),
40
- /* @__PURE__ */ o(L, { children: [
41
- c.label,
42
- n === a.TRIVIA && m === y.RESOLVED && " • Expired"
35
+ /* @__PURE__ */ n(T, { children: [
36
+ r.label,
37
+ o === a.TRIVIA && l === p.RESOLVED && " • Expired"
43
38
  ] })
44
39
  ] }),
45
- /* @__PURE__ */ t(P, { children: u || "" })
40
+ /* @__PURE__ */ t(L, { children: u || "" })
46
41
  ] }),
47
- /* @__PURE__ */ t(w, { children: d ? /* @__PURE__ */ t(x, { children: "Play" }) : h })
42
+ /* @__PURE__ */ t(P, { children: d ? /* @__PURE__ */ t(w, { children: "Play" }) : Q })
48
43
  ] }) : null;
49
44
  };
50
45
  export {
51
- v as Question,
52
- j as QuestionSkeleton
46
+ C as Question,
47
+ B as QuestionSkeleton
53
48
  };
@@ -2,7 +2,6 @@
2
2
  import { InsightContentProps } from '../../../questions/insight';
3
3
  import { VideoPlayerProps } from '../../../video-player';
4
4
  type InsightProps = InsightContentProps & {
5
- openInsight?: (questionId: string) => void;
6
5
  controlVideo: VideoPlayerProps['controlVideo'];
7
6
  };
8
7
  export declare const Insight: React.FC<InsightProps>;
@@ -1,18 +1,10 @@
1
- import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
- import { InsightContent as n } from "../../../questions/insight/index.js";
3
- import { Container as p, ActionBtn as c } from "./styles.js";
4
- import "@streamlayer/sdk-web-types";
5
- import "../../../video-player/index.js";
6
- import "@linaria/core";
7
- import "react";
8
- import "../../../icons/index.js";
9
- import "@linaria/react";
10
- import "../../../video-player/styles.js";
11
- import "../../../questions/insight/styles.js";
12
- const k = ({ openInsight: r, questionId: t, ...o }) => /* @__PURE__ */ m(p, { children: [
13
- /* @__PURE__ */ i(n, { questionId: t, ...o }),
14
- r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { InsightContent as o } from "../../../questions/insight/index.js";
3
+ import { Container as m, ActionBtn as a } from "./styles.js";
4
+ const c = ({ questionId: t, ...r }) => /* @__PURE__ */ i(m, { "data-name": t, children: [
5
+ /* @__PURE__ */ n(o, { questionId: t, ...r }),
6
+ /* @__PURE__ */ n(a, { "data-name": t, children: "View Insight" })
15
7
  ] });
16
8
  export {
17
- k as Insight
9
+ c as Insight
18
10
  };
@@ -1,68 +1,31 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { QuestionSkeleton as l, Question as f } from "../index.js";
3
- import { Insight as c } from "../insight/index.js";
4
- import { Twitter as d } from "../twitter/index.js";
5
- import { pauseAllVideos as h } from "../../../video-player/index.js";
6
- import { QuestionsContainer as p } from "./styles.js";
7
- import "@streamlayer/sdk-web-types";
8
- import "../../constants.js";
9
- import "../../../skeleton/index.js";
10
- import "../../../skeleton/styles.js";
11
- import "@linaria/react";
12
- import "../styles.js";
13
- import "../../../icons/index.js";
14
- import "react";
15
- import "../../../questions/insight/index.js";
16
- import "../../../questions/insight/styles.js";
17
- import "@linaria/core";
18
- import "../../../video-player/styles.js";
19
- import "../insight/styles.js";
20
- import "../../../questions/twitter/index.js";
21
- import "../../../questions/twitter/account/index.js";
22
- import "../../../../utils/common.js";
23
- import "../../../questions/twitter/account/styles.js";
24
- import "../../../questions/twitter/styles.js";
25
- import "../twitter/styles.js";
26
- import "../../../button/index.js";
27
- import "../../../button/styles.js";
28
- const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
29
- const m = (t) => {
30
- h(), b(t, { openedFrom: "list" });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { QuestionSkeleton as c, Question as f } from "../index.js";
3
+ import { Insight as d } from "../insight/index.js";
4
+ import { Twitter as h } from "../twitter/index.js";
5
+ import { pauseAllVideos as g } from "../../../video-player/index.js";
6
+ import { QuestionsContainer as m } from "./styles.js";
7
+ const k = ({ questions: n, openQuestion: b, controlVideo: u }) => {
8
+ const l = (t) => {
9
+ const e = t.target.getAttribute("data-name");
10
+ e && (g(), b(e, { openedFrom: "list" }));
31
11
  };
32
- return r ? /* @__PURE__ */ e(p, { children: r == null ? void 0 : r.map((t) => {
33
- var o, u, s;
34
- if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
12
+ return n ? /* @__PURE__ */ r(m, { onClick: l, children: n == null ? void 0 : n.map((t) => {
13
+ var e, a, s;
14
+ if (t.type === "question" && ((e = t.attributes) == null ? void 0 : e.attributes.case) === "question") {
35
15
  const i = t.attributes.attributes.value;
36
- return /* @__PURE__ */ e(f, { openQuestion: m, ...i }, i.questionId);
16
+ return /* @__PURE__ */ r(f, { ...i }, i.questionId);
37
17
  }
38
- if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
18
+ if (t.type === "insight" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "insight") {
39
19
  const i = t.attributes.attributes.value;
40
- return /* @__PURE__ */ e(
41
- c,
42
- {
43
- openInsight: m,
44
- controlVideo: n,
45
- ...i
46
- },
47
- i.questionId
48
- );
20
+ return /* @__PURE__ */ r(d, { controlVideo: u, ...i }, i.questionId);
49
21
  }
50
22
  if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
51
- const i = t.attributes.attributes.value, a = t.attributes.id;
52
- return /* @__PURE__ */ e(
53
- d,
54
- {
55
- openTweet: m,
56
- controlVideo: n,
57
- ...i,
58
- tweetId: a
59
- },
60
- a
61
- );
23
+ const i = t.attributes.attributes.value, o = t.attributes.id;
24
+ return /* @__PURE__ */ r(h, { controlVideo: u, ...i, tweetId: o }, o);
62
25
  }
63
26
  return null;
64
- }) }) : /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ e(l, {}, o)) });
27
+ }) }) : /* @__PURE__ */ r(m, { children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ r(c, {}, e)) });
65
28
  };
66
29
  export {
67
- N as QuestionList
30
+ k as QuestionList
68
31
  };
@@ -1,50 +1,37 @@
1
- import { jsxs as a, jsx as o, Fragment as d } from "react/jsx-runtime";
2
- import { QuestionType as m } from "@streamlayer/sdk-web-types";
1
+ import { jsxs as t, jsx as a, Fragment as p } from "react/jsx-runtime";
2
+ import { QuestionType as l } from "@streamlayer/sdk-web-types";
3
3
  import { QuestionTypeData as T } from "../../constants.js";
4
4
  import { Insight as f } from "./insight/index.js";
5
5
  import { Container as E, CloseIconWrap as I, CloseIcon as h, Header as C, TypeIcon as A, TypeName as W, Question as s, AnswerButton as x } from "./styles.js";
6
6
  import { Tweet as D } from "./tweet/index.js";
7
- import "../../../video-player/index.js";
8
- import "@linaria/core";
9
- import "react";
10
- import "../../../icons/index.js";
11
- import "@linaria/react";
12
- import "../../../video-player/styles.js";
13
- import "./insight/styles.js";
14
- import "../../../questions/twitter/index.js";
15
- import "../../../questions/twitter/account/index.js";
16
- import "../../../../utils/common.js";
17
- import "../../../questions/twitter/account/styles.js";
18
- import "../../../questions/twitter/styles.js";
19
- import "./tweet/styles.js";
20
- const K = ({
21
- close: e,
22
- action: t,
23
- controlVideo: l,
24
- data: { questionType: r, question: i, insight: n, tweet: c }
7
+ const k = ({
8
+ close: d,
9
+ action: n,
10
+ controlVideo: c,
11
+ data: { questionType: r, question: o, insight: e, tweet: i }
25
12
  }) => {
26
- const p = T[r];
27
- return p ? /* @__PURE__ */ a(E, { style: r === m.TWEET ? { paddingTop: "12px" } : {}, children: [
28
- /* @__PURE__ */ o(I, { onClick: e, children: /* @__PURE__ */ o(h, { name: "icon-cross" }) }),
29
- r !== m.TWEET && /* @__PURE__ */ a(C, { children: [
30
- /* @__PURE__ */ o(
13
+ const m = T[r];
14
+ return m ? /* @__PURE__ */ t(E, { style: r === l.TWEET ? { paddingTop: "12px" } : {}, children: [
15
+ /* @__PURE__ */ a(I, { onClick: d, children: /* @__PURE__ */ a(h, { name: "icon-cross" }) }),
16
+ r !== l.TWEET && /* @__PURE__ */ t(C, { children: [
17
+ /* @__PURE__ */ a(
31
18
  A,
32
19
  {
33
- "data-type-trivia": r === m.TRIVIA,
34
- "data-type-poll": r === m.POLL,
35
- name: p.iconName
20
+ "data-type-trivia": r === l.TRIVIA,
21
+ "data-type-poll": r === l.POLL,
22
+ name: m.iconName
36
23
  }
37
24
  ),
38
- /* @__PURE__ */ o(W, { children: p.label })
25
+ /* @__PURE__ */ a(W, { children: m.label })
39
26
  ] }),
40
- r === m.FACTOID && n && /* @__PURE__ */ o(f, { ...n, action: t, controlVideo: l }),
41
- r === m.TWEET && c && /* @__PURE__ */ o(D, { ...c, action: t, controlVideo: l }),
42
- r !== m.FACTOID && r !== m.TWEET && /* @__PURE__ */ a(d, { children: [
43
- /* @__PURE__ */ o(s, { children: i == null ? void 0 : i.title }),
44
- /* @__PURE__ */ o(x, { onClick: t, children: "Answer" })
27
+ r === l.FACTOID && e && /* @__PURE__ */ a(f, { ...e, action: n, controlVideo: c }),
28
+ r === l.TWEET && i && /* @__PURE__ */ a(D, { ...i, action: n, controlVideo: c }),
29
+ r !== l.FACTOID && r !== l.TWEET && /* @__PURE__ */ t(p, { children: [
30
+ /* @__PURE__ */ a(s, { children: o == null ? void 0 : o.title }),
31
+ /* @__PURE__ */ a(x, { onClick: n, children: "Answer" })
45
32
  ] })
46
33
  ] }) : null;
47
34
  };
48
35
  export {
49
- K as Notification
36
+ k as Notification
50
37
  };
@@ -1,21 +1,16 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { QuestionImages as c } from "@streamlayer/sdk-web-types";
3
- import { VideoPlayer as e } from "../../../../video-player/index.js";
4
- import { InsightContainer as h, ImageContainer as u, Image as a, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
5
- import "@linaria/core";
6
- import "react";
7
- import "../../../../icons/index.js";
8
- import "@linaria/react";
9
- import "../../../../video-player/styles.js";
10
- const A = ({ video: r, image: n, imageMode: o, heading: i, body: s, action: m, controlVideo: p }) => /* @__PURE__ */ l(h, { children: [
11
- (r == null ? void 0 : r.url) && /* @__PURE__ */ t(e, { source: r.url, poster: r.thumbnailUrl, controlVideo: p }),
12
- n && !(r != null && r.url) && /* @__PURE__ */ t(u, { "data-rounded": o === c.ROUNDED, children: /* @__PURE__ */ t(a, { src: n, alt: i }) }),
13
- /* @__PURE__ */ l(I, { children: [
14
- /* @__PURE__ */ t(g, { children: i }),
15
- /* @__PURE__ */ t(f, { children: s }),
16
- m && /* @__PURE__ */ t(C, { onClick: m, children: "View Insight" })
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
+ import { QuestionImages as h } from "@streamlayer/sdk-web-types";
3
+ import { VideoPlayer as o } from "../../../../video-player/index.js";
4
+ import { InsightContainer as u, ImageContainer as a, Image as p, InsightContent as I, Title as g, Description as f, ActionBtn as C } from "./styles.js";
5
+ const V = ({ video: r, image: t, imageMode: i, heading: l, body: m, action: s, controlVideo: e }) => /* @__PURE__ */ c(u, { children: [
6
+ (r == null ? void 0 : r.url) && /* @__PURE__ */ n(o, { source: r.url, poster: r.thumbnailUrl, controlVideo: e }),
7
+ t && !(r != null && r.url) && /* @__PURE__ */ n(a, { "data-rounded": i === h.ROUNDED, children: /* @__PURE__ */ n(p, { src: t, alt: l }) }),
8
+ /* @__PURE__ */ c(I, { children: [
9
+ /* @__PURE__ */ n(g, { children: l }),
10
+ /* @__PURE__ */ n(f, { children: m }),
11
+ s && /* @__PURE__ */ n(C, { onClick: s, children: "View Insight" })
17
12
  ] })
18
13
  ] });
19
14
  export {
20
- A as Insight
15
+ V as Insight
21
16
  };
@@ -1,12 +1,10 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { SvgIcon as e } from "../../../../icons/index.js";
3
- import { Container as p, Content as c, Title as l } from "./styles.js";
4
- import "@linaria/react";
5
- import "react";
6
- const a = ({ title: o, onClick: n, className: i, style: t }) => /* @__PURE__ */ r(p, { onClick: n, className: i, style: t, children: /* @__PURE__ */ m(c, { children: [
7
- /* @__PURE__ */ r(e, { name: "iconUp" }),
8
- o && /* @__PURE__ */ r(l, { children: o })
1
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
+ import { SvgIcon as m } from "../../../../icons/index.js";
3
+ import { Container as c, Content as l, Title as p } from "./styles.js";
4
+ const h = ({ title: n, onClick: o, className: i, style: e }) => /* @__PURE__ */ r(c, { onClick: o, className: i, style: e, children: /* @__PURE__ */ t(l, { children: [
5
+ /* @__PURE__ */ r(m, { name: "iconUp" }),
6
+ n && /* @__PURE__ */ r(p, { children: n })
9
7
  ] }) });
10
8
  export {
11
- a as Pill
9
+ h as Pill
12
10
  };
@@ -1,42 +1,41 @@
1
1
  import { jsxs as r, Fragment as a, jsx as e } from "react/jsx-runtime";
2
- import { BGWrap as n, BGOneLineOne as T, BGOneLineTwo as l, BGOneLineThree as u, BGTwoLineOne as t, BGTwoLineTwo as o, BGTwoLineThree as c, BGThreeLineOne as d, BGThreeLineTwo as h, BGThreeLineThree as B, BGThreeLineFour as G, BGFourLineOne as m, BGFourLineTwo as w, BGFourLineThree as F, BGFourLineFour as O } from "./styles.js";
3
- import "@linaria/react";
4
- const x = ({ step: i, correct: L }) => /* @__PURE__ */ r(a, { children: [
5
- /* @__PURE__ */ r(n, { "data-active": i === 1, "data-first-screen": "true", children: [
2
+ import { BGWrap as i, BGOneLineOne as T, BGOneLineTwo as l, BGOneLineThree as u, BGTwoLineOne as t, BGTwoLineTwo as o, BGTwoLineThree as c, BGThreeLineOne as d, BGThreeLineTwo as h, BGThreeLineThree as B, BGThreeLineFour as G, BGFourLineOne as w, BGFourLineTwo as F, BGFourLineThree as O, BGFourLineFour as m } from "./styles.js";
3
+ const s = ({ step: n, correct: L }) => /* @__PURE__ */ r(a, { children: [
4
+ /* @__PURE__ */ r(i, { "data-active": n === 1, "data-first-screen": "true", children: [
6
5
  /* @__PURE__ */ e(T, {}),
7
6
  /* @__PURE__ */ e(l, {}),
8
7
  /* @__PURE__ */ e(u, {})
9
8
  ] }),
10
- /* @__PURE__ */ r(n, { "data-active": i === 2, children: [
9
+ /* @__PURE__ */ r(i, { "data-active": n === 2, children: [
11
10
  /* @__PURE__ */ e(t, {}),
12
11
  /* @__PURE__ */ e(o, {}),
13
12
  /* @__PURE__ */ e(c, {})
14
13
  ] }),
15
- /* @__PURE__ */ r(n, { "data-active": i === 3, children: [
14
+ /* @__PURE__ */ r(i, { "data-active": n === 3, children: [
16
15
  /* @__PURE__ */ e(t, {}),
17
16
  /* @__PURE__ */ e(o, {}),
18
17
  /* @__PURE__ */ e(c, {})
19
18
  ] }),
20
19
  L ? /* @__PURE__ */ r(a, { children: [
21
- /* @__PURE__ */ r(n, { "data-active": i === 4, "data-correct": "true", children: [
20
+ /* @__PURE__ */ r(i, { "data-active": n === 4, "data-correct": "true", children: [
22
21
  /* @__PURE__ */ e(d, {}),
23
22
  /* @__PURE__ */ e(h, {}),
24
23
  /* @__PURE__ */ e(B, {}),
25
24
  /* @__PURE__ */ e(G, {})
26
25
  ] }),
27
- /* @__PURE__ */ r(n, { "data-active": i === 5, "data-correct": "true", children: [
26
+ /* @__PURE__ */ r(i, { "data-active": n === 5, "data-correct": "true", children: [
28
27
  /* @__PURE__ */ e(d, {}),
29
28
  /* @__PURE__ */ e(h, {}),
30
29
  /* @__PURE__ */ e(B, {}),
31
30
  /* @__PURE__ */ e(G, {})
32
31
  ] })
33
- ] }) : /* @__PURE__ */ r(n, { "data-active": i === 4, "data-correct": "false", children: [
34
- /* @__PURE__ */ e(m, {}),
32
+ ] }) : /* @__PURE__ */ r(i, { "data-active": n === 4, "data-correct": "false", children: [
35
33
  /* @__PURE__ */ e(w, {}),
36
34
  /* @__PURE__ */ e(F, {}),
37
- /* @__PURE__ */ e(O, {})
35
+ /* @__PURE__ */ e(O, {}),
36
+ /* @__PURE__ */ e(m, {})
38
37
  ] })
39
38
  ] });
40
39
  export {
41
- x as AnimationLines
40
+ s as AnimationLines
42
41
  };