@streamlayer/react-ui 1.28.3 → 1.29.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/Layout/styles.d.ts +1 -0
- package/lib/app/app/Layout/styles.js +33 -24
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +2 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +92 -70
- package/lib/app/webos/ExposedPauseAd/styles.d.ts +1 -1
- package/lib/app/webos/ExposedPauseAd/styles.js +5 -5
- package/lib/app/webos/index.d.ts +4 -0
- package/lib/app/webos/index.js +38 -36
- package/lib/app/webos/story.js +29 -25
- package/lib/app/webos/ui/Sidebar/PromoAction.js +38 -34
- package/lib/app/webos/ui/Sidebar/index.js +24 -24
- package/lib/app/webos/ui/Sidebar/styles.d.ts +1 -0
- package/lib/app/webos/ui/Sidebar/styles.js +120 -115
- package/lib/assets/style.css +1 -1
- package/lib/{index-DXvAPWiE.js → index-l-eyvmpL.js} +296 -281
- package/lib/ui/advertisement/notification/index.js +24 -24
- package/lib/ui/advertisement/notification/lower-third/index.js +48 -40
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +8 -7
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +9 -0
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +44 -0
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +240 -6
- package/lib/{useVastAds-CakWRNKN.js → vast-client.min-B0NUra1B.js} +358 -594
- package/package.json +17 -17
- package/lib/app/webos/ui/Layout/index.d.ts +0 -21
- package/lib/app/webos/ui/Layout/index.js +0 -78
- package/lib/app/webos/ui/Layout/styles.d.ts +0 -11
- package/lib/app/webos/ui/Layout/styles.js +0 -59
|
@@ -1,53 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { withFocusable as
|
|
3
|
-
import { PromotionButtonType as
|
|
4
|
-
import { QRBlock as u, QR as E, QRDescBlock as A, LearnMore as
|
|
5
|
-
const
|
|
6
|
-
var d, R, h, N,
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ c(
|
|
12
|
-
/* @__PURE__ */ c(
|
|
1
|
+
import { jsxs as t, jsx as c, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { withFocusable as F } from "../../useTvButton.js";
|
|
3
|
+
import { PromotionButtonType as n, PromotionType as _ } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { QRBlock as u, QR as E, QRDescBlock as A, LearnMore as a, QRHint as O, EnvelopeIcon as x, SendToUserText as H, SendToUserButton as Q } from "./styles.js";
|
|
5
|
+
const C = F(Q), w = ({ promotion: e, onClose: M }) => {
|
|
6
|
+
var d, R, s, h, N, b, B, S, I, D, f, L, U;
|
|
7
|
+
const r = e.buttonType, y = e.coupon, l = (d = e.banner) == null ? void 0 : d.url, T = e.type;
|
|
8
|
+
return r === n.BASIC ? /* @__PURE__ */ t(u, { children: [
|
|
9
|
+
l && /* @__PURE__ */ c(E, { value: l }),
|
|
10
|
+
/* @__PURE__ */ t(A, { children: [
|
|
11
|
+
/* @__PURE__ */ c(a, { children: "LEARN MORE" }),
|
|
12
|
+
/* @__PURE__ */ c(O, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
|
|
13
13
|
] })
|
|
14
|
-
] }) :
|
|
14
|
+
] }) : r === n.ADD_TO_WALLET ? /* @__PURE__ */ t(u, { children: [
|
|
15
15
|
/* @__PURE__ */ c(E, { value: y }),
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */ c(
|
|
18
|
-
/* @__PURE__ */ c(
|
|
16
|
+
/* @__PURE__ */ t(A, { children: [
|
|
17
|
+
/* @__PURE__ */ c(a, { style: { fontSize: 18, fontWeight: 400 }, children: "ADD TO APPLE WALLET" }),
|
|
18
|
+
/* @__PURE__ */ c(O, { style: { fontSize: 17 }, children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
|
|
19
19
|
] })
|
|
20
|
-
] }) :
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
20
|
+
] }) : r === n.SEND_TO_USER && T !== _.INGAME_IAB11_LBAR ? /* @__PURE__ */ t(P, { children: [
|
|
21
|
+
/* @__PURE__ */ t(
|
|
22
|
+
C,
|
|
23
23
|
{
|
|
24
|
-
backgroundColor: (
|
|
25
|
-
textColor: (
|
|
24
|
+
backgroundColor: (s = (R = e == null ? void 0 : e.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : s.color,
|
|
25
|
+
textColor: (N = (h = e == null ? void 0 : e.banner) == null ? void 0 : h.ctaButton) == null ? void 0 : N.textColor,
|
|
26
|
+
autoFocus: !0,
|
|
27
|
+
webos: !0,
|
|
26
28
|
children: [
|
|
27
29
|
/* @__PURE__ */ c(x, {}),
|
|
28
30
|
"SEND INFO TO ACCOUNT EMAIL"
|
|
29
31
|
]
|
|
30
32
|
}
|
|
31
33
|
),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ c(
|
|
36
|
-
/* @__PURE__ */ c(
|
|
34
|
+
/* @__PURE__ */ t(u, { children: [
|
|
35
|
+
l && /* @__PURE__ */ c(E, { value: l }),
|
|
36
|
+
/* @__PURE__ */ t(A, { children: [
|
|
37
|
+
/* @__PURE__ */ c(a, { children: "LEARN MORE" }),
|
|
38
|
+
/* @__PURE__ */ c(O, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
|
|
37
39
|
] })
|
|
38
40
|
] })
|
|
39
|
-
] }) :
|
|
40
|
-
|
|
41
|
+
] }) : r === n.SEND_TO_USER && T === _.INGAME_IAB11_LBAR ? /* @__PURE__ */ t(
|
|
42
|
+
C,
|
|
41
43
|
{
|
|
42
|
-
backgroundColor: (
|
|
43
|
-
textColor: (I = (
|
|
44
|
+
backgroundColor: (B = (b = e == null ? void 0 : e.banner) == null ? void 0 : b.ctaButton) == null ? void 0 : B.color,
|
|
45
|
+
textColor: (I = (S = e == null ? void 0 : e.banner) == null ? void 0 : S.ctaButton) == null ? void 0 : I.textColor,
|
|
46
|
+
webos: !0,
|
|
47
|
+
autoFocus: !0,
|
|
44
48
|
children: [
|
|
45
49
|
/* @__PURE__ */ c(x, {}),
|
|
46
|
-
/* @__PURE__ */ c(
|
|
50
|
+
/* @__PURE__ */ c(H, { children: "SEND INFO TO ACCOUNT EMAIL" })
|
|
47
51
|
]
|
|
48
52
|
}
|
|
49
|
-
) :
|
|
50
|
-
|
|
53
|
+
) : r === n.RETURN_TO_VIDEO ? /* @__PURE__ */ c(
|
|
54
|
+
C,
|
|
51
55
|
{
|
|
52
56
|
webos: !0,
|
|
53
57
|
autoFocus: !0,
|
|
@@ -59,5 +63,5 @@ const W = H(a), i = ({ promotion: e, onClose: M }) => {
|
|
|
59
63
|
) : null;
|
|
60
64
|
};
|
|
61
65
|
export {
|
|
62
|
-
|
|
66
|
+
w as PromoAction
|
|
63
67
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as d, jsxs as l, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import { updateAllLayouts as ee } from "@noriginmedia/norigin-spatial-navigation";
|
|
3
3
|
import { withFocusable as oe } from "../../useTvButton.js";
|
|
4
|
-
import { useRef as
|
|
4
|
+
import { useRef as k, useState as I, useEffect as h } from "react";
|
|
5
5
|
import { eventBus as p } from "@streamlayer/sdk-web-interfaces";
|
|
6
6
|
import { PromotionType as r, AutoPlayVideo as te, PlayVideoMuted as de } from "@streamlayer/sdk-web-types";
|
|
7
|
-
import { SvgIcon as
|
|
7
|
+
import { SvgIcon as T } from "../../../../ui/icons/index.js";
|
|
8
8
|
import { PromoAction as ae } from "./PromoAction.js";
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
9
|
+
import { Wrap as ne, Container as ie, Header as re, BrandBlock as le, LogoIcon as pe, BrandText as se, BrandNameContainer as ce, BrandName as ye, Sponsored as me, CloseIcon as ue, VideoBlock as he, VideoWrapper as Ae, FocusableVideo as Be, VideoStatus as O, Title as Ie, Description as be, CloseButton as Me } from "./styles.js";
|
|
10
|
+
const Re = oe(Me, {
|
|
11
11
|
isFocusBoundary: !0
|
|
12
|
-
}),
|
|
13
|
-
var N, _, w, P, S, g, L, C, G, D,
|
|
12
|
+
}), Ce = (j) => {
|
|
13
|
+
var N, _, w, P, S, g, L, C, G, D, x, U, v, W;
|
|
14
14
|
const {
|
|
15
15
|
promotion: e,
|
|
16
16
|
open: c,
|
|
@@ -23,7 +23,7 @@ const Me = oe(be, {
|
|
|
23
23
|
isEventFired: o,
|
|
24
24
|
fireEvent: t,
|
|
25
25
|
muted: $
|
|
26
|
-
} = j, q =
|
|
26
|
+
} = j, q = k(null), B = k(null), [M, z] = I(0), K = e.type === r.INGAME_IAB11_LBAR ? M : M / 2, R = !!((_ = (N = e.banner) == null ? void 0 : N.video) != null && _.url), y = e.autoPlayVideo === te.ENABLED, V = e.playVideoMuted === de.ENABLED, Q = V && y, J = e.type === r.INGAME_IAB11_LBAR || e.type === r.INGAME_IAB11 || e.type === r.INGAME_IAB11_SIDEBAR, [f, X] = I(!0), [Y, Z] = I(void 0);
|
|
27
27
|
let m = (w = e.banner) == null ? void 0 : w.url;
|
|
28
28
|
return m && !m.startsWith("http") && (m = `https://${m}`), h(() => {
|
|
29
29
|
if (!B.current) return;
|
|
@@ -40,17 +40,17 @@ const Me = oe(be, {
|
|
|
40
40
|
i && e.type && A && A();
|
|
41
41
|
}, [i, e.type, A]), h(() => () => {
|
|
42
42
|
s == null || s({ muted: !1 });
|
|
43
|
-
}, [s]), /* @__PURE__ */ d(
|
|
44
|
-
/* @__PURE__ */ l(
|
|
45
|
-
e.logoMode === 1 && /* @__PURE__ */ l(
|
|
46
|
-
/* @__PURE__ */ d(
|
|
47
|
-
/* @__PURE__ */ l(
|
|
48
|
-
/* @__PURE__ */ d(
|
|
49
|
-
/* @__PURE__ */ d(
|
|
43
|
+
}, [s]), /* @__PURE__ */ d(ne, { children: /* @__PURE__ */ l(ie, { ref: B, children: [
|
|
44
|
+
/* @__PURE__ */ l(re, { children: [
|
|
45
|
+
e.logoMode === 1 && /* @__PURE__ */ l(le, { children: [
|
|
46
|
+
/* @__PURE__ */ d(pe, { src: (P = e.sponsor) == null ? void 0 : P.logo, alt: "Logo" }),
|
|
47
|
+
/* @__PURE__ */ l(se, { children: [
|
|
48
|
+
/* @__PURE__ */ d(ce, { children: /* @__PURE__ */ d(ye, { children: (S = e.sponsor) == null ? void 0 : S.name }) }),
|
|
49
|
+
/* @__PURE__ */ d(me, { children: "SPONSORED" })
|
|
50
50
|
] })
|
|
51
51
|
] }),
|
|
52
52
|
e.logoMode === 2 && e.type === r.INGAME_IAB11_LBAR && /* @__PURE__ */ d("img", { src: (g = e.sponsor) == null ? void 0 : g.logo, alt: "Video paused preview", style: { height: "56px" } }),
|
|
53
|
-
/* @__PURE__ */ d(
|
|
53
|
+
/* @__PURE__ */ d(Re, { options: { focusKey: "close-ad-button" }, webos: !0, onClick: b, "data-close-btn": "true", children: /* @__PURE__ */ d(ue, {}) })
|
|
54
54
|
] }),
|
|
55
55
|
e.logoMode === 2 && e.type !== r.INGAME_IAB11_LBAR && /* @__PURE__ */ d(
|
|
56
56
|
"img",
|
|
@@ -65,7 +65,7 @@ const Me = oe(be, {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
((C = e.banner) == null ? void 0 : C.imageUrl) && /* @__PURE__ */ d(
|
|
68
|
+
((C = e.banner) == null ? void 0 : C.imageUrl) && /* @__PURE__ */ d(he, { style: { height: K }, children: /* @__PURE__ */ d(
|
|
69
69
|
"img",
|
|
70
70
|
{
|
|
71
71
|
src: (G = e.banner) == null ? void 0 : G.imageUrl,
|
|
@@ -73,12 +73,12 @@ const Me = oe(be, {
|
|
|
73
73
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
74
74
|
}
|
|
75
75
|
) }),
|
|
76
|
-
((D = e.banner) == null ? void 0 : D.video) && /* @__PURE__ */ l(
|
|
76
|
+
((D = e.banner) == null ? void 0 : D.video) && /* @__PURE__ */ l(Ae, { children: [
|
|
77
77
|
/* @__PURE__ */ d(
|
|
78
|
-
|
|
78
|
+
Be,
|
|
79
79
|
{
|
|
80
80
|
source: e.banner.video.url,
|
|
81
|
-
poster: (
|
|
81
|
+
poster: (U = (x = e.banner) == null ? void 0 : x.video) == null ? void 0 : U.thumbnailUrl,
|
|
82
82
|
webos: !0,
|
|
83
83
|
aspectRatio: J ? "1/1" : "2/1",
|
|
84
84
|
ref: q,
|
|
@@ -155,21 +155,21 @@ const Me = oe(be, {
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
H && !f && /* @__PURE__ */ l(O, { children: [
|
|
158
|
-
/* @__PURE__ */ d(
|
|
158
|
+
/* @__PURE__ */ d(T, { name: "icon-pause" }),
|
|
159
159
|
"PAUSED"
|
|
160
160
|
] }),
|
|
161
161
|
Y && Q && /* @__PURE__ */ l(O, { children: [
|
|
162
|
-
/* @__PURE__ */ d(
|
|
162
|
+
/* @__PURE__ */ d(T, { name: "iconMute" }),
|
|
163
163
|
"MUTED"
|
|
164
164
|
] })
|
|
165
165
|
] }),
|
|
166
166
|
e.type !== r.INGAME_IAB11 && e.type !== r.INGAME_IAB11_LBAR && e.type !== r.INGAME_IAB11_SIDEBAR && /* @__PURE__ */ l(F, { children: [
|
|
167
|
-
/* @__PURE__ */ d(
|
|
168
|
-
/* @__PURE__ */ d(
|
|
167
|
+
/* @__PURE__ */ d(Ie, { children: (v = e.banner) == null ? void 0 : v.title }),
|
|
168
|
+
/* @__PURE__ */ d(be, { children: (W = e.banner) == null ? void 0 : W.body })
|
|
169
169
|
] }),
|
|
170
170
|
/* @__PURE__ */ d(ae, { promotion: e, onClose: b })
|
|
171
171
|
] }) });
|
|
172
172
|
};
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
Ce as TVSidebar
|
|
175
175
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export declare const Wrap: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
3
|
export declare const Container: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
4
|
export declare const Header: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
5
|
export declare const BrandBlock: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|