@streamlayer/react-ui 1.2.1 → 1.3.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 +2 -1
- package/lib/app/app/Advertisement/index.js +73 -61
- package/lib/app/app/Features/FeatureProvider.d.ts +0 -1
- package/lib/app/app/Features/Gamification/Leaderboard.d.ts +0 -1
- package/lib/app/app/Features/Gamification/Question.d.ts +3 -1
- package/lib/app/app/Features/Gamification/Question.js +45 -41
- package/lib/app/app/Features/Gamification/QuestionsList.d.ts +0 -1
- package/lib/app/app/Features/Gamification/Tabs.d.ts +0 -1
- package/lib/app/app/Features/Gamification/UserSummary.d.ts +0 -1
- package/lib/app/app/Features/Gamification/gamification-feature.d.ts +0 -1
- package/lib/app/app/Features/Gamification/index.d.ts +0 -1
- package/lib/app/app/Features/index.d.ts +0 -1
- package/lib/app/app/Insight/index.d.ts +18 -0
- package/lib/app/app/Insight/index.js +62 -0
- package/lib/app/app/Navigation/index.d.ts +0 -1
- package/lib/app/app/Navigation/index.js +39 -31
- package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +0 -1
- package/lib/app/app/Notifications/Onboarding/index.d.ts +0 -1
- package/lib/app/app/Notifications/index.d.ts +0 -1
- package/lib/app/app/Notifications/styles.d.ts +1 -1
- package/lib/app/app/Points/index.d.ts +0 -1
- package/lib/app/app/index.d.ts +0 -1
- package/lib/app/app/story/index.d.ts +2 -10
- package/lib/app/app/story/index.js +44 -89
- package/lib/app/app/story/insight/index.d.ts +8 -0
- package/lib/app/app/story/insight/index.js +57 -0
- package/lib/app/app/story/insight/styles.d.ts +6 -0
- package/lib/app/app/story/insight/styles.js +30 -0
- package/lib/app/app/story/insight/video.d.ts +4 -0
- package/lib/app/app/story/insight/video.js +30 -0
- package/lib/app/app/story/promotion/content.d.ts +3 -0
- package/lib/app/app/story/{content.js → promotion/content.js} +22 -18
- package/lib/app/app/story/promotion/index.d.ts +9 -0
- package/lib/app/app/story/promotion/index.js +54 -0
- package/lib/app/app/story/promotion/styles.d.ts +6 -0
- package/lib/app/app/story/promotion/styles.js +35 -0
- package/lib/app/app/story/promotion/video.d.ts +8 -0
- package/lib/app/app/story/promotion/video.js +98 -0
- package/lib/app/app/story/settings/index.d.ts +1 -0
- package/lib/app/app/story/settings/index.js +14 -0
- package/lib/app/app/story/styles.d.ts +1 -6
- package/lib/app/app/story/styles.js +9 -34
- package/lib/app/app/story/video.d.ts +1 -10
- package/lib/app/app/story/video.js +35 -62
- package/lib/app/app/useApp.d.ts +0 -1
- package/lib/app/app/useAppContext.d.ts +0 -1
- package/lib/app/login/demo.d.ts +0 -1
- package/lib/app/login/demo.js +23 -9
- package/lib/app/masters/Features/FeatureProvider.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/Question.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/UserSummary.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/gamification-feature.d.ts +0 -1
- package/lib/app/masters/Features/Gamification/index.d.ts +0 -1
- package/lib/app/masters/Features/index.d.ts +0 -1
- package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +0 -1
- package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +0 -1
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +0 -1
- package/lib/app/masters/Notifications/index.d.ts +0 -1
- package/lib/app/masters/Notifications/styles.d.ts +1 -1
- package/lib/app/masters/Points/index.d.ts +0 -1
- package/lib/app/masters/masters.d.ts +0 -1
- package/lib/app/masters/useMastersApp.d.ts +0 -1
- package/lib/app/masters/useMastersContext.d.ts +0 -1
- package/lib/app/styles.d.ts +3 -3
- package/lib/app/useClipboardCopy.d.ts +0 -1
- package/lib/app/useSdkFeature.d.ts +0 -1
- package/lib/app/useSdkResponsive.d.ts +0 -1
- package/lib/app/useSdkScroll.d.ts +0 -1
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/banner/index.d.ts +1 -2
- package/lib/ui/advertisement/banner/index.js +16 -28
- package/lib/ui/advertisement/banner/styles.d.ts +3 -0
- package/lib/ui/advertisement/banner/styles.js +20 -0
- package/lib/ui/advertisement/index.d.ts +0 -1
- package/lib/ui/advertisement/index.js +13 -12
- package/lib/ui/advertisement/mock.d.ts +0 -1
- package/lib/ui/advertisement/overlay/index.d.ts +2 -1
- package/lib/ui/advertisement/overlay/index.js +61 -58
- package/lib/ui/advertisement/overlay/styles.d.ts +8 -4
- package/lib/ui/advertisement/overlay/styles.js +70 -62
- package/lib/ui/animated-counter/index.d.ts +0 -1
- package/lib/ui/gamification/constants.d.ts +0 -1
- package/lib/ui/gamification/detail/header/index.d.ts +0 -1
- package/lib/ui/gamification/insight/index.d.ts +0 -1
- package/lib/ui/gamification/insight-list/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/static.d.ts +0 -1
- package/lib/ui/gamification/onboarding/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +0 -1
- package/lib/ui/gamification/question/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/list/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +14 -14
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/vote/alert/index.d.ts +0 -1
- package/lib/ui/gamification/vote/feedback/index.d.ts +0 -1
- package/lib/ui/gamification/vote/index.d.ts +0 -1
- package/lib/ui/gamification/vote/insight-details/index.d.ts +0 -1
- package/lib/ui/gamification/vote/insight-details/index.js +7 -8
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/insight-details/styles.js +10 -4
- package/lib/ui/gamification/vote/twitter-details/index.d.ts +0 -1
- package/lib/ui/gamification/vote/vote-option/index.d.ts +0 -1
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +2 -2
- package/lib/ui/gamification/vote/win-bar/index.d.ts +0 -1
- package/lib/ui/link/index.d.ts +1 -0
- package/lib/ui/link/index.js +9 -0
- package/lib/ui/navigation/button/Channels.d.ts +0 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +0 -1
- package/lib/ui/navigation/button/LeaderBoard.d.ts +0 -1
- package/lib/ui/navigation/button/index.d.ts +0 -1
- package/lib/ui/navigation/index.d.ts +0 -1
- package/lib/ui/questions/insight/index.d.ts +0 -1
- package/lib/ui/questions/twitter/index.d.ts +0 -1
- package/lib/ui/questions/twitter/styles.d.ts +2 -2
- package/lib/ui/show-in/index.d.ts +0 -1
- package/lib/ui/theme/breakpoints.d.ts +0 -1
- package/lib/ui/theme/index.d.ts +1 -0
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/masters-theme.d.ts +0 -1
- package/lib/ui/theme/theme.js +42 -16
- package/lib/ui/timer/index.d.ts +0 -1
- package/lib/ui/video-player/index.d.ts +1 -0
- package/lib/ui/video-player/index.js +43 -43
- package/lib/utils/debug/index.js +45 -19
- package/package.json +26 -26
- package/lib/app/app/story/content.d.ts +0 -4
- package/lib/app/app/story/useResponsive.d.ts +0 -1
- package/lib/app/app/story/useResponsive.js +0 -15
- /package/lib/app/app/story/{login.d.ts → settings/login.d.ts} +0 -0
- /package/lib/app/app/story/{login.js → settings/login.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
-
|
|
3
2
|
export declare const AdvertisementUIWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
3
|
export type StreamLayerSDKAdvertisementProps = {
|
|
5
4
|
event?: string;
|
|
5
|
+
isMobileScreen?: boolean;
|
|
6
|
+
persistent?: boolean;
|
|
6
7
|
sidebar?: 'left' | 'right';
|
|
7
8
|
banner?: 'top' | 'bottom';
|
|
8
9
|
layoutMode?: 'cover' | 'side-by-side';
|
|
@@ -1,89 +1,101 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { useAnalyticsListener as
|
|
5
|
-
import { useEffect as
|
|
6
|
-
import { eventBus as
|
|
7
|
-
import { FeatureType as
|
|
8
|
-
import { useAppApp as
|
|
9
|
-
import { AdvertisementUI as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { styled as u } from "@linaria/react";
|
|
3
|
+
import { useStore as f } from "@nanostores/react";
|
|
4
|
+
import { useAnalyticsListener as p } from "../../../hooks/analytics.js";
|
|
5
|
+
import { useEffect as v, useRef as A, useMemo as y } from "react";
|
|
6
|
+
import { eventBus as d } from "@streamlayer/sdk-web-interfaces";
|
|
7
|
+
import { FeatureType as g, PromotionType as S } from "@streamlayer/sdk-web-types";
|
|
8
|
+
import { useAppApp as b } from "../useApp.js";
|
|
9
|
+
import { AdvertisementUI as h } from "../../../ui/advertisement/index.js";
|
|
10
|
+
const L = /* @__PURE__ */ u("div")({
|
|
11
11
|
name: "AdvertisementUIWrap",
|
|
12
12
|
class: "aa6pjif",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}), E = (t) => {
|
|
15
|
+
const e = t.target;
|
|
16
|
+
if (e instanceof HTMLAnchorElement && e.target === "_blank") {
|
|
17
|
+
const i = e.getAttribute("data-promo-id") || "", r = e.getAttribute("data-promo-type") || S.UNSET;
|
|
18
|
+
e.getAttribute("data-analytics") === "button" && d.emit("advertisement", {
|
|
19
|
+
action: "buttonSelect",
|
|
20
|
+
payload: {
|
|
21
|
+
advertisementId: i,
|
|
22
|
+
advertisementType: r
|
|
23
|
+
}
|
|
24
|
+
}), e.getAttribute("data-analytics") === "banner" && d.emit("advertisement", {
|
|
25
|
+
action: "bannerSelect",
|
|
26
|
+
payload: {
|
|
27
|
+
advertisementId: i,
|
|
28
|
+
advertisementType: r
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}, I = ({
|
|
33
|
+
gamification: t,
|
|
34
|
+
layoutMode: e,
|
|
35
|
+
sidebar: i,
|
|
36
|
+
banner: r,
|
|
37
|
+
isMobileScreen: c,
|
|
38
|
+
persistent: o
|
|
25
39
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
() =>
|
|
40
|
+
const a = A(null), s = f(t.advertisement.$list), n = y(
|
|
41
|
+
() => t.advertisement.getActiveAdvertisement(o),
|
|
28
42
|
// fire getActiveNotification when notifications were updated
|
|
29
43
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
|
-
[
|
|
44
|
+
[s, o]
|
|
31
45
|
);
|
|
32
|
-
return
|
|
46
|
+
return p(a, {
|
|
33
47
|
enabled: !!n,
|
|
34
48
|
event: "click",
|
|
35
|
-
listener:
|
|
36
|
-
}), n ? /* @__PURE__ */
|
|
37
|
-
ref:
|
|
49
|
+
listener: E
|
|
50
|
+
}), n ? /* @__PURE__ */ m(L, {
|
|
51
|
+
ref: a,
|
|
38
52
|
style: {
|
|
39
|
-
height: !
|
|
53
|
+
height: !r && !i ? "auto" : "100%"
|
|
40
54
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
className: c ? "mobile-view" : "",
|
|
56
|
+
children: /* @__PURE__ */ m(h, {
|
|
57
|
+
sidebar: i,
|
|
58
|
+
banner: r,
|
|
44
59
|
advertisement: n,
|
|
45
|
-
layoutMode:
|
|
60
|
+
layoutMode: e
|
|
46
61
|
})
|
|
47
62
|
}) : null;
|
|
48
|
-
},
|
|
49
|
-
sdk:
|
|
50
|
-
sidebar:
|
|
51
|
-
banner:
|
|
52
|
-
event:
|
|
53
|
-
layoutMode:
|
|
63
|
+
}, O = ({
|
|
64
|
+
sdk: t,
|
|
65
|
+
sidebar: e,
|
|
66
|
+
banner: i,
|
|
67
|
+
event: r,
|
|
68
|
+
layoutMode: c,
|
|
69
|
+
isMobileScreen: o,
|
|
70
|
+
persistent: a
|
|
54
71
|
}) => {
|
|
55
72
|
const {
|
|
56
|
-
deactivate:
|
|
57
|
-
} =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
const n =
|
|
62
|
-
if (
|
|
63
|
-
return /* @__PURE__ */
|
|
73
|
+
deactivate: s
|
|
74
|
+
} = b(t);
|
|
75
|
+
v(() => {
|
|
76
|
+
r ? t.createEventSession(r) : s();
|
|
77
|
+
}, [r, s, t]);
|
|
78
|
+
const n = f(t.featuresList.getStore());
|
|
79
|
+
if (e && i)
|
|
80
|
+
return /* @__PURE__ */ m("div", {
|
|
64
81
|
style: {
|
|
65
82
|
color: "red"
|
|
66
83
|
},
|
|
67
84
|
children: "define either sidebar or banner, not both."
|
|
68
85
|
});
|
|
69
|
-
if (!t && !r && o)
|
|
70
|
-
return /* @__PURE__ */ s("div", {
|
|
71
|
-
style: {
|
|
72
|
-
color: "red"
|
|
73
|
-
},
|
|
74
|
-
children: "layoutMode property unavailable for the overlay mode."
|
|
75
|
-
});
|
|
76
86
|
if (!n)
|
|
77
87
|
return null;
|
|
78
|
-
const l =
|
|
79
|
-
return l ? /* @__PURE__ */
|
|
88
|
+
const l = t.getFeature(g.GAMES);
|
|
89
|
+
return l ? /* @__PURE__ */ m(I, {
|
|
80
90
|
gamification: l,
|
|
81
|
-
sidebar:
|
|
82
|
-
banner:
|
|
83
|
-
layoutMode:
|
|
91
|
+
sidebar: e,
|
|
92
|
+
banner: i,
|
|
93
|
+
layoutMode: c,
|
|
94
|
+
isMobileScreen: o,
|
|
95
|
+
persistent: a
|
|
84
96
|
}) : null;
|
|
85
97
|
};
|
|
86
98
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
L as AdvertisementUIWrap,
|
|
100
|
+
O as StreamLayerSDKAdvertisement
|
|
89
101
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
2
2
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
|
-
|
|
4
3
|
/** Here we check data, render loaders, load data and perform some side effects for the active feature */
|
|
5
4
|
export declare const FeatureProvider: React.FC<{
|
|
6
5
|
feature: Features;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ScrollNodeRef } from '../../..';
|
|
2
2
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
3
3
|
import { Gamification } from '@streamlayer/feature-gamification';
|
|
4
|
-
|
|
5
4
|
export declare const Leaderboard: React.FC<{
|
|
6
5
|
gamification: Gamification;
|
|
7
6
|
scrollNode: ScrollNodeRef;
|
|
@@ -1,69 +1,73 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { useAppContext as
|
|
5
|
-
import { QuestionType as
|
|
6
|
-
import { VoteHeader as
|
|
7
|
-
import { Sponsor as
|
|
8
|
-
import { Vote as
|
|
9
|
-
import { InsightDetails as
|
|
10
|
-
import { TwitterDetails as
|
|
11
|
-
const
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { styled as f } from "@linaria/react";
|
|
3
|
+
import { useStore as m } from "@nanostores/react";
|
|
4
|
+
import { useAppContext as b } from "../../useAppContext.js";
|
|
5
|
+
import { QuestionType as y } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { VoteHeader as V } from "../../../../ui/gamification/detail/header/index.js";
|
|
7
|
+
import { Sponsor as d } from "../../../../ui/gamification/detail/sponsor/index.js";
|
|
8
|
+
import { Vote as h, VoteSkeleton as x } from "../../../../ui/gamification/vote/index.js";
|
|
9
|
+
import { InsightDetails as S } from "../../../../ui/gamification/vote/insight-details/index.js";
|
|
10
|
+
import { TwitterDetails as g } from "../../../../ui/gamification/vote/twitter-details/index.js";
|
|
11
|
+
const q = /* @__PURE__ */ f("div")({
|
|
12
12
|
name: "QuestionContainer",
|
|
13
13
|
class: "q14ckf9e",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), v = ({
|
|
16
16
|
openedQuestion: t
|
|
17
17
|
}) => {
|
|
18
|
-
var
|
|
18
|
+
var s, i;
|
|
19
19
|
const {
|
|
20
20
|
sdk: o
|
|
21
|
-
} =
|
|
22
|
-
return ((
|
|
21
|
+
} = b();
|
|
22
|
+
return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ r(S, {
|
|
23
23
|
...t.attributes.attributes.value,
|
|
24
24
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
25
|
-
}) : ((
|
|
25
|
+
}) : ((i = t == null ? void 0 : t.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ r(g, {
|
|
26
26
|
...t.attributes.attributes.value,
|
|
27
27
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
28
28
|
}) : null;
|
|
29
|
-
},
|
|
29
|
+
}, D = ({
|
|
30
30
|
extendedQuestion: t,
|
|
31
31
|
vote: o,
|
|
32
|
-
close:
|
|
32
|
+
close: s
|
|
33
33
|
}) => {
|
|
34
34
|
const {
|
|
35
|
-
loading:
|
|
36
|
-
data:
|
|
35
|
+
loading: i,
|
|
36
|
+
data: e
|
|
37
37
|
} = t;
|
|
38
|
-
return
|
|
38
|
+
return e ? /* @__PURE__ */ r(h, {
|
|
39
39
|
vote: o,
|
|
40
|
-
close:
|
|
41
|
-
openedQuestion:
|
|
42
|
-
isLoading: !!
|
|
43
|
-
}) : /* @__PURE__ */ r(
|
|
44
|
-
},
|
|
45
|
-
gamification: t
|
|
40
|
+
close: s,
|
|
41
|
+
openedQuestion: e,
|
|
42
|
+
isLoading: !!i
|
|
43
|
+
}) : /* @__PURE__ */ r(x, {});
|
|
44
|
+
}, E = ({
|
|
45
|
+
gamification: t,
|
|
46
|
+
hideSponsor: o,
|
|
47
|
+
className: s,
|
|
48
|
+
hideHeader: i
|
|
46
49
|
}) => {
|
|
47
|
-
var
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
50
|
+
var u, a, c;
|
|
51
|
+
const e = m(t.openedQuestion.$store), n = m(t.openedQuestion.$extendedStore);
|
|
52
|
+
if (!e)
|
|
50
53
|
return null;
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
54
|
+
const l = e.type;
|
|
55
|
+
return /* @__PURE__ */ p(q, {
|
|
56
|
+
className: s,
|
|
57
|
+
children: [!i && /* @__PURE__ */ r(V, {
|
|
54
58
|
close: t.closeQuestion,
|
|
55
|
-
type: ((
|
|
56
|
-
}),
|
|
59
|
+
type: ((u = e.attributes) == null ? void 0 : u.type) || y.UNSET
|
|
60
|
+
}), l === "question" && /* @__PURE__ */ r(D, {
|
|
57
61
|
vote: t.submitAnswer,
|
|
58
62
|
close: t.closeQuestion,
|
|
59
|
-
extendedQuestion:
|
|
60
|
-
}),
|
|
61
|
-
openedQuestion:
|
|
62
|
-
}), /* @__PURE__ */ r(
|
|
63
|
-
sponsorLogo: (
|
|
63
|
+
extendedQuestion: n
|
|
64
|
+
}), l !== "question" && /* @__PURE__ */ r(v, {
|
|
65
|
+
openedQuestion: e
|
|
66
|
+
}), !o && /* @__PURE__ */ r(d, {
|
|
67
|
+
sponsorLogo: (c = (a = n.data) == null ? void 0 : a.sponsorship) == null ? void 0 : c.logo
|
|
64
68
|
})]
|
|
65
69
|
});
|
|
66
70
|
};
|
|
67
71
|
export {
|
|
68
|
-
|
|
72
|
+
E as Question
|
|
69
73
|
};
|
|
@@ -2,7 +2,6 @@ import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
|
2
2
|
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
4
|
import { Gamification } from '@streamlayer/feature-gamification';
|
|
5
|
-
|
|
6
5
|
export declare const Tabs: React.FC<{
|
|
7
6
|
appNode: AppNodeRef;
|
|
8
7
|
gamification: Gamification;
|
|
@@ -2,7 +2,6 @@ import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
|
2
2
|
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
4
|
import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
|
|
5
|
-
|
|
6
5
|
export declare const GamificationOverlay: React.FC<{
|
|
7
6
|
gamification: GamificationClass;
|
|
8
7
|
className?: string;
|
|
@@ -3,7 +3,6 @@ import { ResponsiveStore } from '../../useSdkResponsive';
|
|
|
3
3
|
import { ScrollStore } from '../../useSdkScroll';
|
|
4
4
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
5
5
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
6
|
-
|
|
7
6
|
/** render feature by type */
|
|
8
7
|
export declare const ActiveFeature: React.FC<{
|
|
9
8
|
sdk: StreamLayerSDK;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Gamification } from '@streamlayer/feature-gamification';
|
|
2
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
|
+
export declare const QuestionWrap: {
|
|
4
|
+
__wyw_meta: unknown;
|
|
5
|
+
} & import('react').FC<{
|
|
6
|
+
gamification: Gamification;
|
|
7
|
+
hideSponsor?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
hideHeader?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export type StreamLayerSDKInsightProps = {
|
|
12
|
+
event?: string;
|
|
13
|
+
hideHeader?: boolean;
|
|
14
|
+
persistent?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const StreamLayerSDKInsight: React.FC<StreamLayerSDKInsightProps & {
|
|
17
|
+
sdk: StreamLayerSDK;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { styled as S } from "@linaria/react";
|
|
3
|
+
import { useStore as m } from "@nanostores/react";
|
|
4
|
+
import { useEffect as c } from "react";
|
|
5
|
+
import { FeatureType as h, QuestionStatus as l } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { Question as d } from "../Features/Gamification/Question.js";
|
|
7
|
+
import { useAppApp as Q } from "../useApp.js";
|
|
8
|
+
import { ShowIn as I } from "../../../ui/show-in/index.js";
|
|
9
|
+
const a = () => d, y = /* @__PURE__ */ S(a())({
|
|
10
|
+
name: "QuestionWrap",
|
|
11
|
+
class: "q10hhsxv",
|
|
12
|
+
propsAsIs: !0
|
|
13
|
+
}), A = ({
|
|
14
|
+
gamification: e,
|
|
15
|
+
persistent: t,
|
|
16
|
+
hideHeader: n
|
|
17
|
+
}) => {
|
|
18
|
+
const i = m(e.openedQuestion.$store);
|
|
19
|
+
return c(() => e.feedList.getStore().subscribe(({
|
|
20
|
+
data: o
|
|
21
|
+
}) => {
|
|
22
|
+
if (o) {
|
|
23
|
+
const s = o, r = s == null ? void 0 : s.find(({
|
|
24
|
+
type: f,
|
|
25
|
+
attributes: u
|
|
26
|
+
}) => f === "insight" && (u == null ? void 0 : u.status) === l.ACTIVE);
|
|
27
|
+
r && (!t || e.isOpenedQuestion(r.id) || e.openQuestion(r.id, r));
|
|
28
|
+
}
|
|
29
|
+
}), [e, t]), i ? /* @__PURE__ */ p(I, {
|
|
30
|
+
style: {
|
|
31
|
+
height: "100%"
|
|
32
|
+
},
|
|
33
|
+
children: /* @__PURE__ */ p(y, {
|
|
34
|
+
hideHeader: n,
|
|
35
|
+
gamification: e,
|
|
36
|
+
hideSponsor: !0
|
|
37
|
+
})
|
|
38
|
+
}) : null;
|
|
39
|
+
}, F = ({
|
|
40
|
+
sdk: e,
|
|
41
|
+
event: t,
|
|
42
|
+
persistent: n,
|
|
43
|
+
hideHeader: i
|
|
44
|
+
}) => {
|
|
45
|
+
const {
|
|
46
|
+
deactivate: o
|
|
47
|
+
} = Q(e);
|
|
48
|
+
if (c(() => {
|
|
49
|
+
t ? e.createEventSession(t) : o();
|
|
50
|
+
}, [t, o, e]), !m(e.featuresList.getStore()))
|
|
51
|
+
return null;
|
|
52
|
+
const r = e.getFeature(h.GAMES);
|
|
53
|
+
return r ? /* @__PURE__ */ p(A, {
|
|
54
|
+
persistent: n,
|
|
55
|
+
hideHeader: i,
|
|
56
|
+
gamification: r
|
|
57
|
+
}) : null;
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
y as QuestionWrap,
|
|
61
|
+
F as StreamLayerSDKInsight
|
|
62
|
+
};
|
|
@@ -1,61 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as e, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { styled as g } from "@linaria/react";
|
|
3
|
+
import { useStore as l } from "@nanostores/react";
|
|
4
|
+
import { forwardRef as h, useMemo as m } from "react";
|
|
5
5
|
import { AvailableFeatures as S } from "@streamlayer/sdk-web-features";
|
|
6
|
-
import { FeatureType as
|
|
7
|
-
import { SvgIcon as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Navigation as
|
|
10
|
-
const
|
|
6
|
+
import { FeatureType as d } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { SvgIcon as F } from "../../../ui/icons/index.js";
|
|
8
|
+
import { Button as n } from "../../../ui/navigation/button/index.js";
|
|
9
|
+
import { Navigation as A, NavigationItems as v } from "../../../ui/navigation/masters.js";
|
|
10
|
+
const C = () => F, x = /* @__PURE__ */ g(C())({
|
|
11
11
|
name: "ButtonIcon",
|
|
12
12
|
class: "b11wpe79",
|
|
13
13
|
propsAsIs: !0
|
|
14
|
-
}), K =
|
|
15
|
-
sdk:
|
|
16
|
-
className:
|
|
17
|
-
},
|
|
18
|
-
const
|
|
19
|
-
const o = (
|
|
14
|
+
}), K = h(({
|
|
15
|
+
sdk: i,
|
|
16
|
+
className: f
|
|
17
|
+
}, u) => {
|
|
18
|
+
const t = l(i.sdkStore.organizationSettings), r = l(i.sdkStore.streamSettings), a = l(i.getActiveFeature()), p = m(() => {
|
|
19
|
+
const o = (r == null ? void 0 : r.data) || (t == null ? void 0 : t.data);
|
|
20
20
|
return o != null && o.overlays ? o.overlays : [];
|
|
21
|
-
}, [
|
|
22
|
-
enableSdkButton: o
|
|
23
|
-
|
|
21
|
+
}, [t, r]), s = m(() => [...p.filter(({
|
|
22
|
+
enableSdkButton: o,
|
|
23
|
+
type: c
|
|
24
|
+
}) => c === d.GAMES || o).map((o) => ({
|
|
24
25
|
id: o.type,
|
|
25
|
-
onClick: () =>
|
|
26
|
+
onClick: () => i.openFeature(o.type),
|
|
26
27
|
disabled: !(o.type in S),
|
|
27
28
|
label: o.name,
|
|
28
|
-
icon: /* @__PURE__ */
|
|
29
|
+
icon: /* @__PURE__ */ e("img", {
|
|
29
30
|
src: o.icon,
|
|
30
31
|
alt: ""
|
|
31
32
|
}),
|
|
32
33
|
/** multiplied by 10 to add the ability to insert custom buttons between our buttons */
|
|
33
34
|
position: o.position * 10
|
|
34
|
-
}))].sort((o,
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
className:
|
|
37
|
-
children: [/* @__PURE__ */
|
|
38
|
-
children: [/* @__PURE__ */
|
|
35
|
+
}))].sort((o, c) => o.position - c.position), [p, i]);
|
|
36
|
+
return /* @__PURE__ */ y(A, {
|
|
37
|
+
className: f,
|
|
38
|
+
children: [s.length !== 0 && /* @__PURE__ */ e(v, {
|
|
39
|
+
children: [/* @__PURE__ */ e(n, {
|
|
39
40
|
id: "Channels",
|
|
40
|
-
onClick: () =>
|
|
41
|
+
onClick: () => i.closeFeature(),
|
|
41
42
|
label: "Channels",
|
|
42
43
|
active: a === 0
|
|
43
|
-
}, "Channels"), ...
|
|
44
|
+
}, "Channels"), ...s.map((o) => o.id === d.GAMES ? /* @__PURE__ */ e(n, {
|
|
44
45
|
...o,
|
|
45
46
|
active: o.id === a,
|
|
46
47
|
label: "StreamLayer +",
|
|
47
48
|
id: "featuredGroups",
|
|
48
|
-
icon: /* @__PURE__ */
|
|
49
|
+
icon: /* @__PURE__ */ e(x, {
|
|
49
50
|
name: "icon-btn-feature-groups",
|
|
50
51
|
"data-selected": o.id === a
|
|
51
52
|
})
|
|
52
|
-
}, o.id) : /* @__PURE__ */
|
|
53
|
+
}, o.id) : /* @__PURE__ */ e(n, {
|
|
53
54
|
...o,
|
|
54
55
|
icon: void 0,
|
|
55
56
|
active: o.id === a
|
|
56
57
|
}, o.id))]
|
|
57
|
-
}), /* @__PURE__ */
|
|
58
|
-
|
|
58
|
+
}), !s.length && /* @__PURE__ */ e(v, {
|
|
59
|
+
children: [/* @__PURE__ */ e(n, {
|
|
60
|
+
id: "empty",
|
|
61
|
+
label: "No Features...",
|
|
62
|
+
active: !1,
|
|
63
|
+
disabled: !0
|
|
64
|
+
}, "empty")]
|
|
65
|
+
}), /* @__PURE__ */ e("div", {
|
|
66
|
+
ref: u
|
|
59
67
|
})]
|
|
60
68
|
});
|
|
61
69
|
});
|
|
@@ -2,7 +2,6 @@ import { AppNodeRef } from '../../..';
|
|
|
2
2
|
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
3
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
4
4
|
import { Notification } from '@streamlayer/sdk-web-notifications';
|
|
5
|
-
|
|
6
5
|
export declare const Onboarding: React.FC<{
|
|
7
6
|
sdk: StreamLayerSDK;
|
|
8
7
|
notification: Notification;
|
|
@@ -2,7 +2,6 @@ import { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../..';
|
|
|
2
2
|
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../useSdkScroll';
|
|
4
4
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
5
|
-
|
|
6
5
|
export declare const SDKNotifications: React.FC<{
|
|
7
6
|
sdk: StreamLayerSDK;
|
|
8
7
|
scrollNode: ScrollNodeRef;
|
|
@@ -3,7 +3,7 @@ export declare const InnerContainer: import('@linaria/react').StyledComponent<im
|
|
|
3
3
|
export declare const HiddenContainer: {
|
|
4
4
|
__wyw_meta: unknown;
|
|
5
5
|
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
6
|
-
as?:
|
|
6
|
+
as?: React.ElementType;
|
|
7
7
|
}>;
|
|
8
8
|
export declare const NotificationRefreshing: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
9
|
export declare const Pill: any;
|
package/lib/app/app/index.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
hideLogin?: boolean;
|
|
4
|
-
hidePoints?: boolean;
|
|
5
|
-
settings?: boolean;
|
|
6
|
-
promotionId?: string;
|
|
7
|
-
sidebar: 'left' | 'right';
|
|
8
|
-
banner: 'top' | 'bottom';
|
|
9
|
-
layoutMode: 'cover' | 'side-by-side';
|
|
10
|
-
}>;
|
|
1
|
+
import { DebugProps } from '../../../utils/debug';
|
|
2
|
+
export declare const AppStory: React.FC<DebugProps>;
|