@streamlayer/react 1.12.0 → 1.13.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.
Files changed (62) hide show
  1. package/lib/app/app.d.ts +1 -0
  2. package/lib/app/masters.d.ts +11 -18
  3. package/lib/app/provider.d.ts +2 -0
  4. package/lib/app/useStreamLayerApp.d.ts +3 -1
  5. package/lib/cjs/advertisement.js +1 -1
  6. package/lib/cjs/bet-pack.js +1 -1
  7. package/lib/cjs/gamification-feature2.js +1 -1
  8. package/lib/cjs/index2.js +6 -2
  9. package/lib/cjs/masters.js +1 -1
  10. package/lib/cjs/masters2.js +3 -3
  11. package/lib/cjs/notification.js +1 -1
  12. package/lib/cjs/points.js +1 -1
  13. package/lib/cjs/provider.js +28 -162
  14. package/lib/cjs/useStreamLayerApp2.js +9 -9
  15. package/lib/classic/app/app.d.ts +1 -0
  16. package/lib/classic/app/masters.d.ts +11 -18
  17. package/lib/classic/app/provider.d.ts +2 -0
  18. package/lib/classic/app/useStreamLayerApp.d.ts +3 -1
  19. package/lib/classic/cjs/advertisement.js +1 -1
  20. package/lib/classic/cjs/bet-pack.js +1 -1
  21. package/lib/classic/cjs/gamification-feature2.js +1 -1
  22. package/lib/classic/cjs/index2.js +6 -2
  23. package/lib/classic/cjs/masters.js +1 -1
  24. package/lib/classic/cjs/masters2.js +3 -3
  25. package/lib/classic/cjs/notification.js +1 -1
  26. package/lib/classic/cjs/points.js +1 -1
  27. package/lib/classic/cjs/provider.js +28 -162
  28. package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
  29. package/lib/classic/es/advertisement.js +30 -30
  30. package/lib/classic/es/bet-pack.js +1 -1
  31. package/lib/classic/es/gamification-feature2.js +1 -1
  32. package/lib/classic/es/index.js +1 -1
  33. package/lib/classic/es/index2.js +1160 -1055
  34. package/lib/classic/es/masters.js +5 -4
  35. package/lib/classic/es/masters2.js +467 -580
  36. package/lib/classic/es/notification.js +42 -42
  37. package/lib/classic/es/points.js +5 -5
  38. package/lib/classic/es/provider.js +8535 -22157
  39. package/lib/classic/es/useStreamLayerApp2.js +2321 -2232
  40. package/lib/classic/style.css +1 -1
  41. package/lib/dist/cjs/gamification-feature.js +1 -1
  42. package/lib/dist/cjs/gamification-feature2.js +1 -1
  43. package/lib/dist/cjs/index.js +1 -1
  44. package/lib/dist/cjs/masters.js +53 -183
  45. package/lib/dist/es/gamification-feature.js +1 -1
  46. package/lib/dist/es/gamification-feature2.js +231 -77
  47. package/lib/dist/es/index.js +3 -2
  48. package/lib/dist/es/masters.js +19314 -32998
  49. package/lib/dist/style.css +1 -1
  50. package/lib/es/advertisement.js +30 -30
  51. package/lib/es/bet-pack.js +1 -1
  52. package/lib/es/gamification-feature2.js +1 -1
  53. package/lib/es/index.js +1 -1
  54. package/lib/es/index2.js +1160 -1055
  55. package/lib/es/masters.js +5 -4
  56. package/lib/es/masters2.js +467 -580
  57. package/lib/es/notification.js +42 -42
  58. package/lib/es/points.js +5 -5
  59. package/lib/es/provider.js +8524 -22146
  60. package/lib/es/useStreamLayerApp2.js +2321 -2232
  61. package/lib/style.css +1 -1
  62. package/package.json +17 -15
@@ -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 { 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";
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
- }), Yo = /* @__PURE__ */ n("div")({
26
+ }), Zo = /* @__PURE__ */ n("div")({
27
27
  name: "BannerContainer",
28
28
  class: "b7yfc72",
29
29
  propsAsIs: !1
30
- }), Jo = () => Ko, Zo = /* @__PURE__ */ n(Jo())({
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(Yo, { className: "BannerContainer", children: /* @__PURE__ */ e(
40
- Zo,
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, Ee = /* @__PURE__ */ n(Te())({
172
+ }), Te = () => q, Se = /* @__PURE__ */ n(Te())({
173
173
  name: "MediaImgMiddle",
174
174
  class: "m12jtj3u",
175
175
  propsAsIs: !0
176
- }), Se = /* @__PURE__ */ n("img")({
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]: Ee
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(Se, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
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
- }), Ye = ({
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
- }, Je = (o, s, { onPlay: i, onStop: t, onProgress: l }) => {
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
- }, Ze = /* @__PURE__ */ n("div")({
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 = Je(m.current, l.url, {
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(Ye, {
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(Ze, {
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, Z, Q, X, oo, eo;
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: S,
432
+ togglePause: E,
433
433
  controlVideo: _,
434
- skipAutoClose: Eo,
434
+ skipAutoClose: So,
435
435
  promotionId: B,
436
- onClose: So,
436
+ onClose: Eo,
437
437
  markAsViewed: w,
438
438
  externalAd: so
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;
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
- S == null || S(to || x), no == null || no();
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: So,
475
+ close: Eo,
476
476
  autoClose: (g = d.closeTimer) == null ? void 0 : g.auto,
477
- duration: Eo ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
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 && (S == null || S(!0));
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
- }), S == null || S(!1);
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: (Y = d.banner) == null ? void 0 : Y.body })
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: ((Z = (J = d.banner) == null ? void 0 : J.ctaButton) == null ? void 0 : Z.color) || "#009dc4",
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) === 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 = ({
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") || E.UNSET;
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: {
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { Y as s, r as u } from "./index2.js";
2
+ import { q as s, n as u } from "./index2.js";
3
3
  import { u as o } from "./provider.js";
4
4
  const c = () => {
5
5
  const r = o();
@@ -1,4 +1,4 @@
1
- import { z as f } from "./masters2.js";
1
+ import { A as f } from "./masters2.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/lib/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as S, S as o, ab as i, h as s, u as y, b as L, i as p } from "./provider.js";
1
+ import { T as S, S as o, a4 as i, h as s, u as y, b as L, i as p } from "./provider.js";
2
2
  import "./useStreamLayerApp2.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";