@streamlayer/react-ui 0.99.0 → 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.
- package/lib/assets/style.css +1 -1
- package/lib/hooks/showIn.js +45 -0
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +24 -26
- package/lib/ui/app/Features/Gamification/Question.js +19 -19
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +27 -37
- package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/index.js +46 -40
- package/lib/ui/app/Features/index.d.ts +1 -2
- package/lib/ui/app/Features/index.js +16 -17
- package/lib/ui/app/Notifications/Onboarding/index.js +33 -33
- package/lib/ui/app/masters.js +42 -42
- package/lib/ui/app/useSdkScroll.js +30 -27
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.js +16 -16
- package/lib/ui/gamification/leaderboard/static.js +31 -24
- package/lib/ui/gamification/question/index.d.ts +1 -3
- package/lib/ui/gamification/question/index.js +25 -26
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.js +7 -7
- package/lib/ui/gamification/question/list/index.js +19 -35
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.js +8 -8
- package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
- package/lib/ui/gamification/vote/alert/index.js +11 -0
- package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
- package/lib/ui/gamification/vote/feedback/index.js +31 -31
- package/lib/ui/gamification/vote/index.d.ts +1 -0
- package/lib/ui/gamification/vote/index.js +109 -89
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +14 -8
- package/lib/ui/gamification/vote/vote-option/index.js +28 -28
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +34 -29
- package/lib/ui/modal/index.js +31 -31
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +12 -10
- package/package.json +19 -20
- package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
- package/lib/ui/gamification/vote/expired-alert/index.js +0 -11
- /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
package/lib/ui/app/masters.js
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import { useStore as C } from "@nanostores/react";
|
|
3
|
-
import { useAnalyticsListener as
|
|
4
|
-
import { useRef as S, useMemo as b } from "react";
|
|
5
|
-
import { resetCss as
|
|
6
|
-
import { ActiveFeature as
|
|
7
|
-
import { MastersNavigation as
|
|
8
|
-
import { SDKNotifications as
|
|
9
|
-
import { SDKContainer as
|
|
3
|
+
import { useAnalyticsListener as d, newTabLinkListener as A, appScrollListener as F, appClickListener as x } from "../../hooks/analytics.js";
|
|
4
|
+
import { useRef as S, useMemo as b, useEffect as D } from "react";
|
|
5
|
+
import { resetCss as p } from "../theme/theme.js";
|
|
6
|
+
import { ActiveFeature as I, StandaloneFeature as M } from "./Features/index.js";
|
|
7
|
+
import { MastersNavigation as B } from "./Navigation/MastersNavigation/index.js";
|
|
8
|
+
import { SDKNotifications as j } from "./Notifications/index.js";
|
|
9
|
+
import { SDKContainer as k, SDKScrollContainer as E } from "./styles.js";
|
|
10
10
|
import { useMastersApp as K } from "./useMastersApp.js";
|
|
11
11
|
import { MastersContext as O } from "./useMastersContext.js";
|
|
12
12
|
import { useSdkFeature as R } from "./useSdkFeature.js";
|
|
13
13
|
import { useSdkResponsive as T } from "./useSdkResponsive.js";
|
|
14
14
|
import { useSdkScroll as w } from "./useSdkScroll.js";
|
|
15
|
-
import { ChannelsButtonId as
|
|
16
|
-
import { LeaderBoardButtonId as
|
|
17
|
-
import { FeaturedGroupsButtonId as
|
|
18
|
-
const
|
|
19
|
-
const [,
|
|
15
|
+
import { ChannelsButtonId as G } from "../navigation/button/Channels.js";
|
|
16
|
+
import { LeaderBoardButtonId as P } from "../navigation/button/LeaderBoard.js";
|
|
17
|
+
import { FeaturedGroupsButtonId as V } from "../navigation/button/FeaturedGroups.js";
|
|
18
|
+
const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, responsiveStore: o }) => {
|
|
19
|
+
const [, r] = R(e);
|
|
20
20
|
return /* @__PURE__ */ n(
|
|
21
|
-
|
|
21
|
+
I,
|
|
22
22
|
{
|
|
23
23
|
className: i,
|
|
24
24
|
scrollNode: s,
|
|
25
25
|
appNode: t,
|
|
26
26
|
scrollStore: l,
|
|
27
|
-
feature:
|
|
28
|
-
|
|
29
|
-
responsiveStore: r,
|
|
27
|
+
feature: r,
|
|
28
|
+
responsiveStore: o,
|
|
30
29
|
sdk: e
|
|
31
30
|
}
|
|
32
31
|
);
|
|
33
|
-
},
|
|
32
|
+
}, Y = ({ sdk: e, className: i, appNode: l, responsiveStore: t }) => {
|
|
34
33
|
const s = C(e.featuresList.getStore());
|
|
35
34
|
return s ? Array.from(s, (o) => {
|
|
36
35
|
const r = e.getFeature(o);
|
|
37
36
|
return r ? /* @__PURE__ */ n(
|
|
38
|
-
|
|
37
|
+
M,
|
|
39
38
|
{
|
|
40
39
|
className: i,
|
|
41
40
|
appNode: l,
|
|
@@ -46,63 +45,64 @@ const V = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, he
|
|
|
46
45
|
o
|
|
47
46
|
) : null;
|
|
48
47
|
}) : null;
|
|
49
|
-
},
|
|
50
|
-
const t = S(null), s = S(null), [o] = T(t), [r,
|
|
51
|
-
|
|
48
|
+
}, ie = ({ sdk: e, overlays: i, children: l }) => {
|
|
49
|
+
const t = S(null), s = S(null), [o] = T(t), [r, f] = w(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = K(e);
|
|
50
|
+
d(t, { enabled: a, event: "click", listener: A }), d(r, {
|
|
52
51
|
enabled: a,
|
|
53
52
|
event: "scrollend",
|
|
54
53
|
listener: F,
|
|
55
54
|
useDomNode: !0
|
|
56
|
-
}),
|
|
55
|
+
}), d(r, {
|
|
57
56
|
enabled: a,
|
|
58
57
|
event: "click",
|
|
59
58
|
listener: x,
|
|
60
59
|
useDomNode: !0
|
|
61
60
|
});
|
|
62
61
|
const L = b(() => ({ sdk: e }), [e]);
|
|
63
|
-
return
|
|
62
|
+
return D(() => {
|
|
63
|
+
import("./Features/Gamification/gamification-feature.js");
|
|
64
|
+
}, []), /* @__PURE__ */ n(O.Provider, { value: L, children: /* @__PURE__ */ v(k, { ref: t, children: [
|
|
64
65
|
a && /* @__PURE__ */ n(
|
|
65
|
-
|
|
66
|
+
B,
|
|
66
67
|
{
|
|
67
68
|
ref: s,
|
|
68
|
-
sdkReady:
|
|
69
|
+
sdkReady: c,
|
|
69
70
|
activeOverlay: m,
|
|
70
|
-
className:
|
|
71
|
-
setActiveOverlay: (
|
|
71
|
+
className: p,
|
|
72
|
+
setActiveOverlay: (u) => h("", u),
|
|
72
73
|
scrollToTop: () => {
|
|
73
|
-
var
|
|
74
|
-
return (
|
|
74
|
+
var u;
|
|
75
|
+
return (u = r.current) == null ? void 0 : u.scrollTo(0, 0);
|
|
75
76
|
},
|
|
76
77
|
responsiveStore: o
|
|
77
78
|
}
|
|
78
79
|
),
|
|
79
|
-
/* @__PURE__ */ v(
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
/* @__PURE__ */ v(E, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
|
|
81
|
+
c && /* @__PURE__ */ n(
|
|
82
|
+
j,
|
|
82
83
|
{
|
|
83
84
|
sdk: e,
|
|
84
85
|
scrollNode: r,
|
|
85
86
|
headerNode: s,
|
|
86
87
|
appNode: t,
|
|
87
|
-
scrollStore:
|
|
88
|
+
scrollStore: f,
|
|
88
89
|
responsiveStore: o
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
/* @__PURE__ */ n("div", { style: !a || m ===
|
|
92
|
-
i && m ===
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
/* @__PURE__ */ n("div", { style: !a || m === G ? {} : { display: "none" }, children: l && l({ activateEventWithId: N, deactivate: g }) }),
|
|
93
|
+
i && m === P && i[m],
|
|
94
|
+
c && m === V && /* @__PURE__ */ n(
|
|
95
|
+
W,
|
|
95
96
|
{
|
|
96
|
-
scrollStore:
|
|
97
|
+
scrollStore: f,
|
|
97
98
|
responsiveStore: o,
|
|
98
99
|
scrollNode: r,
|
|
99
100
|
appNode: t,
|
|
100
|
-
|
|
101
|
-
className: f,
|
|
101
|
+
className: p,
|
|
102
102
|
sdk: e
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
|
-
|
|
105
|
+
c && /* @__PURE__ */ n(Y, { responsiveStore: o, appNode: t, className: p, sdk: e })
|
|
106
106
|
] }),
|
|
107
107
|
a && !y && /* @__PURE__ */ n(
|
|
108
108
|
"div",
|
|
@@ -114,5 +114,5 @@ const V = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, he
|
|
|
114
114
|
] }) });
|
|
115
115
|
};
|
|
116
116
|
export {
|
|
117
|
-
|
|
117
|
+
ie as MastersApp
|
|
118
118
|
};
|
|
@@ -1,47 +1,50 @@
|
|
|
1
|
-
import { useStore as
|
|
2
|
-
import
|
|
3
|
-
import { useRef as m, useState as
|
|
4
|
-
import { BREAKPOINTS as
|
|
5
|
-
import { m as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
1
|
+
import { useStore as S } from "@nanostores/react";
|
|
2
|
+
import h from "lodash.throttle";
|
|
3
|
+
import { useRef as m, useState as b, useEffect as g } from "react";
|
|
4
|
+
import { BREAKPOINTS as c } from "../theme/constants.js";
|
|
5
|
+
import { m as v } from "../../index-CZvwzN5o.js";
|
|
6
|
+
const C = (o, e, n) => {
|
|
7
|
+
const t = e >= c.lg && e < c.xl ? 75 : 52;
|
|
8
8
|
o.current && window.scrollTo({
|
|
9
|
-
top: o.current.offsetTop -
|
|
10
|
-
...
|
|
9
|
+
top: o.current.offsetTop - t,
|
|
10
|
+
...n
|
|
11
11
|
});
|
|
12
|
-
},
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
}, T = 15, D = (o, e) => {
|
|
13
|
+
const n = m(null), t = m(0), [s] = b(
|
|
14
|
+
v({
|
|
15
15
|
scrollPosition: 0,
|
|
16
16
|
tabsShown: !0,
|
|
17
17
|
scrollDirection: "forward"
|
|
18
18
|
})
|
|
19
|
-
), i =
|
|
19
|
+
), i = S(e);
|
|
20
20
|
return g(() => {
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
21
|
+
const l = window.innerWidth < c.xl ? window : n.current;
|
|
22
|
+
if (!l)
|
|
23
23
|
return () => {
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const f = h((d) => {
|
|
26
26
|
var a;
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
27
|
+
const u = d.target;
|
|
28
|
+
if (!u)
|
|
29
29
|
return;
|
|
30
30
|
let r = 0;
|
|
31
|
-
i.screen.size <
|
|
32
|
-
const
|
|
33
|
-
|
|
31
|
+
i.screen.size < c.xl ? r = ((a = o.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : r = u.scrollTop;
|
|
32
|
+
const w = t.current - r;
|
|
33
|
+
if (T > Math.abs(w))
|
|
34
|
+
return;
|
|
35
|
+
const p = t.current < r ? "forward" : "backward";
|
|
36
|
+
t.current = r, s.set({
|
|
34
37
|
scrollPosition: Math.round(r),
|
|
35
|
-
scrollDirection:
|
|
38
|
+
scrollDirection: p,
|
|
36
39
|
tabsShown: s.get().tabsShown
|
|
37
40
|
});
|
|
38
41
|
}, 200);
|
|
39
|
-
return
|
|
40
|
-
|
|
42
|
+
return l.addEventListener("scroll", f), () => {
|
|
43
|
+
l.removeEventListener("scroll", f);
|
|
41
44
|
};
|
|
42
|
-
}, [s, o, i.screen]), [
|
|
45
|
+
}, [s, o, i.screen]), [n, s];
|
|
43
46
|
};
|
|
44
47
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
C as scrollIntoAppView,
|
|
49
|
+
D as useSdkScroll
|
|
47
50
|
};
|
|
@@ -3,7 +3,6 @@ import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sdk-web-t
|
|
|
3
3
|
export type LeaderboardItemProps = Partial<ILeaderboardItem> & {
|
|
4
4
|
userId: string;
|
|
5
5
|
isCurrentUser?: boolean;
|
|
6
|
-
openItemDetail: () => void;
|
|
7
6
|
style?: React.CSSProperties;
|
|
8
7
|
};
|
|
9
8
|
export declare const LeaderboardItem: React.FC<LeaderboardItemProps>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { abbreviate as
|
|
3
|
-
import { Container as s, Position as h, Content as
|
|
2
|
+
import { abbreviate as c, formatDecimals as l } from "../../../../utils/common.js";
|
|
3
|
+
import { Container as s, Position as h, Content as b, Avatar as f, AvatarPlaceholder as p, NameContainer as v, Name as C, CurrentUserBadge as x } from "./styles.js";
|
|
4
4
|
const N = ({
|
|
5
|
-
friendsRank:
|
|
5
|
+
friendsRank: i,
|
|
6
6
|
avatar: a,
|
|
7
|
-
name:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
style:
|
|
12
|
-
}) => /* @__PURE__ */ e(s, {
|
|
13
|
-
/* @__PURE__ */ r(h, { children:
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
a ? /* @__PURE__ */ r(
|
|
16
|
-
/* @__PURE__ */ e(
|
|
17
|
-
/* @__PURE__ */ r(
|
|
18
|
-
|
|
7
|
+
name: t,
|
|
8
|
+
userId: n,
|
|
9
|
+
points: o,
|
|
10
|
+
isCurrentUser: d,
|
|
11
|
+
style: m
|
|
12
|
+
}) => /* @__PURE__ */ e(s, { "data-name": n, style: m, children: [
|
|
13
|
+
/* @__PURE__ */ r(h, { children: i || 0 }),
|
|
14
|
+
/* @__PURE__ */ e(b, { children: [
|
|
15
|
+
a ? /* @__PURE__ */ r(f, { alt: "leaderboard-item-avatar", src: a }) : /* @__PURE__ */ r(p, { children: c(t || "") }),
|
|
16
|
+
/* @__PURE__ */ e(v, { children: [
|
|
17
|
+
/* @__PURE__ */ r(C, { children: t || "" }),
|
|
18
|
+
d && /* @__PURE__ */ r(x, { name: "icon-star" })
|
|
19
19
|
] })
|
|
20
20
|
] }),
|
|
21
|
-
/* @__PURE__ */ r("div", { children:
|
|
21
|
+
/* @__PURE__ */ r("div", { children: l(o) })
|
|
22
22
|
] });
|
|
23
23
|
export {
|
|
24
24
|
N as LeaderboardItem
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import
|
|
2
|
+
import { styled as c } from "@linaria/react";
|
|
3
|
+
import { useCallback as f } from "react";
|
|
4
|
+
import m from "react-infinite-scroller";
|
|
4
5
|
import { LeaderboardItem as p } from "./list-item/index.js";
|
|
5
|
-
const
|
|
6
|
+
const u = /* @__PURE__ */ c("div")({
|
|
6
7
|
name: "Container",
|
|
7
8
|
class: "c16btbfp",
|
|
8
9
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
10
|
-
items:
|
|
10
|
+
}), S = ({
|
|
11
|
+
items: s,
|
|
11
12
|
currentUserId: o,
|
|
12
|
-
openItemDetail:
|
|
13
|
-
fetchMore:
|
|
14
|
-
scrollNode:
|
|
15
|
-
hasMore:
|
|
16
|
-
}) =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
openItemDetail: t,
|
|
14
|
+
fetchMore: n,
|
|
15
|
+
scrollNode: i,
|
|
16
|
+
hasMore: l
|
|
17
|
+
}) => {
|
|
18
|
+
const d = f((r) => {
|
|
19
|
+
const a = r.target.getAttribute("data-name");
|
|
20
|
+
a && t(a);
|
|
21
|
+
}, [t]);
|
|
22
|
+
return /* @__PURE__ */ e(m, {
|
|
23
|
+
loadMore: n,
|
|
24
|
+
initialLoad: !1,
|
|
25
|
+
hasMore: l,
|
|
26
|
+
useWindow: !1,
|
|
27
|
+
getScrollParent: () => i.current,
|
|
28
|
+
children: /* @__PURE__ */ e(u, {
|
|
29
|
+
onClick: d,
|
|
30
|
+
children: s.map((r) => /* @__PURE__ */ e(p, {
|
|
31
|
+
...r,
|
|
32
|
+
isCurrentUser: !!o && o === r.userId
|
|
33
|
+
}, r.userId))
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
};
|
|
30
37
|
export {
|
|
31
|
-
|
|
38
|
+
S as LeaderboardStaticList
|
|
32
39
|
};
|
|
@@ -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,49 +1,48 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as
|
|
3
|
-
import { QuestionTypeData as
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { QuestionActionIcon as i, SkeletonContainer as
|
|
6
|
-
const
|
|
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 = {
|
|
7
7
|
[e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
|
|
8
8
|
[e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
|
|
9
9
|
[e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
|
|
10
10
|
[e.DNP]: /* @__PURE__ */ t(i, { name: "icon-arrow" })
|
|
11
|
-
}, B = () => /* @__PURE__ */ n(
|
|
12
|
-
/* @__PURE__ */ t(
|
|
13
|
-
/* @__PURE__ */ t(
|
|
14
|
-
/* @__PURE__ */ t(
|
|
15
|
-
] }),
|
|
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 = ({
|
|
16
16
|
questionId: s,
|
|
17
17
|
questionType: o,
|
|
18
|
-
questionStatus:
|
|
19
|
-
subject:
|
|
20
|
-
openForVoting:
|
|
21
|
-
|
|
22
|
-
status: h
|
|
18
|
+
questionStatus: l,
|
|
19
|
+
subject: u,
|
|
20
|
+
openForVoting: d,
|
|
21
|
+
status: m
|
|
23
22
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
return
|
|
23
|
+
const r = h[o], Q = x[m];
|
|
24
|
+
return r ? /* @__PURE__ */ n(S, { "data-name": s, children: [
|
|
26
25
|
/* @__PURE__ */ n(f, { children: [
|
|
27
|
-
/* @__PURE__ */ n(
|
|
26
|
+
/* @__PURE__ */ n(k, { children: [
|
|
28
27
|
/* @__PURE__ */ t(
|
|
29
|
-
|
|
28
|
+
A,
|
|
30
29
|
{
|
|
31
30
|
"data-type-trivia": o === a.TRIVIA,
|
|
32
31
|
"data-type-poll": o === a.POLL,
|
|
33
|
-
name:
|
|
32
|
+
name: r.iconName
|
|
34
33
|
}
|
|
35
34
|
),
|
|
36
|
-
/* @__PURE__ */ n(
|
|
37
|
-
|
|
38
|
-
o === a.TRIVIA &&
|
|
35
|
+
/* @__PURE__ */ n(T, { children: [
|
|
36
|
+
r.label,
|
|
37
|
+
o === a.TRIVIA && l === p.RESOLVED && " • Expired"
|
|
39
38
|
] })
|
|
40
39
|
] }),
|
|
41
|
-
/* @__PURE__ */ t(
|
|
40
|
+
/* @__PURE__ */ t(L, { children: u || "" })
|
|
42
41
|
] }),
|
|
43
|
-
/* @__PURE__ */ t(
|
|
42
|
+
/* @__PURE__ */ t(P, { children: d ? /* @__PURE__ */ t(w, { children: "Play" }) : Q })
|
|
44
43
|
] }) : null;
|
|
45
44
|
};
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
C as Question,
|
|
48
47
|
B as QuestionSkeleton
|
|
49
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,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InsightContent as
|
|
3
|
-
import { Container as
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
|
|
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" })
|
|
7
7
|
] });
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
c as Insight
|
|
10
10
|
};
|
|
@@ -1,47 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { QuestionSkeleton as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionSkeleton as c, Question as f } from "../index.js";
|
|
3
3
|
import { Insight as d } from "../insight/index.js";
|
|
4
4
|
import { Twitter as h } from "../twitter/index.js";
|
|
5
5
|
import { pauseAllVideos as g } from "../../../video-player/index.js";
|
|
6
|
-
import { QuestionsContainer as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
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" }));
|
|
10
11
|
};
|
|
11
|
-
return n ? /* @__PURE__ */
|
|
12
|
-
var
|
|
13
|
-
if (t.type === "question" && ((
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
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") {
|
|
15
|
+
const i = t.attributes.attributes.value;
|
|
16
|
+
return /* @__PURE__ */ r(f, { ...i }, i.questionId);
|
|
16
17
|
}
|
|
17
18
|
if (t.type === "insight" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "insight") {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */ i
|
|
20
|
-
d,
|
|
21
|
-
{
|
|
22
|
-
openInsight: u,
|
|
23
|
-
controlVideo: s,
|
|
24
|
-
...e
|
|
25
|
-
},
|
|
26
|
-
e.questionId
|
|
27
|
-
);
|
|
19
|
+
const i = t.attributes.attributes.value;
|
|
20
|
+
return /* @__PURE__ */ r(d, { controlVideo: u, ...i }, i.questionId);
|
|
28
21
|
}
|
|
29
|
-
if (t.type === "tweet" && ((
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */ i
|
|
32
|
-
h,
|
|
33
|
-
{
|
|
34
|
-
openTweet: u,
|
|
35
|
-
controlVideo: s,
|
|
36
|
-
...e,
|
|
37
|
-
tweetId: m
|
|
38
|
-
},
|
|
39
|
-
m
|
|
40
|
-
);
|
|
22
|
+
if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
|
|
23
|
+
const i = t.attributes.attributes.value, o = t.attributes.id;
|
|
24
|
+
return /* @__PURE__ */ r(h, { controlVideo: u, ...i, tweetId: o }, o);
|
|
41
25
|
}
|
|
42
26
|
return null;
|
|
43
|
-
}) }) : /* @__PURE__ */
|
|
27
|
+
}) }) : /* @__PURE__ */ r(m, { children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ r(c, {}, e)) });
|
|
44
28
|
};
|
|
45
29
|
export {
|
|
46
|
-
|
|
30
|
+
k as QuestionList
|
|
47
31
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { type TwitterContentProps } from '../../../questions/twitter';
|
|
3
3
|
import { VideoPlayerProps } from '../../../video-player';
|
|
4
4
|
type TwitterProps = TwitterContentProps & {
|
|
5
|
-
openTweet?: (questionId: string) => void;
|
|
6
5
|
controlVideo: VideoPlayerProps['controlVideo'];
|
|
7
6
|
};
|
|
8
7
|
export declare const Twitter: React.FC<TwitterProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { TwitterContent as
|
|
3
|
-
import { Container as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TwitterContent as n } from "../../../questions/twitter/index.js";
|
|
3
|
+
import { Container as r, Quote as o, ActionButton as m } from "./styles.js";
|
|
4
|
+
const a = ({ ...t }) => /* @__PURE__ */ i(r, { "data-name": t.tweetId, children: [
|
|
5
|
+
t.title && /* @__PURE__ */ e(o, { children: t.title }),
|
|
6
|
+
/* @__PURE__ */ e(n, { ...t }),
|
|
7
|
+
/* @__PURE__ */ e(m, { children: "View Insight" })
|
|
8
8
|
] });
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
a as Twitter
|
|
11
11
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon as t } from "../../../icons/index.js";
|
|
3
|
+
import { Container as m, Title as c, Description as l } from "./styles.js";
|
|
4
|
+
const f = ({ icon: o, title: e, description: i }) => /* @__PURE__ */ n(m, { children: [
|
|
5
|
+
/* @__PURE__ */ r(t, { name: o }),
|
|
6
|
+
/* @__PURE__ */ r(c, { children: e }),
|
|
7
|
+
/* @__PURE__ */ r(l, { children: i })
|
|
8
|
+
] });
|
|
9
|
+
export {
|
|
10
|
+
f as Alert
|
|
11
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const n = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
|
-
class: "
|
|
4
|
+
class: "c1gcvmcj",
|
|
5
5
|
propsAsIs: !1
|
|
6
6
|
}), o = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "Title",
|
|
8
|
-
class: "
|
|
8
|
+
class: "tnr592a",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "Description",
|
|
12
|
-
class: "
|
|
12
|
+
class: "d1e8jqpv",
|
|
13
13
|
propsAsIs: !1
|
|
14
14
|
});
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
n as Container,
|
|
17
|
+
t as Description,
|
|
18
18
|
o as Title
|
|
19
19
|
};
|