@streamlayer/react-ui 1.32.3 → 1.33.1
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 +1 -1
- package/lib/app/app/Advertisement/index.js +14 -15
- package/lib/app/app/Banner/index.d.ts +1 -1
- package/lib/app/app/Features/FeatureProvider.d.ts +2 -2
- package/lib/app/app/Features/Gamification/Leaderboard.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
- package/lib/app/app/Features/Gamification/Question.d.ts +2 -2
- package/lib/app/app/Features/Gamification/Question.js +42 -42
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +19 -25
- package/lib/app/app/Features/Gamification/QuestionsList.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Tabs.d.ts +1 -1
- package/lib/app/app/Features/Gamification/UserSummary.d.ts +1 -1
- package/lib/app/app/Features/Gamification/index.d.ts +2 -2
- package/lib/app/app/Features/Gamification/index.js +29 -28
- package/lib/app/app/Features/index.d.ts +2 -2
- package/lib/app/app/InApp/index.d.ts +1 -1
- package/lib/app/app/Insight/index.d.ts +2 -2
- package/lib/app/app/Layout/index.d.ts +1 -1
- package/lib/app/app/Navigation/index.d.ts +1 -1
- package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/index.js +45 -42
- package/lib/app/app/Notifications/index.d.ts +1 -1
- package/lib/app/app/Points/index.d.ts +1 -1
- package/lib/app/app/index.d.ts +1 -1
- package/lib/app/app/story/index.js +24 -24
- package/lib/app/app/story/insight/index.js +14 -15
- package/lib/app/app/story/insight/video.js +3 -3
- package/lib/app/app/story/promotion/content.js +5 -5
- package/lib/app/app/story/promotion/index.d.ts +1 -0
- package/lib/app/app/story/promotion/index.js +24 -25
- package/lib/app/app/story/promotion/video.d.ts +0 -1
- package/lib/app/app/story/promotion/video.js +41 -43
- package/lib/app/app/story/promotion-notification/index.js +15 -16
- package/lib/app/app/story/promotion-notification/video.d.ts +0 -1
- package/lib/app/app/story/promotion-notification/video.js +22 -30
- package/lib/app/app/story/settings/index.js +6 -6
- package/lib/app/app/story/settings/login.js +1 -1
- package/lib/app/app/story/video.js +28 -28
- package/lib/app/app/useApp.d.ts +1 -1
- package/lib/app/app/useAppContext.d.ts +1 -1
- package/lib/app/login/demo.js +19 -18
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +0 -1
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +17 -17
- package/lib/app/masters/BetPack/BetPackContent/QuestionScreen/index.d.ts +2 -2
- package/lib/app/masters/BetPack/BetPackContent/index.d.ts +1 -1
- package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
- package/lib/app/masters/BetPack/index.d.ts +1 -1
- package/lib/app/masters/Features/FeatureProvider.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/Question.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/UserSummary.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/index.d.ts +1 -1
- package/lib/app/masters/Features/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
- package/lib/app/masters/Notifications/index.d.ts +1 -1
- package/lib/app/masters/Points/index.d.ts +1 -1
- package/lib/app/masters/masters.d.ts +2 -1
- package/lib/app/masters/masters.js +34 -32
- package/lib/app/masters/provider.d.ts +4 -0
- package/lib/app/masters/provider.js +23 -0
- package/lib/app/masters/story/components.js +48 -52
- package/lib/app/masters/story/index.js +16 -15
- package/lib/app/masters/useMastersApp.d.ts +1 -1
- package/lib/app/masters/useMastersContext.d.ts +1 -1
- package/lib/app/tgl/index.d.ts +1 -0
- package/lib/app/tgl/index.js +19 -20
- package/lib/app/tgl/video.d.ts +0 -1
- package/lib/app/tgl/video.js +40 -42
- package/lib/app/useSdkFeature.d.ts +3 -3
- package/lib/app/webos/Advertisement/AdvertisementUI.d.ts +1 -1
- package/lib/app/webos/Advertisement/index.d.ts +1 -1
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +1 -1
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
- package/lib/app/webos/Question/index.d.ts +1 -1
- package/lib/app/webos/index.d.ts +1 -1
- package/lib/app/webos/story.js +26 -26
- package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +1 -1
- package/lib/app/webos/ui/Sidebar/index.d.ts +2 -2
- package/lib/app/webos/ui/Sidebar/styles.js +82 -888
- package/lib/app/webos/ui/insight/index.d.ts +1 -1
- package/lib/assets/style.css +1 -1
- package/lib/core/app.d.ts +7 -0
- package/lib/core/app.js +14 -0
- package/lib/core/event.d.ts +6 -0
- package/lib/core/event.js +5 -0
- package/lib/core/hooks.d.ts +16 -0
- package/lib/core/hooks.js +8 -0
- package/lib/core/provider.d.ts +49 -0
- package/lib/core/provider.js +9 -0
- package/lib/hooks/analytics.d.ts +1 -1
- package/lib/hooks-B0Qttldg.js +99 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +2 -4
- package/lib/ui/advertisement/banner/index.d.ts +3 -3
- package/lib/ui/advertisement/index.d.ts +1 -1
- package/lib/ui/advertisement/mock.d.ts +1 -1
- package/lib/ui/advertisement/notification/index.d.ts +1 -1
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +1 -1
- package/lib/ui/advertisement/notification/lower-third/index.js +34 -30
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +100 -33212
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +13 -13
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.d.ts +1 -1
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
- package/lib/ui/advertisement/overlay/index.d.ts +2 -2
- package/lib/ui/close-btn/index.d.ts +1 -1
- package/lib/ui/gamification/constants.d.ts +1 -1
- package/lib/ui/gamification/detail/header/index.d.ts +1 -1
- package/lib/ui/gamification/insight/index.d.ts +1 -1
- package/lib/ui/gamification/insight-list/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
- package/lib/ui/gamification/onboarding/index.d.ts +2 -2
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +2 -2
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +1 -1
- package/lib/ui/gamification/question/index.d.ts +1 -1
- package/lib/ui/gamification/question/list/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +1 -1
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
- package/lib/ui/gamification/vote/index.d.ts +1 -1
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
- package/lib/ui/icons/index.d.ts +198 -66
- package/lib/ui/navigation/button/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/twitter/index.d.ts +1 -1
- package/lib/ui/video-player/index.js +26 -23
- package/lib/useStreamLayerApp.d.ts +23 -0
- package/lib/useStreamLayerApp.js +167 -0
- package/lib/utils/debug/components/bypassLogin.d.ts +1 -1
- package/lib/utils/debug/components/developer.d.ts +1 -1
- package/lib/utils/debug/components/eventInput.d.ts +1 -1
- package/lib/utils/debug/index.js +8 -8
- package/lib/utils/debug/storage.d.ts +1 -1
- package/lib/utils/storage.d.ts +1 -1
- package/package.json +42 -35
- package/lib/index-l-eyvmpL.js +0 -3758
- package/lib/utils/createDemo.d.ts +0 -12
- package/lib/utils/createDemo.js +0 -49
- package/lib/vast-client.min-B0NUra1B.js +0 -1060
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StreamLayerSDK } from '
|
|
1
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
2
2
|
export declare const AdvertisementUIWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export type StreamLayerSDKAdvertisementProps = {
|
|
4
4
|
isMobileScreen?: boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as n, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { cx as
|
|
2
|
+
import { cx as q } from "@linaria/core";
|
|
3
3
|
import { styled as J } from "@linaria/react";
|
|
4
4
|
import { useAnalyticsListener as X } from "../../../hooks/analytics.js";
|
|
5
5
|
import { useState as Y, useEffect as Z, useRef as Q } from "react";
|
|
6
6
|
import { useStore as u } from "@streamlayer/react-polyfills";
|
|
7
|
-
import { eventBus as
|
|
7
|
+
import { eventBus as H } from "@streamlayer/sdk-web-interfaces";
|
|
8
8
|
import { FeatureType as tt, AdUnit as et, NotificationPromotionMode as rt, PromotionType as ot } from "@streamlayer/sdk-web-types";
|
|
9
9
|
import { StreamLayerSDKBannerProvider as at } from "../Banner/index.js";
|
|
10
10
|
import { AdvertisementUI as it } from "../../../ui/advertisement/index.js";
|
|
11
11
|
import { useAdvertisementBackground as nt } from "../../../ui/theme/utils.js";
|
|
12
|
-
const
|
|
12
|
+
const M = /* @__PURE__ */ J("div")({
|
|
13
13
|
name: "AdvertisementUIWrap",
|
|
14
14
|
class: "aa6pjif",
|
|
15
15
|
propsAsIs: !1
|
|
@@ -17,13 +17,13 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
17
17
|
const r = a.target;
|
|
18
18
|
if (r instanceof HTMLAnchorElement && r.target === "_blank") {
|
|
19
19
|
const o = r.getAttribute("data-promo-id") || "", i = r.getAttribute("data-promo-type") || ot.UNSET;
|
|
20
|
-
r.getAttribute("data-a") === "button" &&
|
|
20
|
+
r.getAttribute("data-a") === "button" && H.emit("advertisement", {
|
|
21
21
|
action: "buttonSelect",
|
|
22
22
|
payload: {
|
|
23
23
|
id: o,
|
|
24
24
|
type: i
|
|
25
25
|
}
|
|
26
|
-
}), r.getAttribute("data-a") === "banner" &&
|
|
26
|
+
}), r.getAttribute("data-a") === "banner" && H.emit("advertisement", {
|
|
27
27
|
action: "bannerSelect",
|
|
28
28
|
payload: {
|
|
29
29
|
id: o,
|
|
@@ -47,7 +47,7 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
47
47
|
controlVideo: y,
|
|
48
48
|
muted: b
|
|
49
49
|
}) => {
|
|
50
|
-
var A, U, S, h, I, L, P, E, k, w, T, N, W, D, V, j, x, B, F,
|
|
50
|
+
var A, U, S, h, I, L, P, E, k, w, T, N, W, D, V, j, x, B, F, R, K;
|
|
51
51
|
const d = Q(null), t = u(r.$store), e = u(a.openedQuestion.$store);
|
|
52
52
|
X(d, {
|
|
53
53
|
enabled: !!t.data,
|
|
@@ -60,12 +60,12 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
60
60
|
portraitUrl: _
|
|
61
61
|
});
|
|
62
62
|
if (((T = e == null ? void 0 : e.attributes) == null ? void 0 : T.adUnit) === et.STANDART && ((D = (W = (N = e == null ? void 0 : e.attributes) == null ? void 0 : N.adPromotion) == null ? void 0 : W.banner) != null && D.imageUrl))
|
|
63
|
-
return s ? /* @__PURE__ */ n(
|
|
63
|
+
return s ? /* @__PURE__ */ n(M, {
|
|
64
64
|
ref: d,
|
|
65
65
|
style: {
|
|
66
66
|
height: "100%"
|
|
67
67
|
},
|
|
68
|
-
className:
|
|
68
|
+
className: q("SL-AdvertisementUIWrap", c && "mobile-view"),
|
|
69
69
|
children: /* @__PURE__ */ n(at, {
|
|
70
70
|
cardId: e.id,
|
|
71
71
|
promotion: {
|
|
@@ -78,12 +78,12 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
78
78
|
if (t.data === void 0 || !f && t.isViewed)
|
|
79
79
|
return null;
|
|
80
80
|
const G = ((F = (B = (x = t == null ? void 0 : t.data) == null ? void 0 : x.notification) == null ? void 0 : B.promotion) == null ? void 0 : F.mode) === rt.LOWER_THIRD;
|
|
81
|
-
return /* @__PURE__ */ z(
|
|
81
|
+
return /* @__PURE__ */ z(M, {
|
|
82
82
|
ref: d,
|
|
83
83
|
style: {
|
|
84
84
|
height: C ? "auto" : "100%"
|
|
85
85
|
},
|
|
86
|
-
className:
|
|
86
|
+
className: q("SL-AdvertisementUIWrap", c && "mobile-view", G && "SL-AdvertisementUIWrap--lower-third"),
|
|
87
87
|
children: [!l && $, /* @__PURE__ */ n(it, {
|
|
88
88
|
skipTypeCheck: p,
|
|
89
89
|
sidebar: m,
|
|
@@ -92,12 +92,11 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
92
92
|
advertisementPaused: !!t.isPaused,
|
|
93
93
|
togglePause: t.togglePause,
|
|
94
94
|
isEventFired: t.isEventFired,
|
|
95
|
-
toggleMute: t.toggleMute,
|
|
96
95
|
fireEvent: t.fireEvent,
|
|
97
96
|
close: t.close,
|
|
98
97
|
externalAd: g ? t.externalAd : void 0,
|
|
99
|
-
markAsViewed: (
|
|
100
|
-
open: (
|
|
98
|
+
markAsViewed: (R = a.advertisement) == null ? void 0 : R.markAsViewed,
|
|
99
|
+
open: (K = a.advertisement) == null ? void 0 : K.open,
|
|
101
100
|
layoutMode: o,
|
|
102
101
|
isNotification: l,
|
|
103
102
|
skipAutoClose: i,
|
|
@@ -143,7 +142,7 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
143
142
|
if (!g)
|
|
144
143
|
return null;
|
|
145
144
|
const t = a.getFeature(tt.GAMES);
|
|
146
|
-
return !t || o && !y ? null : /* @__PURE__ */ n(dt, {
|
|
145
|
+
return !(t != null && t.advertisement) || o && !y ? null : /* @__PURE__ */ n(dt, {
|
|
147
146
|
gamification: t,
|
|
148
147
|
advertisement: t.advertisement,
|
|
149
148
|
sidebar: r,
|
|
@@ -161,6 +160,6 @@ const H = /* @__PURE__ */ J("div")({
|
|
|
161
160
|
});
|
|
162
161
|
};
|
|
163
162
|
export {
|
|
164
|
-
|
|
163
|
+
M as AdvertisementUIWrap,
|
|
165
164
|
Ut as StreamLayerSDKAdvertisement
|
|
166
165
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Features } from '
|
|
2
|
-
import { StreamLayerSDK } from '
|
|
1
|
+
import { Features } from '../../../packages/sdk-web-features/src/index.ts';
|
|
2
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
3
3
|
/** Here we check data, render loaders, load data and perform some side effects for the active feature */
|
|
4
4
|
export declare const FeatureProvider: React.FC<{
|
|
5
5
|
feature: Features;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScrollNodeRef } from '../../..';
|
|
2
2
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
3
|
-
import { Gamification } from '
|
|
3
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
4
4
|
export declare const Leaderboard: React.FC<{
|
|
5
5
|
gamification: Gamification;
|
|
6
6
|
scrollNode: ScrollNodeRef;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { styled as h } from "@linaria/react";
|
|
3
3
|
import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useStore as
|
|
6
|
-
import { InviteLink as
|
|
4
|
+
import { useRef as I } from "react";
|
|
5
|
+
import { useStore as p } from "@streamlayer/react-polyfills";
|
|
6
|
+
import { InviteLink as b } 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";
|
|
@@ -11,47 +11,57 @@ import "@storybook/blocks";
|
|
|
11
11
|
import "../../../../ui/icons/index.js";
|
|
12
12
|
import "../../../../ui/gamification/leaderboard/list-item/styles.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { LeaderboardStaticList as
|
|
14
|
+
import { LeaderboardStaticList as C } from "../../../../ui/gamification/leaderboard/static.js";
|
|
15
15
|
import { Friends as y } from "./Friends.js";
|
|
16
|
-
const
|
|
16
|
+
const v = /* @__PURE__ */ h("div")({
|
|
17
17
|
name: "InviteLinkContainer",
|
|
18
18
|
class: "i1odbhm4",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
21
|
-
gamification:
|
|
22
|
-
scrollNode:
|
|
23
|
-
scrollStore:
|
|
20
|
+
}), x = ({
|
|
21
|
+
gamification: r,
|
|
22
|
+
scrollNode: t,
|
|
23
|
+
scrollStore: o,
|
|
24
|
+
leaderboardList: i
|
|
24
25
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
data:
|
|
27
|
-
hasMore:
|
|
28
|
-
loading:
|
|
29
|
-
key:
|
|
30
|
-
} =
|
|
31
|
-
data:
|
|
32
|
-
} =
|
|
33
|
-
return !
|
|
34
|
-
deepLink:
|
|
35
|
-
}) : /* @__PURE__ */
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
-
items:
|
|
38
|
-
scrollNode:
|
|
39
|
-
scrollStore:
|
|
40
|
-
fetchMore:
|
|
41
|
-
hasMore:
|
|
42
|
-
openItemDetail:
|
|
43
|
-
currentUserId:
|
|
44
|
-
},
|
|
45
|
-
ref:
|
|
46
|
-
children: /* @__PURE__ */
|
|
26
|
+
const s = I(null), {
|
|
27
|
+
data: d,
|
|
28
|
+
hasMore: m,
|
|
29
|
+
loading: a,
|
|
30
|
+
key: l
|
|
31
|
+
} = p(i.$store), {
|
|
32
|
+
data: n
|
|
33
|
+
} = p(r.deepLink.$store), [c, f] = k(s);
|
|
34
|
+
return !d.length && !a ? /* @__PURE__ */ e(y, {
|
|
35
|
+
deepLink: n
|
|
36
|
+
}) : /* @__PURE__ */ u(L, {
|
|
37
|
+
children: [/* @__PURE__ */ e(C, {
|
|
38
|
+
items: d,
|
|
39
|
+
scrollNode: t,
|
|
40
|
+
scrollStore: o,
|
|
41
|
+
fetchMore: i.fetchMore,
|
|
42
|
+
hasMore: m,
|
|
43
|
+
openItemDetail: r.openUser,
|
|
44
|
+
currentUserId: r.currentUserId.get()
|
|
45
|
+
}, l), n && /* @__PURE__ */ e(v, {
|
|
46
|
+
ref: s,
|
|
47
|
+
children: /* @__PURE__ */ e(b, {
|
|
47
48
|
"data-a": "intr",
|
|
48
|
-
onClick: () =>
|
|
49
|
+
onClick: () => c(n),
|
|
49
50
|
title: "Invite Friends",
|
|
50
51
|
description: "Challenge them now!"
|
|
51
52
|
})
|
|
52
|
-
}),
|
|
53
|
+
}), f]
|
|
53
54
|
});
|
|
54
|
-
}
|
|
55
|
+
}, E = ({
|
|
56
|
+
gamification: r,
|
|
57
|
+
scrollNode: t,
|
|
58
|
+
scrollStore: o
|
|
59
|
+
}) => r.leaderboardList ? /* @__PURE__ */ e(x, {
|
|
60
|
+
leaderboardList: r.leaderboardList,
|
|
61
|
+
gamification: r,
|
|
62
|
+
scrollNode: t,
|
|
63
|
+
scrollStore: o
|
|
64
|
+
}) : null;
|
|
55
65
|
export {
|
|
56
|
-
|
|
66
|
+
E as Leaderboard
|
|
57
67
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Gamification } from '
|
|
2
|
-
import { StreamLayerSDK } from '
|
|
1
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
2
|
+
import { StreamLayerSDK } from '../../../../packages/sdk-web-interfaces/src/index.ts';
|
|
3
3
|
export declare const Question: React.FC<{
|
|
4
4
|
gamification: Gamification;
|
|
5
5
|
sdk: StreamLayerSDK;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useAppContext as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsxs as I, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as G } from "@linaria/react";
|
|
3
|
+
import { useAppContext as J } from "../../useAppContext.js";
|
|
4
|
+
import { useState as K } from "react";
|
|
5
5
|
import { useStore as u } from "@streamlayer/react-polyfills";
|
|
6
|
-
import { QuestionType as
|
|
7
|
-
import { VoteHeader as
|
|
8
|
-
import { Sponsor as
|
|
9
|
-
import { Vote as
|
|
10
|
-
import { InsightDetails as
|
|
11
|
-
import { TwitterDetails as
|
|
12
|
-
import { useAdvertisementBackground as
|
|
13
|
-
import { QuestionAdvertisement as
|
|
14
|
-
const
|
|
6
|
+
import { QuestionType as P, AdUnit as M } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { VoteHeader as W } from "../../../../ui/gamification/detail/header/index.js";
|
|
8
|
+
import { Sponsor as X } from "../../../../ui/gamification/detail/sponsor/index.js";
|
|
9
|
+
import { Vote as Y, VoteSkeleton as Z } from "../../../../ui/gamification/vote/index.js";
|
|
10
|
+
import { InsightDetails as _ } from "../../../../ui/gamification/vote/insight-details/index.js";
|
|
11
|
+
import { TwitterDetails as k } from "../../../../ui/gamification/vote/twitter-details/index.js";
|
|
12
|
+
import { useAdvertisementBackground as F } from "../../../../ui/theme/utils.js";
|
|
13
|
+
import { QuestionAdvertisement as Q } from "./QuestionAdvertisement.js";
|
|
14
|
+
const $ = /* @__PURE__ */ G("div")({
|
|
15
15
|
name: "QuestionContainer",
|
|
16
16
|
class: "q14ckf9e",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
-
}),
|
|
18
|
+
}), tt = ({
|
|
19
19
|
openedQuestion: t,
|
|
20
20
|
muted: n,
|
|
21
21
|
webos: c
|
|
@@ -23,18 +23,18 @@ const N = /* @__PURE__ */ M("div")({
|
|
|
23
23
|
var a, i;
|
|
24
24
|
const {
|
|
25
25
|
sdk: r
|
|
26
|
-
} =
|
|
27
|
-
return ((a = t == null ? void 0 : t.attributes) == null ? void 0 : a.attributes.case) === "insight" ? /* @__PURE__ */ e(
|
|
26
|
+
} = J();
|
|
27
|
+
return ((a = t == null ? void 0 : t.attributes) == null ? void 0 : a.attributes.case) === "insight" ? /* @__PURE__ */ e(_, {
|
|
28
28
|
...t.attributes.attributes.value,
|
|
29
29
|
muted: n,
|
|
30
30
|
controlVideo: r == null ? void 0 : r.controlVideoPlayer,
|
|
31
31
|
webos: c
|
|
32
|
-
}) : ((i = t == null ? void 0 : t.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ e(
|
|
32
|
+
}) : ((i = t == null ? void 0 : t.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ e(k, {
|
|
33
33
|
...t.attributes.attributes.value,
|
|
34
34
|
muted: n,
|
|
35
35
|
controlVideo: r == null ? void 0 : r.controlVideoPlayer
|
|
36
36
|
}) : null;
|
|
37
|
-
},
|
|
37
|
+
}, ot = ({
|
|
38
38
|
extendedQuestion: t,
|
|
39
39
|
vote: n,
|
|
40
40
|
close: c,
|
|
@@ -44,61 +44,61 @@ const N = /* @__PURE__ */ M("div")({
|
|
|
44
44
|
loading: a,
|
|
45
45
|
data: i
|
|
46
46
|
} = t;
|
|
47
|
-
return i ? /* @__PURE__ */ e(
|
|
47
|
+
return i ? /* @__PURE__ */ e(Y, {
|
|
48
48
|
webos: r,
|
|
49
49
|
vote: n,
|
|
50
50
|
close: c,
|
|
51
51
|
openedQuestion: i,
|
|
52
52
|
isLoading: !!a
|
|
53
|
-
}) : /* @__PURE__ */ e(
|
|
54
|
-
},
|
|
53
|
+
}) : /* @__PURE__ */ e(Z, {});
|
|
54
|
+
}, ht = ({
|
|
55
55
|
gamification: t,
|
|
56
56
|
sdk: n,
|
|
57
57
|
muted: c,
|
|
58
58
|
skipAutoClose: r,
|
|
59
59
|
hideSponsor: a,
|
|
60
60
|
className: i,
|
|
61
|
-
hideHeader:
|
|
61
|
+
hideHeader: E,
|
|
62
62
|
webos: d
|
|
63
63
|
}) => {
|
|
64
|
-
var A, S, T, v, b, y, U, V, x, D, g, q, C, w, j, H
|
|
65
|
-
const s = u(t.openedQuestion.$store), o = u(t.openedQuestion.$extendedStore), [
|
|
66
|
-
containerId:
|
|
67
|
-
landscapeUrl:
|
|
68
|
-
portraitUrl:
|
|
64
|
+
var A, S, T, v, b, y, U, V, x, D, g, q, C, w, j, H;
|
|
65
|
+
const s = u(t.openedQuestion.$store), o = u(t.openedQuestion.$extendedStore), [L, N] = K(!1), O = u(n.options), m = ((A = s == null ? void 0 : s.attributes) == null ? void 0 : A.type) === P.FACTOID, l = (S = s == null ? void 0 : s.attributes) == null ? void 0 : S.backgroundImage, p = (T = o.data) == null ? void 0 : T.backgroundImage, R = m ? l == null ? void 0 : l.landscapeUrl : p == null ? void 0 : p.landscapeUrl, z = m ? l == null ? void 0 : l.portraitUrl : p == null ? void 0 : p.portraitUrl, f = F({
|
|
66
|
+
containerId: O.containerId,
|
|
67
|
+
landscapeUrl: R,
|
|
68
|
+
portraitUrl: z
|
|
69
69
|
});
|
|
70
70
|
if (!s)
|
|
71
71
|
return null;
|
|
72
|
-
const h = s.type,
|
|
73
|
-
return
|
|
72
|
+
const h = s.type, B = ((b = (v = o.data) == null ? void 0 : v.options) == null ? void 0 : b.options.case) === "factoid" ? o.data.options.options.value.closeTimer : void 0;
|
|
73
|
+
return o.data && o.data.adUnit === M.STANDART && !L ? /* @__PURE__ */ I($, {
|
|
74
74
|
className: i,
|
|
75
|
-
children: [f, /* @__PURE__ */ e(
|
|
75
|
+
children: [f, /* @__PURE__ */ e(Q, {
|
|
76
76
|
id: o.data.id,
|
|
77
|
-
hasBanner: !!((
|
|
78
|
-
setAdShowed:
|
|
79
|
-
sponsorLogo: ((
|
|
77
|
+
hasBanner: !!((U = (y = o.data.promotion) == null ? void 0 : y.banner) != null && U.imageUrl),
|
|
78
|
+
setAdShowed: N,
|
|
79
|
+
sponsorLogo: ((x = (V = o.data.promotion) == null ? void 0 : V.sponsor) == null ? void 0 : x.logo) || ((D = o.data.sponsorship) == null ? void 0 : D.logo) || ""
|
|
80
80
|
})]
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ I($, {
|
|
82
82
|
className: i,
|
|
83
|
-
children: [f, !
|
|
84
|
-
closeTimer: r ? void 0 :
|
|
83
|
+
children: [f, !E && /* @__PURE__ */ e(W, {
|
|
84
|
+
closeTimer: r ? void 0 : B,
|
|
85
85
|
close: t.closeQuestion,
|
|
86
|
-
type: ((
|
|
86
|
+
type: ((g = s.attributes) == null ? void 0 : g.type) || P.UNSET,
|
|
87
87
|
webos: d
|
|
88
|
-
}), h === "question" && /* @__PURE__ */ e(
|
|
88
|
+
}), h === "question" && /* @__PURE__ */ e(ot, {
|
|
89
89
|
webos: d,
|
|
90
90
|
vote: t.submitAnswer,
|
|
91
91
|
close: t.closeQuestion,
|
|
92
92
|
extendedQuestion: o
|
|
93
|
-
}), h !== "question" && /* @__PURE__ */ e(
|
|
93
|
+
}), h !== "question" && /* @__PURE__ */ e(tt, {
|
|
94
94
|
muted: c,
|
|
95
95
|
openedQuestion: s,
|
|
96
96
|
webos: d
|
|
97
|
-
}), !a && /* @__PURE__ */ e(
|
|
98
|
-
sponsorLogo: ((
|
|
97
|
+
}), !a && /* @__PURE__ */ e(X, {
|
|
98
|
+
sponsorLogo: ((w = (C = (q = o.data) == null ? void 0 : q.promotion) == null ? void 0 : C.sponsor) == null ? void 0 : w.logo) || ((H = (j = o.data) == null ? void 0 : j.sponsorship) == null ? void 0 : H.logo)
|
|
99
99
|
})]
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
ht as Question
|
|
104
104
|
};
|
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useRef as u, useEffect as
|
|
4
|
-
|
|
5
|
-
const d = /* @__PURE__ */ t("div")({
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { useRef as u, useEffect as c } from "react";
|
|
4
|
+
const a = /* @__PURE__ */ s("div")({
|
|
6
5
|
name: "QuestionAdvertisementContainer",
|
|
7
6
|
class: "qwludgs",
|
|
8
7
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
8
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
10
9
|
name: "QuestionAdvertisementText",
|
|
11
10
|
class: "qvce6pv",
|
|
12
11
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
12
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
14
13
|
name: "QuestionAdvertisementImage",
|
|
15
14
|
class: "qsid7hx",
|
|
16
15
|
propsAsIs: !1
|
|
17
|
-
}),
|
|
18
|
-
sponsorLogo:
|
|
19
|
-
id:
|
|
20
|
-
hasBanner:
|
|
21
|
-
setAdShowed:
|
|
16
|
+
}), A = ({
|
|
17
|
+
sponsorLogo: r,
|
|
18
|
+
id: i,
|
|
19
|
+
hasBanner: o,
|
|
20
|
+
setAdShowed: t
|
|
22
21
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
action: "bannerOpened",
|
|
27
|
-
payload: {
|
|
28
|
-
questionId: s
|
|
29
|
-
}
|
|
30
|
-
});
|
|
22
|
+
const n = u();
|
|
23
|
+
return c(() => (n.current = setTimeout(() => {
|
|
24
|
+
t(!0);
|
|
31
25
|
}, 5e3), () => {
|
|
32
|
-
clearTimeout(
|
|
33
|
-
}), [
|
|
34
|
-
children: [/* @__PURE__ */ e(
|
|
26
|
+
clearTimeout(n.current);
|
|
27
|
+
}), [t, i, o]), /* @__PURE__ */ m(a, {
|
|
28
|
+
children: [/* @__PURE__ */ e(d, {
|
|
35
29
|
children: "PRESENTED BY"
|
|
36
|
-
}), /* @__PURE__ */ e(
|
|
30
|
+
}), /* @__PURE__ */ e(l, {
|
|
37
31
|
children: /* @__PURE__ */ e("img", {
|
|
38
|
-
src:
|
|
32
|
+
src: r,
|
|
39
33
|
alt: "ad-sponsor-logo"
|
|
40
34
|
})
|
|
41
35
|
})]
|
|
42
36
|
});
|
|
43
37
|
};
|
|
44
38
|
export {
|
|
45
|
-
|
|
39
|
+
A as QuestionAdvertisement
|
|
46
40
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gamification } from '
|
|
1
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
2
2
|
export declare const QuestionsList: React.FC<{
|
|
3
3
|
store: ReturnType<Exclude<Gamification['feedList'], undefined>['getStore']>;
|
|
4
4
|
openQuestion: (questionId: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
2
2
|
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
|
-
import { Gamification } from '
|
|
4
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
5
5
|
export declare const Tabs: React.FC<{
|
|
6
6
|
appNode: AppNodeRef;
|
|
7
7
|
gamification: Gamification;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AppNodeRef, ScrollNodeRef } from '../../..';
|
|
2
2
|
import { ResponsiveStore } from '../../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../../useSdkScroll';
|
|
4
|
-
import { Gamification as GamificationClass } from '
|
|
5
|
-
import { StreamLayerSDK } from '
|
|
4
|
+
import { Gamification as GamificationClass } from '../../../../packages/feature-gamification/src/index.ts';
|
|
5
|
+
import { StreamLayerSDK } from '../../../../packages/sdk-web-interfaces/src/index.ts';
|
|
6
6
|
export declare const GamificationOverlay: React.FC<{
|
|
7
7
|
gamification: GamificationClass;
|
|
8
8
|
className?: string;
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
|
2
2
|
import { cx as l } from "@linaria/core";
|
|
3
3
|
import { styled as h } from "@linaria/react";
|
|
4
|
-
import { SDKWhiteContainer as
|
|
4
|
+
import { SDKWhiteContainer as k } from "../../styles.js";
|
|
5
5
|
import { useAppContext as U } from "../../useAppContext.js";
|
|
6
6
|
import { useHideTransition as Q } from "../../../../hooks/showIn.js";
|
|
7
7
|
import { useStore as i } from "@streamlayer/react-polyfills";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
8
|
+
import { createSingleStore as y } from "@streamlayer/sdk-web-interfaces";
|
|
9
|
+
import { VoteHeader as A } from "../../../../ui/gamification/detail/header/index.js";
|
|
10
|
+
import { UserStatistics as O } from "../../../../ui/gamification/user-statistics/index.js";
|
|
11
|
+
import { ModalPortal as b } from "../../../../ui/modal/index.js";
|
|
12
|
+
import { ShowIn as w } from "../../../../ui/show-in/index.js";
|
|
13
|
+
import { Question as D } from "./Question.js";
|
|
14
|
+
import { Tabs as H } from "./Tabs.js";
|
|
15
|
+
const R = () => w, u = /* @__PURE__ */ h(R())({
|
|
15
16
|
name: "OpenedContainer",
|
|
16
17
|
class: "ouvguos",
|
|
17
18
|
propsAsIs: !0
|
|
18
|
-
}), f = "t1eu4lbg",
|
|
19
|
+
}), f = "t1eu4lbg", V = /* @__PURE__ */ h("div")({
|
|
19
20
|
name: "UserContainer",
|
|
20
21
|
class: "uuv2xqo",
|
|
21
22
|
propsAsIs: !1
|
|
22
|
-
}),
|
|
23
|
+
}), j = ({
|
|
23
24
|
correct: e,
|
|
24
25
|
incorrect: t
|
|
25
26
|
}) => {
|
|
26
27
|
const n = e + t;
|
|
27
28
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
28
|
-
},
|
|
29
|
+
}, B = ({
|
|
29
30
|
gamification: e,
|
|
30
31
|
scrollStore: t,
|
|
31
32
|
className: n,
|
|
32
33
|
appNode: r,
|
|
33
34
|
scrollNode: p,
|
|
34
35
|
responsiveStore: a
|
|
35
|
-
}) => /* @__PURE__ */ o(
|
|
36
|
+
}) => /* @__PURE__ */ o(H, {
|
|
36
37
|
appNode: r,
|
|
37
38
|
scrollStore: t,
|
|
38
39
|
scrollNode: p,
|
|
39
40
|
className: n,
|
|
40
41
|
gamification: e,
|
|
41
42
|
responsiveStore: a
|
|
42
|
-
}),
|
|
43
|
+
}), J = ({
|
|
43
44
|
gamification: e,
|
|
44
45
|
muted: t,
|
|
45
46
|
sdk: n,
|
|
@@ -49,8 +50,8 @@ const H = () => b, u = /* @__PURE__ */ h(H())({
|
|
|
49
50
|
}) => {
|
|
50
51
|
const {
|
|
51
52
|
topNavigation: c
|
|
52
|
-
} = U(), C = i(e.openedQuestionId),
|
|
53
|
-
sdkInDesktopView:
|
|
53
|
+
} = U(), C = i(e.openedQuestionId), S = i(e.openedQuestion.$store), s = i(e.openedUser || y(void 0)), {
|
|
54
|
+
sdkInDesktopView: v
|
|
54
55
|
} = i(a, {
|
|
55
56
|
keys: ["sdkInDesktopView"]
|
|
56
57
|
}), {
|
|
@@ -59,11 +60,11 @@ const H = () => b, u = /* @__PURE__ */ h(H())({
|
|
|
59
60
|
} = Q();
|
|
60
61
|
if (!C && !s)
|
|
61
62
|
return null;
|
|
62
|
-
const
|
|
63
|
+
const x = S ? /* @__PURE__ */ o(u, {
|
|
63
64
|
className: l(r, !c && f),
|
|
64
65
|
hiding: m,
|
|
65
66
|
onAnimationEnd: d,
|
|
66
|
-
children: /* @__PURE__ */ o(
|
|
67
|
+
children: /* @__PURE__ */ o(D, {
|
|
67
68
|
muted: t,
|
|
68
69
|
sdk: n,
|
|
69
70
|
gamification: e
|
|
@@ -72,25 +73,25 @@ const H = () => b, u = /* @__PURE__ */ h(H())({
|
|
|
72
73
|
className: l(r, !c && f),
|
|
73
74
|
hiding: m,
|
|
74
75
|
onAnimationEnd: d,
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
-
children: [/* @__PURE__ */ o(
|
|
76
|
+
children: /* @__PURE__ */ I(V, {
|
|
77
|
+
children: [/* @__PURE__ */ o(A, {
|
|
77
78
|
label: "Friend's Rank",
|
|
78
79
|
close: e.closeUser
|
|
79
|
-
}), /* @__PURE__ */ o(
|
|
80
|
-
children: /* @__PURE__ */ o(
|
|
80
|
+
}), /* @__PURE__ */ o(k, {
|
|
81
|
+
children: /* @__PURE__ */ o(O, {
|
|
81
82
|
...s,
|
|
82
|
-
successRate:
|
|
83
|
+
successRate: j(s)
|
|
83
84
|
})
|
|
84
85
|
})]
|
|
85
86
|
})
|
|
86
87
|
}) : null;
|
|
87
|
-
return /* @__PURE__ */ o(
|
|
88
|
+
return /* @__PURE__ */ o(b, {
|
|
88
89
|
container: p,
|
|
89
|
-
useContainer: !
|
|
90
|
-
children:
|
|
90
|
+
useContainer: !v,
|
|
91
|
+
children: x
|
|
91
92
|
});
|
|
92
93
|
};
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
B as GamificationOverlay,
|
|
96
|
+
J as GamificationOverlayStandalone
|
|
96
97
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AppNodeRef, ScrollNodeRef } from '../..';
|
|
2
2
|
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
3
|
import { ScrollStore } from '../../useSdkScroll';
|
|
4
|
-
import { Features } from '
|
|
5
|
-
import { StreamLayerSDK } from '
|
|
4
|
+
import { Features } from '../../../packages/sdk-web-features/src/index.ts';
|
|
5
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
6
6
|
/** render feature by type */
|
|
7
7
|
export declare const ActiveFeature: React.FC<{
|
|
8
8
|
sdk: StreamLayerSDK;
|