@streamlayer/react-ui 0.98.1 → 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/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
- package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
- package/lib/index.js +4 -8
- package/lib/ui/app/Features/Gamification/Friends.js +10 -23
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
- package/lib/ui/app/Features/Gamification/Question.js +33 -65
- package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
- package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
- package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
- package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/index.js +68 -143
- package/lib/ui/app/Features/index.d.ts +1 -2
- package/lib/ui/app/Features/index.js +20 -109
- package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
- package/lib/ui/app/Navigation/index.js +9 -12
- package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
- package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
- package/lib/ui/app/Notifications/index.js +96 -148
- package/lib/ui/app/Notifications/styles.js +10 -15
- package/lib/ui/app/Points/index.js +18 -26
- package/lib/ui/app/masters.js +71 -190
- package/lib/ui/app/useClipboardCopy.js +11 -15
- package/lib/ui/app/useMastersApp.js +34 -44
- package/lib/ui/app/useSdkResponsive.js +18 -19
- package/lib/ui/app/useSdkScroll.js +28 -26
- package/lib/ui/button/index.js +3 -4
- package/lib/ui/gamification/copyNotification/index.js +5 -7
- package/lib/ui/gamification/detail/header/index.js +15 -18
- package/lib/ui/gamification/detail/header/styles.js +12 -14
- package/lib/ui/gamification/detail/sponsor/index.js +2 -3
- package/lib/ui/gamification/insight/index.js +5 -6
- package/lib/ui/gamification/insight-list/index.js +3 -6
- package/lib/ui/gamification/invite-link/index.js +11 -17
- package/lib/ui/gamification/invite-link/styles.js +13 -15
- package/lib/ui/gamification/leaderboard/index.js +21 -28
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
- package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
- package/lib/ui/gamification/leaderboard/static.js +34 -31
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.js +51 -73
- package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
- package/lib/ui/gamification/onboarding/styles.js +14 -17
- package/lib/ui/gamification/points/index.js +9 -15
- package/lib/ui/gamification/points/styles.js +12 -14
- package/lib/ui/gamification/question/index.d.ts +1 -3
- package/lib/ui/gamification/question/index.js +29 -34
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.js +7 -15
- package/lib/ui/gamification/question/list/index.js +20 -57
- package/lib/ui/gamification/question/notification/index.js +22 -35
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/pill/index.js +7 -9
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
- package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
- package/lib/ui/gamification/question/notification/styles.js +17 -19
- package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
- package/lib/ui/gamification/question/styles.js +32 -34
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.js +8 -20
- package/lib/ui/gamification/question/twitter/styles.js +4 -6
- package/lib/ui/gamification/tabs/index.js +6 -7
- package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
- package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
- package/lib/ui/gamification/user-statistics/index.js +2 -6
- 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 +29 -33
- package/lib/ui/gamification/vote/feedback/styles.js +20 -23
- package/lib/ui/gamification/vote/index.d.ts +1 -0
- package/lib/ui/gamification/vote/index.js +123 -117
- package/lib/ui/gamification/vote/insight-details/index.js +9 -16
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +14 -8
- package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
- package/lib/ui/gamification/vote/vote-option/index.js +38 -41
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
- package/lib/ui/gamification/vote/win-bar/index.js +29 -37
- package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
- package/lib/ui/login/demo.d.ts +1 -0
- package/lib/ui/login/demo.js +5 -17
- package/lib/ui/login/index.js +29 -35
- package/lib/ui/modal/index.js +31 -32
- package/lib/ui/navigation/button/Channels.js +5 -8
- package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
- package/lib/ui/navigation/button/LeaderBoard.js +8 -11
- package/lib/ui/navigation/button/index.js +10 -11
- package/lib/ui/navigation/masters.js +2 -3
- package/lib/ui/questions/insight/index.js +14 -19
- package/lib/ui/questions/twitter/account/index.js +13 -15
- package/lib/ui/questions/twitter/account/styles.js +14 -16
- package/lib/ui/questions/twitter/index.js +31 -38
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +12 -10
- package/lib/ui/skeleton/index.js +3 -4
- package/lib/ui/theme/index.js +3 -5
- package/lib/ui/video-player/index.js +44 -38
- package/lib/utils/createDemo.js +18 -28
- package/lib/utils/debug/components/copyLogs.js +2 -3
- package/lib/utils/debug/components/developer.js +20 -24
- package/lib/utils/debug/components/eventInput.js +9 -10
- package/lib/utils/debug/components/sdkKey.js +9 -10
- package/lib/utils/debug/index.js +17 -28
- package/lib/utils/debug/storage.js +32 -14
- package/lib/utils/decorators/container.js +5 -9
- package/lib/utils/storage.js +32 -14
- package/package.json +25 -26
- package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
- package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
- /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
- /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
- /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { FeatureStatus as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as i } from "@nanostores/react";
|
|
3
|
+
import { useState as c, useEffect as f } from "react";
|
|
4
|
+
import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
|
|
5
5
|
import { FeatureType as S } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { Points as l } from "../../gamification/points/index.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import "@linaria/react";
|
|
14
|
-
import "../../icons/index.js";
|
|
15
|
-
const a = ({ gamification: r }) => {
|
|
16
|
-
const o = r.userSummary.$store, [t, i] = p(0);
|
|
17
|
-
return c(() => {
|
|
18
|
-
const n = o.subscribe((e) => {
|
|
19
|
-
var s;
|
|
20
|
-
(s = e == null ? void 0 : e.summary) != null && s.points && i(e.summary.points);
|
|
7
|
+
const a = ({ gamification: e }) => {
|
|
8
|
+
const s = e.userSummary.$store, [r, u] = c(0);
|
|
9
|
+
return f(() => {
|
|
10
|
+
const m = s.subscribe((t) => {
|
|
11
|
+
var o;
|
|
12
|
+
(o = t == null ? void 0 : t.summary) != null && o.points && u(t.summary.points);
|
|
21
13
|
});
|
|
22
14
|
return () => {
|
|
23
|
-
|
|
15
|
+
m();
|
|
24
16
|
};
|
|
25
|
-
}, [
|
|
26
|
-
|
|
17
|
+
}, [s]), /* @__PURE__ */ n(l, { points: r, onClick: () => {
|
|
18
|
+
e.status.get() === p.Suspended && e.openFeature();
|
|
27
19
|
} });
|
|
28
|
-
},
|
|
29
|
-
if (!
|
|
20
|
+
}, h = ({ sdk: e }) => {
|
|
21
|
+
if (!i(e.featuresList.getStore()))
|
|
30
22
|
return null;
|
|
31
|
-
const
|
|
32
|
-
return
|
|
23
|
+
const r = e.getFeature(S.GAMES);
|
|
24
|
+
return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
|
|
33
25
|
};
|
|
34
26
|
export {
|
|
35
|
-
|
|
27
|
+
h as StreamLayerSDKPoints
|
|
36
28
|
};
|
package/lib/ui/app/masters.js
CHANGED
|
@@ -1,229 +1,110 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import { useStore as C } from "@nanostores/react";
|
|
3
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 } from "react";
|
|
5
|
-
import { resetCss as
|
|
6
|
-
import { ActiveFeature as
|
|
7
|
-
import { MastersNavigation as
|
|
8
|
-
import { SDKNotifications as
|
|
9
|
-
import { SDKContainer as
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import "@streamlayer/sdk-web-types";
|
|
23
|
-
import "./Features/FeatureProvider.js";
|
|
24
|
-
import "@linaria/react";
|
|
25
|
-
import "./Features/Gamification/index.js";
|
|
26
|
-
import "../gamification/detail/header/index.js";
|
|
27
|
-
import "../gamification/constants.js";
|
|
28
|
-
import "../gamification/detail/header/styles.js";
|
|
29
|
-
import "../icons/index.js";
|
|
30
|
-
import "../gamification/user-statistics/index.js";
|
|
31
|
-
import "../skeleton/index.js";
|
|
32
|
-
import "../skeleton/styles.js";
|
|
33
|
-
import "../../utils/common.js";
|
|
34
|
-
import "../gamification/user-statistics/components/rank/index.js";
|
|
35
|
-
import "../gamification/user-statistics/components/rank/styles.js";
|
|
36
|
-
import "../gamification/user-statistics/components/statistic/index.js";
|
|
37
|
-
import "../gamification/user-statistics/components/statistic/styles.js";
|
|
38
|
-
import "../gamification/user-statistics/styles.js";
|
|
39
|
-
import "../modal/index.js";
|
|
40
|
-
import "../../index-jRXrW6ie.js";
|
|
41
|
-
import "../../index-uEuzH3jr.js";
|
|
42
|
-
import "../show-in/index.js";
|
|
43
|
-
import "@linaria/core";
|
|
44
|
-
import "./Features/Gamification/Question.js";
|
|
45
|
-
import "../gamification/detail/sponsor/index.js";
|
|
46
|
-
import "../gamification/vote/index.js";
|
|
47
|
-
import "../gamification/vote/expired-alert/index.js";
|
|
48
|
-
import "../gamification/vote/expired-alert/styles.js";
|
|
49
|
-
import "../gamification/vote/feedback/index.js";
|
|
50
|
-
import "../gamification/vote/feedback/styles.js";
|
|
51
|
-
import "../gamification/vote/styles.js";
|
|
52
|
-
import "../gamification/vote/vote-option/index.js";
|
|
53
|
-
import "../animated-counter/index.js";
|
|
54
|
-
import "react-countup";
|
|
55
|
-
import "../gamification/vote/vote-option/styles.js";
|
|
56
|
-
import "../gamification/vote/win-bar/index.js";
|
|
57
|
-
import "../timer/index.js";
|
|
58
|
-
import "react-countdown-circle-timer";
|
|
59
|
-
import "../gamification/vote/win-bar/styles.js";
|
|
60
|
-
import "../gamification/vote/insight-details/index.js";
|
|
61
|
-
import "../questions/insight/index.js";
|
|
62
|
-
import "../video-player/index.js";
|
|
63
|
-
import "../video-player/styles.js";
|
|
64
|
-
import "../questions/insight/styles.js";
|
|
65
|
-
import "../gamification/vote/insight-details/styles.js";
|
|
66
|
-
import "../gamification/vote/twitter-details/index.js";
|
|
67
|
-
import "../questions/twitter/index.js";
|
|
68
|
-
import "../questions/twitter/account/index.js";
|
|
69
|
-
import "../questions/twitter/account/styles.js";
|
|
70
|
-
import "../questions/twitter/styles.js";
|
|
71
|
-
import "../gamification/vote/twitter-details/styles.js";
|
|
72
|
-
import "./Features/Gamification/Tabs.js";
|
|
73
|
-
import "../gamification/tabs/index.js";
|
|
74
|
-
import "../gamification/tabs/styles.js";
|
|
75
|
-
import "./Features/Gamification/Leaderboard.js";
|
|
76
|
-
import "./useClipboardCopy.js";
|
|
77
|
-
import "../gamification/copyNotification/index.js";
|
|
78
|
-
import "../gamification/copyNotification/styles.js";
|
|
79
|
-
import "../gamification/invite-link/index.js";
|
|
80
|
-
import "../gamification/invite-link/styles.js";
|
|
81
|
-
import "react-virtualized-auto-sizer";
|
|
82
|
-
import "react-window";
|
|
83
|
-
import "react-window-infinite-loader";
|
|
84
|
-
import "../gamification/leaderboard/list-item/styles.js";
|
|
85
|
-
import "../../styles_z07sl8-w40geAFS.js";
|
|
86
|
-
import "../gamification/leaderboard/static.js";
|
|
87
|
-
import "react-infinite-scroller";
|
|
88
|
-
import "../gamification/leaderboard/list-item/index.js";
|
|
89
|
-
import "./Features/Gamification/Friends.js";
|
|
90
|
-
import "../gamification/onboarding/slides/onboarding-invite-card/index.js";
|
|
91
|
-
import "../gamification/onboarding/slides/onboarding-invite-card/styles.js";
|
|
92
|
-
import "./Features/Gamification/QuestionsList.js";
|
|
93
|
-
import "../gamification/question/list/index.js";
|
|
94
|
-
import "../gamification/question/index.js";
|
|
95
|
-
import "../gamification/question/styles.js";
|
|
96
|
-
import "../gamification/question/insight/index.js";
|
|
97
|
-
import "../gamification/question/insight/styles.js";
|
|
98
|
-
import "../gamification/question/twitter/index.js";
|
|
99
|
-
import "../gamification/question/twitter/styles.js";
|
|
100
|
-
import "../button/index.js";
|
|
101
|
-
import "../button/styles.js";
|
|
102
|
-
import "../gamification/question/list/styles.js";
|
|
103
|
-
import "./Features/Gamification/UserSummary.js";
|
|
104
|
-
import "../navigation/masters.js";
|
|
105
|
-
import "../navigation/index.js";
|
|
106
|
-
import "../navigation/button/index.js";
|
|
107
|
-
import "../navigation/button/styles.js";
|
|
108
|
-
import "@streamlayer/sdk-web-notifications";
|
|
109
|
-
import "../gamification/question/notification/index.js";
|
|
110
|
-
import "../gamification/question/notification/insight/index.js";
|
|
111
|
-
import "../gamification/question/notification/insight/styles.js";
|
|
112
|
-
import "../gamification/question/notification/styles.js";
|
|
113
|
-
import "../gamification/question/notification/tweet/index.js";
|
|
114
|
-
import "../gamification/question/notification/tweet/styles.js";
|
|
115
|
-
import "../gamification/question/notification/prediction-result/index.js";
|
|
116
|
-
import "../gamification/question/notification/prediction-result/animation-lines/index.js";
|
|
117
|
-
import "../gamification/question/notification/prediction-result/animation-lines/styles.js";
|
|
118
|
-
import "../gamification/question/notification/prediction-result/styles.js";
|
|
119
|
-
import "./Notifications/Onboarding/index.js";
|
|
120
|
-
import "./useImagesPreload.js";
|
|
121
|
-
import "../gamification/onboarding/index.js";
|
|
122
|
-
import "../gamification/onboarding/slides/onboarding-instructions/index.js";
|
|
123
|
-
import "../gamification/onboarding/invitingUser/index.js";
|
|
124
|
-
import "../gamification/onboarding/invitingUser/styles.js";
|
|
125
|
-
import "../gamification/onboarding/slides/onboarding-instructions/styles.js";
|
|
126
|
-
import "../gamification/onboarding/slides/onboarding-rules/index.js";
|
|
127
|
-
import "../gamification/onboarding/slides/onboarding-rules/styles.js";
|
|
128
|
-
import "../gamification/onboarding/slides/onboarding-terms/index.js";
|
|
129
|
-
import "../gamification/onboarding/slides/onboarding-terms/styles.js";
|
|
130
|
-
import "../gamification/onboarding/styles.js";
|
|
131
|
-
import "./Notifications/Onboarding/Notification/index.js";
|
|
132
|
-
import "./Notifications/Onboarding/Notification/styles.js";
|
|
133
|
-
import "./Notifications/styles.js";
|
|
134
|
-
import "../gamification/question/notification/pill/index.js";
|
|
135
|
-
import "../gamification/question/notification/pill/styles.js";
|
|
136
|
-
import "../../index-z0QjLiEL.js";
|
|
137
|
-
const V = ({ sdk: t, className: n, scrollStore: s, appNode: r, scrollNode: p, headerNode: i, responsiveStore: o }) => {
|
|
138
|
-
const [, l] = R(t);
|
|
139
|
-
return /* @__PURE__ */ m(
|
|
140
|
-
D,
|
|
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
|
+
return /* @__PURE__ */ n(
|
|
21
|
+
I,
|
|
141
22
|
{
|
|
142
|
-
className:
|
|
143
|
-
scrollNode:
|
|
144
|
-
appNode:
|
|
145
|
-
scrollStore:
|
|
146
|
-
feature:
|
|
147
|
-
headerNode: i,
|
|
23
|
+
className: i,
|
|
24
|
+
scrollNode: s,
|
|
25
|
+
appNode: t,
|
|
26
|
+
scrollStore: l,
|
|
27
|
+
feature: r,
|
|
148
28
|
responsiveStore: o,
|
|
149
|
-
sdk:
|
|
29
|
+
sdk: e
|
|
150
30
|
}
|
|
151
31
|
);
|
|
152
|
-
},
|
|
153
|
-
const
|
|
154
|
-
return
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
|
|
32
|
+
}, Y = ({ sdk: e, className: i, appNode: l, responsiveStore: t }) => {
|
|
33
|
+
const s = C(e.featuresList.getStore());
|
|
34
|
+
return s ? Array.from(s, (o) => {
|
|
35
|
+
const r = e.getFeature(o);
|
|
36
|
+
return r ? /* @__PURE__ */ n(
|
|
37
|
+
M,
|
|
158
38
|
{
|
|
159
|
-
className:
|
|
160
|
-
appNode:
|
|
161
|
-
feature:
|
|
162
|
-
responsiveStore:
|
|
163
|
-
sdk:
|
|
39
|
+
className: i,
|
|
40
|
+
appNode: l,
|
|
41
|
+
feature: r,
|
|
42
|
+
responsiveStore: t,
|
|
43
|
+
sdk: e
|
|
164
44
|
},
|
|
165
|
-
|
|
45
|
+
o
|
|
166
46
|
) : null;
|
|
167
47
|
}) : null;
|
|
168
|
-
},
|
|
169
|
-
const
|
|
170
|
-
d(
|
|
171
|
-
enabled:
|
|
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, {
|
|
51
|
+
enabled: a,
|
|
172
52
|
event: "scrollend",
|
|
173
53
|
listener: F,
|
|
174
54
|
useDomNode: !0
|
|
175
|
-
}), d(
|
|
176
|
-
enabled:
|
|
55
|
+
}), d(r, {
|
|
56
|
+
enabled: a,
|
|
177
57
|
event: "click",
|
|
178
58
|
listener: x,
|
|
179
59
|
useDomNode: !0
|
|
180
60
|
});
|
|
181
|
-
const L = b(() => ({ sdk:
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
|
|
61
|
+
const L = b(() => ({ sdk: e }), [e]);
|
|
62
|
+
return D(() => {
|
|
63
|
+
import("./Features/Gamification/gamification-feature.js");
|
|
64
|
+
}, []), /* @__PURE__ */ n(O.Provider, { value: L, children: /* @__PURE__ */ v(k, { ref: t, children: [
|
|
65
|
+
a && /* @__PURE__ */ n(
|
|
66
|
+
B,
|
|
185
67
|
{
|
|
186
|
-
ref:
|
|
68
|
+
ref: s,
|
|
187
69
|
sdkReady: c,
|
|
188
|
-
activeOverlay:
|
|
189
|
-
className:
|
|
70
|
+
activeOverlay: m,
|
|
71
|
+
className: p,
|
|
190
72
|
setActiveOverlay: (u) => h("", u),
|
|
191
73
|
scrollToTop: () => {
|
|
192
74
|
var u;
|
|
193
|
-
return (u =
|
|
75
|
+
return (u = r.current) == null ? void 0 : u.scrollTo(0, 0);
|
|
194
76
|
},
|
|
195
|
-
responsiveStore:
|
|
77
|
+
responsiveStore: o
|
|
196
78
|
}
|
|
197
79
|
),
|
|
198
|
-
/* @__PURE__ */ v(
|
|
199
|
-
c && /* @__PURE__ */
|
|
200
|
-
|
|
80
|
+
/* @__PURE__ */ v(E, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
|
|
81
|
+
c && /* @__PURE__ */ n(
|
|
82
|
+
j,
|
|
201
83
|
{
|
|
202
|
-
sdk:
|
|
203
|
-
scrollNode:
|
|
204
|
-
headerNode:
|
|
205
|
-
appNode:
|
|
206
|
-
scrollStore:
|
|
207
|
-
responsiveStore:
|
|
84
|
+
sdk: e,
|
|
85
|
+
scrollNode: r,
|
|
86
|
+
headerNode: s,
|
|
87
|
+
appNode: t,
|
|
88
|
+
scrollStore: f,
|
|
89
|
+
responsiveStore: o
|
|
208
90
|
}
|
|
209
91
|
),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
212
|
-
c &&
|
|
213
|
-
|
|
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,
|
|
214
96
|
{
|
|
215
|
-
scrollStore:
|
|
216
|
-
responsiveStore:
|
|
217
|
-
scrollNode:
|
|
218
|
-
appNode:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
sdk: t
|
|
97
|
+
scrollStore: f,
|
|
98
|
+
responsiveStore: o,
|
|
99
|
+
scrollNode: r,
|
|
100
|
+
appNode: t,
|
|
101
|
+
className: p,
|
|
102
|
+
sdk: e
|
|
222
103
|
}
|
|
223
104
|
),
|
|
224
|
-
c && /* @__PURE__ */
|
|
105
|
+
c && /* @__PURE__ */ n(Y, { responsiveStore: o, appNode: t, className: p, sdk: e })
|
|
225
106
|
] }),
|
|
226
|
-
|
|
107
|
+
a && !y && /* @__PURE__ */ n(
|
|
227
108
|
"div",
|
|
228
109
|
{
|
|
229
110
|
style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" },
|
|
@@ -233,5 +114,5 @@ const V = ({ sdk: t, className: n, scrollStore: s, appNode: r, scrollNode: p, he
|
|
|
233
114
|
] }) });
|
|
234
115
|
};
|
|
235
116
|
export {
|
|
236
|
-
|
|
117
|
+
ie as MastersApp
|
|
237
118
|
};
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { r as
|
|
2
|
+
import { useRef as l, useState as s, useCallback as p, useEffect as f } from "react";
|
|
3
|
+
import { r as m } from "../../index-Bicco-Aq.js";
|
|
4
4
|
import { CopyNotification as b } from "../gamification/copyNotification/index.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const t = p(), [c, o] = m(null), a = l(
|
|
11
|
-
async (i) => {
|
|
12
|
-
var e;
|
|
13
|
-
if (i && ((e = navigator == null ? void 0 : navigator.clipboard) != null && e.writeText)) {
|
|
5
|
+
const T = (r) => {
|
|
6
|
+
const t = l(), [i, o] = s(null), a = p(
|
|
7
|
+
async (e) => {
|
|
8
|
+
var c;
|
|
9
|
+
if (e && ((c = navigator == null ? void 0 : navigator.clipboard) != null && c.writeText)) {
|
|
14
10
|
t.current && (clearTimeout(t.current), o(null));
|
|
15
11
|
try {
|
|
16
|
-
await navigator.clipboard.writeText(
|
|
12
|
+
await navigator.clipboard.writeText(e), r.current && (o(m.createPortal(/* @__PURE__ */ u(b, {}), r.current)), t.current = setTimeout(() => {
|
|
17
13
|
o(null);
|
|
18
14
|
}, 1e3));
|
|
19
15
|
} catch (n) {
|
|
@@ -23,10 +19,10 @@ const h = (r) => {
|
|
|
23
19
|
},
|
|
24
20
|
[r]
|
|
25
21
|
);
|
|
26
|
-
return
|
|
22
|
+
return f(() => () => {
|
|
27
23
|
clearTimeout(t.current);
|
|
28
|
-
}, []), [a,
|
|
24
|
+
}, []), [a, i];
|
|
29
25
|
};
|
|
30
26
|
export {
|
|
31
|
-
|
|
27
|
+
T as useClipboardCopy
|
|
32
28
|
};
|
|
@@ -1,45 +1,35 @@
|
|
|
1
|
-
import { useStore as
|
|
2
|
-
import { useRef as y, useState as
|
|
3
|
-
import { FeatureType as
|
|
1
|
+
import { useStore as u } from "@nanostores/react";
|
|
2
|
+
import { useRef as y, useState as d, useCallback as z, useEffect as c } from "react";
|
|
3
|
+
import { FeatureType as l } from "@streamlayer/sdk-web-types";
|
|
4
4
|
import "./Navigation/MastersNavigation/index.js";
|
|
5
|
-
import { FeaturedGroupsButtonId as
|
|
5
|
+
import { FeaturedGroupsButtonId as p } from "../navigation/button/FeaturedGroups.js";
|
|
6
6
|
import { ChannelsButtonId as i } from "../navigation/button/Channels.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "@linaria/react";
|
|
10
|
-
import "../icons/index.js";
|
|
11
|
-
import "../navigation/button/index.js";
|
|
12
|
-
import "@linaria/core";
|
|
13
|
-
import "../navigation/button/styles.js";
|
|
14
|
-
import "../navigation/masters.js";
|
|
15
|
-
import "../navigation/index.js";
|
|
16
|
-
import "../theme/constants.js";
|
|
17
|
-
const j = (e) => {
|
|
18
|
-
const f = y(""), [S, o] = E(!1), g = v(e.status), a = v(e.userId()), l = v(e.getActiveFeature()), n = g === "ready", [m, r] = E(c), A = z(
|
|
7
|
+
const C = (e) => {
|
|
8
|
+
const f = y(""), [v, a] = d(!1), E = u(e.status), g = u(e.sdkStore.slStreamId), n = u(e.userId()), m = u(e.getActiveFeature()), o = E === "ready" && !!g.data, [A, r] = d(p), S = z(
|
|
19
9
|
(t, s) => {
|
|
20
|
-
r(s), t && e.createEventSession(t), s ===
|
|
21
|
-
e.openFeature(
|
|
10
|
+
r(s), t && e.createEventSession(t), s === p ? window.requestAnimationFrame(() => {
|
|
11
|
+
e.openFeature(l.GAMES);
|
|
22
12
|
}) : e.closeFeature(!1);
|
|
23
13
|
},
|
|
24
14
|
[e]
|
|
25
15
|
);
|
|
26
|
-
|
|
27
|
-
!
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
const t = e.getFeature(
|
|
16
|
+
c(() => {
|
|
17
|
+
!o && A === p && (r(i), e.closeFeature(!0));
|
|
18
|
+
}, [o, A, e]), c(() => {
|
|
19
|
+
m === l.GAMES ? r(p) : m === l.UNSET && r(i);
|
|
20
|
+
const t = e.getFeature(l.GAMES);
|
|
31
21
|
t && (t.closeQuestion(), t.closeUser());
|
|
32
|
-
}, [
|
|
22
|
+
}, [m, e]);
|
|
33
23
|
const F = (t) => {
|
|
34
|
-
f.current = t,
|
|
35
|
-
if (
|
|
36
|
-
|
|
24
|
+
f.current = t, a(!0), e.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: s, err: I }) => {
|
|
25
|
+
if (I) {
|
|
26
|
+
S(t, i);
|
|
37
27
|
return;
|
|
38
28
|
}
|
|
39
29
|
if (s) {
|
|
40
30
|
e.isUserAuthorized().then((h) => {
|
|
41
31
|
if (h) {
|
|
42
|
-
|
|
32
|
+
S(t, i);
|
|
43
33
|
return;
|
|
44
34
|
} else
|
|
45
35
|
e.disableApp();
|
|
@@ -47,32 +37,32 @@ const j = (e) => {
|
|
|
47
37
|
return;
|
|
48
38
|
}
|
|
49
39
|
});
|
|
50
|
-
},
|
|
51
|
-
|
|
40
|
+
}, b = () => {
|
|
41
|
+
a(!1), e.disableApp();
|
|
52
42
|
};
|
|
53
|
-
return
|
|
54
|
-
if (!
|
|
55
|
-
|
|
43
|
+
return c(() => {
|
|
44
|
+
if (!n) {
|
|
45
|
+
o && (r(i), e.disableApp());
|
|
56
46
|
return;
|
|
57
47
|
}
|
|
58
|
-
if (
|
|
48
|
+
if (n && f.current && v) {
|
|
59
49
|
e.initializeApp({ skipOrganizationSettings: !0 }).then(() => {
|
|
60
50
|
e.createEventSession(f.current);
|
|
61
51
|
});
|
|
62
52
|
return;
|
|
63
53
|
}
|
|
64
|
-
}, [
|
|
65
|
-
|
|
66
|
-
}, [
|
|
67
|
-
sdkEnabled:
|
|
68
|
-
sdkReady:
|
|
69
|
-
activeOverlay:
|
|
70
|
-
activateAndLoadOverlay:
|
|
54
|
+
}, [n]), c(() => () => {
|
|
55
|
+
a(!1), e.disableApp();
|
|
56
|
+
}, [a, e]), {
|
|
57
|
+
sdkEnabled: v,
|
|
58
|
+
sdkReady: o,
|
|
59
|
+
activeOverlay: A,
|
|
60
|
+
activateAndLoadOverlay: S,
|
|
71
61
|
activateEventWithId: F,
|
|
72
|
-
deactivate:
|
|
73
|
-
isLogged: !!
|
|
62
|
+
deactivate: b,
|
|
63
|
+
isLogged: !!n
|
|
74
64
|
};
|
|
75
65
|
};
|
|
76
66
|
export {
|
|
77
|
-
|
|
67
|
+
C as useMastersApp
|
|
78
68
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import c from "lodash.throttle";
|
|
2
2
|
import { useState as m, useEffect as u } from "react";
|
|
3
3
|
import { BREAKPOINTS as r } from "../theme/constants.js";
|
|
4
|
-
import { m as
|
|
5
|
-
import "../../index-uEuzH3jr.js";
|
|
4
|
+
import { m as l } from "../../index-CZvwzN5o.js";
|
|
6
5
|
const d = Object.keys(r), i = () => {
|
|
7
|
-
const
|
|
6
|
+
const n = window.innerWidth;
|
|
8
7
|
let e = "sm";
|
|
9
|
-
for (let
|
|
10
|
-
const s = d[
|
|
11
|
-
if (!(
|
|
8
|
+
for (let t = d.length - 1; t > 0; t--) {
|
|
9
|
+
const s = d[t];
|
|
10
|
+
if (!(n < r[s]) && n >= r[s]) {
|
|
12
11
|
e = s;
|
|
13
12
|
break;
|
|
14
13
|
}
|
|
@@ -17,30 +16,30 @@ const d = Object.keys(r), i = () => {
|
|
|
17
16
|
name: e,
|
|
18
17
|
size: r[e]
|
|
19
18
|
};
|
|
20
|
-
}, w = (
|
|
19
|
+
}, w = (n) => {
|
|
21
20
|
var e;
|
|
22
|
-
return (((e =
|
|
23
|
-
}, k = (
|
|
21
|
+
return (((e = n.current) == null ? void 0 : e.getBoundingClientRect().y) || 0) < -68;
|
|
22
|
+
}, k = (n) => n >= r.xl, v = (n) => {
|
|
24
23
|
const [e] = m(() => {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
24
|
+
const t = i();
|
|
25
|
+
return l({
|
|
27
26
|
screen: i(),
|
|
28
|
-
sdkInView: w(
|
|
29
|
-
sdkInDesktopView: k(
|
|
27
|
+
sdkInView: w(n),
|
|
28
|
+
sdkInDesktopView: k(t.size)
|
|
30
29
|
});
|
|
31
30
|
});
|
|
32
31
|
return u(() => {
|
|
33
|
-
const
|
|
34
|
-
e.setKey("sdkInView", w(
|
|
32
|
+
const t = c(() => {
|
|
33
|
+
e.setKey("sdkInView", w(n));
|
|
35
34
|
}, 200), s = c(() => {
|
|
36
35
|
const o = i();
|
|
37
36
|
e.setKey("screen", o), e.setKey("sdkInDesktopView", k(o.size));
|
|
38
37
|
}, 200);
|
|
39
|
-
return window.addEventListener("scroll",
|
|
40
|
-
window.removeEventListener("scroll",
|
|
38
|
+
return window.addEventListener("scroll", t), window.addEventListener("resize", s), () => {
|
|
39
|
+
window.removeEventListener("scroll", t), window.removeEventListener("resize", s);
|
|
41
40
|
};
|
|
42
|
-
}, [e,
|
|
41
|
+
}, [e, n]), [e];
|
|
43
42
|
};
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
v as useSdkResponsive
|
|
46
45
|
};
|