@streamlayer/react-ui 0.96.3 → 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 (71) 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/Gamification/Friends.d.ts +0 -2
  5. package/lib/ui/app/Features/Gamification/Friends.js +16 -22
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +31 -25
  7. package/lib/ui/app/Features/Gamification/Question.js +4 -2
  8. package/lib/ui/app/Features/Gamification/QuestionsList.js +11 -8
  9. package/lib/ui/app/Features/Gamification/Tabs.js +30 -25
  10. package/lib/ui/app/Features/Gamification/UserSummary.js +14 -12
  11. package/lib/ui/app/Features/Gamification/gamification-feature.js +5 -1
  12. package/lib/ui/app/Features/Gamification/index.js +9 -5
  13. package/lib/ui/app/Features/index.js +24 -21
  14. package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -0
  15. package/lib/ui/app/Notifications/Onboarding/index.js +76 -78
  16. package/lib/ui/app/Notifications/index.js +98 -91
  17. package/lib/ui/app/Points/index.js +20 -17
  18. package/lib/ui/app/masters.js +76 -65
  19. package/lib/ui/app/useMastersApp.js +9 -9
  20. package/lib/ui/app/useSdkFeature.js +13 -16
  21. package/lib/ui/app/useSdkResponsive.js +1 -1
  22. package/lib/ui/app/useSdkScroll.d.ts +1 -1
  23. package/lib/ui/app/useSdkScroll.js +28 -25
  24. package/lib/ui/gamification/invite-link/index.js +26 -12
  25. package/lib/ui/gamification/onboarding/index.d.ts +0 -2
  26. package/lib/ui/gamification/onboarding/index.js +46 -46
  27. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +2 -2
  28. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +21 -20
  29. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -0
  30. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +20 -15
  31. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -3
  32. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +34 -29
  33. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +0 -3
  34. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +17 -32
  35. package/lib/ui/gamification/points/index.d.ts +1 -0
  36. package/lib/ui/gamification/points/index.js +9 -9
  37. package/lib/ui/gamification/question/index.d.ts +1 -0
  38. package/lib/ui/gamification/question/index.js +31 -24
  39. package/lib/ui/gamification/question/insight/index.js +3 -2
  40. package/lib/ui/gamification/question/list/index.d.ts +3 -1
  41. package/lib/ui/gamification/question/list/index.js +22 -19
  42. package/lib/ui/gamification/question/notification/index.js +3 -2
  43. package/lib/ui/gamification/question/notification/insight/index.js +10 -9
  44. package/lib/ui/gamification/question/notification/tweet/index.js +3 -2
  45. package/lib/ui/gamification/question/styles.d.ts +2 -0
  46. package/lib/ui/gamification/question/styles.js +39 -28
  47. package/lib/ui/gamification/question/twitter/index.js +3 -2
  48. package/lib/ui/gamification/user-statistics/index.d.ts +3 -2
  49. package/lib/ui/gamification/user-statistics/index.js +48 -45
  50. package/lib/ui/gamification/vote/feedback/index.d.ts +3 -2
  51. package/lib/ui/gamification/vote/feedback/index.js +76 -63
  52. package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
  53. package/lib/ui/gamification/vote/feedback/styles.js +31 -24
  54. package/lib/ui/gamification/vote/index.js +93 -89
  55. package/lib/ui/gamification/vote/insight-details/index.js +7 -6
  56. package/lib/ui/gamification/vote/twitter-details/index.js +3 -2
  57. package/lib/ui/gamification/vote/vote-option/index.d.ts +2 -1
  58. package/lib/ui/gamification/vote/vote-option/index.js +47 -39
  59. package/lib/ui/icons/index.d.ts +1 -2
  60. package/lib/ui/icons/index.js +44 -36
  61. package/lib/ui/modal/index.js +27 -21
  62. package/lib/ui/questions/insight/index.js +3 -2
  63. package/lib/ui/questions/twitter/index.js +3 -2
  64. package/lib/ui/show-in/index.d.ts +2 -0
  65. package/lib/ui/show-in/index.js +24 -14
  66. package/lib/ui/timer/index.js +32 -28
  67. package/lib/ui/video-player/index.js +41 -39
  68. package/lib/ui/video-player/styles.d.ts +1 -0
  69. package/lib/ui/video-player/styles.js +10 -9
  70. package/package.json +22 -21
  71. package/lib/index-keh7OLCY.js +0 -67
@@ -1,26 +1,27 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { InvitingUser as s } from "../../invitingUser/index.js";
3
- import { Skeleton as p } from "../../../../skeleton/index.js";
4
- import { Container as h, Content as a, Graphic as l, Headline as f, InvitingUserWrap as x, StepsContainer as g, StepIndicator as y } from "./styles.js";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { InvitingUser as h } from "../../invitingUser/index.js";
3
+ import { Skeleton as d } from "../../../../skeleton/index.js";
4
+ import { Container as l, Content as p, Graphic as s, GraphicImage as f, Headline as I, InvitingUserWrap as g, StepsContainer as v, StepIndicator as x } from "./styles.js";
5
5
  import "../../../../../utils/common.js";
6
6
  import "../../invitingUser/styles.js";
7
7
  import "@linaria/react";
8
8
  import "../../../../skeleton/styles.js";
9
- const G = ({
10
- loading: i,
11
- graphicSrc: c,
12
- headline: t,
13
- stepsCount: d,
14
- currentStep: n,
15
- inviterName: e
16
- }) => /* @__PURE__ */ m(h, { children: [
17
- /* @__PURE__ */ m(a, { "data-centered": n === 0, children: [
18
- /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(p, { loading: i, style: { width: "80px", height: "80px" }, children: /* @__PURE__ */ r("img", { src: c, alt: t }) }) }),
19
- t && /* @__PURE__ */ r(p, { loading: i, children: /* @__PURE__ */ r(f, { children: t }) })
20
- ] }),
21
- e && n === 0 && /* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(s, { name: e }) }),
22
- /* @__PURE__ */ r(g, { style: i ? { visibility: "hidden" } : {}, children: Array.from({ length: d }).map((I, o) => /* @__PURE__ */ r(y, { "data-active": n === o }, o)) })
23
- ] });
9
+ const A = ({
10
+ loading: e,
11
+ steps: o,
12
+ currentStep: r,
13
+ inviterName: t
14
+ }) => {
15
+ const { headline: a } = o[r];
16
+ return /* @__PURE__ */ c(l, { children: [
17
+ /* @__PURE__ */ c(p, { "data-welcome-screen": r === 0, children: [
18
+ /* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(d, { loading: e, children: o.map(({ graphicSrc: m }, n) => /* @__PURE__ */ i(f, { src: m, "data-active": r === n })) }) }),
19
+ a && /* @__PURE__ */ i(d, { loading: e, children: /* @__PURE__ */ i(I, { children: a }) })
20
+ ] }),
21
+ t && r === 0 && /* @__PURE__ */ i(g, { children: /* @__PURE__ */ i(h, { name: t }) }),
22
+ /* @__PURE__ */ i(v, { style: e ? { visibility: "hidden" } : {}, children: Array.from({ length: o.length }).map((m, n) => /* @__PURE__ */ i(x, { "data-active": r === n }, n)) })
23
+ ] });
24
+ };
24
25
  export {
25
- G as OnboardingInstructions
26
+ A as OnboardingInstructions
26
27
  };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const Graphic: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const GraphicImage: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
4
5
  export declare const Headline: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
6
  export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
7
  export declare const StepsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,5 +1,5 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const a = /* @__PURE__ */ s("div")({
2
+ const n = /* @__PURE__ */ s("div")({
3
3
  name: "Container",
4
4
  class: "c1htq1lb",
5
5
  propsAsIs: !1
@@ -7,33 +7,38 @@ const a = /* @__PURE__ */ s("div")({
7
7
  name: "Graphic",
8
8
  class: "gjyzpp7",
9
9
  propsAsIs: !1
10
- }), p = /* @__PURE__ */ s("div")({
10
+ }), p = /* @__PURE__ */ s("img")({
11
+ name: "GraphicImage",
12
+ class: "g16mldgz",
13
+ propsAsIs: !1
14
+ }), o = /* @__PURE__ */ s("div")({
11
15
  name: "Headline",
12
- class: "h16mldgz",
16
+ class: "h69js65",
13
17
  propsAsIs: !1
14
18
  }), t = /* @__PURE__ */ s("div")({
15
19
  name: "Content",
16
- class: "c69js65",
20
+ class: "cmm7qmo",
17
21
  propsAsIs: !1
18
- }), o = /* @__PURE__ */ s("div")({
22
+ }), i = /* @__PURE__ */ s("div")({
19
23
  name: "StepsContainer",
20
- class: "smm7qmo",
24
+ class: "s17knuw2",
21
25
  propsAsIs: !1
22
- }), i = /* @__PURE__ */ s("span")({
26
+ }), r = /* @__PURE__ */ s("span")({
23
27
  name: "StepIndicator",
24
- class: "s17knuw2",
28
+ class: "s1b74psg",
25
29
  propsAsIs: !1
26
- }), r = /* @__PURE__ */ s("div")({
30
+ }), c = /* @__PURE__ */ s("div")({
27
31
  name: "InvitingUserWrap",
28
- class: "i1b74psg",
32
+ class: "i1y99ug7",
29
33
  propsAsIs: !1
30
34
  });
31
35
  export {
32
- a as Container,
36
+ n as Container,
33
37
  t as Content,
34
38
  e as Graphic,
35
- p as Headline,
36
- r as InvitingUserWrap,
37
- i as StepIndicator,
38
- o as StepsContainer
39
+ p as GraphicImage,
40
+ o as Headline,
41
+ c as InvitingUserWrap,
42
+ r as StepIndicator,
43
+ i as StepsContainer
39
44
  };
@@ -1,13 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { HeaderNodeRef, type AppNodeRef } from '../../../../app/masters';
3
2
  import { icons } from '../../../../icons';
4
3
  export type OnboardingInviteCardProps = {
5
- renderToNode: AppNodeRef | HeaderNodeRef;
6
4
  inviteLink?: string;
7
5
  inviteCardTitle?: string;
8
6
  inviteCardSubtext?: string;
9
7
  primaryColor?: string;
10
- socialLinks?: InviteCardSocialLink[];
11
8
  className?: string;
12
9
  };
13
10
  export type InviteCardSocialLink = {
@@ -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
  };
@@ -3,15 +3,16 @@ import { InsightContent as n } from "../../../questions/insight/index.js";
3
3
  import { Container as p, ActionBtn as c } from "./styles.js";
4
4
  import "@streamlayer/sdk-web-types";
5
5
  import "../../../video-player/index.js";
6
+ import "@linaria/core";
6
7
  import "react";
7
8
  import "../../../icons/index.js";
8
9
  import "@linaria/react";
9
10
  import "../../../video-player/styles.js";
10
11
  import "../../../questions/insight/styles.js";
11
- const d = ({ openInsight: r, questionId: t, ...o }) => /* @__PURE__ */ m(p, { children: [
12
+ const k = ({ openInsight: r, questionId: t, ...o }) => /* @__PURE__ */ m(p, { children: [
12
13
  /* @__PURE__ */ i(n, { questionId: t, ...o }),
13
14
  r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
14
15
  ] });
15
16
  export {
16
- d as Insight
17
+ k as Insight
17
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,17 +1,20 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { Question as b } from "../index.js";
2
+ import { QuestionSkeleton as l, Question as f } from "../index.js";
3
3
  import { Insight as c } from "../insight/index.js";
4
- import { Twitter as f } from "../twitter/index.js";
5
- import { pauseAllVideos as l } from "../../../video-player/index.js";
6
- import { QuestionsContainer as d } from "./styles.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
7
  import "@streamlayer/sdk-web-types";
8
8
  import "../../constants.js";
9
- import "../styles.js";
9
+ import "../../../skeleton/index.js";
10
+ import "../../../skeleton/styles.js";
10
11
  import "@linaria/react";
12
+ import "../styles.js";
11
13
  import "../../../icons/index.js";
12
14
  import "react";
13
15
  import "../../../questions/insight/index.js";
14
16
  import "../../../questions/insight/styles.js";
17
+ import "@linaria/core";
15
18
  import "../../../video-player/styles.js";
16
19
  import "../insight/styles.js";
17
20
  import "../../../questions/twitter/index.js";
@@ -22,23 +25,23 @@ 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 K = ({ questions: r, openQuestion: p, controlVideo: m }) => {
26
- const o = (t) => {
27
- l(), p(t);
28
+ const N = ({ questions: r, openQuestion: b, controlVideo: n }) => {
29
+ const m = (t) => {
30
+ h(), b(t, { openedFrom: "list" });
28
31
  };
29
- return /* @__PURE__ */ e(d, { children: r == null ? void 0 : r.map((t) => {
30
- var n, u, s;
31
- if (t.type === "question" && ((n = t.attributes) == null ? void 0 : n.attributes.case) === "question") {
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") {
32
35
  const i = t.attributes.attributes.value;
33
- return /* @__PURE__ */ e(b, { openQuestion: o, ...i }, i.questionId);
36
+ return /* @__PURE__ */ e(f, { openQuestion: m, ...i }, i.questionId);
34
37
  }
35
38
  if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
36
39
  const i = t.attributes.attributes.value;
37
40
  return /* @__PURE__ */ e(
38
41
  c,
39
42
  {
40
- openInsight: o,
41
- controlVideo: m,
43
+ openInsight: m,
44
+ controlVideo: n,
42
45
  ...i
43
46
  },
44
47
  i.questionId
@@ -47,10 +50,10 @@ const K = ({ questions: r, openQuestion: p, controlVideo: m }) => {
47
50
  if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
48
51
  const i = t.attributes.attributes.value, a = t.attributes.id;
49
52
  return /* @__PURE__ */ e(
50
- f,
53
+ d,
51
54
  {
52
- openTweet: o,
53
- controlVideo: m,
55
+ openTweet: m,
56
+ controlVideo: n,
54
57
  ...i,
55
58
  tweetId: a
56
59
  },
@@ -58,8 +61,8 @@ const K = ({ questions: r, openQuestion: p, controlVideo: m }) => {
58
61
  );
59
62
  }
60
63
  return null;
61
- }) });
64
+ }) }) : /* @__PURE__ */ e(p, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ e(l, {}, o)) });
62
65
  };
63
66
  export {
64
- K as QuestionList
67
+ N as QuestionList
65
68
  };
@@ -5,6 +5,7 @@ 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
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,7 +17,7 @@ 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
+ const K = ({
20
21
  close: e,
21
22
  action: t,
22
23
  controlVideo: l,
@@ -45,5 +46,5 @@ const J = ({
45
46
  ] }) : null;
46
47
  };
47
48
  export {
48
- J as Notification
49
+ K as Notification
49
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
  };