@streamlayer/react 1.3.0 → 1.3.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/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/masters2.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +1 -1
- package/lib/dist/cjs/masters.js +16 -16
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +35 -33
- package/lib/es/index2.js +107 -107
- package/lib/es/masters2.js +1 -1
- package/lib/es/points.js +6 -6
- package/lib/es/provider.js +10 -10
- package/lib/es/useStreamLayerApp2.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/advertisement.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as F, useRef as z, useMemo as W } from "react";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as g, s as n, c as H, Q as K, e as A, u as I, L as Q } from "./provider.js";
|
|
4
4
|
import { F as J, u as V, d as X } from "./index2.js";
|
|
5
5
|
import { P as u, a as h, S as Y } from "./useStreamLayerApp2.js";
|
|
6
6
|
const Z = /* @__PURE__ */ n("div")({
|
|
@@ -17,7 +17,7 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
17
17
|
onAnimationEnd: l
|
|
18
18
|
}) => /* @__PURE__ */ o(Z, {
|
|
19
19
|
style: s,
|
|
20
|
-
className:
|
|
20
|
+
className: g(r, ee, re(i), a && !t && te(i), a && t && ie(i)),
|
|
21
21
|
onAnimationEnd: l,
|
|
22
22
|
children: e
|
|
23
23
|
}), le = /* @__PURE__ */ n("a")({
|
|
@@ -38,10 +38,12 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
38
38
|
propsAsIs: !1
|
|
39
39
|
}), ue = ({ promotion: e, promotionId: s, hiding: r, direction: a = "bottom" }) => {
|
|
40
40
|
var t;
|
|
41
|
-
return (t = e.additionalBanner) != null && t.imageUrl ? /* @__PURE__ */ o(q, { direction: a, hiding: r, children: /* @__PURE__ */ o(de, { children: /* @__PURE__ */ o(
|
|
41
|
+
return (t = e.additionalBanner) != null && t.imageUrl ? /* @__PURE__ */ o(q, { direction: a, hiding: r, children: /* @__PURE__ */ o(de, { className: "BannerContainer", children: /* @__PURE__ */ o(
|
|
42
42
|
pe,
|
|
43
43
|
{
|
|
44
|
+
className: "BannerLink",
|
|
44
45
|
href: e.additionalBanner.url,
|
|
46
|
+
style: { backgroundImage: `url(${e.additionalBanner.imageUrl})` },
|
|
45
47
|
"data-promo-id": s,
|
|
46
48
|
"data-promo-type": e.type,
|
|
47
49
|
"data-analytics": "banner",
|
|
@@ -65,11 +67,11 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
65
67
|
name: "HeaderContent",
|
|
66
68
|
class: "h149e3gp",
|
|
67
69
|
propsAsIs: !1
|
|
68
|
-
}),
|
|
70
|
+
}), ge = "h10toh7", D = /* @__PURE__ */ n("img")({
|
|
69
71
|
name: "SponsorLogo",
|
|
70
72
|
class: "s1jyea6t",
|
|
71
73
|
propsAsIs: !1
|
|
72
|
-
}),
|
|
74
|
+
}), Ae = /* @__PURE__ */ n("div")({
|
|
73
75
|
name: "SponsorName",
|
|
74
76
|
class: "szpfa3h",
|
|
75
77
|
propsAsIs: !1
|
|
@@ -81,7 +83,7 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
81
83
|
name: "PromoImg",
|
|
82
84
|
class: "p1l37r8s",
|
|
83
85
|
propsAsIs: !1
|
|
84
|
-
}), $e = "s1nmch9k",
|
|
86
|
+
}), $e = "s1nmch9k", R = /* @__PURE__ */ n("div")({
|
|
85
87
|
name: "Content",
|
|
86
88
|
class: "c1er0ljd",
|
|
87
89
|
propsAsIs: !1
|
|
@@ -97,19 +99,19 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
97
99
|
name: "SponsorText",
|
|
98
100
|
class: "s1evcmtq",
|
|
99
101
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
102
|
+
}), Ne = /* @__PURE__ */ n("div")({
|
|
101
103
|
name: "ADLogo",
|
|
102
104
|
class: "awodx0x",
|
|
103
105
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
106
|
+
}), Be = /* @__PURE__ */ n("span")({
|
|
105
107
|
name: "SponsoredText",
|
|
106
108
|
class: "s1q3n6oi",
|
|
107
109
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
110
|
+
}), Me = /* @__PURE__ */ n("div")({
|
|
109
111
|
name: "CloseIconWrap",
|
|
110
112
|
class: "c8d4xfk",
|
|
111
113
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
114
|
+
}), Te = () => H, Ee = /* @__PURE__ */ n(Te())({
|
|
113
115
|
name: "CloseIcon",
|
|
114
116
|
class: "ct6oobh",
|
|
115
117
|
propsAsIs: !0
|
|
@@ -126,12 +128,12 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
126
128
|
class: "t3vxzaw",
|
|
127
129
|
propsAsIs: !1
|
|
128
130
|
}), je = "h10f3u0j", G = ({ promotion: e, promotionId: s, onClose: r }) => {
|
|
129
|
-
var a, t, i, l, p, m, c, v, f, $, k, S, C,
|
|
131
|
+
var a, t, i, l, p, m, c, v, f, $, k, S, C, N, B, M, T, E, L, x, _, j, P, O, U, w;
|
|
130
132
|
const y = e.type === u.INGAME_IAB11_LBAR || e.type === u.INGAME_IAB11, b = ((a = e.sponsor) == null ? void 0 : a.logo) && e.logoMode === h.CENTER;
|
|
131
133
|
return /* @__PURE__ */ d(he, { className: "PromoOverlay", children: [
|
|
132
134
|
/* @__PURE__ */ d(ye, { children: [
|
|
133
|
-
/* @__PURE__ */ d(be, { className:
|
|
134
|
-
((t = e.sponsor) == null ? void 0 : t.logo) && e.logoMode === h.LEFT && /* @__PURE__ */ o(
|
|
135
|
+
/* @__PURE__ */ d(be, { className: g(!b && ge), children: [
|
|
136
|
+
((t = e.sponsor) == null ? void 0 : t.logo) && e.logoMode === h.LEFT && /* @__PURE__ */ o(D, { src: (i = e.sponsor) == null ? void 0 : i.logo, alt: "promo" }),
|
|
135
137
|
/* @__PURE__ */ d(
|
|
136
138
|
Se,
|
|
137
139
|
{
|
|
@@ -139,27 +141,27 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
139
141
|
paddingLeft: (l = e.sponsor) != null && l.logo && e.logoMode === h.LEFT ? "0px" : "8px"
|
|
140
142
|
},
|
|
141
143
|
children: [
|
|
142
|
-
((p = e.sponsor) == null ? void 0 : p.logo) && e.logoMode === h.LEFT && /* @__PURE__ */ o(
|
|
143
|
-
/* @__PURE__ */ d(Ce, { children: [
|
|
144
|
-
/* @__PURE__ */ o(
|
|
145
|
-
/* @__PURE__ */ o(
|
|
144
|
+
((p = e.sponsor) == null ? void 0 : p.logo) && e.logoMode === h.LEFT && /* @__PURE__ */ o(Ae, { children: (m = e.sponsor) == null ? void 0 : m.name }),
|
|
145
|
+
/* @__PURE__ */ d(Ce, { className: "SponsorText", children: [
|
|
146
|
+
/* @__PURE__ */ o(Ne, { children: "AD" }),
|
|
147
|
+
/* @__PURE__ */ o(Be, { children: "SPONSORED" })
|
|
146
148
|
] })
|
|
147
149
|
]
|
|
148
150
|
}
|
|
149
151
|
)
|
|
150
152
|
] }),
|
|
151
|
-
/* @__PURE__ */ o(
|
|
153
|
+
/* @__PURE__ */ o(Me, { className: "ClosePromoIcon", onClick: r, children: /* @__PURE__ */ o(Ee, { name: "icon-cross" }) })
|
|
152
154
|
] }),
|
|
153
155
|
/* @__PURE__ */ d(Ie, { children: [
|
|
154
|
-
b && /* @__PURE__ */ o(
|
|
155
|
-
/* @__PURE__ */ o(
|
|
156
|
+
b && /* @__PURE__ */ o(D, { className: $e, src: (c = e.sponsor) == null ? void 0 : c.logo, alt: "promo" }),
|
|
157
|
+
/* @__PURE__ */ o(R, { children: (f = (v = e.banner) == null ? void 0 : v.video) != null && f.url ? /* @__PURE__ */ o(
|
|
156
158
|
K,
|
|
157
159
|
{
|
|
158
160
|
source: (k = ($ = e.banner) == null ? void 0 : $.video) == null ? void 0 : k.url,
|
|
159
161
|
poster: (C = (S = e.banner) == null ? void 0 : S.video) == null ? void 0 : C.thumbnailUrl,
|
|
160
162
|
aspectRatio: y ? "1/1" : "16/9",
|
|
161
163
|
onPlay: () => {
|
|
162
|
-
|
|
164
|
+
A.emit("advertisement", {
|
|
163
165
|
action: "videoPlay",
|
|
164
166
|
payload: {
|
|
165
167
|
advertisementId: s,
|
|
@@ -168,10 +170,10 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
|
-
) : (
|
|
172
|
-
!y && /* @__PURE__ */ d(
|
|
173
|
-
((
|
|
174
|
-
((
|
|
173
|
+
) : (N = e.banner) != null && N.imageUrl ? /* @__PURE__ */ o(fe, { style: y ? { aspectRatio: "1/1" } : {}, src: (B = e.banner) == null ? void 0 : B.imageUrl, alt: "promo" }) : null }),
|
|
174
|
+
!y && /* @__PURE__ */ d(R, { children: [
|
|
175
|
+
((M = e.banner) == null ? void 0 : M.title) && /* @__PURE__ */ o(_e, { className: g("AdvTitle", b && je), children: (T = e.banner) == null ? void 0 : T.title }),
|
|
176
|
+
((E = e.banner) == null ? void 0 : E.body) && /* @__PURE__ */ o(ke, { className: "AdvDescription", children: (L = e.banner) == null ? void 0 : L.body })
|
|
175
177
|
] })
|
|
176
178
|
] }),
|
|
177
179
|
/* @__PURE__ */ o(Le, { children: /* @__PURE__ */ o(
|
|
@@ -186,7 +188,7 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
186
188
|
"data-promo-id": s,
|
|
187
189
|
"data-promo-type": e.type,
|
|
188
190
|
target: "_blank",
|
|
189
|
-
children: (
|
|
191
|
+
children: (w = (U = e.banner) == null ? void 0 : U.ctaButton) == null ? void 0 : w.label
|
|
190
192
|
}
|
|
191
193
|
) })
|
|
192
194
|
] });
|
|
@@ -208,16 +210,16 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
208
210
|
children: /* @__PURE__ */ o(Pe, {
|
|
209
211
|
children: e
|
|
210
212
|
})
|
|
211
|
-
}),
|
|
213
|
+
}), Ue = (e) => (e == null ? void 0 : e.type) === u.INGAME_IAB11_LBAR || (e == null ? void 0 : e.type) === u.INGAME_IAB21_LBAR, we = (e) => (e == null ? void 0 : e.type) === u.INGAME_IAB11 || (e == null ? void 0 : e.type) === u.INGAME_IAB21, De = ({ advertisement: e, skipTypeCheck: s, layoutMode: r = "side-by-side", sidebar: a, banner: t }) => {
|
|
212
214
|
const i = I(e.data);
|
|
213
215
|
return !i.data && i.loading ? null : i.error ? /* @__PURE__ */ d("div", { children: [
|
|
214
216
|
"error ",
|
|
215
217
|
/* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
|
|
216
|
-
] }) : i.data ? !a && !t && (s ||
|
|
218
|
+
] }) : i.data ? !a && !t && (s || we(i.data)) ? /* @__PURE__ */ o(ve, { className: "PromoOverlayContainer", children: /* @__PURE__ */ o(G, { promotionId: e.id, promotion: i.data, onClose: e.close }) }) : a && (s || Ue(i.data)) ? /* @__PURE__ */ o(Oe, { className: "PromoSidebarContainer", direction: a, hiding: e.hiding, children: /* @__PURE__ */ o(G, { promotionId: e.id, promotion: i.data, onClose: e.close }) }) : t ? /* @__PURE__ */ o(ue, { promotionId: e.id, hiding: e.hiding, promotion: i.data, direction: t }) : null : /* @__PURE__ */ d("div", { children: [
|
|
217
219
|
"empty promo ",
|
|
218
220
|
/* @__PURE__ */ o("button", { onClick: e.close, children: "close" })
|
|
219
221
|
] });
|
|
220
|
-
},
|
|
222
|
+
}, Re = /* @__PURE__ */ n("div")({
|
|
221
223
|
name: "AdvertisementUIWrap",
|
|
222
224
|
class: "aa6pjif",
|
|
223
225
|
propsAsIs: !1
|
|
@@ -225,13 +227,13 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
225
227
|
const s = e.target;
|
|
226
228
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
227
229
|
const r = s.getAttribute("data-promo-id") || "", a = s.getAttribute("data-promo-type") || u.UNSET;
|
|
228
|
-
s.getAttribute("data-analytics") === "button" &&
|
|
230
|
+
s.getAttribute("data-analytics") === "button" && A.emit("advertisement", {
|
|
229
231
|
action: "buttonSelect",
|
|
230
232
|
payload: {
|
|
231
233
|
advertisementId: r,
|
|
232
234
|
advertisementType: a
|
|
233
235
|
}
|
|
234
|
-
}), s.getAttribute("data-analytics") === "banner" &&
|
|
236
|
+
}), s.getAttribute("data-analytics") === "banner" && A.emit("advertisement", {
|
|
235
237
|
action: "bannerSelect",
|
|
236
238
|
payload: {
|
|
237
239
|
advertisementId: r,
|
|
@@ -258,13 +260,13 @@ const Z = /* @__PURE__ */ n("div")({
|
|
|
258
260
|
enabled: !!c,
|
|
259
261
|
event: "click",
|
|
260
262
|
listener: Ge
|
|
261
|
-
}), c ? /* @__PURE__ */ o(
|
|
263
|
+
}), c ? /* @__PURE__ */ o(Re, {
|
|
262
264
|
ref: p,
|
|
263
265
|
style: {
|
|
264
266
|
height: !t && !a ? "auto" : "100%"
|
|
265
267
|
},
|
|
266
268
|
className: i ? "mobile-view" : "",
|
|
267
|
-
children: /* @__PURE__ */ o(
|
|
269
|
+
children: /* @__PURE__ */ o(De, {
|
|
268
270
|
skipTypeCheck: r,
|
|
269
271
|
sidebar: a,
|
|
270
272
|
banner: t,
|