@streamlayer/react-ui 1.14.3 → 1.16.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.js +1 -1
- package/lib/app/app/Features/FeatureProvider.js +1 -1
- package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
- package/lib/app/app/Features/Gamification/Question.js +1 -1
- package/lib/app/app/Features/Gamification/QuestionsList.js +3 -3
- package/lib/app/app/Features/Gamification/Tabs.js +2 -2
- package/lib/app/app/Features/Gamification/index.js +1 -1
- package/lib/app/app/InApp/index.d.ts +4 -0
- package/lib/app/app/InApp/index.js +31 -0
- package/lib/app/app/Insight/index.js +1 -1
- package/lib/app/app/Navigation/index.js +1 -1
- package/lib/app/app/Notifications/Onboarding/index.js +79 -73
- package/lib/app/app/Notifications/index.js +1 -1
- package/lib/app/app/Points/index.js +5 -5
- package/lib/app/app/index.js +17 -17
- package/lib/app/app/story/index.d.ts +0 -1
- package/lib/app/app/story/index.js +39 -50
- package/lib/app/app/story/styles.d.ts +1 -0
- package/lib/app/app/story/styles.js +9 -4
- package/lib/app/app/story/video.js +28 -25
- package/lib/app/app/useApp.d.ts +1 -2
- package/lib/app/app/useApp.js +1 -1
- package/lib/app/login/demo.js +1 -1
- package/lib/app/masters/Features/FeatureProvider.js +1 -1
- package/lib/app/masters/Features/Gamification/Leaderboard.js +4 -3
- package/lib/app/masters/Features/Gamification/Question.js +1 -1
- package/lib/app/masters/Features/Gamification/QuestionsList.js +3 -3
- package/lib/app/masters/Features/Gamification/Tabs.js +4 -4
- package/lib/app/masters/Features/Gamification/index.js +1 -1
- package/lib/app/masters/Navigation/MastersNavigation/index.js +4 -4
- package/lib/app/masters/Notifications/Onboarding/index.js +5 -5
- package/lib/app/masters/Notifications/index.js +1 -1
- package/lib/app/masters/Points/index.js +5 -5
- package/lib/app/masters/masters.js +16 -16
- package/lib/app/masters/useMastersApp.js +7 -7
- package/lib/app/masters/useSdkScroll.js +7 -7
- package/lib/app/useSdkFeature.js +1 -1
- package/lib/app/useSdkScroll.js +7 -7
- package/lib/assets/style.css +1 -1
- package/lib/ui/close-btn/index.d.ts +1 -1
- package/lib/ui/gamification/constants.d.ts +1 -0
- package/lib/ui/gamification/constants.js +11 -2
- package/lib/ui/gamification/points/index.js +7 -7
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +61 -0
- package/lib/ui/gamification/question/inapp/notification/index.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/notification/index.js +38 -0
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/notification/styles.js +40 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.d.ts +2 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/index.js +24 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/notification/tweet/styles.js +24 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/onboarding/index.js +50 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/onboarding/styles.js +51 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.d.ts +6 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +57 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +59 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.js +26 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.js +38 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.js +33 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +3 -0
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result/index.js +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result/styles.js +9 -0
- package/lib/ui/gamification/question/index.d.ts +10 -1
- package/lib/ui/gamification/question/index.js +45 -36
- package/lib/ui/icons/index.d.ts +2 -3
- package/lib/ui/icons/index.js +72 -63
- package/lib/ui/questions/twitter/account/index.js +17 -17
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +2 -1
- package/lib/ui/theme/constants.d.ts +6 -0
- package/lib/ui/theme/constants.js +20 -14
- package/lib/ui/theme/index.d.ts +1 -0
- package/lib/ui/theme/index.js +4 -4
- package/lib/ui/theme/theme.js +2 -2
- package/lib/utils/debug/components/eventInput.js +1 -1
- package/lib/utils/decorators/container.js +10 -6
- package/lib/utils/decorators/styles.js +7 -2
- package/package.json +20 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { cx as b } from "@linaria/core";
|
|
3
3
|
import { styled as L } from "@linaria/react";
|
|
4
|
-
import { useStore as g } from "@nanostores/react";
|
|
5
4
|
import { useAnalyticsListener as P } from "../../../hooks/analytics.js";
|
|
6
5
|
import { useEffect as w, useRef as I } from "react";
|
|
6
|
+
import { useStore as g } from "@streamlayer/react-polyfills";
|
|
7
7
|
import { eventBus as A } from "@streamlayer/sdk-web-interfaces";
|
|
8
8
|
import { FeatureType as E, NotificationPromotionMode as T, PromotionType as U } from "@streamlayer/sdk-web-types";
|
|
9
9
|
import { AdvertisementUI as N } from "../../../ui/advertisement/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as u } from "@linaria/react";
|
|
3
|
-
import { useStore as i } from "@
|
|
3
|
+
import { useStore as i } from "@streamlayer/react-polyfills";
|
|
4
4
|
import { FeatureStatus as c } from "@streamlayer/sdk-web-interfaces";
|
|
5
5
|
const o = /* @__PURE__ */ u("div")({
|
|
6
6
|
name: "LoadingContainer",
|
|
@@ -1,12 +1,13 @@
|
|
|
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
|
-
import { useStore as i } from "@nanostores/react";
|
|
4
3
|
import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
|
|
5
4
|
import { useRef as u } from "react";
|
|
5
|
+
import { useStore as n } from "@streamlayer/react-polyfills";
|
|
6
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 "@storybook/blocks";
|
|
10
11
|
import "../../../../ui/icons/index.js";
|
|
11
12
|
import "../../../../ui/gamification/leaderboard/list-item/styles.js";
|
|
12
13
|
/* empty css */
|
|
@@ -16,24 +17,24 @@ const C = /* @__PURE__ */ h("div")({
|
|
|
16
17
|
name: "InviteLinkContainer",
|
|
17
18
|
class: "i1odbhm4",
|
|
18
19
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
20
|
+
}), z = ({
|
|
20
21
|
gamification: e,
|
|
21
22
|
scrollNode: s,
|
|
22
23
|
scrollStore: p
|
|
23
24
|
}) => {
|
|
24
25
|
const t = u(null), {
|
|
25
|
-
data:
|
|
26
|
+
data: i,
|
|
26
27
|
hasMore: d,
|
|
27
28
|
loading: m,
|
|
28
29
|
key: l
|
|
29
|
-
} =
|
|
30
|
+
} = n(e.leaderboardList.$store), {
|
|
30
31
|
data: o
|
|
31
|
-
} =
|
|
32
|
-
return !
|
|
32
|
+
} = n(e.deepLink.$store), [a, c] = k(t);
|
|
33
|
+
return !i.length && !m ? /* @__PURE__ */ r(y, {
|
|
33
34
|
deepLink: o
|
|
34
35
|
}) : /* @__PURE__ */ f(L, {
|
|
35
36
|
children: [/* @__PURE__ */ r(b, {
|
|
36
|
-
items:
|
|
37
|
+
items: i,
|
|
37
38
|
scrollNode: s,
|
|
38
39
|
scrollStore: p,
|
|
39
40
|
fetchMore: e.leaderboardList.fetchMore,
|
|
@@ -51,5 +52,5 @@ const C = /* @__PURE__ */ h("div")({
|
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
z as Leaderboard
|
|
55
56
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as y, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as v } from "@linaria/react";
|
|
3
|
-
import { useStore as d } from "@nanostores/react";
|
|
4
3
|
import { useAppContext as T } from "../../useAppContext.js";
|
|
4
|
+
import { useStore as d } from "@streamlayer/react-polyfills";
|
|
5
5
|
import { QuestionType as V } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { VoteHeader as h } from "../../../../ui/gamification/detail/header/index.js";
|
|
7
7
|
import { Sponsor as x } from "../../../../ui/gamification/detail/sponsor/index.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useAppContext as i } from "../../useAppContext.js";
|
|
3
|
+
import { useStore as n } from "@streamlayer/react-polyfills";
|
|
4
4
|
import { QuestionList as m } from "../../../../ui/gamification/question/list/index.js";
|
|
5
5
|
const a = ({ store: t, openQuestion: r }) => {
|
|
6
|
-
const { sdk: o } =
|
|
6
|
+
const { sdk: o } = i(), e = n(t);
|
|
7
7
|
return /* @__PURE__ */ s(m, { openQuestion: r, questions: e.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as f, jsx as e, Fragment as D } from "react/jsx-runtime";
|
|
2
2
|
import { cx as C } from "@linaria/core";
|
|
3
|
-
import { useStore as c } from "@nanostores/react";
|
|
4
3
|
import { TabsContainer as S, TabsNavContainer as E, SDKSummaryContainer as v, UserSummaryContainer as A, SDKContentContainer as I, LeaderboardContainer as L } from "../../styles.js";
|
|
5
4
|
import { scrollIntoAppView as P } from "../../../useSdkScroll.js";
|
|
6
|
-
import { useState as V,
|
|
5
|
+
import { useState as V, useEffect as l } from "react";
|
|
6
|
+
import { useStore as c, useTransition as K } from "@streamlayer/react-polyfills";
|
|
7
7
|
import { ActivePages as n, Tabs as F } from "../../../../ui/gamification/tabs/index.js";
|
|
8
8
|
import { Leaderboard as O } from "./Leaderboard.js";
|
|
9
9
|
import { QuestionsList as H } from "./QuestionsList.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { cx as l } from "@linaria/core";
|
|
3
3
|
import { styled as f } from "@linaria/react";
|
|
4
|
-
import { useStore as c } from "@nanostores/react";
|
|
5
4
|
import { SDKWhiteContainer as k } from "../../styles.js";
|
|
6
5
|
import { useAppContext as v } from "../../useAppContext.js";
|
|
7
6
|
import { useHideTransition as S } from "../../../../hooks/showIn.js";
|
|
7
|
+
import { useStore as c } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { VoteHeader as U } from "../../../../ui/gamification/detail/header/index.js";
|
|
9
9
|
import { UserStatistics as I } from "../../../../ui/gamification/user-statistics/index.js";
|
|
10
10
|
import { ModalPortal as y } from "../../../../ui/modal/index.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useMemo as c, useEffect as s } from "react";
|
|
3
|
+
import { useStore as u } from "@streamlayer/react-polyfills";
|
|
4
|
+
import { eventBus as f } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
import { NotificationType as n } from "@streamlayer/sdk-web-notifications";
|
|
6
|
+
import { FeatureType as m, QuestionType as d } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { InAppNotification as l } from "../../../ui/gamification/question/inapp/notification/index.js";
|
|
8
|
+
import { InAppOnboarding as y } from "../../../ui/gamification/question/inapp/onboarding/index.js";
|
|
9
|
+
import { InAppPredictionResult as I } from "../../../ui/gamification/question/inapp/prediction-result/index.js";
|
|
10
|
+
const R = ({ sdk: o }) => {
|
|
11
|
+
const [r] = p(o.getNotificationsStore()), a = u(r), e = o.getFeature(m.GAMES), t = c(() => o.getActiveNotification(), [o, a]);
|
|
12
|
+
return s(() => {
|
|
13
|
+
t && f.emit("notification", {
|
|
14
|
+
action: "rendered",
|
|
15
|
+
payload: {
|
|
16
|
+
questionId: t.data.questionId,
|
|
17
|
+
questionType: t.data.questionType
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}, [t]), t && t.type === n.QUESTION_RESOLVED ? t.data.question && t.data.questionType === d.PREDICTION ? /* @__PURE__ */ i(
|
|
21
|
+
I,
|
|
22
|
+
{
|
|
23
|
+
action: t.action,
|
|
24
|
+
close: t.close,
|
|
25
|
+
...t.data.question
|
|
26
|
+
}
|
|
27
|
+
) : null : t && t.type === n.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ i(y, { open: e == null ? void 0 : e.openFeature, close: t.close, ...t.data.onboarding }) : null : t && /* @__PURE__ */ i(l, { ...t.data, action: t.action });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
R as StreamLayerSDKNotification
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { styled as i } from "@linaria/react";
|
|
3
|
-
import { useStore as Q } from "@nanostores/react";
|
|
4
3
|
import { useRef as l, useEffect as m } from "react";
|
|
4
|
+
import { useStore as Q } from "@streamlayer/react-polyfills";
|
|
5
5
|
import { FeatureType as S } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { Question as y } from "../Features/Gamification/Question.js";
|
|
7
7
|
const I = () => y, b = /* @__PURE__ */ i(I())({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cx as S } from "@linaria/core";
|
|
3
3
|
import { styled as n } from "@linaria/react";
|
|
4
|
-
import { useStore as v } from "@nanostores/react";
|
|
5
4
|
import { forwardRef as y, useMemo as u } from "react";
|
|
5
|
+
import { useStore as v } from "@streamlayer/react-polyfills";
|
|
6
6
|
import { AvailableFeatures as b } from "@streamlayer/sdk-web-features";
|
|
7
7
|
import { FeatureType as C } from "@streamlayer/sdk-web-types";
|
|
8
8
|
import { SvgIcon as h } from "../../../ui/icons/index.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { FeatureType as
|
|
8
|
-
import { OnboardingUI as
|
|
9
|
-
import { ModalPortal as
|
|
10
|
-
import { ShowIn as
|
|
11
|
-
import { Onboarding as
|
|
1
|
+
import { jsx as n, jsxs as w, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { styled as y } from "@linaria/react";
|
|
3
|
+
import { useImagesPreload as _ } from "../../../useImagesPreload.js";
|
|
4
|
+
import { scrollIntoAppView as E } from "../../../useSdkScroll.js";
|
|
5
|
+
import { useRef as M, useState as T, useMemo as A, useLayoutEffect as R, useEffect as V } from "react";
|
|
6
|
+
import { useStore as F } from "@streamlayer/react-polyfills";
|
|
7
|
+
import { FeatureType as W } from "@streamlayer/sdk-web-types";
|
|
8
|
+
import { OnboardingUI as $ } from "../../../../ui/gamification/onboarding/index.js";
|
|
9
|
+
import { ModalPortal as j } from "../../../../ui/modal/index.js";
|
|
10
|
+
import { ShowIn as P } from "../../../../ui/show-in/index.js";
|
|
11
|
+
import { Onboarding as L } from "./Notification/index.js";
|
|
12
12
|
const C = [{
|
|
13
13
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
|
|
14
14
|
tagline: "",
|
|
15
|
-
headline: /* @__PURE__ */
|
|
16
|
-
children: ["Welcome to ", /* @__PURE__ */
|
|
15
|
+
headline: /* @__PURE__ */ w(O, {
|
|
16
|
+
children: ["Welcome to ", /* @__PURE__ */ n("br", {}), " Live Challenge"]
|
|
17
17
|
})
|
|
18
18
|
}, {
|
|
19
19
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
|
|
@@ -21,43 +21,48 @@ const C = [{
|
|
|
21
21
|
}, {
|
|
22
22
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
|
|
23
23
|
headline: "Win points and play against friends."
|
|
24
|
-
}],
|
|
24
|
+
}], q = /* @__PURE__ */ y("div")({
|
|
25
25
|
name: "OnboardingContainer",
|
|
26
26
|
class: "o1xni1kr",
|
|
27
27
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
28
|
+
}), z = () => P, D = /* @__PURE__ */ y(z())({
|
|
29
29
|
name: "OnboardingNotificationContainer",
|
|
30
30
|
class: "o1vnouv7",
|
|
31
31
|
propsAsIs: !0
|
|
32
|
-
}),
|
|
32
|
+
}), x = /* @__PURE__ */ y("div")({
|
|
33
33
|
name: "InnerContainer",
|
|
34
34
|
class: "i59uefw",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
36
|
+
}), G = /* @__PURE__ */ y("div")({
|
|
37
|
+
name: "OnboardingOverlap",
|
|
38
|
+
class: "ovnr8ov",
|
|
39
|
+
propsAsIs: !1
|
|
40
|
+
}), U = ({
|
|
37
41
|
deepLink: l,
|
|
38
42
|
onboardingOpts: e,
|
|
39
43
|
notification: o,
|
|
40
|
-
gamification:
|
|
44
|
+
gamification: p,
|
|
41
45
|
loading: s,
|
|
42
|
-
sdk: d
|
|
46
|
+
sdk: d,
|
|
47
|
+
throttled: I
|
|
43
48
|
}) => {
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
var
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
+
var a, b, h, f, v, t, u;
|
|
50
|
+
const c = F(p.friends.getStore()), [r, k] = T(void 0), g = A(() => {
|
|
51
|
+
var m, S;
|
|
52
|
+
const i = d.getInviter();
|
|
53
|
+
return i ? (S = (m = c.data) == null ? void 0 : m.find(({
|
|
49
54
|
slId: B
|
|
50
|
-
}) => B ===
|
|
51
|
-
}, [
|
|
52
|
-
return
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
+
}) => B === i)) == null ? void 0 : S.name : "";
|
|
56
|
+
}, [c.data, d]);
|
|
57
|
+
return V(() => {
|
|
58
|
+
const i = l.$store.subscribe((m) => {
|
|
59
|
+
m && k(m.data);
|
|
55
60
|
});
|
|
56
61
|
return () => {
|
|
57
|
-
|
|
62
|
+
i();
|
|
58
63
|
};
|
|
59
|
-
}, [l.$store]), /* @__PURE__ */
|
|
60
|
-
children: /* @__PURE__ */
|
|
64
|
+
}, [l.$store]), /* @__PURE__ */ w(q, {
|
|
65
|
+
children: [/* @__PURE__ */ n($, {
|
|
61
66
|
loading: s,
|
|
62
67
|
rules: [{
|
|
63
68
|
label: "Answer as many questions as you like.",
|
|
@@ -69,94 +74,95 @@ const C = [{
|
|
|
69
74
|
label: "Top the leader board and best your friends.",
|
|
70
75
|
icon: "icon-trophy"
|
|
71
76
|
}],
|
|
72
|
-
rulesBtnLabel: (
|
|
73
|
-
rulesTitle: (
|
|
77
|
+
rulesBtnLabel: (a = e.rules) == null ? void 0 : a.buttonLabel,
|
|
78
|
+
rulesTitle: (b = e.rules) == null ? void 0 : b.heading,
|
|
74
79
|
termsTitle: "Terms and Conditions",
|
|
75
|
-
termsText: (
|
|
80
|
+
termsText: (h = e.rules) == null ? void 0 : h.terms,
|
|
76
81
|
steps: C,
|
|
77
|
-
primaryColor: (
|
|
78
|
-
inviteLink:
|
|
79
|
-
inviteCardTitle: (
|
|
80
|
-
inviteCardSubtext: (
|
|
81
|
-
inviteCardBtnLabel: (
|
|
82
|
+
primaryColor: (f = e.inviteCard) == null ? void 0 : f.iconColor,
|
|
83
|
+
inviteLink: r,
|
|
84
|
+
inviteCardTitle: (v = e.inviteCard) == null ? void 0 : v.heading,
|
|
85
|
+
inviteCardSubtext: (t = e.inviteCard) == null ? void 0 : t.subtext,
|
|
86
|
+
inviteCardBtnLabel: (u = e.inviteCard) == null ? void 0 : u.buttonLabel,
|
|
82
87
|
onClose: () => {
|
|
83
|
-
var
|
|
84
|
-
(
|
|
88
|
+
var i;
|
|
89
|
+
(i = o.close) == null || i.call(o);
|
|
85
90
|
},
|
|
86
|
-
gamification:
|
|
91
|
+
gamification: p,
|
|
87
92
|
sdk: d,
|
|
88
|
-
inviterName:
|
|
89
|
-
})
|
|
93
|
+
inviterName: g
|
|
94
|
+
}), I && /* @__PURE__ */ n(G, {})]
|
|
90
95
|
});
|
|
91
|
-
},
|
|
96
|
+
}, te = ({
|
|
92
97
|
sdk: l,
|
|
93
98
|
notification: e,
|
|
94
99
|
saveHeight: o,
|
|
95
|
-
style:
|
|
100
|
+
style: p,
|
|
96
101
|
appNode: s,
|
|
97
102
|
sdkInDesktopView: d,
|
|
98
|
-
responsiveStore:
|
|
103
|
+
responsiveStore: I
|
|
99
104
|
}) => {
|
|
100
|
-
const
|
|
101
|
-
graphicSrc:
|
|
102
|
-
}) =>
|
|
105
|
+
const c = M(null), r = e.data.onboarding, [k, g] = T(r == null ? void 0 : r.instantOpen), a = l.getFeature(W.GAMES), b = A(() => C == null ? void 0 : C.map(({
|
|
106
|
+
graphicSrc: t
|
|
107
|
+
}) => t), []), {
|
|
103
108
|
screen: h
|
|
104
|
-
} =
|
|
109
|
+
} = F(I, {
|
|
105
110
|
keys: ["screen"]
|
|
106
111
|
});
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
o(((
|
|
112
|
+
R(() => {
|
|
113
|
+
var t;
|
|
114
|
+
o(((t = c.current) == null ? void 0 : t.getBoundingClientRect().height) || 0);
|
|
110
115
|
}, [o]);
|
|
111
116
|
const {
|
|
112
117
|
loading: f,
|
|
113
118
|
throttled: v
|
|
114
|
-
} =
|
|
115
|
-
return
|
|
119
|
+
} = _(b);
|
|
120
|
+
return k && a && r && s.current ? /* @__PURE__ */ n(j, {
|
|
116
121
|
container: s,
|
|
117
122
|
useContainer: !d,
|
|
118
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ n(U, {
|
|
124
|
+
throttled: v,
|
|
119
125
|
notification: e,
|
|
120
|
-
setOpened:
|
|
126
|
+
setOpened: g,
|
|
121
127
|
gamification: a,
|
|
122
|
-
onboardingOpts:
|
|
128
|
+
onboardingOpts: r,
|
|
123
129
|
deepLink: a.deepLink,
|
|
124
130
|
loading: f,
|
|
125
131
|
renderToNode: s,
|
|
126
132
|
sdk: l
|
|
127
133
|
})
|
|
128
|
-
}) : /* @__PURE__ */
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
ref:
|
|
134
|
+
}) : /* @__PURE__ */ w(O, {
|
|
135
|
+
children: [/* @__PURE__ */ n(x, {
|
|
136
|
+
ref: c,
|
|
131
137
|
style: {
|
|
132
138
|
position: "absolute",
|
|
133
139
|
visibility: "hidden"
|
|
134
140
|
},
|
|
135
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ n(L, {
|
|
136
142
|
close: () => {
|
|
137
143
|
},
|
|
138
144
|
action: () => {
|
|
139
145
|
},
|
|
140
|
-
onboarding:
|
|
146
|
+
onboarding: r
|
|
141
147
|
})
|
|
142
|
-
}), /* @__PURE__ */
|
|
143
|
-
style:
|
|
148
|
+
}), /* @__PURE__ */ n(D, {
|
|
149
|
+
style: p,
|
|
144
150
|
hiding: e.hiding,
|
|
145
|
-
children: /* @__PURE__ */
|
|
146
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ n(x, {
|
|
152
|
+
children: /* @__PURE__ */ n(L, {
|
|
147
153
|
close: e.close,
|
|
148
154
|
action: () => {
|
|
149
|
-
var
|
|
150
|
-
|
|
155
|
+
var u;
|
|
156
|
+
g(!0), (((u = s.current) == null ? void 0 : u.getBoundingClientRect().y) || 0) < 0 && E(s, h.size, {
|
|
151
157
|
behavior: "smooth"
|
|
152
158
|
});
|
|
153
159
|
},
|
|
154
|
-
onboarding:
|
|
160
|
+
onboarding: r
|
|
155
161
|
})
|
|
156
162
|
})
|
|
157
163
|
})]
|
|
158
164
|
});
|
|
159
165
|
};
|
|
160
166
|
export {
|
|
161
|
-
|
|
167
|
+
te as Onboarding
|
|
162
168
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as k, Fragment as b, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { cx as V } from "@linaria/core";
|
|
3
|
-
import { useStore as y } from "@nanostores/react";
|
|
4
3
|
import { useAppContext as O } from "../useAppContext.js";
|
|
5
4
|
import { scrollIntoAppView as T } from "../../useSdkScroll.js";
|
|
6
5
|
import { useState as I, useMemo as D, useEffect as a, useRef as E, useCallback as w } from "react";
|
|
7
6
|
import { r as R } from "../../../index-B1QdimmR.js";
|
|
7
|
+
import { useStore as y } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
|
|
9
9
|
import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
|
|
10
10
|
import { QuestionTypeData as C } from "../../../ui/gamification/constants.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useState as f, useEffect as c } from "react";
|
|
3
|
+
import { useStore as l } from "@streamlayer/react-polyfills";
|
|
4
4
|
import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
|
|
5
5
|
import { FeatureType as p } from "@streamlayer/sdk-web-types";
|
|
6
6
|
import { Points as S } from "../../../ui/gamification/points/index.js";
|
|
7
7
|
const a = ({ gamification: e }) => {
|
|
8
|
-
const s = e.userSummary.$store, [r, m] =
|
|
9
|
-
return
|
|
8
|
+
const s = e.userSummary.$store, [r, m] = f(0);
|
|
9
|
+
return c(() => {
|
|
10
10
|
const i = s.subscribe((t) => {
|
|
11
11
|
var o;
|
|
12
12
|
(o = t == null ? void 0 : t.summary) != null && o.points && m(t.summary.points);
|
|
@@ -18,7 +18,7 @@ const a = ({ gamification: e }) => {
|
|
|
18
18
|
e.status.get() === u.Suspended ? e.openFeature() : e.status.get() === u.Ready && e.closeFeature(!1);
|
|
19
19
|
} });
|
|
20
20
|
}, k = ({ sdk: e }) => {
|
|
21
|
-
if (!
|
|
21
|
+
if (!l(e.featuresList.getStore()))
|
|
22
22
|
return null;
|
|
23
23
|
const r = e.getFeature(p.GAMES);
|
|
24
24
|
return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
|
package/lib/app/app/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as l, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { cx as v } from "@linaria/core";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { SDKContainer as N, SDKScrollContainer as A } from "./styles.js";
|
|
4
|
+
import { useSdkFeature as F } from "../useSdkFeature.js";
|
|
5
|
+
import { useSdkResponsive as x } from "../useSdkResponsive.js";
|
|
6
|
+
import { useSdkScroll as D } from "../useSdkScroll.js";
|
|
7
|
+
import { useAnalyticsListener as u, newTabLinkListener as L, appScrollListener as g, appClickListener as C } from "../../hooks/analytics.js";
|
|
8
|
+
import { useRef as p, useMemo as b, useEffect as y } from "react";
|
|
9
|
+
import { useStore as K } from "@streamlayer/react-polyfills";
|
|
10
10
|
import { resetCss as c } from "../../ui/theme/theme.js";
|
|
11
11
|
import { ActiveFeature as j, StandaloneFeature as R } from "./Features/index.js";
|
|
12
12
|
import { SDKNavigation as w, SDKHeader as E } from "./Navigation/index.js";
|
|
@@ -21,7 +21,7 @@ const M = ({
|
|
|
21
21
|
scrollNode: s,
|
|
22
22
|
responsiveStore: t
|
|
23
23
|
}) => {
|
|
24
|
-
const [, a] =
|
|
24
|
+
const [, a] = F(e);
|
|
25
25
|
return /* @__PURE__ */ l(j, {
|
|
26
26
|
className: n,
|
|
27
27
|
scrollNode: s,
|
|
@@ -37,7 +37,7 @@ const M = ({
|
|
|
37
37
|
appNode: r,
|
|
38
38
|
responsiveStore: i
|
|
39
39
|
}) => {
|
|
40
|
-
const s =
|
|
40
|
+
const s = K(e.featuresList.getStore());
|
|
41
41
|
return s ? Array.from(s, (t) => {
|
|
42
42
|
const a = e.getFeature(t);
|
|
43
43
|
return a ? /* @__PURE__ */ l(R, {
|
|
@@ -52,7 +52,7 @@ const M = ({
|
|
|
52
52
|
sdk: e,
|
|
53
53
|
topNavigation: n
|
|
54
54
|
}) => {
|
|
55
|
-
const r = p(null), i = p(null), [s] =
|
|
55
|
+
const r = p(null), i = p(null), [s] = x(r), [t, a] = D(r, s), {
|
|
56
56
|
sdkReady: d,
|
|
57
57
|
activeFeature: m,
|
|
58
58
|
isLogged: S
|
|
@@ -60,27 +60,27 @@ const M = ({
|
|
|
60
60
|
u(r, {
|
|
61
61
|
enabled: o,
|
|
62
62
|
event: "click",
|
|
63
|
-
listener:
|
|
63
|
+
listener: L
|
|
64
64
|
}), u(t, {
|
|
65
65
|
enabled: o,
|
|
66
66
|
event: "scrollend",
|
|
67
|
-
listener:
|
|
67
|
+
listener: g,
|
|
68
68
|
useDomNode: !0
|
|
69
69
|
}), u(t, {
|
|
70
70
|
enabled: o,
|
|
71
71
|
event: "click",
|
|
72
|
-
listener:
|
|
72
|
+
listener: C,
|
|
73
73
|
useDomNode: !0
|
|
74
74
|
});
|
|
75
|
-
const h =
|
|
75
|
+
const h = b(() => ({
|
|
76
76
|
sdk: e,
|
|
77
77
|
topNavigation: n
|
|
78
78
|
}), [e, n]);
|
|
79
|
-
return
|
|
79
|
+
return y(() => {
|
|
80
80
|
import("./Features/Gamification/gamification-feature.js");
|
|
81
81
|
}, []), /* @__PURE__ */ l(I.Provider, {
|
|
82
82
|
value: h,
|
|
83
|
-
children: /* @__PURE__ */ f(
|
|
83
|
+
children: /* @__PURE__ */ f(N, {
|
|
84
84
|
ref: r,
|
|
85
85
|
className: n ? "" : "c10llmat",
|
|
86
86
|
children: [o && n && /* @__PURE__ */ l(w, {
|
|
@@ -91,7 +91,7 @@ const M = ({
|
|
|
91
91
|
className: v(c, "sl-hide-on-modal"),
|
|
92
92
|
sdk: e,
|
|
93
93
|
ref: i
|
|
94
|
-
}), /* @__PURE__ */ f(
|
|
94
|
+
}), /* @__PURE__ */ f(A, {
|
|
95
95
|
className: "sl-hide-on-modal",
|
|
96
96
|
ref: t,
|
|
97
97
|
"data-nav": (!!m && o).toString(),
|