@streamlayer/react 1.11.3-rc.4 → 1.11.3-rc.5
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/advertisement.d.ts +146 -0
- package/lib/{classic/app/auth.d.ts → auth.d.ts} +13 -4
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +58 -59
- package/lib/cjs/useStreamLayerApp2.js +15 -17
- package/lib/classic/advertisement.d.ts +146 -0
- package/lib/{app → classic}/auth.d.ts +13 -4
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +58 -59
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -17
- package/lib/classic/es/advertisement.js +94 -93
- package/lib/classic/es/auth.js +5 -2
- package/lib/classic/es/insight.js +22 -21
- package/lib/classic/es/notification.js +5 -4
- package/lib/classic/es/points.js +8 -6
- package/lib/classic/es/provider.js +10672 -11282
- package/lib/classic/es/useStreamLayerApp2.js +4697 -8424
- package/lib/classic/index.d.ts +218 -5
- package/lib/classic/insight.d.ts +136 -0
- package/lib/classic/notification.d.ts +120 -0
- package/lib/classic/points.d.ts +12 -0
- package/lib/classic/style.css +1 -1
- package/lib/classic/useStreamLayerApp.d.ts +167 -0
- package/lib/es/advertisement.js +94 -93
- package/lib/es/auth.js +5 -2
- package/lib/es/insight.js +22 -21
- package/lib/es/notification.js +5 -4
- package/lib/es/points.js +8 -6
- package/lib/es/provider.js +10709 -11327
- package/lib/es/useStreamLayerApp2.js +4697 -8424
- package/lib/index.d.ts +218 -5
- package/lib/insight.d.ts +136 -0
- package/lib/notification.d.ts +120 -0
- package/lib/points.d.ts +12 -0
- package/lib/style.css +1 -1
- package/lib/useStreamLayerApp.d.ts +167 -0
- package/package.json +22 -1
- package/lib/app/advertisement.d.ts +0 -18
- package/lib/app/app.d.ts +0 -19
- package/lib/app/event.d.ts +0 -4
- package/lib/app/insight.d.ts +0 -13
- package/lib/app/notification.d.ts +0 -5
- package/lib/app/points.d.ts +0 -3
- package/lib/app/provider.d.ts +0 -43
- package/lib/app/useStreamLayerApp.d.ts +0 -19
- package/lib/classic/app/advertisement.d.ts +0 -18
- package/lib/classic/app/app.d.ts +0 -19
- package/lib/classic/app/event.d.ts +0 -4
- package/lib/classic/app/insight.d.ts +0 -13
- package/lib/classic/app/notification.d.ts +0 -5
- package/lib/classic/app/points.d.ts +0 -3
- package/lib/classic/app/provider.d.ts +0 -43
- package/lib/classic/app/useStreamLayerApp.d.ts +0 -19
package/lib/es/advertisement.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { jsx as o, jsxs as v, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
-
import { e as pe, L as Se, g as L,
|
|
2
|
+
import { s, e as pe, L as Se, g as L, i as D, j as me, k as Le, p as Ce, u as _e, c as Me, d as xe, a as E, h as Oe } from "./provider.js";
|
|
3
3
|
import { useEffect as M, useRef as G, useState as w, useCallback as Be } from "react";
|
|
4
|
-
import { S as Re,
|
|
4
|
+
import { N, S as Re, a as ue, P, b as ve, c as Ae, C as fe, d as _, A as we, e as De } from "./useStreamLayerApp2.js";
|
|
5
|
+
import "@bufbuild/protobuf";
|
|
5
6
|
const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
6
7
|
name: "Ue",
|
|
7
8
|
class: "uyu7xk0",
|
|
8
9
|
propsAsIs: !1
|
|
9
10
|
}), Ue = "fqz8iof", je = "gxr1krc", Ge = "h13v49g2", Fe = "wa4hjtn", We = "q1ymob7l", He = (e) => e === "left" || e === "right" ? je : Fe, $e = (e) => e === "left" || e === "right" ? Ge : We, Ke = (e) => e === "left" ? "q1fdesan" : e === "right" ? "qbseob7" : e === "top" ? "q75ycmf" : "q4whugf", F = ({
|
|
10
11
|
children: e,
|
|
11
|
-
style:
|
|
12
|
+
style: t,
|
|
12
13
|
className: a,
|
|
13
|
-
enabled:
|
|
14
|
+
enabled: n = !0,
|
|
14
15
|
hiding: r,
|
|
15
16
|
direction: i = "left",
|
|
16
17
|
onAnimationEnd: c
|
|
17
18
|
}) => /* @__PURE__ */ o(ze, {
|
|
18
|
-
style:
|
|
19
|
-
className: L(a, Ue, Ke(i),
|
|
19
|
+
style: t,
|
|
20
|
+
className: L(a, Ue, Ke(i), n && !r && He(i), n && r && $e(i)),
|
|
20
21
|
onAnimationEnd: c,
|
|
21
22
|
children: e
|
|
22
23
|
}), Xe = /* @__PURE__ */ s("a")({
|
|
@@ -33,15 +34,15 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
33
34
|
propsAsIs: !0
|
|
34
35
|
}), Qe = ({
|
|
35
36
|
promotion: e,
|
|
36
|
-
promotionId:
|
|
37
|
+
promotionId: t,
|
|
37
38
|
hiding: a,
|
|
38
|
-
direction:
|
|
39
|
+
direction: n = "bottom"
|
|
39
40
|
}) => {
|
|
40
41
|
var r, i;
|
|
41
42
|
if (!((r = e.additionalBanner) != null && r.imageUrl)) return null;
|
|
42
43
|
let c = (i = e.additionalBanner) == null ? void 0 : i.url;
|
|
43
44
|
return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ o(F, {
|
|
44
|
-
direction:
|
|
45
|
+
direction: n,
|
|
45
46
|
hiding: a,
|
|
46
47
|
children: /* @__PURE__ */ o(Ye, {
|
|
47
48
|
className: "BannerContainer",
|
|
@@ -53,7 +54,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
53
54
|
backgroundImage: `url(${e.additionalBanner.imageUrl})`,
|
|
54
55
|
cursor: c ? "pointer" : "default"
|
|
55
56
|
},
|
|
56
|
-
"data-promo-id":
|
|
57
|
+
"data-promo-id": t,
|
|
57
58
|
"data-promo-type": e.type,
|
|
58
59
|
"data-analytics": "banner",
|
|
59
60
|
target: "_blank"
|
|
@@ -80,11 +81,11 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
80
81
|
name: "S",
|
|
81
82
|
class: "s5vuv05",
|
|
82
83
|
propsAsIs: !1
|
|
83
|
-
}),
|
|
84
|
+
}), to = /* @__PURE__ */ s(Ve())({
|
|
84
85
|
name: "Ae",
|
|
85
86
|
class: "a1g1k4vx",
|
|
86
87
|
propsAsIs: !0
|
|
87
|
-
}),
|
|
88
|
+
}), no = /* @__PURE__ */ s("img")({
|
|
88
89
|
name: "et",
|
|
89
90
|
class: "e1o3sc8x",
|
|
90
91
|
propsAsIs: !1
|
|
@@ -110,12 +111,12 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
110
111
|
propsAsIs: !1
|
|
111
112
|
}), po = {
|
|
112
113
|
[N.BOTTOM]: W,
|
|
113
|
-
[N.MIDDLE]:
|
|
114
|
+
[N.MIDDLE]: to
|
|
114
115
|
}, mo = ({
|
|
115
116
|
src: e,
|
|
116
|
-
imagePosition:
|
|
117
|
+
imagePosition: t
|
|
117
118
|
}) => {
|
|
118
|
-
const a = po[
|
|
119
|
+
const a = po[t] || W;
|
|
119
120
|
return /* @__PURE__ */ o(a, {
|
|
120
121
|
children: /* @__PURE__ */ o("img", {
|
|
121
122
|
src: e,
|
|
@@ -124,12 +125,12 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
124
125
|
});
|
|
125
126
|
}, uo = ({
|
|
126
127
|
notification: e,
|
|
127
|
-
open:
|
|
128
|
+
open: t
|
|
128
129
|
}) => {
|
|
129
130
|
if (!e || !e.promotion || e.enabled !== ve.NOTIFICATION_ENABLED) return null;
|
|
130
131
|
const {
|
|
131
132
|
title: a,
|
|
132
|
-
body:
|
|
133
|
+
body: n,
|
|
133
134
|
image: r,
|
|
134
135
|
promotion: i
|
|
135
136
|
} = e, {
|
|
@@ -140,7 +141,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
140
141
|
} = i;
|
|
141
142
|
return /* @__PURE__ */ v(co, {
|
|
142
143
|
className: "SL_Lower_Third_Notification",
|
|
143
|
-
onClick:
|
|
144
|
+
onClick: t,
|
|
144
145
|
children: [/* @__PURE__ */ v(Ze, {
|
|
145
146
|
children: [/* @__PURE__ */ o(mo, {
|
|
146
147
|
src: r,
|
|
@@ -148,8 +149,8 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
148
149
|
}), /* @__PURE__ */ v(eo, {
|
|
149
150
|
children: [a && /* @__PURE__ */ o(oo, {
|
|
150
151
|
children: a
|
|
151
|
-
}),
|
|
152
|
-
children:
|
|
152
|
+
}), n && /* @__PURE__ */ o(so, {
|
|
153
|
+
children: n
|
|
153
154
|
})]
|
|
154
155
|
})]
|
|
155
156
|
}), /* @__PURE__ */ v(io, {
|
|
@@ -166,7 +167,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
166
167
|
color: l == null ? void 0 : l.textColor,
|
|
167
168
|
backgroundColor: l == null ? void 0 : l.color
|
|
168
169
|
},
|
|
169
|
-
children: [(l == null ? void 0 : l.ctaIcon) && (l == null ? void 0 : l.ctaIconMode) === fe.CTA_ICON_TRANSPARENT && /* @__PURE__ */ o(
|
|
170
|
+
children: [(l == null ? void 0 : l.ctaIcon) && (l == null ? void 0 : l.ctaIconMode) === fe.CTA_ICON_TRANSPARENT && /* @__PURE__ */ o(no, {
|
|
170
171
|
src: l == null ? void 0 : l.ctaIcon,
|
|
171
172
|
alt: "cta-icon"
|
|
172
173
|
}), (l == null ? void 0 : l.label) || "Open"]
|
|
@@ -242,9 +243,9 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
242
243
|
[N.MIDDLE]: So
|
|
243
244
|
}, Oo = ({
|
|
244
245
|
src: e,
|
|
245
|
-
imagePosition:
|
|
246
|
+
imagePosition: t
|
|
246
247
|
}) => {
|
|
247
|
-
const a = xo[
|
|
248
|
+
const a = xo[t];
|
|
248
249
|
return /* @__PURE__ */ o(a, {
|
|
249
250
|
children: /* @__PURE__ */ o("img", {
|
|
250
251
|
src: e,
|
|
@@ -253,15 +254,15 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
253
254
|
});
|
|
254
255
|
}, Bo = ({
|
|
255
256
|
notification: e,
|
|
256
|
-
open:
|
|
257
|
+
open: t,
|
|
257
258
|
promotionId: a,
|
|
258
|
-
hiding:
|
|
259
|
+
hiding: n,
|
|
259
260
|
direction: r = "left"
|
|
260
261
|
}) => {
|
|
261
262
|
if (!e || !e.promotion || e.enabled !== ve.NOTIFICATION_ENABLED) return null;
|
|
262
263
|
if (e.promotion.mode === ue.LOWER_THIRD) return /* @__PURE__ */ o(uo, {
|
|
263
264
|
notification: e,
|
|
264
|
-
open:
|
|
265
|
+
open: t
|
|
265
266
|
});
|
|
266
267
|
const {
|
|
267
268
|
title: i,
|
|
@@ -277,9 +278,9 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
277
278
|
return /* @__PURE__ */ o(F, {
|
|
278
279
|
className: "SL_Rich_Notification",
|
|
279
280
|
direction: r,
|
|
280
|
-
hiding:
|
|
281
|
+
hiding: n,
|
|
281
282
|
children: /* @__PURE__ */ v(bo, {
|
|
282
|
-
onClick:
|
|
283
|
+
onClick: t,
|
|
283
284
|
children: [f !== Ae.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ o(Mo, {
|
|
284
285
|
children: /* @__PURE__ */ o("img", {
|
|
285
286
|
src: l,
|
|
@@ -311,18 +312,18 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
311
312
|
})]
|
|
312
313
|
})
|
|
313
314
|
});
|
|
314
|
-
}, Ro = (e,
|
|
315
|
+
}, Ro = (e, t, {
|
|
315
316
|
onPlay: a,
|
|
316
|
-
onStop:
|
|
317
|
+
onStop: n,
|
|
317
318
|
onProgress: r
|
|
318
319
|
}) => {
|
|
319
320
|
const i = google.ima;
|
|
320
321
|
let c = new i.AdDisplayContainer(e), m = new i.AdsLoader(c), A = new i.AdsRequest(), l;
|
|
321
322
|
m.addEventListener(i.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, (u) => {
|
|
322
|
-
l = u.getAdsManager(e), a && l.addEventListener(i.AdEvent.Type.STARTED, a),
|
|
323
|
+
l = u.getAdsManager(e), a && l.addEventListener(i.AdEvent.Type.STARTED, a), n && l.addEventListener(i.AdEvent.Type.COMPLETE, n), r && l.addEventListener(i.AdEvent.Type.AD_PROGRESS, (p) => r(p.getAdData())), l.init(e.clientWidth, e.clientHeight, i.ViewMode.NORMAL), l.start();
|
|
323
324
|
}, !1), m.addEventListener(i.AdErrorEvent.Type.AD_ERROR, () => {
|
|
324
|
-
console.log("ad error"),
|
|
325
|
-
}, !1), A.linearAdSlotWidth = e.clientWidth, A.linearAdSlotHeight = e.clientHeight, A.adTagUrl =
|
|
325
|
+
console.log("ad error"), n == null || n();
|
|
326
|
+
}, !1), A.linearAdSlotWidth = e.clientWidth, A.linearAdSlotHeight = e.clientHeight, A.adTagUrl = t, m.requestAds(A);
|
|
326
327
|
const f = () => {
|
|
327
328
|
l == null || l.destroy(), m == null || m.destroy(), c == null || c.destroy(), c = void 0, m = void 0, A = void 0, l = void 0;
|
|
328
329
|
};
|
|
@@ -330,7 +331,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
330
331
|
try {
|
|
331
332
|
c.initialize();
|
|
332
333
|
} catch (u) {
|
|
333
|
-
|
|
334
|
+
n == null || n(), console.log("AdsManager could not be started", u);
|
|
334
335
|
}
|
|
335
336
|
return f;
|
|
336
337
|
};
|
|
@@ -416,17 +417,17 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
416
417
|
propsAsIs: !1
|
|
417
418
|
}), Yo = ({
|
|
418
419
|
time: e,
|
|
419
|
-
adCount:
|
|
420
|
+
adCount: t,
|
|
420
421
|
adPosition: a
|
|
421
422
|
}) => {
|
|
422
|
-
const
|
|
423
|
-
return
|
|
424
|
-
children: [
|
|
423
|
+
const n = Math.floor(e / 60), r = e - n * 60;
|
|
424
|
+
return n === 0 && r === 0 && t === a ? null : /* @__PURE__ */ v(Ko, {
|
|
425
|
+
children: [t > 1 && /* @__PURE__ */ v(ce, {
|
|
425
426
|
children: [/* @__PURE__ */ v(re, {
|
|
426
|
-
children: [a, " of ",
|
|
427
|
+
children: [a, " of ", t]
|
|
427
428
|
}), /* @__PURE__ */ o(Xo, {})]
|
|
428
429
|
}), /* @__PURE__ */ v(re, {
|
|
429
|
-
children: [
|
|
430
|
+
children: [n, ":", r < 10 ? `0${r}` : r]
|
|
430
431
|
})]
|
|
431
432
|
});
|
|
432
433
|
}, Jo = /* @__PURE__ */ s("div")({
|
|
@@ -439,18 +440,18 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
439
440
|
propsAsIs: !1
|
|
440
441
|
}), Zo = "u849s5c", es = "f1yp4da5", os = "gjcla8p", ss = ({
|
|
441
442
|
promotion: e,
|
|
442
|
-
controlVideo:
|
|
443
|
+
controlVideo: t,
|
|
443
444
|
promotionId: a,
|
|
444
|
-
onClose:
|
|
445
|
+
onClose: n,
|
|
445
446
|
externalAd: r,
|
|
446
447
|
skipAutoClose: i
|
|
447
448
|
}) => {
|
|
448
449
|
var c;
|
|
449
450
|
const m = G(null), [A, l] = w(!1), [f, u] = w(0), [p, g] = w(0), [k, h] = w(0), y = G(), I = Be(() => {
|
|
450
|
-
u(0), g(0), h(0), l(!1),
|
|
451
|
+
u(0), g(0), h(0), l(!1), t == null || t({
|
|
451
452
|
muted: !1
|
|
452
453
|
});
|
|
453
|
-
}, [
|
|
454
|
+
}, [t]);
|
|
454
455
|
M(() => {
|
|
455
456
|
if (r != null && r.url && m.current) {
|
|
456
457
|
I();
|
|
@@ -463,12 +464,12 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
463
464
|
type: e.type,
|
|
464
465
|
hasBanner: !1
|
|
465
466
|
}
|
|
466
|
-
}),
|
|
467
|
+
}), t == null || t({
|
|
467
468
|
muted: !0
|
|
468
469
|
}), l(!0);
|
|
469
470
|
},
|
|
470
471
|
onStop: () => {
|
|
471
|
-
|
|
472
|
+
n == null || n(), I();
|
|
472
473
|
},
|
|
473
474
|
onProgress: (T) => {
|
|
474
475
|
u(Math.round(T.duration - T.currentTime)), g(T.totalAds), h(T.adPosition);
|
|
@@ -478,7 +479,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
478
479
|
y.current = void 0, b();
|
|
479
480
|
};
|
|
480
481
|
}
|
|
481
|
-
}, [r == null ? void 0 : r.url,
|
|
482
|
+
}, [r == null ? void 0 : r.url, t, I, a, e.type, n]);
|
|
482
483
|
const x = ((c = e.sponsor) == null ? void 0 : c.logo) && e.logoMode === _.CENTER;
|
|
483
484
|
return /* @__PURE__ */ v(ge, {
|
|
484
485
|
className: "PromoOverlay",
|
|
@@ -500,7 +501,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
500
501
|
className: "ClosePromoIcon",
|
|
501
502
|
close: () => {
|
|
502
503
|
var b;
|
|
503
|
-
(b = y.current) == null || b.call(y),
|
|
504
|
+
(b = y.current) == null || b.call(y), n == null || n(), I();
|
|
504
505
|
}
|
|
505
506
|
})]
|
|
506
507
|
})]
|
|
@@ -512,7 +513,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
512
513
|
})]
|
|
513
514
|
});
|
|
514
515
|
}, de = (e) => {
|
|
515
|
-
var
|
|
516
|
+
var t, a, n, r, i, c, m, A, l, f, u, p, g, k, h, y, I, x, b, T, H, $, K, X, Y, J, Q, Z, ee, oe;
|
|
516
517
|
const {
|
|
517
518
|
promotion: d,
|
|
518
519
|
open: se,
|
|
@@ -523,24 +524,24 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
523
524
|
promotionId: B,
|
|
524
525
|
onClose: Pe,
|
|
525
526
|
markAsViewed: V,
|
|
526
|
-
externalAd:
|
|
527
|
-
} = e, z = d.type === P.INGAME_IAB11_LBAR || d.type === P.INGAME_IAB11, U = ((
|
|
527
|
+
externalAd: te
|
|
528
|
+
} = e, z = d.type === P.INGAME_IAB11_LBAR || d.type === P.INGAME_IAB11, U = ((t = d.sponsor) == null ? void 0 : t.logo) && d.logoMode === _.CENTER, ne = !!((n = (a = d.banner) == null ? void 0 : a.video) != null && n.url), R = d.autoPlayVideo === we.ENABLED;
|
|
528
529
|
if (M(() => {
|
|
529
|
-
S == null || S(
|
|
530
|
+
S == null || S(ne || R), se == null || se();
|
|
530
531
|
}, []), M(() => {
|
|
531
532
|
B && d.type && V && V();
|
|
532
533
|
}, [B, d.type, V]), M(() => () => {
|
|
533
534
|
O == null || O({
|
|
534
535
|
muted: !1
|
|
535
536
|
});
|
|
536
|
-
}, [O]),
|
|
537
|
+
}, [O]), te) return /* @__PURE__ */ o(ss, {
|
|
537
538
|
...e,
|
|
538
|
-
externalAd:
|
|
539
|
+
externalAd: te
|
|
539
540
|
});
|
|
540
541
|
let C = (r = d.banner) == null ? void 0 : r.url;
|
|
541
542
|
C && C.indexOf("http") !== 0 && (C = `https://${C}`);
|
|
542
543
|
let j = !0;
|
|
543
|
-
return
|
|
544
|
+
return ne && (!Te || !R ? j = !0 : j = !1), /* @__PURE__ */ v(ge, {
|
|
544
545
|
className: "PromoOverlay",
|
|
545
546
|
children: [/* @__PURE__ */ v(ye, {
|
|
546
547
|
children: [/* @__PURE__ */ v(Ie, {
|
|
@@ -627,29 +628,29 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
627
628
|
})
|
|
628
629
|
})]
|
|
629
630
|
});
|
|
630
|
-
},
|
|
631
|
+
}, ts = /* @__PURE__ */ s("div")({
|
|
631
632
|
name: "Wt",
|
|
632
633
|
class: "wbguw5z",
|
|
633
634
|
propsAsIs: !1
|
|
634
|
-
}),
|
|
635
|
+
}), ns = ({
|
|
635
636
|
children: e,
|
|
636
|
-
direction:
|
|
637
|
+
direction: t,
|
|
637
638
|
style: a,
|
|
638
|
-
className:
|
|
639
|
+
className: n,
|
|
639
640
|
hiding: r
|
|
640
641
|
}) => /* @__PURE__ */ o(F, {
|
|
641
|
-
direction:
|
|
642
|
+
direction: t,
|
|
642
643
|
style: a,
|
|
643
644
|
hiding: r,
|
|
644
|
-
className:
|
|
645
|
-
children: /* @__PURE__ */ o(
|
|
645
|
+
className: n,
|
|
646
|
+
children: /* @__PURE__ */ o(ts, {
|
|
646
647
|
children: e
|
|
647
648
|
})
|
|
648
649
|
}), as = (e) => (e == null ? void 0 : e.type) === P.INGAME_IAB11_LBAR || (e == null ? void 0 : e.type) === P.INGAME_IAB21_LBAR, ls = (e) => (e == null ? void 0 : e.type) === P.INGAME_IAB11 || (e == null ? void 0 : e.type) === P.INGAME_IAB21, is = ({
|
|
649
650
|
advertisement: e,
|
|
650
|
-
close:
|
|
651
|
+
close: t,
|
|
651
652
|
skipTypeCheck: a,
|
|
652
|
-
skipAutoClose:
|
|
653
|
+
skipAutoClose: n,
|
|
653
654
|
layoutMode: r = "side-by-side",
|
|
654
655
|
sidebar: i,
|
|
655
656
|
isNotification: c,
|
|
@@ -672,15 +673,15 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
672
673
|
markAsViewed: A,
|
|
673
674
|
promotionId: e.question.id,
|
|
674
675
|
promotion: e.promotion,
|
|
675
|
-
onClose:
|
|
676
|
+
onClose: t,
|
|
676
677
|
open: l,
|
|
677
|
-
skipAutoClose:
|
|
678
|
+
skipAutoClose: n,
|
|
678
679
|
externalAd: f,
|
|
679
680
|
controlVideo: u,
|
|
680
681
|
advertisementPaused: p,
|
|
681
682
|
togglePause: g
|
|
682
683
|
})
|
|
683
|
-
}) : i && (a || as(e.promotion)) ? /* @__PURE__ */ o(
|
|
684
|
+
}) : i && (a || as(e.promotion)) ? /* @__PURE__ */ o(ns, {
|
|
684
685
|
className: "PromoSidebarContainer",
|
|
685
686
|
direction: i,
|
|
686
687
|
hiding: !1,
|
|
@@ -689,10 +690,10 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
689
690
|
promotionId: e.question.id,
|
|
690
691
|
promotion: e.promotion,
|
|
691
692
|
externalAd: f,
|
|
692
|
-
onClose:
|
|
693
|
+
onClose: t,
|
|
693
694
|
open: l,
|
|
694
695
|
controlVideo: u,
|
|
695
|
-
skipAutoClose:
|
|
696
|
+
skipAutoClose: n,
|
|
696
697
|
advertisementPaused: p,
|
|
697
698
|
togglePause: g
|
|
698
699
|
})
|
|
@@ -706,30 +707,30 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
706
707
|
class: "v13knq7z",
|
|
707
708
|
propsAsIs: !1
|
|
708
709
|
}), ds = (e) => {
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
711
|
-
const a =
|
|
712
|
-
|
|
710
|
+
const t = e.target;
|
|
711
|
+
if (t instanceof HTMLAnchorElement && t.target === "_blank") {
|
|
712
|
+
const a = t.getAttribute("data-promo-id") || "", n = t.getAttribute("data-promo-type") || P.UNSET;
|
|
713
|
+
t.getAttribute("data-analytics") === "button" && D.emit("advertisement", {
|
|
713
714
|
action: "buttonSelect",
|
|
714
715
|
payload: {
|
|
715
716
|
id: a,
|
|
716
|
-
type:
|
|
717
|
+
type: n,
|
|
717
718
|
hasBanner: !1
|
|
718
719
|
}
|
|
719
|
-
}),
|
|
720
|
+
}), t.getAttribute("data-analytics") === "banner" && D.emit("advertisement", {
|
|
720
721
|
action: "bannerSelect",
|
|
721
722
|
payload: {
|
|
722
723
|
id: a,
|
|
723
|
-
type:
|
|
724
|
+
type: n,
|
|
724
725
|
hasBanner: !1
|
|
725
726
|
}
|
|
726
727
|
});
|
|
727
728
|
}
|
|
728
729
|
}, cs = ({
|
|
729
730
|
gamification: e,
|
|
730
|
-
layoutMode:
|
|
731
|
+
layoutMode: t,
|
|
731
732
|
skipAutoClose: a,
|
|
732
|
-
skipTypeCheck:
|
|
733
|
+
skipTypeCheck: n,
|
|
733
734
|
sidebar: r,
|
|
734
735
|
banner: i,
|
|
735
736
|
notification: c,
|
|
@@ -755,7 +756,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
755
756
|
},
|
|
756
757
|
className: L("SL-AdvertisementUIWrap", m && "mobile-view", I && "SL-AdvertisementUIWrap--lower-third"),
|
|
757
758
|
children: /* @__PURE__ */ o(is, {
|
|
758
|
-
skipTypeCheck:
|
|
759
|
+
skipTypeCheck: n,
|
|
759
760
|
sidebar: r,
|
|
760
761
|
banner: i,
|
|
761
762
|
advertisement: h.data,
|
|
@@ -765,7 +766,7 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
765
766
|
externalAd: l ? h.externalAd : void 0,
|
|
766
767
|
markAsViewed: e.advertisement.markAsViewed,
|
|
767
768
|
open: e.advertisement.open,
|
|
768
|
-
layoutMode:
|
|
769
|
+
layoutMode: t,
|
|
769
770
|
isNotification: c,
|
|
770
771
|
skipAutoClose: a,
|
|
771
772
|
controlVideo: f
|
|
@@ -773,9 +774,9 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
773
774
|
});
|
|
774
775
|
}, ps = ({
|
|
775
776
|
sdk: e,
|
|
776
|
-
sidebar:
|
|
777
|
+
sidebar: t,
|
|
777
778
|
externalAd: a,
|
|
778
|
-
banner:
|
|
779
|
+
banner: n,
|
|
779
780
|
skipAutoClose: r,
|
|
780
781
|
skipTypeCheck: i,
|
|
781
782
|
layoutMode: c,
|
|
@@ -789,13 +790,13 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
789
790
|
const p = document.createElement("script");
|
|
790
791
|
p.async = !0, p.src = "https://imasdk.googleapis.com/js/sdkloader/ima3.js", document.body.appendChild(p);
|
|
791
792
|
}
|
|
792
|
-
}, [a]),
|
|
793
|
+
}, [a]), t && n) return /* @__PURE__ */ o("div", {
|
|
793
794
|
style: {
|
|
794
795
|
color: "red"
|
|
795
796
|
},
|
|
796
797
|
children: "define either sidebar or banner, not both."
|
|
797
798
|
});
|
|
798
|
-
if (
|
|
799
|
+
if (n && a) return /* @__PURE__ */ o("div", {
|
|
799
800
|
style: {
|
|
800
801
|
color: "red"
|
|
801
802
|
},
|
|
@@ -805,8 +806,8 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
805
806
|
const u = e.getFeature(Re.GAMES);
|
|
806
807
|
return u ? /* @__PURE__ */ o(cs, {
|
|
807
808
|
gamification: u,
|
|
808
|
-
sidebar:
|
|
809
|
-
banner:
|
|
809
|
+
sidebar: t,
|
|
810
|
+
banner: n,
|
|
810
811
|
layoutMode: c,
|
|
811
812
|
isMobileScreen: m,
|
|
812
813
|
persistent: A,
|
|
@@ -816,11 +817,11 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
816
817
|
externalAd: a,
|
|
817
818
|
controlVideo: e.controlVideoPlayer
|
|
818
819
|
}) : null;
|
|
819
|
-
},
|
|
820
|
+
}, hs = ({
|
|
820
821
|
event: e,
|
|
821
|
-
sidebar:
|
|
822
|
+
sidebar: t,
|
|
822
823
|
banner: a,
|
|
823
|
-
isMobileScreen:
|
|
824
|
+
isMobileScreen: n,
|
|
824
825
|
skipAutoClose: r,
|
|
825
826
|
persistent: i,
|
|
826
827
|
theme: c,
|
|
@@ -829,14 +830,14 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
829
830
|
externalAd: l
|
|
830
831
|
}) => {
|
|
831
832
|
const f = _e(), u = Me(), p = xe();
|
|
832
|
-
return f ? l && !u.promotionExternalAd ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : !l && u.promotionExternalAd ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) :
|
|
833
|
+
return f ? l && !u.promotionExternalAd ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : !l && u.promotionExternalAd ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : t && !u.promotionSidebar ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : a && !u.promotionBanner ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : m && !u.promotionNotification ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : !a && !t && !m && !u.promotionOverlay ? e !== void 0 && /* @__PURE__ */ o(E, { event: e }) : /* @__PURE__ */ v("div", { className: "StreamLayerSDK", children: [
|
|
833
834
|
/* @__PURE__ */ o(Oe, { customTheme: c ?? p.theme, themeMode: p.themeMode, children: /* @__PURE__ */ o(
|
|
834
835
|
ps,
|
|
835
836
|
{
|
|
836
837
|
sdk: f,
|
|
837
|
-
sidebar:
|
|
838
|
+
sidebar: t,
|
|
838
839
|
banner: a,
|
|
839
|
-
isMobileScreen:
|
|
840
|
+
isMobileScreen: n,
|
|
840
841
|
persistent: i,
|
|
841
842
|
notification: m,
|
|
842
843
|
skipTypeCheck: A,
|
|
@@ -849,6 +850,6 @@ const qe = () => Xe, Ve = () => W, ze = /* @__PURE__ */ s("div")({
|
|
|
849
850
|
] }) : null;
|
|
850
851
|
};
|
|
851
852
|
export {
|
|
852
|
-
|
|
853
|
+
hs as StreamLayerSDKAdvertisement,
|
|
853
854
|
ps as StreamLayerSDKAdvertisementUI
|
|
854
855
|
};
|
package/lib/es/auth.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { useEffect as o } from "react";
|
|
2
|
+
import "react/jsx-runtime";
|
|
2
3
|
import { u } from "./provider.js";
|
|
3
|
-
|
|
4
|
+
import "@nanostores/react";
|
|
5
|
+
import "nanostores";
|
|
6
|
+
const s = ({ token: t, schema: i }) => {
|
|
4
7
|
const r = u();
|
|
5
8
|
return o(() => {
|
|
6
9
|
t && i && r && r.authorizationBypass(i, t), r && (r.withAuth = !0);
|
|
7
10
|
}, [t, i, r]), null;
|
|
8
11
|
};
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
s as StreamLayerLogin
|
|
11
14
|
};
|
package/lib/es/insight.js
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { e as m, s as l, m as
|
|
2
|
+
import { e as m, s as l, m as p, u as h, d as f, h as S, a as g } from "./provider.js";
|
|
3
3
|
import { useRef as I, useEffect as y } from "react";
|
|
4
|
+
import "@bufbuild/protobuf";
|
|
4
5
|
import { S as v } from "./useStreamLayerApp2.js";
|
|
5
|
-
const k = () =>
|
|
6
|
+
const k = () => p, L = /* @__PURE__ */ l(k())({
|
|
6
7
|
name: "y",
|
|
7
8
|
class: "y1tj7gx6",
|
|
8
9
|
propsAsIs: !0
|
|
9
10
|
}), Q = ({
|
|
10
11
|
gamification: e,
|
|
11
12
|
persistent: r,
|
|
12
|
-
skipAutoClose:
|
|
13
|
-
hideHeader:
|
|
13
|
+
skipAutoClose: o,
|
|
14
|
+
hideHeader: a,
|
|
14
15
|
insightId: s
|
|
15
16
|
}) => {
|
|
16
17
|
const t = I(""), d = m(e.openedQuestion.$store);
|
|
17
18
|
return y(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
|
|
18
|
-
var
|
|
19
|
-
t.current === s && ((
|
|
19
|
+
var n;
|
|
20
|
+
t.current === s && ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" && e.openQuestion(s, i);
|
|
20
21
|
})), () => {
|
|
21
22
|
t.current = "";
|
|
22
23
|
}) : (e.activeQuestionId.subscribe(({
|
|
23
24
|
data: i
|
|
24
25
|
}) => {
|
|
25
|
-
var
|
|
26
|
-
i && ((
|
|
26
|
+
var n;
|
|
27
|
+
i && ((n = i.feedItem) == null ? void 0 : n.type) === "insight" && (!r || e.isOpenedQuestion(i.feedItem.id) || (t.current = i.feedItem.id, e.openQuestion(i.feedItem.id, i.feedItem))), !i && t.current && (e.closeQuestion(t.current), t.current = "");
|
|
27
28
|
}), () => {
|
|
28
29
|
}), [e, r, s]), d ? /* @__PURE__ */ u(L, {
|
|
29
|
-
skipAutoClose:
|
|
30
|
-
hideHeader:
|
|
30
|
+
skipAutoClose: o,
|
|
31
|
+
hideHeader: a,
|
|
31
32
|
gamification: e,
|
|
32
33
|
hideSponsor: !0
|
|
33
34
|
}) : null;
|
|
34
35
|
}, A = ({
|
|
35
36
|
sdk: e,
|
|
36
37
|
persistent: r,
|
|
37
|
-
skipAutoClose:
|
|
38
|
-
insightId:
|
|
38
|
+
skipAutoClose: o,
|
|
39
|
+
insightId: a,
|
|
39
40
|
hideHeader: s
|
|
40
41
|
}) => {
|
|
41
42
|
if (!m(e.featuresList.getStore())) return null;
|
|
42
43
|
const t = e.getFeature(v.GAMES);
|
|
43
44
|
return t ? /* @__PURE__ */ u(Q, {
|
|
44
|
-
insightId:
|
|
45
|
+
insightId: a,
|
|
45
46
|
persistent: r,
|
|
46
47
|
hideHeader: s,
|
|
47
48
|
gamification: t,
|
|
48
|
-
skipAutoClose:
|
|
49
|
+
skipAutoClose: o
|
|
49
50
|
}) : null;
|
|
50
|
-
},
|
|
51
|
+
}, H = ({
|
|
51
52
|
event: e,
|
|
52
53
|
theme: r,
|
|
53
|
-
hideHeader:
|
|
54
|
-
skipAutoClose:
|
|
54
|
+
hideHeader: o,
|
|
55
|
+
skipAutoClose: a,
|
|
55
56
|
persistent: s
|
|
56
57
|
}) => {
|
|
57
|
-
const t =
|
|
58
|
+
const t = h(), d = f();
|
|
58
59
|
return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
|
|
59
60
|
/* @__PURE__ */ u(S, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
|
|
60
61
|
A,
|
|
61
62
|
{
|
|
62
|
-
skipAutoClose:
|
|
63
|
+
skipAutoClose: a,
|
|
63
64
|
sdk: t,
|
|
64
|
-
hideHeader:
|
|
65
|
+
hideHeader: o,
|
|
65
66
|
persistent: s
|
|
66
67
|
}
|
|
67
68
|
) }),
|
|
@@ -69,6 +70,6 @@ const k = () => h, L = /* @__PURE__ */ l(k())({
|
|
|
69
70
|
] }) : null;
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
H as StreamLayerSDKInsight,
|
|
73
74
|
A as StreamLayerSDKInsightUI
|
|
74
75
|
};
|
package/lib/es/notification.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { e as D, i as M, N as q, p as u,
|
|
2
|
+
import { s, e as D, i as M, N as q, p as u, P as L, X as R, Z as P, j as U, n as V, B as Q, f as F, u as K, d as W, c as B, h as G } from "./provider.js";
|
|
3
3
|
import { useState as E, useMemo as H, useEffect as _ } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { Q as d, S as Y, f, g as Z } from "./useStreamLayerApp2.js";
|
|
5
|
+
import "@bufbuild/protobuf";
|
|
5
6
|
const $ = () => h, X = () => h, J = () => h, ee = () => h, se = () => h, h = /* @__PURE__ */ s("div")({
|
|
6
7
|
name: "g",
|
|
7
8
|
class: "g1mxl69i",
|
|
@@ -532,11 +533,11 @@ const $ = () => h, X = () => h, J = () => h, ee = () => h, se = () => h, h = /*
|
|
|
532
533
|
...t.data,
|
|
533
534
|
action: t.action
|
|
534
535
|
});
|
|
535
|
-
},
|
|
536
|
+
}, ks = ({ theme: n }) => {
|
|
536
537
|
const a = K(), i = W(), o = B();
|
|
537
538
|
return a && o.appNotification ? o.app ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(G, { customTheme: n ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(gs, { sdk: a }) }) }) : null;
|
|
538
539
|
};
|
|
539
540
|
export {
|
|
540
|
-
|
|
541
|
+
ks as StreamLayerSDKNotification,
|
|
541
542
|
gs as StreamLayerSDKNotificationUI
|
|
542
543
|
};
|