@streamlayer/react-ui 0.96.2 → 0.97.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 (83) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/analytics.js +50 -0
  3. package/lib/index-z0QjLiEL.js +75 -0
  4. package/lib/ui/app/Features/FeatureProvider.d.ts +1 -0
  5. package/lib/ui/app/Features/FeatureProvider.js +34 -6
  6. package/lib/ui/app/Features/Gamification/Friends.d.ts +0 -2
  7. package/lib/ui/app/Features/Gamification/Friends.js +20 -23
  8. package/lib/ui/app/Features/Gamification/Leaderboard.js +31 -25
  9. package/lib/ui/app/Features/Gamification/Question.js +4 -2
  10. package/lib/ui/app/Features/Gamification/QuestionsList.js +11 -8
  11. package/lib/ui/app/Features/Gamification/Tabs.js +30 -25
  12. package/lib/ui/app/Features/Gamification/UserSummary.js +14 -12
  13. package/lib/ui/app/Features/Gamification/gamification-feature.js +6 -2
  14. package/lib/ui/app/Features/Gamification/index.d.ts +10 -0
  15. package/lib/ui/app/Features/Gamification/index.js +73 -68
  16. package/lib/ui/app/Features/index.d.ts +8 -0
  17. package/lib/ui/app/Features/index.js +112 -16
  18. package/lib/ui/app/Navigation/MastersNavigation/index.js +5 -4
  19. package/lib/ui/app/Navigation/index.js +7 -6
  20. package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -0
  21. package/lib/ui/app/Notifications/Onboarding/index.js +76 -78
  22. package/lib/ui/app/Notifications/index.js +98 -91
  23. package/lib/ui/app/Points/index.js +20 -17
  24. package/lib/ui/app/masters.js +167 -86
  25. package/lib/ui/app/useMastersApp.js +12 -11
  26. package/lib/ui/app/useSdkFeature.js +13 -16
  27. package/lib/ui/app/useSdkResponsive.js +1 -1
  28. package/lib/ui/app/useSdkScroll.d.ts +1 -1
  29. package/lib/ui/app/useSdkScroll.js +28 -25
  30. package/lib/ui/gamification/invite-link/index.js +26 -12
  31. package/lib/ui/gamification/onboarding/index.d.ts +0 -2
  32. package/lib/ui/gamification/onboarding/index.js +46 -46
  33. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +2 -2
  34. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +21 -20
  35. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -0
  36. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +20 -15
  37. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -3
  38. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +34 -29
  39. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +0 -3
  40. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +17 -32
  41. package/lib/ui/gamification/points/index.d.ts +1 -0
  42. package/lib/ui/gamification/points/index.js +9 -9
  43. package/lib/ui/gamification/question/index.d.ts +1 -0
  44. package/lib/ui/gamification/question/index.js +31 -24
  45. package/lib/ui/gamification/question/insight/index.js +11 -15
  46. package/lib/ui/gamification/question/list/index.d.ts +3 -1
  47. package/lib/ui/gamification/question/list/index.js +50 -34
  48. package/lib/ui/gamification/question/notification/index.js +23 -25
  49. package/lib/ui/gamification/question/notification/insight/index.js +10 -9
  50. package/lib/ui/gamification/question/notification/tweet/index.js +3 -2
  51. package/lib/ui/gamification/question/styles.d.ts +2 -0
  52. package/lib/ui/gamification/question/styles.js +39 -28
  53. package/lib/ui/gamification/question/twitter/index.js +14 -18
  54. package/lib/ui/gamification/user-statistics/index.d.ts +3 -2
  55. package/lib/ui/gamification/user-statistics/index.js +48 -45
  56. package/lib/ui/gamification/vote/feedback/index.d.ts +3 -2
  57. package/lib/ui/gamification/vote/feedback/index.js +74 -58
  58. package/lib/ui/gamification/vote/feedback/styles.d.ts +2 -0
  59. package/lib/ui/gamification/vote/feedback/styles.js +33 -21
  60. package/lib/ui/gamification/vote/index.js +94 -83
  61. package/lib/ui/gamification/vote/insight-details/index.js +7 -6
  62. package/lib/ui/gamification/vote/twitter-details/index.js +3 -2
  63. package/lib/ui/gamification/vote/vote-option/index.d.ts +2 -1
  64. package/lib/ui/gamification/vote/vote-option/index.js +47 -39
  65. package/lib/ui/icons/index.d.ts +1 -2
  66. package/lib/ui/icons/index.js +122 -49
  67. package/lib/ui/modal/index.js +27 -21
  68. package/lib/ui/navigation/button/Channels.js +6 -5
  69. package/lib/ui/navigation/button/FeaturedGroups.js +4 -3
  70. package/lib/ui/navigation/button/LeaderBoard.js +6 -5
  71. package/lib/ui/navigation/button/index.js +20 -7
  72. package/lib/ui/navigation/button/styles.d.ts +3 -0
  73. package/lib/ui/navigation/button/styles.js +9 -6
  74. package/lib/ui/questions/insight/index.js +16 -16
  75. package/lib/ui/questions/twitter/index.js +3 -2
  76. package/lib/ui/show-in/index.d.ts +2 -0
  77. package/lib/ui/show-in/index.js +24 -14
  78. package/lib/ui/timer/index.js +32 -28
  79. package/lib/ui/video-player/index.js +41 -39
  80. package/lib/ui/video-player/styles.d.ts +1 -0
  81. package/lib/ui/video-player/styles.js +10 -9
  82. package/package.json +22 -21
  83. package/lib/index-keh7OLCY.js +0 -67
@@ -1,43 +1,48 @@
1
- import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
- import { useClipboardCopy as I } from "../../../../app/useClipboardCopy.js";
3
- import { SvgIcon as f } from "../../../../icons/index.js";
4
- import { Container as g, IconContainer as k, InviteGameIcon as b, Content as s, Heading as y, Subtext as L, LinkContainer as S, LinkInfo as u, LinkTitle as x, LinkAddress as v, LinkIcon as j, SocialLinksContainer as A, SocialLink as G, SocialLinkLabel as H } from "./styles.js";
5
- import "react";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { useAnalyticsHandle as d } from "../../../../../hooks/analytics.js";
3
+ import { useRef as s } from "react";
4
+ import { InvitationFrom as f } from "@streamlayer/sdk-web-types";
5
+ import { useClipboardCopy as h } from "../../../../app/useClipboardCopy.js";
6
+ import { Container as y, IconContainer as C, InviteGameIcon as I, Content as k, Heading as u, Subtext as b, LinkContainer as g, LinkInfo as v, LinkTitle as x, LinkAddress as A, LinkIcon as L } from "./styles.js";
7
+ import "lodash.throttle";
8
+ import "@streamlayer/sdk-web-interfaces";
9
+ import "../../../../theme/constants.js";
6
10
  import "../../../../../index-jRXrW6ie.js";
7
11
  import "../../../../../index-uEuzH3jr.js";
8
12
  import "../../../copyNotification/index.js";
9
- import "../../../copyNotification/styles.js";
13
+ import "../../../../icons/index.js";
10
14
  import "@linaria/react";
11
- const F = ({
12
- renderToNode: t,
13
- inviteLink: r,
14
- socialLinks: i,
15
- inviteCardTitle: c,
16
- inviteCardSubtext: l,
15
+ import "../../../copyNotification/styles.js";
16
+ const B = ({
17
+ inviteLink: i,
18
+ inviteCardTitle: t,
19
+ inviteCardSubtext: e,
17
20
  primaryColor: m,
18
- className: a
21
+ className: c
19
22
  }) => {
20
- const [d, p] = I(t);
21
- return /* @__PURE__ */ o(g, { className: a, children: [
22
- /* @__PURE__ */ n(k, { style: { backgroundColor: m }, children: /* @__PURE__ */ n(b, { name: "invite-game-icon" }) }),
23
- /* @__PURE__ */ o(s, { children: [
24
- /* @__PURE__ */ n(y, { children: c || "" }),
25
- /* @__PURE__ */ n(L, { children: l || "" })
23
+ const r = s(null), [l, p] = h(r), [a] = d({
24
+ type: "invitation",
25
+ action: "sent",
26
+ payload: {
27
+ from: f.MENU
28
+ }
29
+ });
30
+ return /* @__PURE__ */ n(y, { className: c, children: [
31
+ /* @__PURE__ */ o(C, { style: { backgroundColor: m }, children: /* @__PURE__ */ o(I, { name: "invite-game-icon" }) }),
32
+ /* @__PURE__ */ n(k, { children: [
33
+ /* @__PURE__ */ o(u, { children: t || "" }),
34
+ /* @__PURE__ */ o(b, { children: e || "" })
26
35
  ] }),
27
- r && /* @__PURE__ */ o(S, { onClick: () => d(r), children: [
28
- /* @__PURE__ */ o(u, { children: [
29
- /* @__PURE__ */ n(x, { children: "Invite link" }),
30
- /* @__PURE__ */ n(v, { children: r })
36
+ i && /* @__PURE__ */ n(g, { ref: r, onClick: a(() => l(i)), children: [
37
+ /* @__PURE__ */ n(v, { children: [
38
+ /* @__PURE__ */ o(x, { children: "Invite link" }),
39
+ /* @__PURE__ */ o(A, { children: i })
31
40
  ] }),
32
- /* @__PURE__ */ n(j, { name: "icon-copy" })
41
+ /* @__PURE__ */ o(L, { name: "icon-copy" })
33
42
  ] }),
34
- i && i.length > 0 && /* @__PURE__ */ n(A, { children: i.map(({ icon: h, link: e, label: C }) => /* @__PURE__ */ o(G, { href: e, target: "_blank", children: [
35
- /* @__PURE__ */ n(f, { name: h }),
36
- /* @__PURE__ */ n(H, { children: C })
37
- ] }, e)) }),
38
43
  p
39
44
  ] });
40
45
  };
41
46
  export {
42
- F as OnboardingInviteCard
47
+ B as OnboardingInviteCard
43
48
  };
@@ -10,6 +10,3 @@ export declare const LinkInfo: import("@linaria/react").StyledComponent<import("
10
10
  export declare const LinkTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
11
11
  export declare const LinkAddress: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
12
12
  export declare const LinkIcon: any;
13
- export declare const SocialLinksContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
14
- export declare const SocialLink: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
15
- export declare const SocialLinkLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
@@ -2,15 +2,15 @@ import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as n } from "../../../../icons/index.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
- const l = /* @__PURE__ */ s("div")({
5
+ const p = /* @__PURE__ */ s("div")({
6
6
  name: "Container",
7
7
  class: "c1itm4k7",
8
8
  propsAsIs: !1
9
- }), p = /* @__PURE__ */ s("div")({
9
+ }), l = /* @__PURE__ */ s("div")({
10
10
  name: "IconContainer",
11
11
  class: "i1w4fsni",
12
12
  propsAsIs: !1
13
- }), a = () => n, r = /* @__PURE__ */ s(a())({
13
+ }), o = () => n, r = /* @__PURE__ */ s(o())({
14
14
  name: "InviteGameIcon",
15
15
  class: "i19m85r1",
16
16
  propsAsIs: !0
@@ -22,56 +22,41 @@ const l = /* @__PURE__ */ s("div")({
22
22
  name: "Heading",
23
23
  class: "h1amdqtv",
24
24
  propsAsIs: !1
25
- }), k = /* @__PURE__ */ s("div")({
25
+ }), d = /* @__PURE__ */ s("div")({
26
26
  name: "Subtext",
27
27
  class: "s1lhlj9j",
28
28
  propsAsIs: !1
29
- }), L = /* @__PURE__ */ s("div")({
29
+ }), f = /* @__PURE__ */ s("div")({
30
30
  name: "LinkContainer",
31
31
  class: "l1wot35e",
32
32
  propsAsIs: !1
33
- }), d = /* @__PURE__ */ s("div")({
33
+ }), v = /* @__PURE__ */ s("div")({
34
34
  name: "LinkInfo",
35
35
  class: "l1jdw39q",
36
36
  propsAsIs: !1
37
- }), f = /* @__PURE__ */ s("span")({
37
+ }), A = /* @__PURE__ */ s("span")({
38
38
  name: "LinkTitle",
39
39
  class: "l1cr5mk",
40
40
  propsAsIs: !1
41
- }), A = /* @__PURE__ */ s("span")({
41
+ }), k = /* @__PURE__ */ s("span")({
42
42
  name: "LinkAddress",
43
43
  class: "lvi87q4",
44
44
  propsAsIs: !1
45
- }), o = () => n, v = /* @__PURE__ */ s(o())({
45
+ }), e = () => n, L = /* @__PURE__ */ s(e())({
46
46
  name: "LinkIcon",
47
47
  class: "l1pqlvw3",
48
48
  propsAsIs: !0
49
- }), C = /* @__PURE__ */ s("div")({
50
- name: "SocialLinksContainer",
51
- class: "s1n7kzeh",
52
- propsAsIs: !1
53
- }), S = /* @__PURE__ */ s("a")({
54
- name: "SocialLink",
55
- class: "s2m9o9y",
56
- propsAsIs: !1
57
- }), b = /* @__PURE__ */ s("span")({
58
- name: "SocialLinkLabel",
59
- class: "sewjbbn",
60
- propsAsIs: !1
61
49
  });
62
50
  export {
63
- l as Container,
51
+ p as Container,
64
52
  m as Content,
65
53
  I as Heading,
66
- p as IconContainer,
54
+ l as IconContainer,
67
55
  r as InviteGameIcon,
68
- A as LinkAddress,
69
- L as LinkContainer,
70
- v as LinkIcon,
71
- d as LinkInfo,
72
- f as LinkTitle,
73
- S as SocialLink,
74
- b as SocialLinkLabel,
75
- C as SocialLinksContainer,
76
- k as Subtext
56
+ k as LinkAddress,
57
+ f as LinkContainer,
58
+ L as LinkIcon,
59
+ v as LinkInfo,
60
+ A as LinkTitle,
61
+ d as Subtext
77
62
  };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  type PointsProps = {
3
3
  points?: number;
4
+ onClick?: () => void;
4
5
  };
5
6
  export declare const Points: React.FC<PointsProps>;
6
7
  export {};
@@ -1,20 +1,20 @@
1
1
  import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
- import { AnimatedCounter as r } from "../../animated-counter/index.js";
3
- import { resetCss as n } from "../../theme/theme.js";
4
- import { PointsContainer as e, PointsIcon as m, PointsSvg as s, PointsBody as p, PointsTitle as l, PointsValue as c } from "./styles.js";
2
+ import { AnimatedCounter as n } from "../../animated-counter/index.js";
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
5
  import "react-countup";
6
6
  import "../../theme/breakpoints.js";
7
7
  import "../../theme/constants.js";
8
8
  import "@linaria/react";
9
9
  import "../../icons/index.js";
10
10
  import "react";
11
- const y = ({ points: i }) => /* @__PURE__ */ t(e, { className: n, children: [
12
- /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(s, { name: "icon-trophy" }) }),
13
- /* @__PURE__ */ t(p, { children: [
14
- /* @__PURE__ */ o(l, { children: "Total points" }),
15
- /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(r, { value: i }) })
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 }) })
16
16
  ] })
17
17
  ] });
18
18
  export {
19
- y as Points
19
+ T as Points
20
20
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type PickHistory } from '@streamlayer/sdk-web-types';
3
+ export declare const QuestionSkeleton: React.FC;
3
4
  export declare const Question: React.FC<{
4
5
  openQuestion?: (questionId: string) => void;
5
6
  } & PickHistory>;
@@ -1,46 +1,53 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { PickHistoryStatus as i, QuestionType as a, QuestionStatus as I } from "@streamlayer/sdk-web-types";
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
3
  import { QuestionTypeData as Q } from "../constants.js";
4
- import { QuestionActionIcon as e, QuestionItem as h, QuestionContent as y, QuestionCaption as A, QuestionTypeIcon as T, QuestionTypeLabel as f, QuestionBody as L, QuestionAction as P, PlayButton as S } from "./styles.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";
5
7
  import "@linaria/react";
6
8
  import "../../icons/index.js";
7
9
  import "react";
8
- const x = {
9
- [i.LOST]: /* @__PURE__ */ t(e, { name: "incorrectVoted" }),
10
- [i.WON]: /* @__PURE__ */ t(e, { name: "icon-check" }),
11
- [i.UNSET]: /* @__PURE__ */ t(e, { name: "icon-arrow" }),
12
- [i.DNP]: /* @__PURE__ */ t(e, { name: "icon-arrow" })
13
- }, R = ({
10
+ const C = {
11
+ [e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
12
+ [e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
13
+ [e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
14
+ [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 = ({
14
20
  questionId: s,
15
- questionType: o,
21
+ questionType: n,
16
22
  questionStatus: m,
17
- subject: l,
18
- openForVoting: u,
23
+ subject: u,
24
+ openForVoting: d,
19
25
  openQuestion: r,
20
- status: d
26
+ status: p
21
27
  }) => {
22
- const c = Q[o], p = x[d];
23
- return c ? /* @__PURE__ */ n(h, { onClick: () => r == null ? void 0 : r(s), children: [
24
- /* @__PURE__ */ n(y, { children: [
25
- /* @__PURE__ */ n(A, { children: [
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: [
26
32
  /* @__PURE__ */ t(
27
33
  T,
28
34
  {
29
- "data-type-trivia": o === a.TRIVIA,
30
- "data-type-poll": o === a.POLL,
35
+ "data-type-trivia": n === a.TRIVIA,
36
+ "data-type-poll": n === a.POLL,
31
37
  name: c.iconName
32
38
  }
33
39
  ),
34
- /* @__PURE__ */ n(f, { children: [
40
+ /* @__PURE__ */ o(L, { children: [
35
41
  c.label,
36
- o === a.TRIVIA && m === I.RESOLVED && " • Expired"
42
+ n === a.TRIVIA && m === y.RESOLVED && " • Expired"
37
43
  ] })
38
44
  ] }),
39
- /* @__PURE__ */ t(L, { children: l || "" })
45
+ /* @__PURE__ */ t(P, { children: u || "" })
40
46
  ] }),
41
- /* @__PURE__ */ t(P, { children: u ? /* @__PURE__ */ t(S, { children: "Play" }) : p })
47
+ /* @__PURE__ */ t(w, { children: d ? /* @__PURE__ */ t(x, { children: "Play" }) : h })
42
48
  ] }) : null;
43
49
  };
44
50
  export {
45
- R as Question
51
+ v as Question,
52
+ j as QuestionSkeleton
46
53
  };
@@ -1,22 +1,18 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { InsightContent as p } from "../../../questions/insight/index.js";
3
- import { pauseAllVideos as l } from "../../../video-player/index.js";
4
- import { Container as n, ActionBtn as e } from "./styles.js";
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";
5
4
  import "@streamlayer/sdk-web-types";
6
- import "../../../questions/insight/styles.js";
7
- import "@linaria/react";
5
+ import "../../../video-player/index.js";
6
+ import "@linaria/core";
8
7
  import "react";
9
8
  import "../../../icons/index.js";
9
+ import "@linaria/react";
10
10
  import "../../../video-player/styles.js";
11
- const k = ({ openInsight: r, questionId: o, ...i }) => {
12
- const m = () => {
13
- l(), r == null || r(o);
14
- };
15
- return /* @__PURE__ */ c(n, { children: [
16
- /* @__PURE__ */ t(p, { questionId: o, ...i }),
17
- r && /* @__PURE__ */ t(e, { onClick: m, children: "View Insight" })
18
- ] });
19
- };
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" })
15
+ ] });
20
16
  export {
21
17
  k as Insight
22
18
  };
@@ -4,7 +4,9 @@ import { VideoPlayerProps } from '../../../video-player';
4
4
  type FeedItem = Exclude<Awaited<ReturnType<Exclude<Gamification['feedList'], undefined>['getValue']>>, undefined>;
5
5
  interface QuestionListProps {
6
6
  questions: FeedItem;
7
- openQuestion: (questionId: string) => void;
7
+ openQuestion: (questionId: string, options: {
8
+ openedFrom: 'list';
9
+ }) => void;
8
10
  controlVideo: VideoPlayerProps['controlVideo'];
9
11
  }
10
12
  export declare const QuestionList: React.FC<QuestionListProps>;
@@ -1,18 +1,21 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Question as b } from "../index.js";
3
- import { Insight as p } from "../insight/index.js";
4
- import { Twitter as c } from "../twitter/index.js";
5
- import { QuestionsContainer as f } from "./styles.js";
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";
6
7
  import "@streamlayer/sdk-web-types";
7
8
  import "../../constants.js";
8
- import "../styles.js";
9
+ import "../../../skeleton/index.js";
10
+ import "../../../skeleton/styles.js";
9
11
  import "@linaria/react";
12
+ import "../styles.js";
10
13
  import "../../../icons/index.js";
11
14
  import "react";
12
15
  import "../../../questions/insight/index.js";
13
- import "../../../video-player/index.js";
14
- import "../../../video-player/styles.js";
15
16
  import "../../../questions/insight/styles.js";
17
+ import "@linaria/core";
18
+ import "../../../video-player/styles.js";
16
19
  import "../insight/styles.js";
17
20
  import "../../../questions/twitter/index.js";
18
21
  import "../../../questions/twitter/account/index.js";
@@ -22,31 +25,44 @@ import "../../../questions/twitter/styles.js";
22
25
  import "../twitter/styles.js";
23
26
  import "../../../button/index.js";
24
27
  import "../../../button/styles.js";
25
- const J = ({ questions: e, openQuestion: m, controlVideo: o }) => /* @__PURE__ */ r(f, { children: e == null ? void 0 : e.map((t) => {
26
- var u, a, n;
27
- if (t.type === "question" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "question") {
28
- const i = t.attributes.attributes.value;
29
- return /* @__PURE__ */ r(b, { openQuestion: m, ...i }, i.questionId);
30
- }
31
- if (t.type === "insight" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "insight") {
32
- const i = t.attributes.attributes.value;
33
- return /* @__PURE__ */ r(p, { openInsight: m, controlVideo: o, ...i }, i.questionId);
34
- }
35
- if (t.type === "tweet" && ((n = t.attributes) == null ? void 0 : n.attributes.case) === "tweet") {
36
- const i = t.attributes.attributes.value, s = t.attributes.id;
37
- return /* @__PURE__ */ r(
38
- c,
39
- {
40
- openTweet: m,
41
- controlVideo: o,
42
- ...i,
43
- tweetId: s
44
- },
45
- s
46
- );
47
- }
48
- return null;
49
- }) });
28
+ const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
29
+ const m = (t) => {
30
+ h(), b(t, { openedFrom: "list" });
31
+ };
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") {
35
+ const i = t.attributes.attributes.value;
36
+ return /* @__PURE__ */ e(f, { openQuestion: m, ...i }, i.questionId);
37
+ }
38
+ if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
39
+ 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
+ );
49
+ }
50
+ 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
+ );
62
+ }
63
+ return null;
64
+ }) }) : /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ e(l, {}, o)) });
65
+ };
50
66
  export {
51
- J as QuestionList
67
+ N as QuestionList
52
68
  };
@@ -1,10 +1,11 @@
1
- import { jsxs as a, jsx as t, Fragment as d } from "react/jsx-runtime";
2
- import { QuestionType as o } from "@streamlayer/sdk-web-types";
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";
3
3
  import { QuestionTypeData as T } from "../../constants.js";
4
4
  import { Insight as f } from "./insight/index.js";
5
- import { Container as h, CloseIconWrap as E, CloseIcon as I, Header as C, TypeIcon as s, TypeName as A, Question as W, AnswerButton as x } from "./styles.js";
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
7
  import "../../../video-player/index.js";
8
+ import "@linaria/core";
8
9
  import "react";
9
10
  import "../../../icons/index.js";
10
11
  import "@linaria/react";
@@ -16,37 +17,34 @@ import "../../../../utils/common.js";
16
17
  import "../../../questions/twitter/account/styles.js";
17
18
  import "../../../questions/twitter/styles.js";
18
19
  import "./tweet/styles.js";
19
- const J = ({
20
- close: l,
21
- action: m,
22
- controlVideo: n,
23
- data: { questionType: r, question: i, insight: e, tweet: c }
20
+ const K = ({
21
+ close: e,
22
+ action: t,
23
+ controlVideo: l,
24
+ data: { questionType: r, question: i, insight: n, tweet: c }
24
25
  }) => {
25
26
  const p = T[r];
26
- return p ? /* @__PURE__ */ a(h, { style: r === o.TWEET ? { paddingTop: "12px" } : {}, children: [
27
- /* @__PURE__ */ t(E, { onClick: l, children: /* @__PURE__ */ t(I, { name: "icon-cross" }) }),
28
- r !== o.TWEET && /* @__PURE__ */ a(C, { children: [
29
- /* @__PURE__ */ t(
30
- s,
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(
31
+ A,
31
32
  {
32
- "data-type-trivia": r === o.TRIVIA,
33
- "data-type-poll": r === o.POLL,
33
+ "data-type-trivia": r === m.TRIVIA,
34
+ "data-type-poll": r === m.POLL,
34
35
  name: p.iconName
35
36
  }
36
37
  ),
37
- /* @__PURE__ */ t(A, { children: p.label })
38
+ /* @__PURE__ */ o(W, { children: p.label })
38
39
  ] }),
39
- r === o.FACTOID && /* @__PURE__ */ t(f, { ...e, action: m, controlVideo: n }),
40
- r === o.TWEET && // ToDo: connect with real Api data
41
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
42
- // @ts-ignore
43
- /* @__PURE__ */ t(D, { ...c, action: m, controlVideo: n }),
44
- r !== o.FACTOID && r !== o.TWEET && /* @__PURE__ */ a(d, { children: [
45
- /* @__PURE__ */ t(W, { children: i == null ? void 0 : i.title }),
46
- /* @__PURE__ */ t(x, { onClick: m, children: "Answer" })
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" })
47
45
  ] })
48
46
  ] }) : null;
49
47
  };
50
48
  export {
51
- J as Notification
49
+ K as Notification
52
50
  };
@@ -1,20 +1,21 @@
1
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
- import { QuestionImages as p } from "@streamlayer/sdk-web-types";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { QuestionImages as c } from "@streamlayer/sdk-web-types";
3
3
  import { VideoPlayer as e } from "../../../../video-player/index.js";
4
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";
5
6
  import "react";
6
7
  import "../../../../icons/index.js";
7
8
  import "@linaria/react";
8
9
  import "../../../../video-player/styles.js";
9
- const y = ({ video: r, image: n, imageMode: s, heading: i, body: o, action: l, controlVideo: c }) => /* @__PURE__ */ m(h, { children: [
10
- (r == null ? void 0 : r.url) && /* @__PURE__ */ t(e, { source: r.url, poster: r.thumbnailUrl, controlVideo: c }),
11
- n && !(r != null && r.url) && /* @__PURE__ */ t(u, { "data-rounded": s === p.ROUNDED, children: /* @__PURE__ */ t(a, { src: n, alt: i }) }),
12
- /* @__PURE__ */ m(I, { children: [
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: [
13
14
  /* @__PURE__ */ t(g, { children: i }),
14
- /* @__PURE__ */ t(f, { children: o }),
15
- l && /* @__PURE__ */ t(C, { onClick: l, children: "View Insight" })
15
+ /* @__PURE__ */ t(f, { children: s }),
16
+ m && /* @__PURE__ */ t(C, { onClick: m, children: "View Insight" })
16
17
  ] })
17
18
  ] });
18
19
  export {
19
- y as Insight
20
+ A as Insight
20
21
  };
@@ -2,6 +2,7 @@ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { TwitterContent as e } from "../../../../questions/twitter/index.js";
3
3
  import { Container as m, QuoteWrap as n, Quote as p, ActionBtn as l } from "./styles.js";
4
4
  import "../../../../video-player/index.js";
5
+ import "@linaria/core";
5
6
  import "react";
6
7
  import "../../../../icons/index.js";
7
8
  import "@linaria/react";
@@ -10,11 +11,11 @@ import "../../../../questions/twitter/account/index.js";
10
11
  import "../../../../../utils/common.js";
11
12
  import "../../../../questions/twitter/account/styles.js";
12
13
  import "../../../../questions/twitter/styles.js";
13
- const a = ({ action: r, ...i }) => /* @__PURE__ */ o(m, { children: [
14
+ const g = ({ action: r, ...i }) => /* @__PURE__ */ o(m, { children: [
14
15
  i.title && /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(p, { children: i.title }) }),
15
16
  /* @__PURE__ */ t(e, { ...i }),
16
17
  r && /* @__PURE__ */ t(l, { onClick: r, children: "View Insight" })
17
18
  ] });
18
19
  export {
19
- a as Tweet
20
+ g as Tweet
20
21
  };
@@ -13,3 +13,5 @@ export declare const QuestionStatusIcon: import("@linaria/react").StyledComponen
13
13
  export declare const QuestionTypeTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
14
14
  export declare const ExpiredQuestion: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
15
15
  export declare const PlayButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
16
+ export declare const SkeletonContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
17
+ export declare const SkeletonButton: any;