@streamlayer/react-ui 1.0.0 → 1.2.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 +10 -0
- package/lib/app/app/Advertisement/index.js +89 -0
- package/lib/{ui/app/masters → app/app}/Features/FeatureProvider.d.ts +2 -2
- package/lib/{ui/app → app}/app/Features/FeatureProvider.js +8 -8
- package/lib/{ui/app → app}/app/Features/Gamification/Friends.d.ts +0 -1
- package/lib/{ui/app → app}/app/Features/Gamification/Friends.js +2 -2
- package/lib/{ui/app → app}/app/Features/Gamification/Leaderboard.d.ts +3 -3
- package/lib/{ui/app → app}/app/Features/Gamification/Leaderboard.js +16 -16
- package/lib/{ui/app/masters → app/app}/Features/Gamification/Question.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Question.js +69 -0
- package/lib/{ui/app → app}/app/Features/Gamification/QuestionsList.d.ts +2 -2
- package/lib/{ui/app → app}/app/Features/Gamification/QuestionsList.js +1 -1
- package/lib/{ui/app/masters → app/app}/Features/Gamification/Tabs.d.ts +3 -3
- package/lib/{ui/app → app}/app/Features/Gamification/Tabs.js +12 -12
- package/lib/{ui/app → app}/app/Features/Gamification/UserSummary.d.ts +2 -2
- package/lib/{ui/app/masters → app/app}/Features/Gamification/UserSummary.js +1 -1
- package/lib/{ui/app → app}/app/Features/Gamification/gamification-feature.d.ts +1 -0
- package/lib/{ui/app → app}/app/Features/Gamification/index.d.ts +3 -3
- package/lib/{ui/app/masters → app/app}/Features/Gamification/index.js +29 -29
- package/lib/{ui/app/masters → app/app}/Features/index.d.ts +4 -4
- package/lib/app/app/Navigation/index.d.ts +6 -0
- package/lib/app/app/Navigation/index.js +64 -0
- package/lib/{ui/app → 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/{ui/app/masters → app/app}/Notifications/Onboarding/index.d.ts +4 -4
- package/lib/app/app/Notifications/Onboarding/index.js +168 -0
- package/lib/{ui/app → app}/app/Notifications/index.d.ts +3 -3
- package/lib/{ui/app → app}/app/Notifications/index.js +27 -27
- package/lib/app/app/Notifications/styles.d.ts +9 -0
- package/lib/app/app/Notifications/styles.js +31 -0
- package/lib/{ui/app/app/Navigation → app/app/Points}/index.d.ts +2 -2
- package/lib/{ui/app → app}/app/Points/index.js +1 -1
- package/lib/{ui/app → app}/app/index.d.ts +2 -2
- package/lib/{ui/app → app}/app/index.js +32 -32
- package/lib/app/app/story/content.d.ts +4 -0
- package/lib/app/app/story/content.js +30 -0
- package/lib/app/app/story/index.d.ts +10 -0
- package/lib/app/app/story/index.js +113 -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/styles.d.ts +9 -0
- package/lib/app/app/story/styles.js +49 -0
- package/lib/app/app/story/useResponsive.d.ts +1 -0
- package/lib/app/app/story/useResponsive.js +15 -0
- package/lib/app/app/story/video.d.ts +10 -0
- package/lib/app/app/story/video.js +67 -0
- package/lib/{ui/app → app}/app/useApp.d.ts +2 -1
- package/lib/{ui/app → app}/app/useApp.js +20 -17
- package/lib/app/app/useAppContext.d.ts +8 -0
- package/lib/{ui/app → app}/index.d.ts +0 -1
- 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/{ui/app/app → app/masters}/Features/FeatureProvider.d.ts +2 -2
- package/lib/{ui/app → app}/masters/Features/FeatureProvider.js +8 -8
- package/lib/{ui/app → app}/masters/Features/Gamification/Friends.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/Friends.js +19 -0
- package/lib/{ui/app → app}/masters/Features/Gamification/Leaderboard.d.ts +3 -3
- package/lib/{ui/app → app}/masters/Features/Gamification/Leaderboard.js +10 -10
- package/lib/{ui/app/app → app/masters}/Features/Gamification/Question.d.ts +1 -1
- package/lib/{ui/app → app}/masters/Features/Gamification/Question.js +11 -11
- package/lib/{ui/app → app}/masters/Features/Gamification/QuestionsList.d.ts +2 -2
- package/lib/{ui/app → app}/masters/Features/Gamification/QuestionsList.js +1 -1
- package/lib/{ui/app/app → app/masters}/Features/Gamification/Tabs.d.ts +3 -3
- package/lib/{ui/app → app}/masters/Features/Gamification/Tabs.js +12 -12
- package/lib/{ui/app → app}/masters/Features/Gamification/UserSummary.d.ts +2 -2
- package/lib/{ui/app/app → app/masters}/Features/Gamification/UserSummary.js +1 -1
- package/lib/{ui/app → app}/masters/Features/Gamification/gamification-feature.d.ts +1 -0
- package/lib/{ui/app → app}/masters/Features/Gamification/index.d.ts +3 -3
- package/lib/app/masters/Features/Gamification/index.js +88 -0
- package/lib/{ui/app/app → app/masters}/Features/index.d.ts +4 -4
- package/lib/{ui/app → app}/masters/Navigation/MastersNavigation/index.d.ts +5 -5
- package/lib/{ui/app → app}/masters/Navigation/MastersNavigation/index.js +5 -5
- package/lib/{ui/app → app}/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +9 -0
- package/lib/{ui/app/app → app/masters}/Notifications/Onboarding/Notification/styles.js +16 -16
- package/lib/{ui/app/app → app/masters}/Notifications/Onboarding/index.d.ts +4 -4
- package/lib/{mastersLogoSolid-B4Dz-vm1.js → app/masters/Notifications/Onboarding/index.js} +166 -2
- package/lib/{ui/app → app}/masters/Notifications/index.d.ts +3 -3
- package/lib/{ui/app → app}/masters/Notifications/index.js +48 -47
- package/lib/app/masters/Notifications/styles.d.ts +9 -0
- package/lib/{ui/app/app → app/masters}/Notifications/styles.js +10 -10
- package/lib/app/masters/Points/index.d.ts +5 -0
- package/lib/{ui/app → app}/masters/Points/index.js +1 -1
- package/lib/{ui/app → app}/masters/masters.d.ts +3 -3
- package/lib/{ui/app → app}/masters/masters.js +20 -20
- 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/{ui/app → app}/useClipboardCopy.d.ts +3 -3
- 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 -1
- package/lib/index.js +1 -1
- package/lib/ui/advertisement/banner/index.d.ts +8 -0
- package/lib/ui/advertisement/banner/index.js +32 -0
- package/lib/ui/advertisement/index.d.ts +10 -0
- package/lib/ui/advertisement/index.js +19 -0
- package/lib/ui/advertisement/mock.d.ts +4 -0
- package/lib/ui/advertisement/mock.js +67 -0
- package/lib/ui/advertisement/overlay/index.d.ts +7 -0
- package/lib/ui/advertisement/overlay/index.js +74 -0
- package/lib/ui/advertisement/overlay/styles.d.ts +18 -0
- package/lib/ui/advertisement/overlay/styles.js +95 -0
- package/lib/ui/advertisement/sidebar/index.d.ts +7 -0
- package/lib/ui/advertisement/sidebar/index.js +25 -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 +27 -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/index.js +6 -6
- 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 +108 -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 +24 -0
- package/lib/ui/theme/ThemeColors.js +1 -1
- package/lib/ui/theme/ThemeColorsAdvertisement.d.ts +1 -0
- package/lib/ui/theme/ThemeColorsAdvertisement.js +15 -0
- package/lib/ui/theme/breakpoints.d.ts +1 -0
- package/lib/ui/theme/constants.d.ts +23 -59
- package/lib/ui/theme/constants.js +41 -56
- package/lib/ui/theme/index.d.ts +0 -1
- package/lib/ui/theme/masters-theme.d.ts +4 -24
- package/lib/ui/theme/masters-theme.js +26 -58
- package/lib/ui/theme/masters.d.ts +0 -1
- package/lib/ui/theme/theme.d.ts +1 -1
- package/lib/ui/theme/theme.js +14 -11
- 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 +1 -1
- package/lib/ui/video-player/index.js +70 -62
- 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 +47 -41
- package/lib/styles_z07sl8-l0sNRNKZ.js +0 -1
- package/lib/ui/app/app/Features/Gamification/Question.js +0 -69
- package/lib/ui/app/app/Features/Gamification/index.js +0 -88
- package/lib/ui/app/app/Navigation/index.js +0 -42
- package/lib/ui/app/app/Notifications/Onboarding/Notification/styles.d.ts +0 -10
- package/lib/ui/app/app/Notifications/Onboarding/index.js +0 -172
- package/lib/ui/app/app/Notifications/styles.d.ts +0 -8
- package/lib/ui/app/app/Points/index.d.ts +0 -5
- package/lib/ui/app/app/useAppContext.d.ts +0 -8
- package/lib/ui/app/masters/Features/Gamification/Friends.js +0 -19
- package/lib/ui/app/masters/Navigation/index.d.ts +0 -9
- package/lib/ui/app/masters/Navigation/index.js +0 -30
- package/lib/ui/app/masters/Notifications/Onboarding/Notification/styles.d.ts +0 -10
- package/lib/ui/app/masters/Notifications/Onboarding/Notification/styles.js +0 -50
- package/lib/ui/app/masters/Notifications/Onboarding/index.js +0 -172
- package/lib/ui/app/masters/Notifications/styles.d.ts +0 -8
- package/lib/ui/app/masters/Notifications/styles.js +0 -31
- package/lib/ui/app/masters/Points/index.d.ts +0 -5
- package/lib/ui/app/masters/useMastersApp.js +0 -68
- package/lib/ui/app/masters/useMastersContext.d.ts +0 -8
- package/lib/ui/app/styles.d.ts +0 -15
- 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}/app/Features/Gamification/gamification-feature.js +0 -0
- /package/lib/{ui/app → app}/app/Features/index.js +0 -0
- /package/lib/{ui/app → app}/app/Notifications/Onboarding/Notification/index.js +0 -0
- /package/lib/{ui/app → app}/app/useAppContext.js +0 -0
- /package/lib/{ui/app → app}/index.js +0 -0
- /package/lib/{ui → app}/login/demo.js +0 -0
- /package/lib/{ui/app → app}/masters/Features/Gamification/gamification-feature.js +0 -0
- /package/lib/{ui/app → app}/masters/Features/index.js +0 -0
- /package/lib/{ui/app → app}/masters/Notifications/Onboarding/Notification/index.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,113 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as d } from "@linaria/react";
|
|
3
|
+
import { useRef as A, useState as L, useEffect as m } from "react";
|
|
4
|
+
import t from "screenfull";
|
|
5
|
+
import { StreamLayerProvider as u, useStreamLayer as C } from "@streamlayer/react";
|
|
6
|
+
import { App as S } from "../index.js";
|
|
7
|
+
import { StreamLayerThemeProvider as E } from "../../../ui/theme/index.js";
|
|
8
|
+
import { useStreamLayerDebug as F, StreamLayerDebug as x } from "../../../utils/debug/index.js";
|
|
9
|
+
import { Content as P } from "./content.js";
|
|
10
|
+
import { AppLogin as K } from "./login.js";
|
|
11
|
+
import { Video as D } from "./video.js";
|
|
12
|
+
const l = () => {
|
|
13
|
+
console.log("deep link handled cb");
|
|
14
|
+
}, p = () => {
|
|
15
|
+
console.log("video player handled cb");
|
|
16
|
+
}, I = ({
|
|
17
|
+
event: s
|
|
18
|
+
}) => {
|
|
19
|
+
const r = C();
|
|
20
|
+
return m(() => {
|
|
21
|
+
r && r.openFeature(12);
|
|
22
|
+
}, [r]), r ? /* @__PURE__ */ e(E, {
|
|
23
|
+
children: /* @__PURE__ */ e(S, {
|
|
24
|
+
sdk: r,
|
|
25
|
+
event: s,
|
|
26
|
+
onDeepLinkHandled: l
|
|
27
|
+
})
|
|
28
|
+
}) : null;
|
|
29
|
+
}, j = /* @__PURE__ */ d("div")({
|
|
30
|
+
name: "Container",
|
|
31
|
+
class: "c1a4qh28",
|
|
32
|
+
propsAsIs: !1
|
|
33
|
+
}), T = /* @__PURE__ */ d("div")({
|
|
34
|
+
name: "Body",
|
|
35
|
+
class: "b9h8kuk",
|
|
36
|
+
propsAsIs: !1
|
|
37
|
+
}), q = /* @__PURE__ */ d("div")({
|
|
38
|
+
name: "AppContainer",
|
|
39
|
+
class: "a1wkro2j",
|
|
40
|
+
propsAsIs: !1
|
|
41
|
+
}), Q = ({
|
|
42
|
+
settings: s,
|
|
43
|
+
hideSdk: r,
|
|
44
|
+
hideLogin: f,
|
|
45
|
+
promotionId: y,
|
|
46
|
+
hidePoints: v,
|
|
47
|
+
sidebar: h,
|
|
48
|
+
banner: b,
|
|
49
|
+
layoutMode: g
|
|
50
|
+
}) => {
|
|
51
|
+
const o = F(), a = A(), [w, c] = L(!1);
|
|
52
|
+
if (m(() => {
|
|
53
|
+
const n = () => {
|
|
54
|
+
window.orientation !== 0 ? (document.body.style.height = window.outerHeight + 50 + "px", document.body.style.overflow = "hidden", c(!0)) : (document.body.style.height = "auto", document.body.style.overflow = "auto", c(!1)), setTimeout(function() {
|
|
55
|
+
window.scrollTo(0, 0);
|
|
56
|
+
}, 1e3);
|
|
57
|
+
};
|
|
58
|
+
return t.isEnabled || window.addEventListener("orientationchange", n), () => {
|
|
59
|
+
t.isEnabled || window.removeEventListener("orientationchange", n);
|
|
60
|
+
};
|
|
61
|
+
}, []), s)
|
|
62
|
+
return /* @__PURE__ */ i(u, {
|
|
63
|
+
sdkKey: o.sdkKey,
|
|
64
|
+
production: o.env === "production",
|
|
65
|
+
autoEnable: !1,
|
|
66
|
+
onDeepLinkHandled: l,
|
|
67
|
+
videoPlayerController: p,
|
|
68
|
+
children: [/* @__PURE__ */ e(K, {}), /* @__PURE__ */ e(x, {
|
|
69
|
+
...o,
|
|
70
|
+
standalone: !0,
|
|
71
|
+
hideAuth: !0
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
const k = () => {
|
|
75
|
+
const n = a.current;
|
|
76
|
+
t.isEnabled || alert("Fullscreen is not supported in your browser, rotate your device to landscape mode"), t.isFullscreen ? t.exit() : t.request(n, {
|
|
77
|
+
navigationUI: "hide"
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ i(u, {
|
|
81
|
+
sdkKey: o.sdkKey,
|
|
82
|
+
production: o.env === "production",
|
|
83
|
+
autoEnable: !0,
|
|
84
|
+
onDeepLinkHandled: l,
|
|
85
|
+
videoPlayerController: p,
|
|
86
|
+
children: [/* @__PURE__ */ i(T, {
|
|
87
|
+
ref: a,
|
|
88
|
+
children: [/* @__PURE__ */ e(D, {
|
|
89
|
+
event: o.event,
|
|
90
|
+
hideLogin: f,
|
|
91
|
+
toggleFullscreen: k,
|
|
92
|
+
banner: b,
|
|
93
|
+
sidebar: h,
|
|
94
|
+
hidePoints: v,
|
|
95
|
+
layoutMode: g,
|
|
96
|
+
promotionId: y,
|
|
97
|
+
fullscreen: w
|
|
98
|
+
}), !r && /* @__PURE__ */ e(j, {
|
|
99
|
+
children: /* @__PURE__ */ e(q, {
|
|
100
|
+
className: "StreamLayerSDK",
|
|
101
|
+
children: /* @__PURE__ */ e(I, {
|
|
102
|
+
event: o.event
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
}), /* @__PURE__ */ e(P, {
|
|
107
|
+
event: o.event
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
Q as AppStory
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AppLogin: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as u } from "react";
|
|
3
|
+
import { useStreamLayer as i } from "@streamlayer/react";
|
|
4
|
+
import { storage as s } from "@streamlayer/sdk-web-core";
|
|
5
|
+
const d = ({ token: o, schema: n }) => {
|
|
6
|
+
const t = i();
|
|
7
|
+
return u(() => {
|
|
8
|
+
o && n && t && t.authorizationBypass(n, o);
|
|
9
|
+
}, [o, n, t]), null;
|
|
10
|
+
}, x = () => {
|
|
11
|
+
const [o, n] = h({ token: s.getExternalToken(), schema: s.getSchema() }), t = i();
|
|
12
|
+
return /* @__PURE__ */ r("div", { children: [
|
|
13
|
+
/* @__PURE__ */ r("form", { className: "auth-form", onSubmit: (a) => {
|
|
14
|
+
a.preventDefault();
|
|
15
|
+
const c = new FormData(a.currentTarget), m = c.get("token"), l = c.get("schema");
|
|
16
|
+
n({ token: m, schema: l });
|
|
17
|
+
}, children: [
|
|
18
|
+
/* @__PURE__ */ r("div", { children: [
|
|
19
|
+
/* @__PURE__ */ e("label", { htmlFor: "token", children: "token" }),
|
|
20
|
+
/* @__PURE__ */ e("input", { type: "text", id: "token", name: "token", placeholder: s.getExternalToken() })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ r("div", { children: [
|
|
23
|
+
/* @__PURE__ */ e("label", { htmlFor: "schema", children: "schema" }),
|
|
24
|
+
/* @__PURE__ */ e("input", { type: "text", id: "schema", name: "schema", placeholder: s.getSchema() })
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("button", { type: "submit", children: "submit" }) })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ e(d, { token: o.token, schema: o.schema }),
|
|
29
|
+
/* @__PURE__ */ e("button", { onClick: () => t == null ? void 0 : t.logout(), children: "logout" })
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
x as AppLogin
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const PointsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const LoginContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const FullscreenButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const AdvSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const AdvContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const AdvBanner: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
+
export declare const PromoButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
const n = /* @__PURE__ */ s("div")({
|
|
3
|
+
name: "PointsContainer",
|
|
4
|
+
class: "p10yam33",
|
|
5
|
+
propsAsIs: !1
|
|
6
|
+
}), o = /* @__PURE__ */ s("div")({
|
|
7
|
+
name: "VideoPlayerWrap",
|
|
8
|
+
class: "v13be41a",
|
|
9
|
+
propsAsIs: !1
|
|
10
|
+
}), e = /* @__PURE__ */ s("div")({
|
|
11
|
+
name: "VideoFrame",
|
|
12
|
+
class: "v18d3gas",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
15
|
+
name: "LoginContainer",
|
|
16
|
+
class: "l1aq3x2u",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
}), r = /* @__PURE__ */ s("button")({
|
|
19
|
+
name: "FullscreenButton",
|
|
20
|
+
class: "f6hlblg",
|
|
21
|
+
propsAsIs: !1
|
|
22
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
23
|
+
name: "AdvSidebar",
|
|
24
|
+
class: "a1ir4g01",
|
|
25
|
+
propsAsIs: !1
|
|
26
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
27
|
+
name: "AdvContent",
|
|
28
|
+
class: "aq35lm3",
|
|
29
|
+
propsAsIs: !1
|
|
30
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
31
|
+
name: "AdvBanner",
|
|
32
|
+
class: "a1trv37l",
|
|
33
|
+
propsAsIs: !1
|
|
34
|
+
}), d = /* @__PURE__ */ s("button")({
|
|
35
|
+
name: "PromoButton",
|
|
36
|
+
class: "plx7e50",
|
|
37
|
+
propsAsIs: !1
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
i as AdvBanner,
|
|
41
|
+
p as AdvContent,
|
|
42
|
+
l as AdvSidebar,
|
|
43
|
+
r as FullscreenButton,
|
|
44
|
+
t as LoginContainer,
|
|
45
|
+
n as PointsContainer,
|
|
46
|
+
d as PromoButton,
|
|
47
|
+
e as VideoFrame,
|
|
48
|
+
o as VideoPlayerWrap
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useResponsive: () => boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState as s, useEffect as i } from "react";
|
|
2
|
+
const t = () => window.innerWidth < 768, c = () => {
|
|
3
|
+
const [e, r] = s(t());
|
|
4
|
+
return i(() => {
|
|
5
|
+
const n = () => {
|
|
6
|
+
r(t());
|
|
7
|
+
};
|
|
8
|
+
return window.addEventListener("resize", n), () => {
|
|
9
|
+
window.removeEventListener("resize", n);
|
|
10
|
+
};
|
|
11
|
+
}, []), e;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as useResponsive
|
|
15
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useCallback as L, useEffect as V } from "react";
|
|
3
|
+
import { useStreamLayer as b } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as s } from "../Advertisement/index.js";
|
|
5
|
+
import { StreamLayerSDKPoints as A } from "../Points/index.js";
|
|
6
|
+
import { StreamLayerThemeProvider as t } from "../../../ui/theme/index.js";
|
|
7
|
+
import { AppLogin as F } from "./login.js";
|
|
8
|
+
import { VideoFrame as w, PointsContainer as x, AdvSidebar as B, LoginContainer as j, VideoPlayerWrap as D, AdvBanner as K, PromoButton as R, FullscreenButton as T, AdvContent as E } from "./styles.js";
|
|
9
|
+
import { useResponsive as G } from "./useResponsive.js";
|
|
10
|
+
const Q = ({ toggleFullscreen: p, fullscreen: h, hideLogin: u, hidePoints: f, sidebar: i, banner: a, event: n, promotionId: c, layoutMode: o }) => {
|
|
11
|
+
const e = b(), [g, y] = P(!0), d = G(), l = L(({ muted: S }) => {
|
|
12
|
+
y(S);
|
|
13
|
+
}, []);
|
|
14
|
+
V(() => (e == null || e.addVideoPlayerController(l), () => {
|
|
15
|
+
e == null || e.removeVideoPlayerController(l);
|
|
16
|
+
}), [e, l]);
|
|
17
|
+
const v = () => {
|
|
18
|
+
e == null || e.getFeature(12).background.advertisement.show(c, !0);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ m(C, { children: [
|
|
21
|
+
/* @__PURE__ */ m(w, { "data-testid": "video-frame", style: h ? { position: "fixed", inset: 0 } : {}, children: [
|
|
22
|
+
e && /* @__PURE__ */ r(t, { children: !f && /* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(A, { sdk: e }) }) }),
|
|
23
|
+
!d && /* @__PURE__ */ r(
|
|
24
|
+
B,
|
|
25
|
+
{
|
|
26
|
+
style: {
|
|
27
|
+
...o === "cover" ? { position: "absolute" } : {},
|
|
28
|
+
...i === "left" ? { left: 0 } : { right: 0, order: 3 }
|
|
29
|
+
},
|
|
30
|
+
children: e && /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(s, { event: n, sdk: e, sidebar: i, layoutMode: o }) })
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
!u && /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(F, {}) }),
|
|
34
|
+
/* @__PURE__ */ m(D, { children: [
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"video",
|
|
37
|
+
{
|
|
38
|
+
src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
|
|
39
|
+
muted: g,
|
|
40
|
+
width: "100%",
|
|
41
|
+
height: "100%",
|
|
42
|
+
autoplay: "autoplay",
|
|
43
|
+
loop: !0,
|
|
44
|
+
playsInline: !0,
|
|
45
|
+
playing: !0
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
K,
|
|
50
|
+
{
|
|
51
|
+
style: {
|
|
52
|
+
...o === "cover" ? { position: "absolute" } : {},
|
|
53
|
+
...a === "top" ? { top: 0, order: -1 } : { bottom: 0 }
|
|
54
|
+
},
|
|
55
|
+
children: e && /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(s, { event: n, sdk: e, banner: a, layoutMode: o }) })
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }),
|
|
59
|
+
c && /* @__PURE__ */ r(R, { onClick: v, children: "open promotion" }),
|
|
60
|
+
/* @__PURE__ */ r(T, { onClick: p, children: "fullscreen" })
|
|
61
|
+
] }),
|
|
62
|
+
d && /* @__PURE__ */ r(E, { children: e && /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(s, { event: n, sdk: e, sidebar: i, layoutMode: o }) }) })
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
Q as Video
|
|
67
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* A hook that provides functionality for managing the StreamLayerSDK in the App app.
|
|
4
5
|
* - On activate FG+ button, the SDK is initialized and the FG+ overlay is opened.
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { useStore as n } from "@nanostores/react";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as m, useState as b, useEffect as s, useCallback as c } from "react";
|
|
3
3
|
import { FeatureType as E } from "@streamlayer/sdk-web-types";
|
|
4
|
-
const
|
|
5
|
-
const a =
|
|
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
6
|
s(() => {
|
|
7
7
|
const t = e.getFeature(E.GAMES);
|
|
8
8
|
t && (t.closeQuestion(), t.closeUser());
|
|
9
9
|
}, [f, e]);
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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(() => {
|
|
20
23
|
r(!1), e.disableApp();
|
|
21
|
-
};
|
|
24
|
+
}, [e]);
|
|
22
25
|
return s(() => {
|
|
23
26
|
if (!i) {
|
|
24
27
|
u && e.disableApp();
|
|
@@ -35,11 +38,11 @@ const I = (e) => {
|
|
|
35
38
|
}, [r, e]), {
|
|
36
39
|
sdkEnabled: o,
|
|
37
40
|
sdkReady: u,
|
|
38
|
-
activateEventWithId:
|
|
39
|
-
deactivate:
|
|
41
|
+
activateEventWithId: A,
|
|
42
|
+
deactivate: S,
|
|
40
43
|
isLogged: !!i
|
|
41
44
|
};
|
|
42
45
|
};
|
|
43
46
|
export {
|
|
44
|
-
|
|
47
|
+
F as useAppApp
|
|
45
48
|
};
|
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
3
|
-
import {
|
|
2
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
|
+
|
|
4
4
|
/** Here we check data, render loaders, load data and perform some side effects for the active feature */
|
|
5
5
|
export declare const FeatureProvider: React.FC<{
|
|
6
6
|
feature: Features;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as u } from "@linaria/react";
|
|
3
|
-
import { useStore as
|
|
3
|
+
import { useStore as o } from "@nanostores/react";
|
|
4
4
|
import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
-
const
|
|
5
|
+
const i = /* @__PURE__ */ u("div")({
|
|
6
6
|
name: "LoadingContainer",
|
|
7
|
-
class: "
|
|
7
|
+
class: "l7wseip",
|
|
8
8
|
propsAsIs: !1
|
|
9
9
|
}), v = ({
|
|
10
10
|
feature: n,
|
|
@@ -13,20 +13,20 @@ const o = /* @__PURE__ */ u("div")({
|
|
|
13
13
|
className: r,
|
|
14
14
|
noWait: d
|
|
15
15
|
}) => {
|
|
16
|
-
const f =
|
|
16
|
+
const f = o(n.status), t = o(s.sdkStore.slStreamId);
|
|
17
17
|
if (!d) {
|
|
18
18
|
if (t != null && t.loading && !t.data)
|
|
19
|
-
return /* @__PURE__ */ i
|
|
19
|
+
return /* @__PURE__ */ e(i, {
|
|
20
20
|
className: r,
|
|
21
21
|
children: "Event is loading..."
|
|
22
22
|
});
|
|
23
23
|
if (!(t != null && t.data))
|
|
24
|
-
return /* @__PURE__ */ i
|
|
24
|
+
return /* @__PURE__ */ e(i, {
|
|
25
25
|
className: r,
|
|
26
26
|
children: "Event is forbidden..."
|
|
27
27
|
});
|
|
28
28
|
if (f !== p.Ready)
|
|
29
|
-
return /* @__PURE__ */ i
|
|
29
|
+
return /* @__PURE__ */ e(i, {
|
|
30
30
|
className: r,
|
|
31
31
|
children: "Wait feature..."
|
|
32
32
|
});
|
|
@@ -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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Gamification } from '@streamlayer/feature-gamification';
|
|
3
|
-
import type { ScrollNodeRef } from '../../..';
|
|
1
|
+
import { ScrollNodeRef } from '../../..';
|
|
4
2
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
3
|
+
import { Gamification } from '@streamlayer/feature-gamification';
|
|
4
|
+
|
|
5
5
|
export declare const Leaderboard: React.FC<{
|
|
6
6
|
gamification: Gamification;
|
|
7
7
|
scrollNode: ScrollNodeRef;
|
|
@@ -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 "../../../../gamification/invite-link/index.js";
|
|
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 "../../../../icons/index.js";
|
|
11
|
-
import "../../../../gamification/leaderboard/list-item/styles.js";
|
|
12
|
-
|
|
13
|
-
import { LeaderboardStaticList as y } from "../../../../gamification/leaderboard/static.js";
|
|
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, {
|