@streamlayer/react 1.11.3 → 1.12.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/bet-pack.d.ts +20 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/bet-pack.js +1 -0
- package/lib/cjs/index2.js +5 -0
- package/lib/cjs/masters2.js +9 -9
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +47 -47
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/app/bet-pack.d.ts +20 -0
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/bet-pack.js +1 -0
- package/lib/classic/cjs/index2.js +5 -0
- package/lib/classic/cjs/masters2.js +9 -9
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +48 -48
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +17 -17
- package/lib/classic/es/bet-pack.js +14 -0
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/index2.js +2890 -0
- package/lib/classic/es/masters2.js +372 -497
- package/lib/classic/es/notification.js +24 -24
- package/lib/classic/es/points.js +6 -6
- package/lib/classic/es/provider.js +8872 -8796
- package/lib/classic/es/useStreamLayerApp2.js +3014 -2725
- package/lib/classic/masters.d.ts +5 -1
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +97 -93
- package/lib/dist/es/index.js +7 -5
- package/lib/dist/es/masters.js +24855 -21687
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +17 -17
- package/lib/es/bet-pack.js +14 -0
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +2890 -0
- package/lib/es/masters2.js +372 -497
- package/lib/es/notification.js +24 -24
- package/lib/es/points.js +6 -6
- package/lib/es/provider.js +8866 -8790
- package/lib/es/useStreamLayerApp2.js +3014 -2725
- package/lib/masters.d.ts +5 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
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 { c as M, s as n, E as Po, e 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 E, 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",
|
|
@@ -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, Ee = /* @__PURE__ */ n(Te())({
|
|
173
173
|
name: "MediaImgMiddle",
|
|
174
174
|
class: "m12jtj3u",
|
|
175
175
|
propsAsIs: !0
|
|
176
|
-
}),
|
|
176
|
+
}), Se = /* @__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]: Ee
|
|
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(Se, { 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" })
|
|
@@ -429,16 +429,16 @@ const wo = /* @__PURE__ */ n("div")({
|
|
|
429
429
|
promotion: d,
|
|
430
430
|
open: no,
|
|
431
431
|
advertisementPaused: To,
|
|
432
|
-
togglePause:
|
|
432
|
+
togglePause: S,
|
|
433
433
|
controlVideo: _,
|
|
434
|
-
skipAutoClose:
|
|
434
|
+
skipAutoClose: Eo,
|
|
435
435
|
promotionId: B,
|
|
436
|
-
onClose:
|
|
436
|
+
onClose: So,
|
|
437
437
|
markAsViewed: w,
|
|
438
438
|
externalAd: so
|
|
439
|
-
} = o, V = d.type ===
|
|
439
|
+
} = o, V = d.type === E.INGAME_IAB11_LBAR || d.type === E.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
|
+
S == null || S(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: So,
|
|
476
476
|
autoClose: (g = d.closeTimer) == null ? void 0 : g.auto,
|
|
477
|
-
duration:
|
|
477
|
+
duration: Eo ? 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 && (S == null || S(!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
|
+
}), S == null || S(!1);
|
|
501
501
|
},
|
|
502
502
|
controlVideo: _,
|
|
503
503
|
autoPlay: x
|
|
@@ -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) === E.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === E.INGAME_IAB21_LBAR, rn = (o) => (o == null ? void 0 : o.type) === E.INGAME_IAB11 || (o == null ? void 0 : o.type) === E.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") || E.UNSET;
|
|
611
611
|
s.getAttribute("data-analytics") === "button" && D.emit("advertisement", {
|
|
612
612
|
action: "buttonSelect",
|
|
613
613
|
payload: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Y as s, r as u } from "./index2.js";
|
|
3
|
+
import { u as o } from "./provider.js";
|
|
4
|
+
const c = () => {
|
|
5
|
+
const r = o();
|
|
6
|
+
return r ? /* @__PURE__ */ e(s, { sdk: r }) : null;
|
|
7
|
+
}, f = ({ close: r, onEvent: n }) => {
|
|
8
|
+
const t = o();
|
|
9
|
+
return t ? /* @__PURE__ */ e(u, { sdk: t, onEvent: n, close: r }) : null;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
f as BetPackOverlayProvider,
|
|
13
|
+
c as BetPackProvider
|
|
14
|
+
};
|
package/lib/es/index.js
CHANGED