@streamlayer/react-ui 1.26.1 → 1.27.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 +1 -0
- package/lib/app/app/Advertisement/index.js +125 -92
- package/lib/app/app/Banner/index.d.ts +6 -0
- package/lib/app/app/Banner/index.js +6 -0
- package/lib/app/app/Features/Gamification/Question.d.ts +4 -0
- package/lib/app/app/Features/Gamification/Question.js +79 -50
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.d.ts +6 -0
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +46 -0
- package/lib/app/app/Features/Gamification/Tabs.js +12 -12
- package/lib/app/app/Features/Gamification/index.d.ts +3 -0
- package/lib/app/app/Features/Gamification/index.js +56 -52
- package/lib/app/app/Features/index.d.ts +1 -0
- package/lib/app/app/Features/index.js +6 -4
- package/lib/app/app/InApp/index.d.ts +1 -0
- package/lib/app/app/InApp/index.js +44 -17
- package/lib/app/app/Insight/index.d.ts +3 -0
- package/lib/app/app/Insight/index.js +33 -30
- package/lib/app/app/Layout/index.d.ts +17 -0
- package/lib/app/app/Layout/index.js +105 -0
- package/lib/app/app/Layout/styles.d.ts +12 -0
- package/lib/app/app/Layout/styles.js +64 -0
- package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/app/Notifications/styles.d.ts +18 -2
- package/lib/app/app/index.d.ts +1 -0
- package/lib/app/app/index.js +91 -85
- package/lib/app/app/story/index.js +56 -58
- package/lib/app/app/story/promotion/index.js +31 -36
- package/lib/app/app/story/promotion/styles.d.ts +3 -1
- package/lib/app/app/story/promotion/video.js +63 -81
- package/lib/app/app/story/promotion-notification/styles.d.ts +3 -1
- package/lib/app/app/story/styles.d.ts +5 -1
- package/lib/app/app/story/styles.js +36 -16
- package/lib/app/app/story/video.d.ts +5 -1
- package/lib/app/app/story/video.js +70 -33
- package/lib/app/app/useApp.d.ts +1 -2
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -1
- package/lib/app/masters/BetPack/BetPackContent/index.js +175 -187
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +84 -84
- package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +14 -2
- package/lib/app/masters/Features/Gamification/Question.js +19 -17
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/masters/Notifications/styles.d.ts +18 -2
- package/lib/app/masters/masters.d.ts +4 -1
- package/lib/app/masters/useMastersApp.d.ts +1 -1
- package/lib/app/tgl/styles.d.ts +3 -1
- package/lib/app/{tvos → webos/Advertisement}/AdvertisementUI.d.ts +7 -1
- package/lib/app/webos/Advertisement/AdvertisementUI.js +63 -0
- package/lib/app/{tvos/Advertisement.d.ts → webos/Advertisement/index.d.ts} +3 -1
- package/lib/app/webos/Advertisement/index.js +119 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +15 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +93 -0
- package/lib/app/webos/ExposedPauseAd/styles.d.ts +12 -0
- package/lib/app/webos/ExposedPauseAd/styles.js +64 -0
- package/lib/app/webos/Question/index.d.ts +9 -0
- package/lib/app/webos/Question/index.js +56 -0
- package/lib/app/webos/index.d.ts +24 -0
- package/lib/app/webos/index.js +65 -0
- package/lib/app/webos/story.d.ts +9 -0
- package/lib/app/webos/story.js +74 -0
- package/lib/app/webos/styles.js +4 -0
- package/lib/app/webos/ui/Layout/index.js +78 -0
- package/lib/app/{tvos → webos}/ui/Layout/styles.js +25 -25
- package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +7 -0
- package/lib/app/webos/ui/Sidebar/PromoAction.js +63 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/index.d.ts +6 -0
- package/lib/app/webos/ui/Sidebar/index.js +176 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.d.ts +7 -3
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.js +175 -170
- package/lib/app/webos/ui/insight/index.d.ts +9 -0
- package/lib/app/webos/ui/insight/index.js +100 -0
- package/lib/app/webos/ui/insight/styles.d.ts +12 -0
- package/lib/app/webos/ui/insight/styles.js +51 -0
- package/lib/app/webos/useTvButton.d.ts +9 -0
- package/lib/app/webos/useTvButton.js +23 -0
- package/lib/assets/style.css +1 -1
- package/lib/hooks/analytics.d.ts +14 -0
- package/lib/hooks/showIn.d.ts +9 -0
- package/lib/hooks/useKeyboardNavigation.d.ts +15 -0
- package/lib/hooks/useKeyboardNavigation.js +74 -0
- package/lib/index-T1iiS0ZO.js +17 -0
- package/lib/ui/advertisement/banner/index.d.ts +3 -0
- package/lib/ui/advertisement/banner/index.js +29 -17
- package/lib/ui/advertisement/banner/styles.d.ts +5 -1
- package/lib/ui/advertisement/index.d.ts +4 -1
- package/lib/ui/advertisement/index.js +56 -44
- package/lib/ui/advertisement/notification/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/index.js +50 -34
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/lower-third/index.js +42 -26
- package/lib/ui/advertisement/notification/lower-third/styles.d.ts +11 -0
- package/lib/ui/advertisement/notification/lower-third/styles.js +39 -24
- package/lib/ui/advertisement/notification/styles.d.ts +18 -1
- package/lib/ui/advertisement/notification/styles.js +48 -33
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.d.ts +2 -2
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
- package/lib/ui/advertisement/overlay/index.d.ts +4 -1
- package/lib/ui/advertisement/overlay/index.js +135 -77
- package/lib/ui/gamification/detail/header/index.d.ts +2 -0
- package/lib/ui/gamification/detail/header/index.js +19 -16
- package/lib/ui/gamification/detail/header/styles.d.ts +15 -3
- package/lib/ui/gamification/detail/header/styles.js +1 -1
- package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -0
- package/lib/ui/gamification/detail/sponsor/index.js +25 -13
- package/lib/ui/gamification/invite-link/styles.d.ts +14 -2
- package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +14 -2
- package/lib/ui/gamification/onboarding/styles.d.ts +10 -2
- package/lib/ui/gamification/points/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +48 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +94 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +99 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.d.ts +42 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.js +117 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +9 -8
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.js +12 -12
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +18 -2
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +9 -9
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.js +49 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.js +56 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.js +43 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +10 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.d.ts +11 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.js +34 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +38 -5
- package/lib/ui/gamification/question/notification/styles.d.ts +14 -2
- package/lib/ui/gamification/question/styles.d.ts +26 -4
- package/lib/ui/gamification/vote/alert/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/feedback/styles.d.ts +19 -2
- package/lib/ui/gamification/vote/feedbackAlert/index.d.ts +9 -0
- package/lib/ui/gamification/vote/feedbackAlert/index.js +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.d.ts +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.js +30 -0
- package/lib/ui/gamification/vote/index.d.ts +3 -1
- package/lib/ui/gamification/vote/index.js +160 -130
- package/lib/ui/gamification/vote/insight-details/index.js +8 -7
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/styles.d.ts +29 -4
- package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -0
- package/lib/ui/gamification/vote/vote-option/index.js +72 -64
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +19 -2
- package/lib/ui/icons/index.d.ts +1 -0
- package/lib/ui/icons/index.js +80 -79
- package/lib/ui/modal/index.js +12 -17
- package/lib/ui/questions/insight/index.d.ts +4 -1
- package/lib/ui/questions/insight/index.js +29 -26
- package/lib/ui/questions/twitter/account/styles.d.ts +7 -1
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +27 -19
- package/lib/ui/theme/constants.d.ts +2 -0
- package/lib/ui/theme/constants.js +2 -0
- package/lib/ui/theme/masters-theme.js +1 -0
- package/lib/ui/theme/utils.d.ts +10 -0
- package/lib/ui/theme/utils.js +77 -0
- package/lib/ui/video-player/index.d.ts +10 -2
- package/lib/ui/video-player/index.js +189 -110
- package/lib/ui/video-player/styles.d.ts +36 -0
- package/lib/ui/video-player/styles.js +59 -11
- package/lib/utils/common.d.ts +6 -0
- package/lib/utils/createDemo.d.ts +12 -0
- package/lib/utils/debug/components/bypassLogin.d.ts +6 -0
- package/lib/utils/debug/components/copyLogs.d.ts +1 -0
- package/lib/utils/debug/components/developer.d.ts +14 -0
- package/lib/utils/debug/components/envToggle.d.ts +6 -0
- package/lib/utils/debug/components/eventInput.d.ts +8 -0
- package/lib/utils/debug/components/sdkKey.d.ts +6 -0
- package/lib/utils/debug/components/styles.d.ts +1 -0
- package/lib/utils/debug/index.d.ts +36 -0
- package/lib/utils/debug/storage.d.ts +14 -0
- package/lib/utils/decorators/container.d.ts +6 -0
- package/lib/utils/decorators/container.js +5 -5
- package/lib/utils/decorators/masters.d.ts +2 -0
- package/lib/utils/decorators/styles.d.ts +2 -0
- package/lib/utils/login.d.ts +3 -0
- package/lib/utils/storage.d.ts +14 -0
- package/package.json +27 -20
- package/lib/app/tvos/Advertisement.js +0 -88
- package/lib/app/tvos/AdvertisementUI.js +0 -40
- package/lib/app/tvos/index.d.ts +0 -16
- package/lib/app/tvos/index.js +0 -23
- package/lib/app/tvos/story.d.ts +0 -6
- package/lib/app/tvos/story.js +0 -34
- package/lib/app/tvos/styles.js +0 -4
- package/lib/app/tvos/ui/Layout/index.js +0 -76
- package/lib/app/tvos/ui/Sidebar/PromoAction.d.ts +0 -2
- package/lib/app/tvos/ui/Sidebar/PromoAction.js +0 -62
- package/lib/app/tvos/ui/Sidebar/index.js +0 -114
- /package/lib/app/{tvos → webos}/styles.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/index.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/styles.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventBusData } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
type Arguments<T> = T extends (...args: infer U) => void ? U : never;
|
|
3
|
+
export declare const useAnalyticsHandle: (options: EventBusData) => (<T extends Function>(callback?: T) => (...args: Arguments<T>) => any)[];
|
|
4
|
+
export declare const newTabLinkListener: (event: Event) => void;
|
|
5
|
+
type AnalyticHookRef = React.MutableRefObject<HTMLElement | null>;
|
|
6
|
+
type AnalyticListener = (event: Event, ref: AnalyticHookRef) => void;
|
|
7
|
+
type AnalyticsHookOptions = {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
event: 'click' | 'scrollend' | 'tap';
|
|
10
|
+
useDomNode?: boolean;
|
|
11
|
+
listener: AnalyticListener;
|
|
12
|
+
};
|
|
13
|
+
export declare const useAnalyticsListener: (ref: AnalyticHookRef, options: AnalyticsHookOptions) => void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DependencyList } from 'react';
|
|
2
|
+
interface KeyboardNavigationOptions {
|
|
3
|
+
containerSelector: string;
|
|
4
|
+
getElements?: (container: HTMLElement) => HTMLElement[];
|
|
5
|
+
onEscape: () => void;
|
|
6
|
+
onEnter?: (element: HTMLElement, index: number) => void;
|
|
7
|
+
initialFocusPriority?: 'close-btn' | 'first' | number;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
dependencies?: DependencyList;
|
|
10
|
+
resetFocusOn?: unknown[];
|
|
11
|
+
}
|
|
12
|
+
export declare const useKeyboardNavigation: (options: KeyboardNavigationOptions) => {
|
|
13
|
+
focusedIndex: import('react').MutableRefObject<number>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useRef as m, useEffect as D } from "react";
|
|
2
|
+
const R = (g) => {
|
|
3
|
+
const {
|
|
4
|
+
containerSelector: y,
|
|
5
|
+
getElements: A,
|
|
6
|
+
onEscape: v,
|
|
7
|
+
onEnter: a,
|
|
8
|
+
initialFocusPriority: l = "close-btn",
|
|
9
|
+
enabled: E = !0,
|
|
10
|
+
dependencies: h = [],
|
|
11
|
+
resetFocusOn: f = []
|
|
12
|
+
} = g, t = m(0), d = m(!1), k = m(f);
|
|
13
|
+
return f.some((o, p) => o !== k.current[p]) && (d.current = !1, k.current = f), D(() => {
|
|
14
|
+
if (!E) return;
|
|
15
|
+
const o = document.querySelector(y);
|
|
16
|
+
if (!o) return;
|
|
17
|
+
const b = A || ((e) => Array.from(e.querySelectorAll("button")).filter((r) => !r.disabled));
|
|
18
|
+
let n = b(o);
|
|
19
|
+
(() => {
|
|
20
|
+
var e, c, r;
|
|
21
|
+
if (n.length !== 0) {
|
|
22
|
+
if (d.current) {
|
|
23
|
+
const s = document.activeElement;
|
|
24
|
+
if (n.includes(s))
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (l === "close-btn") {
|
|
28
|
+
const s = o.querySelector('[data-close-btn="true"]');
|
|
29
|
+
if (s) {
|
|
30
|
+
const i = n.indexOf(s);
|
|
31
|
+
t.current = i !== -1 ? i : 0, s.focus();
|
|
32
|
+
} else
|
|
33
|
+
t.current = 0, (e = n[t.current]) == null || e.focus();
|
|
34
|
+
} else l === "first" ? (t.current = 0, (c = n[t.current]) == null || c.focus()) : typeof l == "number" && (t.current = Math.min(l, n.length - 1), (r = n[t.current]) == null || r.focus());
|
|
35
|
+
d.current = !0;
|
|
36
|
+
}
|
|
37
|
+
})();
|
|
38
|
+
const w = (e) => {
|
|
39
|
+
var s, i;
|
|
40
|
+
if (!o) return;
|
|
41
|
+
n = b(o);
|
|
42
|
+
const c = n.length;
|
|
43
|
+
if (c === 0) return;
|
|
44
|
+
const r = e.keyCode;
|
|
45
|
+
if (["ArrowDown", "ArrowRight"].includes(e.key) || r === 40 || r === 39) {
|
|
46
|
+
t.current = (t.current + 1) % c, (s = n[t.current]) == null || s.focus(), e.preventDefault();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (["ArrowUp", "ArrowLeft"].includes(e.key) || r === 38 || r === 37) {
|
|
50
|
+
t.current = (t.current - 1 + c) % c, (i = n[t.current]) == null || i.focus(), e.preventDefault();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (e.key === "Enter" || r === 13 || e.key === " ") {
|
|
54
|
+
const u = n[t.current];
|
|
55
|
+
if (!u) return;
|
|
56
|
+
const F = document.activeElement;
|
|
57
|
+
if (!n.includes(F))
|
|
58
|
+
return;
|
|
59
|
+
a ? a(u, t.current) : (u.tagName === "BUTTON" || u.tagName, u.click()), e.preventDefault();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (e.key === "Escape" || e.key === "Backspace" || e.code === "Back" || r === 10009) {
|
|
63
|
+
v(), e.preventDefault();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return window.addEventListener("keydown", w), () => {
|
|
68
|
+
window.removeEventListener("keydown", w);
|
|
69
|
+
};
|
|
70
|
+
}, [E, y, l, v, a, ...h, ...f]), { focusedIndex: t };
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
R as useKeyboardNavigation
|
|
74
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useCallback as r, useSyncExternalStore as y } from "react";
|
|
2
|
+
function f(e, t, u) {
|
|
3
|
+
let n = new Set(t).add(void 0);
|
|
4
|
+
return e.listen((i, s, l) => {
|
|
5
|
+
n.has(l) && u(i, s, l);
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
function S(e, t = {}) {
|
|
9
|
+
let u = r(
|
|
10
|
+
(i) => t.keys ? f(e, t.keys, i) : e.listen(i),
|
|
11
|
+
[t.keys, e]
|
|
12
|
+
), n = e.get.bind(e);
|
|
13
|
+
return y(u, n, n);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
S as u
|
|
17
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { Advertisement } from '@streamlayer/feature-gamification';
|
|
1
2
|
import { PromotionOptions } from '@streamlayer/sdk-web-types';
|
|
2
3
|
export declare const Banner: React.FC<{
|
|
3
4
|
promotion: PromotionOptions;
|
|
4
5
|
promotionId: string;
|
|
5
6
|
direction?: 'top' | 'bottom';
|
|
6
7
|
hiding?: boolean;
|
|
8
|
+
isEventFired: Advertisement['isEventFired'];
|
|
9
|
+
fireEvent: Advertisement['fireEvent'];
|
|
7
10
|
}>;
|
|
@@ -1,28 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f } from "react";
|
|
3
|
+
import { eventBus as u } from "@streamlayer/sdk-web-interfaces";
|
|
4
|
+
import { AdUnit as h } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { SlideIn as p } from "../../slide-in/index.js";
|
|
6
|
+
import { BannerContainer as y, BannerLink as g } from "./styles.js";
|
|
7
|
+
const x = ({ promotion: t, promotionId: l, hiding: n, isEventFired: r, fireEvent: d, direction: c = "bottom" }) => {
|
|
8
|
+
const s = (t == null ? void 0 : t.adUnit) === h.STANDART, a = s ? t.banner : t.additionalBanner;
|
|
9
|
+
if (f(() => {
|
|
10
|
+
a != null && a.imageUrl && t.type && l && (r != null && r("banner-showed") || (u.emit("advertisement", {
|
|
11
|
+
action: "bannerShown",
|
|
12
|
+
payload: {
|
|
13
|
+
id: l,
|
|
14
|
+
type: t.type
|
|
15
|
+
}
|
|
16
|
+
}), d == null || d("banner-showed")));
|
|
17
|
+
}, [a == null ? void 0 : a.imageUrl, d, r, t.type, l]), !(a != null && a.imageUrl))
|
|
7
18
|
return null;
|
|
8
|
-
let
|
|
9
|
-
return
|
|
10
|
-
|
|
19
|
+
let e = a == null ? void 0 : a.url;
|
|
20
|
+
return e && e.indexOf("http") !== 0 && (e = `https://${e}`), /* @__PURE__ */ m(p, { direction: c, hiding: n, children: /* @__PURE__ */ m(y, { className: "BannerContainer", "data-is-ad": s, children: /* @__PURE__ */ m(
|
|
21
|
+
g,
|
|
11
22
|
{
|
|
12
|
-
as:
|
|
23
|
+
as: e ? "a" : "span",
|
|
13
24
|
className: "BannerLink",
|
|
14
|
-
href:
|
|
25
|
+
href: e,
|
|
15
26
|
style: {
|
|
16
|
-
backgroundImage: `url(${
|
|
17
|
-
cursor:
|
|
27
|
+
backgroundImage: `url(${a.imageUrl})`,
|
|
28
|
+
cursor: e ? "pointer" : "default"
|
|
18
29
|
},
|
|
19
|
-
"data-promo-id":
|
|
20
|
-
"data-promo-type":
|
|
30
|
+
"data-promo-id": l,
|
|
31
|
+
"data-promo-type": t.type,
|
|
21
32
|
"data-a": "banner",
|
|
22
|
-
target: "_blank"
|
|
33
|
+
target: "_blank",
|
|
34
|
+
"data-is-ad": s
|
|
23
35
|
}
|
|
24
36
|
) }) });
|
|
25
37
|
};
|
|
26
38
|
export {
|
|
27
|
-
|
|
39
|
+
x as Banner
|
|
28
40
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export declare const BannerContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
-
export declare const BannerLink:
|
|
2
|
+
export declare const BannerLink: {
|
|
3
|
+
__wyw_meta: unknown;
|
|
4
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown> & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
}>;
|
|
@@ -16,5 +16,8 @@ export declare const AdvertisementUI: React.FC<{
|
|
|
16
16
|
externalAd?: Advertisement['externalAd'];
|
|
17
17
|
controlVideo: ControlVideoCb;
|
|
18
18
|
advertisementPaused: boolean;
|
|
19
|
-
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
togglePause?: (flag: boolean) => void;
|
|
21
|
+
isEventFired: Advertisement['isEventFired'];
|
|
22
|
+
fireEvent: Advertisement['fireEvent'];
|
|
20
23
|
}>;
|
|
@@ -1,69 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
2
|
import { PromotionType as f } from "@streamlayer/sdk-web-types";
|
|
3
|
-
import { Banner as
|
|
4
|
-
import { Notification as
|
|
3
|
+
import { Banner as h } from "./banner/index.js";
|
|
4
|
+
import { Notification as n } from "./notification/index.js";
|
|
5
5
|
import { Overlay as E } from "./overlay/index.js";
|
|
6
|
-
import { Sidebar as
|
|
7
|
-
import { OverlayContainer as
|
|
8
|
-
const
|
|
6
|
+
import { Sidebar as C } from "./sidebar/index.js";
|
|
7
|
+
import { OverlayContainer as L } from "./overlay/styles.js";
|
|
8
|
+
const O = (i) => (i == null ? void 0 : i.type) === f.INGAME_IAB11_LBAR || (i == null ? void 0 : i.type) === f.INGAME_IAB21_LBAR, a = (i) => (i == null ? void 0 : i.type) === f.INGAME_IAB11_SIDEBAR || (i == null ? void 0 : i.type) === f.INGAME_IAB21_SIDEBAR, t = (i) => (i == null ? void 0 : i.type) === f.INGAME_IAB11 || (i == null ? void 0 : i.type) === f.INGAME_IAB21, H = ({
|
|
9
9
|
advertisement: i,
|
|
10
|
-
close:
|
|
11
|
-
skipTypeCheck:
|
|
12
|
-
skipAutoClose:
|
|
13
|
-
layoutMode:
|
|
14
|
-
sidebar:
|
|
15
|
-
isNotification:
|
|
10
|
+
close: u,
|
|
11
|
+
skipTypeCheck: _,
|
|
12
|
+
skipAutoClose: N,
|
|
13
|
+
layoutMode: D = "side-by-side",
|
|
14
|
+
sidebar: y,
|
|
15
|
+
isNotification: R,
|
|
16
16
|
banner: A,
|
|
17
|
-
markAsViewed:
|
|
18
|
-
open:
|
|
19
|
-
externalAd:
|
|
20
|
-
controlVideo:
|
|
21
|
-
advertisementPaused:
|
|
22
|
-
togglePause:
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
markAsViewed: M,
|
|
18
|
+
open: r,
|
|
19
|
+
externalAd: c,
|
|
20
|
+
controlVideo: G,
|
|
21
|
+
advertisementPaused: o,
|
|
22
|
+
togglePause: S,
|
|
23
|
+
isEventFired: l,
|
|
24
|
+
fireEvent: B,
|
|
25
|
+
muted: q
|
|
26
|
+
}) => i.promotion ? R && i.notification ? /* @__PURE__ */ I(
|
|
27
|
+
n,
|
|
25
28
|
{
|
|
26
|
-
open: () =>
|
|
29
|
+
open: () => r == null ? void 0 : r({ fromNotification: !0 }),
|
|
27
30
|
notification: i.notification,
|
|
28
|
-
promotionId: i.question.id
|
|
31
|
+
promotionId: i.question.id,
|
|
32
|
+
close: u
|
|
29
33
|
}
|
|
30
|
-
) : !
|
|
34
|
+
) : !y && !A && (_ || t(i.promotion)) ? /* @__PURE__ */ I(L, { className: "PromoOverlayContainer", children: /* @__PURE__ */ I(
|
|
31
35
|
E,
|
|
32
36
|
{
|
|
33
|
-
markAsViewed:
|
|
37
|
+
markAsViewed: M,
|
|
34
38
|
promotionId: i.question.id,
|
|
35
39
|
promotion: i.promotion,
|
|
36
|
-
onClose:
|
|
37
|
-
open:
|
|
38
|
-
skipAutoClose:
|
|
39
|
-
externalAd:
|
|
40
|
-
controlVideo:
|
|
41
|
-
advertisementPaused:
|
|
42
|
-
togglePause:
|
|
40
|
+
onClose: u,
|
|
41
|
+
open: r,
|
|
42
|
+
skipAutoClose: N,
|
|
43
|
+
externalAd: c,
|
|
44
|
+
controlVideo: G,
|
|
45
|
+
advertisementPaused: o,
|
|
46
|
+
togglePause: S,
|
|
47
|
+
isEventFired: l,
|
|
48
|
+
fireEvent: B,
|
|
49
|
+
muted: q
|
|
43
50
|
}
|
|
44
|
-
) }) :
|
|
51
|
+
) }) : y && (_ || O(i.promotion) || a(i.promotion) || c) ? /* @__PURE__ */ I(C, { className: "PromoSidebarContainer", direction: y, hiding: !1, children: /* @__PURE__ */ I(
|
|
45
52
|
E,
|
|
46
53
|
{
|
|
47
|
-
markAsViewed:
|
|
54
|
+
markAsViewed: M,
|
|
48
55
|
promotionId: i.question.id,
|
|
49
56
|
promotion: i.promotion,
|
|
50
|
-
externalAd:
|
|
51
|
-
onClose:
|
|
52
|
-
open:
|
|
53
|
-
controlVideo:
|
|
54
|
-
skipAutoClose:
|
|
55
|
-
advertisementPaused:
|
|
56
|
-
togglePause:
|
|
57
|
+
externalAd: c,
|
|
58
|
+
onClose: u,
|
|
59
|
+
open: r,
|
|
60
|
+
controlVideo: G,
|
|
61
|
+
skipAutoClose: N,
|
|
62
|
+
advertisementPaused: o,
|
|
63
|
+
togglePause: S,
|
|
64
|
+
isEventFired: l,
|
|
65
|
+
fireEvent: B,
|
|
66
|
+
muted: q
|
|
57
67
|
}
|
|
58
|
-
) }) : A &&
|
|
59
|
-
|
|
68
|
+
) }) : A && O(i.promotion) ? /* @__PURE__ */ I(
|
|
69
|
+
h,
|
|
60
70
|
{
|
|
61
71
|
promotionId: i.question.id,
|
|
62
72
|
hiding: !1,
|
|
63
73
|
promotion: i.promotion,
|
|
64
|
-
direction: A
|
|
74
|
+
direction: A,
|
|
75
|
+
isEventFired: l,
|
|
76
|
+
fireEvent: B
|
|
65
77
|
}
|
|
66
78
|
) : null : null;
|
|
67
79
|
export {
|
|
68
|
-
|
|
80
|
+
H as AdvertisementUI
|
|
69
81
|
};
|
|
@@ -1,41 +1,57 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { withFocusable as N } from "../../../app/webos/useTvButton.js";
|
|
3
|
+
import { NotificationPromotionImagePosition as n, NotificationEnabled as E, NotificationPromotionMode as L, NotificationSponsorLogoMode as S, CtaIconMode as _ } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { SlideIn as D } from "../../slide-in/index.js";
|
|
5
|
+
import { LowerThirdNotification as R } from "./lower-third/index.js";
|
|
6
|
+
import { MediaImgFit as I, MediaImgCentered as P, MediaImgBottom as b, MediaImgSolid as A, MediaImgMiddle as F, NotificationContainer as u, Logo as x, NotificationContent as k, Body as y, Title as W, Text as j, CtaIcon as v, StyledChevronRight as G, DismissButton as H, OpenButton as U } from "./styles.js";
|
|
7
|
+
const q = {
|
|
8
|
+
[n.UNSET]: I,
|
|
9
|
+
[n.FIT]: I,
|
|
10
|
+
[n.CENTERED]: P,
|
|
11
|
+
[n.BOTTOM]: b,
|
|
12
|
+
[n.SOLID]: A,
|
|
13
|
+
[n.MIDDLE]: F
|
|
14
|
+
}, z = ({ src: r, imagePosition: e }) => {
|
|
15
|
+
const c = q[e];
|
|
16
|
+
return /* @__PURE__ */ i(c, { children: /* @__PURE__ */ i("img", { src: r, alt: "" }) });
|
|
17
|
+
}, J = N(H), K = N(U), w = ({ notification: r, open: e, promotionId: c, hiding: p, direction: g = "left", close: d, webos: t }) => {
|
|
18
|
+
if (!r || !r.promotion || r.enabled !== E.NOTIFICATION_ENABLED)
|
|
18
19
|
return null;
|
|
19
|
-
if (
|
|
20
|
-
return /* @__PURE__ */ i(
|
|
21
|
-
const { title:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
if (r.promotion.mode === L.LOWER_THIRD)
|
|
21
|
+
return /* @__PURE__ */ i(R, { notification: r, open: e, close: d, webos: t });
|
|
22
|
+
const { title: l, body: s, image: h, promotion: C } = r, { sponsorLogo: a, sponsorLogoMode: O, imagePosition: M, ctaButton: o } = C, T = (f) => {
|
|
23
|
+
f.stopPropagation(), d == null || d();
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ i(D, { className: "SL_Rich_Notification", direction: g, hiding: p, children: /* @__PURE__ */ m(u, { onClick: t ? () => {
|
|
26
|
+
} : e, children: [
|
|
27
|
+
O !== S.NOTIFICATION_SPONSOR_LOGO_NONE && a && /* @__PURE__ */ i(x, { children: /* @__PURE__ */ i("img", { src: a, alt: l }) }),
|
|
28
|
+
/* @__PURE__ */ m(k, { children: [
|
|
29
|
+
/* @__PURE__ */ i(z, { src: h, imagePosition: M }),
|
|
30
|
+
/* @__PURE__ */ m(y, { children: [
|
|
31
|
+
l && /* @__PURE__ */ i(W, { children: l }),
|
|
32
|
+
s && /* @__PURE__ */ i(j, { children: s })
|
|
29
33
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
t && /* @__PURE__ */ i(J, { webos: !0, onClick: T, children: "Dismiss" }),
|
|
35
|
+
/* @__PURE__ */ m(
|
|
36
|
+
K,
|
|
37
|
+
{
|
|
38
|
+
webos: t,
|
|
39
|
+
autoFocus: !0,
|
|
40
|
+
onClick: t ? e : () => {
|
|
41
|
+
},
|
|
42
|
+
name: "promo-button",
|
|
43
|
+
style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color },
|
|
44
|
+
children: [
|
|
45
|
+
(o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === _.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(v, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
|
|
46
|
+
(o == null ? void 0 : o.label) || "Open"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ i(G, { name: "chevronRight" })
|
|
35
51
|
] })
|
|
36
52
|
] }) });
|
|
37
53
|
};
|
|
38
54
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
w as Notification,
|
|
56
|
+
z as NotificationMedia
|
|
41
57
|
};
|
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as i, jsxs as e, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { withFocusable as C } from "../../../../app/webos/useTvButton.js";
|
|
3
|
+
import { NotificationPromotionImagePosition as N, NotificationEnabled as t, NotificationSponsorLogoMode as _, CtaIconMode as I } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { MediaImgBottom as a, MediaImgMiddle as f, NotificationContainer as L, NotificationContent as A, Body as S, Title as E, Text as P, Footer as x, Logo as D, Vector as F, CtaIcon as O, OpenButton as h, DismissButton as k } from "./styles.js";
|
|
5
|
+
const R = {
|
|
6
|
+
[N.BOTTOM]: a,
|
|
7
|
+
[N.MIDDLE]: f
|
|
8
|
+
}, w = ({ src: r, imagePosition: n }) => {
|
|
9
|
+
const l = R[n] || a;
|
|
10
|
+
return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i("img", { src: r, alt: "" }) });
|
|
11
|
+
}, y = C(k), j = C(h), q = ({ notification: r, open: n, close: l, webos: c }) => {
|
|
12
|
+
if (!r || !r.promotion || r.enabled !== t.NOTIFICATION_ENABLED)
|
|
12
13
|
return null;
|
|
13
|
-
const { title:
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ i(
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const { title: s, body: d, image: T, promotion: p } = r, { sponsorLogo: g, sponsorLogoMode: M, imagePosition: b, ctaButton: o } = p;
|
|
15
|
+
return /* @__PURE__ */ e(L, { className: "SL_Lower_Third_Notification", onClick: c ? void 0 : n, children: [
|
|
16
|
+
/* @__PURE__ */ e(A, { children: [
|
|
17
|
+
/* @__PURE__ */ i(w, { src: T, imagePosition: b }),
|
|
18
|
+
/* @__PURE__ */ e(S, { children: [
|
|
19
|
+
s && /* @__PURE__ */ i(E, { children: s }),
|
|
20
|
+
d && /* @__PURE__ */ i(P, { children: d })
|
|
20
21
|
] })
|
|
21
22
|
] }),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */ i(
|
|
25
|
-
/* @__PURE__ */ i(
|
|
23
|
+
/* @__PURE__ */ e(x, { children: [
|
|
24
|
+
M !== _.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(m, { children: [
|
|
25
|
+
/* @__PURE__ */ i(D, { children: /* @__PURE__ */ i("img", { src: g, alt: s }) }),
|
|
26
|
+
/* @__PURE__ */ i(F, {})
|
|
26
27
|
] }),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
c ? /* @__PURE__ */ e(m, { children: [
|
|
29
|
+
/* @__PURE__ */ i(y, { webos: !0, onClick: l, children: "Dismiss" }),
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
|
+
j,
|
|
32
|
+
{
|
|
33
|
+
webos: !0,
|
|
34
|
+
autoFocus: !0,
|
|
35
|
+
style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color },
|
|
36
|
+
onClick: n,
|
|
37
|
+
children: [
|
|
38
|
+
(o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === I.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(O, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
|
|
39
|
+
(o == null ? void 0 : o.label) || "Open"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }) : /* @__PURE__ */ e(h, { name: "promo-button", style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color }, children: [
|
|
44
|
+
(o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === I.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(O, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
|
|
29
45
|
(o == null ? void 0 : o.label) || "Open"
|
|
30
46
|
] })
|
|
31
47
|
] })
|
|
32
48
|
] });
|
|
33
49
|
};
|
|
34
50
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
q as LowerThirdNotification,
|
|
52
|
+
w as NotificationMedia
|
|
37
53
|
};
|
|
@@ -14,3 +14,14 @@ export declare const Logo: import('@linaria/react').StyledComponent<import('reac
|
|
|
14
14
|
export declare const Footer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
15
15
|
export declare const Vector: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
16
16
|
export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
17
|
+
export declare const TVButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
18
|
+
export declare const DismissButton: {
|
|
19
|
+
__wyw_meta: unknown;
|
|
20
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown> & {
|
|
21
|
+
as?: React.ElementType;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const OpenButton: {
|
|
24
|
+
__wyw_meta: unknown;
|
|
25
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown> & {
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
}>;
|