@streamlayer/react-ui 0.100.5 → 1.1.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/app/app/Advertisement/index.d.ts +8 -0
- package/lib/app/app/Advertisement/index.js +38 -0
- package/lib/{ui → app}/app/Features/FeatureProvider.d.ts +2 -2
- package/lib/{ui → app}/app/Features/FeatureProvider.js +10 -10
- package/lib/{ui → app}/app/Features/Gamification/Friends.d.ts +0 -1
- package/lib/{ui → app}/app/Features/Gamification/Friends.js +2 -2
- package/lib/app/app/Features/Gamification/Leaderboard.d.ts +9 -0
- package/lib/app/app/Features/Gamification/Leaderboard.js +55 -0
- package/lib/{ui → app}/app/Features/Gamification/Question.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Question.js +69 -0
- package/lib/{ui → app}/app/Features/Gamification/QuestionsList.d.ts +2 -2
- package/lib/app/app/Features/Gamification/QuestionsList.js +11 -0
- package/lib/app/app/Features/Gamification/Tabs.d.ts +14 -0
- package/lib/{ui → app}/app/Features/Gamification/Tabs.js +12 -12
- package/lib/{ui → app}/app/Features/Gamification/UserSummary.d.ts +2 -2
- package/lib/{ui → app}/app/Features/Gamification/UserSummary.js +1 -1
- package/lib/{ui → app}/app/Features/Gamification/gamification-feature.d.ts +1 -0
- package/lib/{ui → app}/app/Features/Gamification/index.d.ts +5 -5
- package/lib/app/app/Features/Gamification/index.js +88 -0
- package/lib/{ui → app}/app/Features/index.d.ts +5 -5
- package/lib/app/app/Navigation/index.d.ts +6 -0
- package/lib/app/app/Navigation/index.js +64 -0
- package/lib/{ui → app}/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +9 -0
- package/lib/app/app/Notifications/Onboarding/Notification/styles.js +50 -0
- package/lib/app/app/Notifications/Onboarding/index.d.ts +14 -0
- package/lib/app/app/Notifications/Onboarding/index.js +168 -0
- package/lib/app/app/Notifications/index.d.ts +13 -0
- package/lib/{ui → app}/app/Notifications/index.js +24 -24
- package/lib/app/app/Notifications/styles.d.ts +9 -0
- package/lib/app/app/Notifications/styles.js +31 -0
- package/lib/app/app/Points/index.d.ts +5 -0
- package/lib/{ui → app}/app/Points/index.js +1 -1
- package/lib/app/app/index.d.ts +11 -0
- package/lib/app/app/index.js +101 -0
- package/lib/app/app/story/content.d.ts +3 -0
- package/lib/app/app/story/content.js +14 -0
- package/lib/app/app/story/index.d.ts +8 -0
- package/lib/app/app/story/index.js +96 -0
- package/lib/app/app/story/login.d.ts +1 -0
- package/lib/app/app/story/login.js +34 -0
- package/lib/app/app/story/video.d.ts +8 -0
- package/lib/app/app/story/video.js +96 -0
- package/lib/app/app/useApp.d.ts +20 -0
- package/lib/app/app/useApp.js +48 -0
- package/lib/app/app/useAppContext.d.ts +8 -0
- package/lib/app/app/useAppContext.js +8 -0
- package/lib/app/index.d.ts +6 -0
- package/lib/app/login/demo.d.ts +5 -0
- package/lib/{ui → app}/login/index.d.ts +0 -1
- package/lib/{ui → app}/login/index.js +1 -1
- package/lib/app/login/styles.d.ts +7 -0
- package/lib/app/login/styles.js +39 -0
- package/lib/app/masters/Features/FeatureProvider.d.ts +11 -0
- package/lib/app/masters/Features/FeatureProvider.js +38 -0
- package/lib/app/masters/Features/Gamification/Friends.d.ts +3 -0
- package/lib/app/masters/Features/Gamification/Friends.js +19 -0
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/Leaderboard.js +10 -10
- package/lib/app/masters/Features/Gamification/Question.d.ts +5 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/Question.js +15 -15
- package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +6 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/QuestionsList.js +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +14 -0
- package/lib/app/masters/Features/Gamification/Tabs.js +44 -0
- package/lib/app/masters/Features/Gamification/UserSummary.d.ts +5 -0
- package/lib/app/masters/Features/Gamification/UserSummary.js +18 -0
- package/lib/app/masters/Features/Gamification/gamification-feature.d.ts +3 -0
- package/lib/app/masters/Features/Gamification/gamification-feature.js +4 -0
- package/lib/app/masters/Features/Gamification/index.d.ts +23 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/index.js +28 -28
- package/lib/app/masters/Features/index.d.ts +24 -0
- package/lib/app/masters/Features/index.js +37 -0
- package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.d.ts +6 -6
- package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.js +5 -5
- package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +8 -0
- package/lib/app/masters/Notifications/Onboarding/Notification/index.js +18 -0
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Notifications/Onboarding/Notification/styles.js +16 -16
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +14 -0
- package/lib/{ui/app → app/masters}/Notifications/Onboarding/index.js +87 -90
- package/lib/app/masters/Notifications/index.d.ts +13 -0
- package/lib/app/masters/Notifications/index.js +164 -0
- package/lib/app/masters/Notifications/styles.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Notifications/styles.js +11 -11
- package/lib/app/masters/Points/index.d.ts +5 -0
- package/lib/app/masters/Points/index.js +28 -0
- package/lib/app/masters/masters.d.ts +14 -0
- package/lib/{ui/app → app/masters}/masters.js +33 -31
- package/lib/{ui/app → app/masters}/useMastersApp.d.ts +2 -1
- package/lib/app/masters/useMastersApp.js +71 -0
- package/lib/app/masters/useMastersContext.d.ts +8 -0
- package/lib/app/styles.d.ts +20 -0
- package/lib/{ui/app → app}/styles.js +13 -13
- package/lib/app/useClipboardCopy.d.ts +3 -0
- package/lib/{ui/app → app}/useClipboardCopy.js +2 -2
- package/lib/{ui/app → app}/useSdkFeature.d.ts +2 -1
- package/lib/{ui/app → app}/useSdkResponsive.d.ts +3 -1
- package/lib/{ui/app → app}/useSdkResponsive.js +2 -2
- package/lib/{ui/app → app}/useSdkScroll.d.ts +3 -2
- package/lib/{ui/app → app}/useSdkScroll.js +2 -2
- package/lib/assets/style.css +1 -1
- package/lib/hooks/showIn.js +1 -1
- package/lib/{index-Bicco-Aq.js → index-B1QdimmR.js} +7737 -8219
- package/lib/index.d.ts +1 -4
- package/lib/index.js +4 -4
- package/lib/ui/advertisement/banner/index.d.ts +6 -0
- package/lib/ui/advertisement/banner/index.js +27 -0
- package/lib/ui/advertisement/index.d.ts +9 -0
- package/lib/ui/advertisement/index.js +31 -0
- package/lib/ui/advertisement/mock.d.ts +3 -0
- package/lib/ui/advertisement/mock.js +33 -0
- package/lib/ui/advertisement/overlay/index.d.ts +5 -0
- package/lib/ui/advertisement/overlay/index.js +21 -0
- package/lib/ui/advertisement/sidebar/index.d.ts +6 -0
- package/lib/ui/advertisement/sidebar/index.js +23 -0
- package/lib/ui/animated-counter/index.d.ts +1 -1
- package/lib/ui/button/index.d.ts +0 -1
- package/lib/ui/button/styles.d.ts +2 -3
- package/lib/ui/gamification/constants.d.ts +1 -0
- package/lib/ui/gamification/copyNotification/index.d.ts +0 -1
- package/lib/ui/gamification/copyNotification/styles.d.ts +3 -4
- package/lib/ui/gamification/detail/header/index.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.d.ts +4 -5
- package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -1
- package/lib/ui/gamification/detail/sponsor/index.js +13 -7
- package/lib/ui/gamification/insight/index.d.ts +1 -1
- package/lib/ui/gamification/insight/styles.d.ts +8 -9
- package/lib/ui/gamification/insight-list/index.d.ts +1 -1
- package/lib/ui/gamification/insight-list/styles.d.ts +2 -3
- package/lib/ui/gamification/invite-link/index.d.ts +0 -1
- package/lib/ui/gamification/invite-link/index.js +13 -13
- package/lib/ui/gamification/invite-link/styles.d.ts +5 -6
- package/lib/ui/gamification/invite-link/styles.js +11 -11
- package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +2 -2
- package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -8
- package/lib/ui/gamification/leaderboard/static.d.ts +3 -3
- package/lib/ui/gamification/leaderboard/styles.d.ts +1 -2
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.d.ts +3 -3
- package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +9 -10
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.d.ts +8 -9
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +4 -5
- package/lib/ui/gamification/onboarding/styles.d.ts +5 -6
- package/lib/ui/gamification/points/index.d.ts +0 -1
- package/lib/ui/gamification/points/styles.d.ts +5 -6
- package/lib/ui/gamification/question/index.d.ts +2 -2
- package/lib/ui/gamification/question/index.js +26 -26
- package/lib/ui/gamification/question/insight/index.d.ts +1 -1
- package/lib/ui/gamification/question/insight/styles.d.ts +2 -3
- package/lib/ui/gamification/question/list/index.d.ts +2 -2
- package/lib/ui/gamification/question/list/styles.d.ts +1 -2
- package/lib/ui/gamification/question/notification/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/insight/styles.d.ts +7 -8
- package/lib/ui/gamification/question/notification/pill/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/pill/styles.d.ts +3 -4
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +58 -31
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +3 -2
- package/lib/ui/gamification/question/notification/prediction-result/index.js +55 -54
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +11 -10
- package/lib/ui/gamification/question/notification/styles.d.ts +6 -7
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +3 -3
- package/lib/ui/gamification/question/notification/tweet/styles.d.ts +4 -5
- package/lib/ui/gamification/question/styles.d.ts +14 -14
- package/lib/ui/gamification/question/styles.js +48 -43
- package/lib/ui/gamification/question/twitter/index.d.ts +2 -2
- package/lib/ui/gamification/question/twitter/styles.d.ts +3 -4
- package/lib/ui/gamification/tabs/index.d.ts +0 -1
- package/lib/ui/gamification/tabs/styles.d.ts +4 -5
- package/lib/ui/gamification/user-statistics/components/rank/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/components/rank/styles.d.ts +3 -4
- package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/components/statistic/styles.d.ts +3 -4
- package/lib/ui/gamification/user-statistics/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/styles.d.ts +17 -18
- package/lib/ui/gamification/vote/alert/index.d.ts +2 -1
- package/lib/ui/gamification/vote/alert/styles.d.ts +3 -4
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
- package/lib/ui/gamification/vote/feedback/styles.d.ts +8 -9
- package/lib/ui/gamification/vote/index.d.ts +1 -1
- package/lib/ui/gamification/vote/insight-details/index.d.ts +1 -1
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +2 -3
- package/lib/ui/gamification/vote/styles.d.ts +4 -5
- package/lib/ui/gamification/vote/styles.js +1 -1
- package/lib/ui/gamification/vote/twitter-details/index.d.ts +2 -2
- package/lib/ui/gamification/vote/twitter-details/styles.d.ts +2 -3
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +19 -16
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +6 -7
- package/lib/ui/icons/index.d.ts +1 -1
- package/lib/ui/icons/index.js +107 -47
- package/lib/ui/lottie/index.d.ts +0 -1
- package/lib/ui/modal/index.d.ts +0 -1
- package/lib/ui/modal/index.js +1 -1
- package/lib/ui/navigation/button/Channels.d.ts +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/button/LeaderBoard.d.ts +1 -1
- package/lib/ui/navigation/button/index.d.ts +1 -1
- package/lib/ui/navigation/button/styles.d.ts +6 -7
- package/lib/ui/navigation/index.d.ts +1 -1
- package/lib/ui/navigation/masters.d.ts +6 -5
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/styles.d.ts +6 -7
- package/lib/ui/questions/twitter/account/index.d.ts +0 -1
- package/lib/ui/questions/twitter/account/styles.d.ts +6 -7
- package/lib/ui/questions/twitter/index.d.ts +1 -1
- package/lib/ui/questions/twitter/styles.d.ts +14 -11
- package/lib/ui/show-in/index.d.ts +2 -1
- package/lib/ui/skeleton/index.d.ts +0 -1
- package/lib/ui/skeleton/styles.d.ts +1 -2
- package/lib/ui/slide-in/index.d.ts +11 -0
- package/lib/ui/slide-in/index.js +29 -0
- package/lib/ui/theme/MastersColors.d.ts +1 -0
- package/lib/ui/theme/MastersColors.js +15 -0
- package/lib/ui/theme/ThemeColors.js +1 -1
- package/lib/ui/theme/breakpoints.d.ts +1 -0
- package/lib/ui/theme/constants.d.ts +12 -59
- package/lib/ui/theme/constants.js +26 -55
- package/lib/ui/theme/index.d.ts +0 -1
- package/lib/ui/theme/masters-theme.d.ts +5 -0
- package/lib/ui/theme/masters-theme.js +64 -0
- package/lib/ui/theme/masters.d.ts +4 -0
- package/lib/ui/theme/masters.js +6 -0
- package/lib/ui/theme/theme.d.ts +1 -1
- package/lib/ui/theme/theme.js +2 -2
- package/lib/ui/timer/index.d.ts +3 -2
- package/lib/ui/timer/index.js +32 -32
- package/lib/ui/video-player/index.d.ts +0 -1
- package/lib/ui/video-player/styles.d.ts +5 -6
- package/lib/utils/debug/storage.js +1 -1
- package/lib/utils/storage.js +1 -1
- package/package.json +48 -38
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +0 -9
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +0 -14
- package/lib/ui/app/Navigation/index.d.ts +0 -9
- package/lib/ui/app/Navigation/index.js +0 -30
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.d.ts +0 -10
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +0 -14
- package/lib/ui/app/Notifications/index.d.ts +0 -13
- package/lib/ui/app/Notifications/styles.d.ts +0 -8
- package/lib/ui/app/Points/index.d.ts +0 -5
- package/lib/ui/app/masters.d.ts +0 -20
- package/lib/ui/app/styles.d.ts +0 -15
- package/lib/ui/app/useClipboardCopy.d.ts +0 -3
- package/lib/ui/app/useMastersApp.js +0 -68
- package/lib/ui/app/useMastersContext.d.ts +0 -8
- package/lib/ui/login/demo.d.ts +0 -6
- package/lib/ui/login/styles.d.ts +0 -8
- package/lib/ui/login/styles.js +0 -39
- /package/lib/{ui → app}/app/Features/Gamification/gamification-feature.js +0 -0
- /package/lib/{ui → app}/app/Features/index.js +0 -0
- /package/lib/{ui → app}/app/Notifications/Onboarding/Notification/index.js +0 -0
- /package/lib/{styles_z07sl8-l0sNRNKZ.js → app/index.js} +0 -0
- /package/lib/{ui → app}/login/demo.js +0 -0
- /package/lib/{ui/app → app/masters}/useMastersContext.js +0 -0
- /package/lib/{ui/app → app}/useImagesPreload.d.ts +0 -0
- /package/lib/{ui/app → app}/useImagesPreload.js +0 -0
- /package/lib/{ui/app → app}/useSdkFeature.js +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { useState as v, useCallback as y, useEffect as A } from "react";
|
|
4
|
+
import { useStreamLayer as g } from "@streamlayer/react";
|
|
5
|
+
import { StreamLayerSDKAdvertisement as i } from "../Advertisement/index.js";
|
|
6
|
+
import { StreamLayerSDKPoints as h } from "../Points/index.js";
|
|
7
|
+
import { StreamLayerThemeProvider as S } from "../../../ui/theme/index.js";
|
|
8
|
+
import { AppLogin as C } from "./login.js";
|
|
9
|
+
const P = /* @__PURE__ */ s("div")({
|
|
10
|
+
name: "PointsContainer",
|
|
11
|
+
class: "pvt3dlv",
|
|
12
|
+
propsAsIs: !1
|
|
13
|
+
}), V = /* @__PURE__ */ s("video")({
|
|
14
|
+
name: "VideoPlayer",
|
|
15
|
+
class: "v1jvtznw",
|
|
16
|
+
propsAsIs: !1
|
|
17
|
+
}), B = /* @__PURE__ */ s("div")({
|
|
18
|
+
name: "VideoFrame",
|
|
19
|
+
class: "v13gbl05",
|
|
20
|
+
propsAsIs: !1
|
|
21
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
22
|
+
name: "LoginContainer",
|
|
23
|
+
class: "l65nrgs",
|
|
24
|
+
propsAsIs: !1
|
|
25
|
+
}), L = /* @__PURE__ */ s("button")({
|
|
26
|
+
name: "FullscreenButton",
|
|
27
|
+
class: "f1jxc34p",
|
|
28
|
+
propsAsIs: !1
|
|
29
|
+
}), b = /* @__PURE__ */ s("div")({
|
|
30
|
+
name: "AdvSidebar",
|
|
31
|
+
class: "ayq9x9m",
|
|
32
|
+
propsAsIs: !1
|
|
33
|
+
}), x = /* @__PURE__ */ s("div")({
|
|
34
|
+
name: "AdvBanner",
|
|
35
|
+
class: "am90851",
|
|
36
|
+
propsAsIs: !1
|
|
37
|
+
}), E = ({
|
|
38
|
+
toggleFullscreen: m,
|
|
39
|
+
hideLogin: c,
|
|
40
|
+
hidePoints: d,
|
|
41
|
+
sidebar: t,
|
|
42
|
+
banner: n,
|
|
43
|
+
event: a
|
|
44
|
+
}) => {
|
|
45
|
+
const e = g(), [p, f] = v(!1), r = y(({
|
|
46
|
+
muted: u
|
|
47
|
+
}) => {
|
|
48
|
+
f(u);
|
|
49
|
+
}, []);
|
|
50
|
+
return A(() => (e == null || e.addVideoPlayerController(r), () => {
|
|
51
|
+
e == null || e.removeVideoPlayerController(r);
|
|
52
|
+
}), [e, r]), /* @__PURE__ */ l(B, {
|
|
53
|
+
children: [e && /* @__PURE__ */ l(S, {
|
|
54
|
+
children: [!d && /* @__PURE__ */ o(P, {
|
|
55
|
+
children: /* @__PURE__ */ o(h, {
|
|
56
|
+
sdk: e
|
|
57
|
+
})
|
|
58
|
+
}), /* @__PURE__ */ o(b, {
|
|
59
|
+
style: t === "left" ? {
|
|
60
|
+
left: 0
|
|
61
|
+
} : {
|
|
62
|
+
right: 0
|
|
63
|
+
},
|
|
64
|
+
children: /* @__PURE__ */ o(i, {
|
|
65
|
+
event: a,
|
|
66
|
+
sdk: e,
|
|
67
|
+
sidebar: t
|
|
68
|
+
})
|
|
69
|
+
}), /* @__PURE__ */ o(x, {
|
|
70
|
+
style: n === "top" ? {
|
|
71
|
+
top: 0
|
|
72
|
+
} : {
|
|
73
|
+
bottom: 0
|
|
74
|
+
},
|
|
75
|
+
children: /* @__PURE__ */ o(i, {
|
|
76
|
+
event: a,
|
|
77
|
+
sdk: e,
|
|
78
|
+
banner: n
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
}), !c && /* @__PURE__ */ o(I, {
|
|
82
|
+
children: /* @__PURE__ */ o(C, {})
|
|
83
|
+
}), /* @__PURE__ */ o(V, {
|
|
84
|
+
src: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
85
|
+
muted: p,
|
|
86
|
+
controls: !0
|
|
87
|
+
}), /* @__PURE__ */ o(L, {
|
|
88
|
+
onClick: m,
|
|
89
|
+
children: "fullscreen"
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
E as Video,
|
|
95
|
+
V as VideoPlayer
|
|
96
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A hook that provides functionality for managing the StreamLayerSDK in the App app.
|
|
5
|
+
* - On activate FG+ button, the SDK is initialized and the FG+ overlay is opened.
|
|
6
|
+
* - On activate Channels or Leaderboard button, the SDK is disabled and the FG+ overlay is closed.
|
|
7
|
+
* - On sdk status change, if sdk disabled (f.e some errors occurred), the SDK is disabled and the FG+ overlay is closed.
|
|
8
|
+
* @param sdk - The StreamLayerSDK instance to use.
|
|
9
|
+
* @returns An object containing various functions and state values for managing the SDK and app overlays.
|
|
10
|
+
* @returns deactivate - A function that disables the SDK and closes the FG+ overlay.
|
|
11
|
+
* @returns activateEventWithId - A function that initializes the SDK and opens the FG+ overlay.
|
|
12
|
+
* With event (The id of the event to create a session for.) as a parameter.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useAppApp: (sdk: StreamLayerSDK) => {
|
|
15
|
+
sdkEnabled: boolean;
|
|
16
|
+
sdkReady: boolean;
|
|
17
|
+
activateEventWithId: (event: string) => void;
|
|
18
|
+
deactivate: () => void;
|
|
19
|
+
isLogged: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useStore as n } from "@nanostores/react";
|
|
2
|
+
import { useRef as m, useState as b, useEffect as s, useCallback as c } from "react";
|
|
3
|
+
import { FeatureType as E } from "@streamlayer/sdk-web-types";
|
|
4
|
+
const F = (e) => {
|
|
5
|
+
const a = m(""), [o, r] = b(!1), p = n(e.status), l = n(e.sdkStore.slStreamId), i = n(e.userId()), f = n(e.getActiveFeature()), u = p === "ready" && !!l.data;
|
|
6
|
+
s(() => {
|
|
7
|
+
const t = e.getFeature(E.GAMES);
|
|
8
|
+
t && (t.closeQuestion(), t.closeUser());
|
|
9
|
+
}, [f, e]);
|
|
10
|
+
const A = c(
|
|
11
|
+
(t) => {
|
|
12
|
+
a.current = t, r(!0), e.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: v, err: d }) => {
|
|
13
|
+
if (!d && v) {
|
|
14
|
+
e.isUserAuthorized().then((g) => {
|
|
15
|
+
g || e.disableApp();
|
|
16
|
+
});
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
[e]
|
|
22
|
+
), S = c(() => {
|
|
23
|
+
r(!1), e.disableApp();
|
|
24
|
+
}, [e]);
|
|
25
|
+
return s(() => {
|
|
26
|
+
if (!i) {
|
|
27
|
+
u && e.disableApp();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (i && a.current && o) {
|
|
31
|
+
e.initializeApp({ skipOrganizationSettings: !0 }).then(() => {
|
|
32
|
+
e.createEventSession(a.current);
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}, [i]), s(() => () => {
|
|
37
|
+
r(!1), e.disableApp();
|
|
38
|
+
}, [r, e]), {
|
|
39
|
+
sdkEnabled: o,
|
|
40
|
+
sdkReady: u,
|
|
41
|
+
activateEventWithId: A,
|
|
42
|
+
deactivate: S,
|
|
43
|
+
isLogged: !!i
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
F as useAppApp
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type AppNode = HTMLDivElement | null;
|
|
2
|
+
export type AppNodeRef = React.MutableRefObject<AppNode>;
|
|
3
|
+
export type ScrollNode = HTMLDivElement | null;
|
|
4
|
+
export type ScrollNodeRef = React.MutableRefObject<ScrollNode>;
|
|
5
|
+
export type HeaderNode = HTMLDivElement | null;
|
|
6
|
+
export type HeaderNodeRef = React.MutableRefObject<HeaderNode>;
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as a } from "react";
|
|
3
3
|
import w from "react-auth-code-input";
|
|
4
4
|
import P, { isValidPhoneNumber as F, formatPhoneNumberIntl as v } from "react-phone-number-input";
|
|
5
|
-
import { Timer as D } from "
|
|
5
|
+
import { Timer as D } from "../../ui/timer/index.js";
|
|
6
6
|
import { requestLoginCode as I, register as k, login as S } from "../../utils/login.js";
|
|
7
7
|
import { Panel as q, Form as m, FormTitle as p, FormDescription as d, FormInputContainer as x, FormSubmit as s, Digits as E } from "./styles.js";
|
|
8
8
|
const z = ({ login: h, anonymousLogin: u, host: c }) => {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Panel: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const Form: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLFormElement> & import('react').FormHTMLAttributes<HTMLFormElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const FormTitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const FormDescription: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const FormSubmit: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const FormInputContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Digits: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
const r = /* @__PURE__ */ s("div")({
|
|
3
|
+
name: "Panel",
|
|
4
|
+
class: "p1xyiqdq",
|
|
5
|
+
propsAsIs: !1
|
|
6
|
+
}), a = /* @__PURE__ */ s("form")({
|
|
7
|
+
name: "Form",
|
|
8
|
+
class: "f8dvpyp",
|
|
9
|
+
propsAsIs: !1
|
|
10
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
11
|
+
name: "FormTitle",
|
|
12
|
+
class: "f11rdqjl",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
15
|
+
name: "FormDescription",
|
|
16
|
+
class: "f1grgxkj",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
}), e = /* @__PURE__ */ s("button")({
|
|
19
|
+
name: "FormSubmit",
|
|
20
|
+
class: "f1qnbttk",
|
|
21
|
+
propsAsIs: !1
|
|
22
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
23
|
+
name: "FormInputContainer",
|
|
24
|
+
class: "fqfb0ax",
|
|
25
|
+
propsAsIs: !1
|
|
26
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
27
|
+
name: "Digits",
|
|
28
|
+
class: "dl335k4",
|
|
29
|
+
propsAsIs: !1
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
m as Digits,
|
|
33
|
+
a as Form,
|
|
34
|
+
t as FormDescription,
|
|
35
|
+
p as FormInputContainer,
|
|
36
|
+
e as FormSubmit,
|
|
37
|
+
n as FormTitle,
|
|
38
|
+
r as Panel
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Features } from '@streamlayer/sdk-web-features';
|
|
2
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
|
+
|
|
4
|
+
/** Here we check data, render loaders, load data and perform some side effects for the active feature */
|
|
5
|
+
export declare const FeatureProvider: React.FC<{
|
|
6
|
+
feature: Features;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
sdk: StreamLayerSDK;
|
|
9
|
+
className?: string;
|
|
10
|
+
noWait?: boolean;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as u } from "@linaria/react";
|
|
3
|
+
import { useStore as o } from "@nanostores/react";
|
|
4
|
+
import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
const i = /* @__PURE__ */ u("div")({
|
|
6
|
+
name: "LoadingContainer",
|
|
7
|
+
class: "l7wseip",
|
|
8
|
+
propsAsIs: !1
|
|
9
|
+
}), v = ({
|
|
10
|
+
feature: n,
|
|
11
|
+
sdk: s,
|
|
12
|
+
children: a,
|
|
13
|
+
className: r,
|
|
14
|
+
noWait: d
|
|
15
|
+
}) => {
|
|
16
|
+
const f = o(n.status), t = o(s.sdkStore.slStreamId);
|
|
17
|
+
if (!d) {
|
|
18
|
+
if (t != null && t.loading && !t.data)
|
|
19
|
+
return /* @__PURE__ */ e(i, {
|
|
20
|
+
className: r,
|
|
21
|
+
children: "Event is loading..."
|
|
22
|
+
});
|
|
23
|
+
if (!(t != null && t.data))
|
|
24
|
+
return /* @__PURE__ */ e(i, {
|
|
25
|
+
className: r,
|
|
26
|
+
children: "Event is forbidden..."
|
|
27
|
+
});
|
|
28
|
+
if (f !== p.Ready)
|
|
29
|
+
return /* @__PURE__ */ e(i, {
|
|
30
|
+
className: r,
|
|
31
|
+
children: "Wait feature..."
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return a;
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
v as FeatureProvider
|
|
38
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as i } from "@linaria/react";
|
|
3
|
+
import { OnboardingInviteCard as n } from "../../../../ui/gamification/onboarding/slides/onboarding-invite-card/index.js";
|
|
4
|
+
const r = /* @__PURE__ */ i("div")({
|
|
5
|
+
name: "InviteFriendsContainer",
|
|
6
|
+
class: "i1b9agwt",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), d = ({
|
|
9
|
+
deepLink: t
|
|
10
|
+
}) => /* @__PURE__ */ e(r, {
|
|
11
|
+
children: /* @__PURE__ */ e(n, {
|
|
12
|
+
inviteLink: t,
|
|
13
|
+
inviteCardTitle: "It’s More Fun With Friends",
|
|
14
|
+
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
d as Friends
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScrollNodeRef } from '../../..';
|
|
2
|
+
import { ScrollStore } from '../../../useSdkScroll';
|
|
3
|
+
import { Gamification } from '@streamlayer/feature-gamification';
|
|
4
|
+
|
|
5
|
+
export declare const Leaderboard: React.FC<{
|
|
6
|
+
gamification: Gamification;
|
|
7
|
+
scrollNode: ScrollNodeRef;
|
|
8
|
+
scrollStore: ScrollStore;
|
|
9
|
+
}>;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as r, jsxs as f, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { styled as h } from "@linaria/react";
|
|
3
3
|
import { useStore as i } from "@nanostores/react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { InviteLink as I } from "
|
|
4
|
+
import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
|
|
5
|
+
import { useRef as u } from "react";
|
|
6
|
+
import { InviteLink as I } from "../../../../ui/gamification/invite-link/index.js";
|
|
7
7
|
import "react-virtualized-auto-sizer";
|
|
8
8
|
import "react-window";
|
|
9
9
|
import "react-window-infinite-loader";
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
|
|
13
|
-
import { LeaderboardStaticList as y } from "
|
|
10
|
+
import "../../../../ui/icons/index.js";
|
|
11
|
+
import "../../../../ui/gamification/leaderboard/list-item/styles.js";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { LeaderboardStaticList as y } from "../../../../ui/gamification/leaderboard/static.js";
|
|
14
14
|
import { Friends as C } from "./Friends.js";
|
|
15
15
|
const b = /* @__PURE__ */ h("div")({
|
|
16
16
|
name: "InviteLinkContainer",
|
|
17
|
-
class: "
|
|
17
|
+
class: "ij36hcn",
|
|
18
18
|
propsAsIs: !1
|
|
19
19
|
}), q = ({
|
|
20
20
|
gamification: e,
|
|
21
21
|
scrollNode: s,
|
|
22
22
|
scrollStore: p
|
|
23
23
|
}) => {
|
|
24
|
-
const o =
|
|
24
|
+
const o = u(null), {
|
|
25
25
|
data: n,
|
|
26
26
|
hasMore: d,
|
|
27
27
|
loading: m,
|
|
28
28
|
key: l
|
|
29
29
|
} = i(e.leaderboardList.$store), {
|
|
30
30
|
data: t
|
|
31
|
-
} = i(e.deepLink.$store), [a, c] =
|
|
31
|
+
} = i(e.deepLink.$store), [a, c] = k(o);
|
|
32
32
|
return !n.length && !m ? /* @__PURE__ */ r(C, {
|
|
33
33
|
deepLink: t
|
|
34
34
|
}) : /* @__PURE__ */ f(L, {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as l } from "@linaria/react";
|
|
3
3
|
import { useStore as n } from "@nanostores/react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { VoteHeader as c } from "
|
|
7
|
-
import { Sponsor as p } from "
|
|
8
|
-
import { Vote as f, VoteSkeleton as b } from "
|
|
9
|
-
import { InsightDetails as y } from "
|
|
10
|
-
import { TwitterDetails as V } from "
|
|
11
|
-
const
|
|
4
|
+
import { useMastersContext as a } from "../../useMastersContext.js";
|
|
5
|
+
import { QuestionType as m } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { VoteHeader as c } from "../../../../ui/gamification/detail/header/index.js";
|
|
7
|
+
import { Sponsor as p } from "../../../../ui/gamification/detail/sponsor/index.js";
|
|
8
|
+
import { Vote as f, VoteSkeleton as b } from "../../../../ui/gamification/vote/index.js";
|
|
9
|
+
import { InsightDetails as y } from "../../../../ui/gamification/vote/insight-details/index.js";
|
|
10
|
+
import { TwitterDetails as V } from "../../../../ui/gamification/vote/twitter-details/index.js";
|
|
11
|
+
const h = /* @__PURE__ */ l("div")({
|
|
12
12
|
name: "QuestionContainer",
|
|
13
|
-
class: "
|
|
13
|
+
class: "qwgkhsv",
|
|
14
14
|
propsAsIs: !1
|
|
15
15
|
}), x = ({
|
|
16
16
|
openedQuestion: t
|
|
@@ -18,7 +18,7 @@ const d = /* @__PURE__ */ l("div")({
|
|
|
18
18
|
var s, o;
|
|
19
19
|
const {
|
|
20
20
|
sdk: r
|
|
21
|
-
} =
|
|
21
|
+
} = a();
|
|
22
22
|
return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ e(y, {
|
|
23
23
|
...t.attributes.attributes.value,
|
|
24
24
|
controlVideo: r == null ? void 0 : r.controlVideoPlayer
|
|
@@ -26,7 +26,7 @@ const d = /* @__PURE__ */ l("div")({
|
|
|
26
26
|
...t.attributes.attributes.value,
|
|
27
27
|
controlVideo: r == null ? void 0 : r.controlVideoPlayer
|
|
28
28
|
}) : null;
|
|
29
|
-
},
|
|
29
|
+
}, d = ({
|
|
30
30
|
extendedQuestion: t,
|
|
31
31
|
vote: r,
|
|
32
32
|
close: s
|
|
@@ -49,18 +49,18 @@ const d = /* @__PURE__ */ l("div")({
|
|
|
49
49
|
if (!r)
|
|
50
50
|
return null;
|
|
51
51
|
const o = r.type;
|
|
52
|
-
return /* @__PURE__ */ u(
|
|
52
|
+
return /* @__PURE__ */ u(h, {
|
|
53
53
|
children: [/* @__PURE__ */ e(c, {
|
|
54
54
|
close: t.closeQuestion,
|
|
55
|
-
type: ((i = r.attributes) == null ? void 0 : i.type) ||
|
|
56
|
-
}), o === "question" && /* @__PURE__ */ e(
|
|
55
|
+
type: ((i = r.attributes) == null ? void 0 : i.type) || m.UNSET
|
|
56
|
+
}), o === "question" && /* @__PURE__ */ e(d, {
|
|
57
57
|
vote: t.submitAnswer,
|
|
58
58
|
close: t.closeQuestion,
|
|
59
59
|
extendedQuestion: s
|
|
60
60
|
}), o !== "question" && /* @__PURE__ */ e(x, {
|
|
61
61
|
openedQuestion: r
|
|
62
62
|
}), /* @__PURE__ */ e(p, {
|
|
63
|
-
|
|
63
|
+
mastersLogo: !0
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useStore as i } from "@nanostores/react";
|
|
3
3
|
import { useMastersContext as n } from "../../useMastersContext.js";
|
|
4
|
-
import { QuestionList as m } from "
|
|
4
|
+
import { QuestionList as m } from "../../../../ui/gamification/question/list/index.js";
|
|
5
5
|
const a = ({ store: t, openQuestion: r }) => {
|
|
6
6
|
const { sdk: o } = n(), e = i(t);
|
|
7
7
|
return /* @__PURE__ */ s(m, { openQuestion: r, questions: e.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
2
|
+
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
|
+
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
|
+
import { Gamification } from '@streamlayer/feature-gamification';
|
|
5
|
+
|
|
6
|
+
export declare const Tabs: React.FC<{
|
|
7
|
+
appNode: AppNodeRef;
|
|
8
|
+
gamification: Gamification;
|
|
9
|
+
scrollStore: ScrollStore;
|
|
10
|
+
scrollNode: ScrollNodeRef;
|
|
11
|
+
responsiveStore: ResponsiveStore;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as u } from "@nanostores/react";
|
|
3
|
+
import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../../styles.js";
|
|
4
|
+
import { scrollIntoAppView as P } from "../../../useSdkScroll.js";
|
|
5
|
+
import { useState as S, useTransition as V, useEffect as E } from "react";
|
|
6
|
+
import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
|
|
7
|
+
import { Leaderboard as L } from "./Leaderboard.js";
|
|
8
|
+
import { QuestionsList as F } from "./QuestionsList.js";
|
|
9
|
+
import { UserSummary as O } from "./UserSummary.js";
|
|
10
|
+
const q = ({ gamification: s, className: f, scrollStore: t, scrollNode: l, appNode: c, style: b, responsiveStore: n }) => {
|
|
11
|
+
const { tabsShown: d } = u(t, { keys: ["tabsShown"] }), [i, w] = S(a.HOME), [, y] = V(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
|
|
12
|
+
y(() => {
|
|
13
|
+
var p;
|
|
14
|
+
w(r), m === !1 && (((p = c.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && P(c, g.size, { behavior: "instant" });
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
E(() => t.subscribe((r) => {
|
|
18
|
+
if (r.scrollPosition === 0) {
|
|
19
|
+
t.setKey("tabsShown", !0);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
n.get().sdkInDesktopView ? t.setKey("tabsShown", r.scrollDirection === "backward") : t.setKey("tabsShown", r.scrollDirection === "forward");
|
|
23
|
+
}), [t, n]);
|
|
24
|
+
let o = "0px";
|
|
25
|
+
return m ? o = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : o = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ h(D, { className: f, style: b, children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
T,
|
|
28
|
+
{
|
|
29
|
+
style: {
|
|
30
|
+
top: o
|
|
31
|
+
},
|
|
32
|
+
children: /* @__PURE__ */ e(K, { activePage: i, toggleActivePage: k })
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
i === a.HOME && /* @__PURE__ */ h(x, { children: [
|
|
36
|
+
/* @__PURE__ */ e(v, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(O, { userSummary: s.userSummary }) }) }),
|
|
37
|
+
/* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(F, { openQuestion: s.openQuestion, store: s.feedList.getStore() }) })
|
|
38
|
+
] }),
|
|
39
|
+
i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(L, { scrollStore: t, scrollNode: l, gamification: s }) })
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
q as Tabs
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useEffect as n } from "react";
|
|
3
|
+
import { UserStatistics as a } from "../../../../ui/gamification/user-statistics/index.js";
|
|
4
|
+
const b = ({ userSummary: r }) => {
|
|
5
|
+
var e;
|
|
6
|
+
const [t, s] = i(void 0);
|
|
7
|
+
return n(() => {
|
|
8
|
+
const c = r.$store.subscribe((o) => {
|
|
9
|
+
o && s(o);
|
|
10
|
+
});
|
|
11
|
+
return () => {
|
|
12
|
+
c();
|
|
13
|
+
};
|
|
14
|
+
}, [r]), /* @__PURE__ */ m(a, { loading: !(t != null && t.summary), ...t == null ? void 0 : t.summary, successRate: (e = t == null ? void 0 : t.percentage) == null ? void 0 : e.correct });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
b as UserSummary
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
2
|
+
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
|
+
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
|
+
import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
|
|
5
|
+
|
|
6
|
+
export declare const GamificationOverlay: React.FC<{
|
|
7
|
+
gamification: GamificationClass;
|
|
8
|
+
className?: string;
|
|
9
|
+
scrollStore: ScrollStore;
|
|
10
|
+
responsiveStore: ResponsiveStore;
|
|
11
|
+
appNode: AppNodeRef;
|
|
12
|
+
scrollNode: ScrollNodeRef;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Standalone version of the gamification overlay
|
|
16
|
+
* includes the question and user details, which are shown in a modal and should be available on any overlay
|
|
17
|
+
*/
|
|
18
|
+
export declare const GamificationOverlayStandalone: React.FC<{
|
|
19
|
+
gamification: GamificationClass;
|
|
20
|
+
className?: string;
|
|
21
|
+
responsiveStore: ResponsiveStore;
|
|
22
|
+
appNode: AppNodeRef;
|
|
23
|
+
}>;
|