@streamlayer/react 1.12.1 → 1.13.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.d.ts +1 -0
- package/lib/app/masters.d.ts +11 -18
- package/lib/app/provider.d.ts +2 -0
- package/lib/app/useStreamLayerApp.d.ts +3 -1
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/index2.js +6 -2
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +28 -162
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/app/app.d.ts +1 -0
- package/lib/classic/app/masters.d.ts +11 -18
- package/lib/classic/app/provider.d.ts +2 -0
- package/lib/classic/app/useStreamLayerApp.d.ts +3 -1
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/bet-pack.js +1 -1
- package/lib/classic/cjs/gamification-feature2.js +1 -1
- package/lib/classic/cjs/index2.js +6 -2
- package/lib/classic/cjs/masters.js +1 -1
- package/lib/classic/cjs/masters2.js +3 -3
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +28 -162
- package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/es/advertisement.js +30 -30
- package/lib/classic/es/bet-pack.js +1 -1
- package/lib/classic/es/gamification-feature2.js +1 -1
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/index2.js +1160 -1055
- package/lib/classic/es/masters.js +5 -4
- package/lib/classic/es/masters2.js +467 -580
- package/lib/classic/es/notification.js +42 -42
- package/lib/classic/es/points.js +5 -5
- package/lib/classic/es/provider.js +8535 -22157
- package/lib/classic/es/useStreamLayerApp2.js +2321 -2232
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +53 -183
- package/lib/dist/es/gamification-feature.js +1 -1
- package/lib/dist/es/gamification-feature2.js +231 -77
- package/lib/dist/es/index.js +3 -2
- package/lib/dist/es/masters.js +19314 -32998
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +30 -30
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/gamification-feature2.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +1160 -1055
- package/lib/es/masters.js +5 -4
- package/lib/es/masters2.js +467 -580
- package/lib/es/notification.js +42 -42
- package/lib/es/points.js +5 -5
- package/lib/es/provider.js +8524 -22146
- package/lib/es/useStreamLayerApp2.js +2321 -2232
- package/lib/style.css +1 -1
- package/package.json +17 -15
package/lib/es/advertisement.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as v, Fragment as po } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as F, useState as R, useCallback as Mo, useEffect as L } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { N, a as vo, b as Ao, C as go, c as ho, P as k, d as
|
|
3
|
+
import { e as M, s as n, Z as Po, f as mo, g as D, Y as ko, a as uo, L as Lo, u as Oo, i as _o, b as Bo, S as T, h as xo } from "./provider.js";
|
|
4
|
+
import { N, a as vo, b as Ao, C as go, c as ho, P as k, d as S, A as Ro, e as Do, S as qo } from "./useStreamLayerApp2.js";
|
|
5
5
|
const wo = /* @__PURE__ */ n("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "c5b6wdg",
|
|
@@ -23,11 +23,11 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
23
23
|
name: "Link",
|
|
24
24
|
class: "l1sgte8c",
|
|
25
25
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
26
|
+
}), Zo = /* @__PURE__ */ n("div")({
|
|
27
27
|
name: "BannerContainer",
|
|
28
28
|
class: "b7yfc72",
|
|
29
29
|
propsAsIs: !1
|
|
30
|
-
}),
|
|
30
|
+
}), Yo = () => Ko, Jo = /* @__PURE__ */ n(Yo())({
|
|
31
31
|
name: "BannerLink",
|
|
32
32
|
class: "bejjq94",
|
|
33
33
|
propsAsIs: !0
|
|
@@ -36,8 +36,8 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
36
36
|
if (!((l = o.additionalBanner) != null && l.imageUrl))
|
|
37
37
|
return null;
|
|
38
38
|
let c = (r = o.additionalBanner) == null ? void 0 : r.url;
|
|
39
|
-
return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ e(z, { direction: t, hiding: i, children: /* @__PURE__ */ e(
|
|
40
|
-
|
|
39
|
+
return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ e(z, { direction: t, hiding: i, children: /* @__PURE__ */ e(Zo, { className: "BannerContainer", children: /* @__PURE__ */ e(
|
|
40
|
+
Jo,
|
|
41
41
|
{
|
|
42
42
|
as: c ? "a" : "span",
|
|
43
43
|
className: "BannerLink",
|
|
@@ -169,11 +169,11 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
169
169
|
name: "MediaImgSolid",
|
|
170
170
|
class: "mqvntt2",
|
|
171
171
|
propsAsIs: !0
|
|
172
|
-
}), Te = () => q,
|
|
172
|
+
}), Te = () => q, Se = /* @__PURE__ */ n(Te())({
|
|
173
173
|
name: "MediaImgMiddle",
|
|
174
174
|
class: "m12jtj3u",
|
|
175
175
|
propsAsIs: !0
|
|
176
|
-
}),
|
|
176
|
+
}), Ee = /* @__PURE__ */ n("img")({
|
|
177
177
|
name: "CtaIcon",
|
|
178
178
|
class: "ckq1frv",
|
|
179
179
|
propsAsIs: !1
|
|
@@ -195,7 +195,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
195
195
|
[N.CENTERED]: Io,
|
|
196
196
|
[N.BOTTOM]: Ne,
|
|
197
197
|
[N.SOLID]: Ce,
|
|
198
|
-
[N.MIDDLE]:
|
|
198
|
+
[N.MIDDLE]: Se
|
|
199
199
|
}, _e = ({ src: o, imagePosition: s }) => {
|
|
200
200
|
const i = Oe[s];
|
|
201
201
|
return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
|
|
@@ -214,7 +214,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
214
214
|
c && /* @__PURE__ */ e(Ie, { children: c })
|
|
215
215
|
] }),
|
|
216
216
|
/* @__PURE__ */ v(Me, { name: "promo-button", style: { color: p == null ? void 0 : p.textColor, backgroundColor: p == null ? void 0 : p.color }, children: [
|
|
217
|
-
(p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === go.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(
|
|
217
|
+
(p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === go.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Ee, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
|
|
218
218
|
(p == null ? void 0 : p.label) || "Open"
|
|
219
219
|
] }),
|
|
220
220
|
/* @__PURE__ */ e(ke, { name: "chevronRight" })
|
|
@@ -300,7 +300,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
300
300
|
name: "Dot",
|
|
301
301
|
class: "d1f6aqua",
|
|
302
302
|
propsAsIs: !1
|
|
303
|
-
}),
|
|
303
|
+
}), Ze = ({
|
|
304
304
|
time: o,
|
|
305
305
|
adCount: s,
|
|
306
306
|
adPosition: i
|
|
@@ -315,7 +315,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
315
315
|
children: [t, ":", l < 10 ? `0${l}` : l]
|
|
316
316
|
})]
|
|
317
317
|
});
|
|
318
|
-
},
|
|
318
|
+
}, Ye = (o, s, { onPlay: i, onStop: t, onProgress: l }) => {
|
|
319
319
|
const r = google.ima;
|
|
320
320
|
let c = new r.AdDisplayContainer(o), m = new r.AdsLoader(c), A = new r.AdsRequest(), a;
|
|
321
321
|
m.addEventListener(
|
|
@@ -342,7 +342,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
342
342
|
}
|
|
343
343
|
return g;
|
|
344
344
|
};
|
|
345
|
-
},
|
|
345
|
+
}, Je = /* @__PURE__ */ n("div")({
|
|
346
346
|
name: "Container",
|
|
347
347
|
class: "c4q6dw1",
|
|
348
348
|
propsAsIs: !1
|
|
@@ -367,7 +367,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
367
367
|
L(() => {
|
|
368
368
|
if (l != null && l.url && m.current) {
|
|
369
369
|
b();
|
|
370
|
-
const f =
|
|
370
|
+
const f = Ye(m.current, l.url, {
|
|
371
371
|
onPlay: () => {
|
|
372
372
|
D.emit("advertisement", {
|
|
373
373
|
action: "videoPlay",
|
|
@@ -404,7 +404,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
404
404
|
children: "Ad"
|
|
405
405
|
})
|
|
406
406
|
}), /* @__PURE__ */ v(Qe, {
|
|
407
|
-
children: [/* @__PURE__ */ e(
|
|
407
|
+
children: [/* @__PURE__ */ e(Ze, {
|
|
408
408
|
time: g,
|
|
409
409
|
adCount: p,
|
|
410
410
|
adPosition: $
|
|
@@ -418,27 +418,27 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
418
418
|
})]
|
|
419
419
|
}), /* @__PURE__ */ e($o, {
|
|
420
420
|
className: M(Xe, A && on, !A && en),
|
|
421
|
-
children: /* @__PURE__ */ e(
|
|
421
|
+
children: /* @__PURE__ */ e(Je, {
|
|
422
422
|
ref: m
|
|
423
423
|
})
|
|
424
424
|
})]
|
|
425
425
|
});
|
|
426
426
|
}, co = (o) => {
|
|
427
|
-
var s, i, t, l, r, c, m, A, a, g, u, p, I, $, h, y, b, O, f, C, W, H, K, Y, J,
|
|
427
|
+
var s, i, t, l, r, c, m, A, a, g, u, p, I, $, h, y, b, O, f, C, W, H, K, Z, Y, J, Q, X, oo, eo;
|
|
428
428
|
const {
|
|
429
429
|
promotion: d,
|
|
430
430
|
open: no,
|
|
431
431
|
advertisementPaused: To,
|
|
432
|
-
togglePause:
|
|
432
|
+
togglePause: E,
|
|
433
433
|
controlVideo: _,
|
|
434
|
-
skipAutoClose:
|
|
434
|
+
skipAutoClose: So,
|
|
435
435
|
promotionId: B,
|
|
436
|
-
onClose:
|
|
436
|
+
onClose: Eo,
|
|
437
437
|
markAsViewed: w,
|
|
438
438
|
externalAd: so
|
|
439
|
-
} = o, V = d.type ===
|
|
439
|
+
} = o, V = d.type === S.INGAME_IAB11_LBAR || d.type === S.INGAME_IAB11, j = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === k.CENTER, to = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), x = d.autoPlayVideo === Ro.ENABLED;
|
|
440
440
|
if (L(() => {
|
|
441
|
-
|
|
441
|
+
E == null || E(to || x), no == null || no();
|
|
442
442
|
}, []), L(() => {
|
|
443
443
|
B && d.type && w && w();
|
|
444
444
|
}, [B, d.type, w]), L(() => () => {
|
|
@@ -472,9 +472,9 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
472
472
|
mo,
|
|
473
473
|
{
|
|
474
474
|
className: "ClosePromoIcon",
|
|
475
|
-
close:
|
|
475
|
+
close: Eo,
|
|
476
476
|
autoClose: (g = d.closeTimer) == null ? void 0 : g.auto,
|
|
477
|
-
duration:
|
|
477
|
+
duration: So ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
|
|
478
478
|
isPlaying: U
|
|
479
479
|
}
|
|
480
480
|
)
|
|
@@ -488,7 +488,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
488
488
|
poster: (O = (b = d.banner) == null ? void 0 : b.video) == null ? void 0 : O.thumbnailUrl,
|
|
489
489
|
aspectRatio: V ? "1/1" : "16/9",
|
|
490
490
|
onPause: () => {
|
|
491
|
-
x && (
|
|
491
|
+
x && (E == null || E(!0));
|
|
492
492
|
},
|
|
493
493
|
onPlay: () => {
|
|
494
494
|
D.emit("advertisement", {
|
|
@@ -497,7 +497,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
497
497
|
id: B,
|
|
498
498
|
type: d.type
|
|
499
499
|
}
|
|
500
|
-
}),
|
|
500
|
+
}), E == null || E(!1);
|
|
501
501
|
},
|
|
502
502
|
controlVideo: _,
|
|
503
503
|
autoPlay: x
|
|
@@ -505,7 +505,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
505
505
|
) : (f = d.banner) != null && f.imageUrl ? /* @__PURE__ */ e(De, { style: V ? { aspectRatio: "1/1" } : {}, src: (C = d.banner) == null ? void 0 : C.imageUrl, alt: "promo" }) : null }),
|
|
506
506
|
!V && /* @__PURE__ */ v(ro, { children: [
|
|
507
507
|
((W = d.banner) == null ? void 0 : W.title) && /* @__PURE__ */ e(Ge, { className: M("AdvTitle", j && We), children: (H = d.banner) == null ? void 0 : H.title }),
|
|
508
|
-
((K = d.banner) == null ? void 0 : K.body) && /* @__PURE__ */ e(we, { className: "AdvDescription", children: (
|
|
508
|
+
((K = d.banner) == null ? void 0 : K.body) && /* @__PURE__ */ e(we, { className: "AdvDescription", children: (Z = d.banner) == null ? void 0 : Z.body })
|
|
509
509
|
] })
|
|
510
510
|
] }),
|
|
511
511
|
d.buttonType !== Do.NO_BUTTON && /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e(
|
|
@@ -513,7 +513,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
513
513
|
{
|
|
514
514
|
href: P,
|
|
515
515
|
style: {
|
|
516
|
-
backgroundColor: ((
|
|
516
|
+
backgroundColor: ((J = (Y = d.banner) == null ? void 0 : Y.ctaButton) == null ? void 0 : J.color) || "#009dc4",
|
|
517
517
|
color: ((X = (Q = d.banner) == null ? void 0 : Q.ctaButton) == null ? void 0 : X.textColor) || "#fff"
|
|
518
518
|
},
|
|
519
519
|
"data-analytics": "button",
|
|
@@ -542,7 +542,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
542
542
|
children: /* @__PURE__ */ e(sn, {
|
|
543
543
|
children: o
|
|
544
544
|
})
|
|
545
|
-
}), an = (o) => (o == null ? void 0 : o.type) ===
|
|
545
|
+
}), an = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === S.INGAME_IAB21_LBAR, rn = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11 || (o == null ? void 0 : o.type) === S.INGAME_IAB21, ln = ({
|
|
546
546
|
advertisement: o,
|
|
547
547
|
close: s,
|
|
548
548
|
skipTypeCheck: i,
|
|
@@ -607,7 +607,7 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
607
607
|
}), cn = (o) => {
|
|
608
608
|
const s = o.target;
|
|
609
609
|
if (s instanceof HTMLAnchorElement && s.target === "_blank") {
|
|
610
|
-
const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") ||
|
|
610
|
+
const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") || S.UNSET;
|
|
611
611
|
s.getAttribute("data-analytics") === "button" && D.emit("advertisement", {
|
|
612
612
|
action: "buttonSelect",
|
|
613
613
|
payload: {
|
package/lib/es/bet-pack.js
CHANGED
package/lib/es/index.js
CHANGED