@streamlayer/react 1.5.0 → 1.5.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/advertisement.d.ts +1 -0
- package/lib/app/insight.d.ts +1 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +41 -41
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +7 -7
- package/lib/dist/cjs/masters.js +56 -56
- package/lib/dist/es/masters.js +5256 -5247
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +92 -96
- package/lib/es/index2.js +3996 -3986
- package/lib/es/insight.js +43 -42
- package/lib/es/masters2.js +1 -1
- package/lib/es/points.js +3 -3
- package/lib/es/useStreamLayerApp2.js +21 -21
- package/lib/style.css +1 -1
- package/package.json +13 -13
package/lib/es/insight.js
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { a as
|
|
4
|
-
import { S as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as d, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useEffect as l } from "react";
|
|
3
|
+
import { a as o, s as f, b as h, u as p, d as S, S as I } from "./index2.js";
|
|
4
|
+
import { S as g } from "./useStreamLayerApp2.js";
|
|
5
|
+
const v = () => h, y = /* @__PURE__ */ f(v())({
|
|
6
6
|
name: "QuestionWrap",
|
|
7
7
|
class: "q10hhsxv",
|
|
8
8
|
propsAsIs: !0
|
|
9
|
-
}),
|
|
9
|
+
}), Q = ({
|
|
10
10
|
gamification: e,
|
|
11
|
-
persistent:
|
|
12
|
-
hideHeader:
|
|
13
|
-
insightId:
|
|
11
|
+
persistent: s,
|
|
12
|
+
hideHeader: n,
|
|
13
|
+
insightId: i
|
|
14
14
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
return
|
|
17
|
-
|
|
15
|
+
const t = c(""), u = o(e.openedQuestion.$store);
|
|
16
|
+
return l(() => i ? (!s || e.isOpenedQuestion(i) || (t.current = i, e.getFeedItem(i).then((r) => {
|
|
17
|
+
var a;
|
|
18
|
+
t.current === i && ((a = r == null ? void 0 : r.attributes) == null ? void 0 : a.attributes.case) === "insight" && e.openQuestion(i, r);
|
|
18
19
|
})), () => {
|
|
19
|
-
|
|
20
|
+
t.current = "";
|
|
20
21
|
}) : (e.activeQuestionId.subscribe(({
|
|
21
22
|
data: r
|
|
22
23
|
}) => {
|
|
23
|
-
var
|
|
24
|
-
r && ((
|
|
24
|
+
var a;
|
|
25
|
+
r && ((a = r.feedItem) == null ? void 0 : a.type) === "insight" && (!s || e.isOpenedQuestion(r.feedItem.id) || (t.current = r.feedItem.id, e.openQuestion(r.feedItem.id, r.feedItem))), !r && t.current && (e.closeQuestion(t.current), t.current = "");
|
|
25
26
|
}), () => {
|
|
26
|
-
}), [e,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
children: /* @__PURE__ */ n(v, {
|
|
31
|
-
hideHeader: a,
|
|
32
|
-
gamification: e,
|
|
33
|
-
hideSponsor: !0
|
|
34
|
-
})
|
|
27
|
+
}), [e, s, i]), u ? /* @__PURE__ */ d(y, {
|
|
28
|
+
hideHeader: n,
|
|
29
|
+
gamification: e,
|
|
30
|
+
hideSponsor: !0
|
|
35
31
|
}) : null;
|
|
36
|
-
},
|
|
32
|
+
}, b = ({
|
|
37
33
|
sdk: e,
|
|
38
|
-
persistent:
|
|
39
|
-
insightId:
|
|
40
|
-
hideHeader:
|
|
34
|
+
persistent: s,
|
|
35
|
+
insightId: n,
|
|
36
|
+
hideHeader: i
|
|
41
37
|
}) => {
|
|
42
|
-
if (!
|
|
38
|
+
if (!o(e.featuresList.getStore()))
|
|
43
39
|
return null;
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
insightId:
|
|
47
|
-
persistent:
|
|
48
|
-
hideHeader:
|
|
49
|
-
gamification:
|
|
40
|
+
const t = e.getFeature(g.GAMES);
|
|
41
|
+
return t ? /* @__PURE__ */ d(Q, {
|
|
42
|
+
insightId: n,
|
|
43
|
+
persistent: s,
|
|
44
|
+
hideHeader: i,
|
|
45
|
+
gamification: t
|
|
50
46
|
}) : null;
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
}, H = ({
|
|
48
|
+
event: e,
|
|
49
|
+
theme: s,
|
|
50
|
+
hideHeader: n,
|
|
51
|
+
persistent: i
|
|
52
|
+
}) => {
|
|
53
|
+
const t = p();
|
|
54
|
+
return t ? /* @__PURE__ */ m("div", { className: "StreamLayerSDK", children: [
|
|
55
|
+
/* @__PURE__ */ d(S, { customTheme: s, children: /* @__PURE__ */ d(b, { sdk: t, hideHeader: n, persistent: i }) }),
|
|
56
|
+
e !== void 0 && /* @__PURE__ */ d(I, { event: e })
|
|
56
57
|
] }) : null;
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
H as StreamLayerSDKInsight,
|
|
61
|
+
b as StreamLayerSDKInsightUI
|
|
61
62
|
};
|
package/lib/es/masters2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as L, Fragment as E } from "react/jsx-runtime";
|
|
2
|
-
import { a as C, F as r2, s as u, T as j, i as i2, p as a2, h as l2, N as d2, k as c2, M as p2, j as u2, l as C2, C as v2,
|
|
2
|
+
import { a as C, F as r2, s as u, T as j, i as i2, p as a2, h as l2, N as d2, k as c2, M as p2, j as u2, l as C2, C as v2, n as h2, O as K, o as x, q as m2, r as g2, t as L2, v as X, w as f2, x as S2, y as y2, z as U, A as k2, B as J, D as _, I as e2, c as P, G as N2, H as b2, J as z, K as A2, P as I2, R as $2, g as E2, U as T, V as q, W as V2, X as w2, Y as R2, f as H2, Z as Q, _ as T2, $ as x2, L as F, a0 as F2, a1 as D2, a2 as M2, a3 as O2, m as D, a4 as U2, a5 as _2, a6 as P2, a7 as B2, a8 as G2 } from "./index2.js";
|
|
3
3
|
import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as Q2, useMemo as H, Suspense as Z2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
|
|
4
4
|
import { Q as K2, S as I } from "./useStreamLayerApp2.js";
|
|
5
5
|
const M = /* @__PURE__ */ u("div")({
|
package/lib/es/points.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as p, useEffect as u } from "react";
|
|
3
|
-
import { s as n, c as m,
|
|
3
|
+
import { s as n, c as m, m as d, e as S, a as f, F as y, u as v, d as h } from "./index2.js";
|
|
4
4
|
import { S as g } from "./useStreamLayerApp2.js";
|
|
5
5
|
const A = /* @__PURE__ */ n("div")({
|
|
6
6
|
name: "PointsContainer",
|
|
@@ -43,7 +43,7 @@ const A = /* @__PURE__ */ n("div")({
|
|
|
43
43
|
c();
|
|
44
44
|
};
|
|
45
45
|
}, [r]), /* @__PURE__ */ e(F, { points: i, onClick: () => {
|
|
46
|
-
s.status.get() ===
|
|
46
|
+
s.status.get() === y.Suspended && s.openFeature();
|
|
47
47
|
} });
|
|
48
48
|
}, $ = ({ sdk: s }) => {
|
|
49
49
|
if (!f(s.featuresList.getStore()))
|
|
@@ -51,7 +51,7 @@ const A = /* @__PURE__ */ n("div")({
|
|
|
51
51
|
const r = s.getFeature(g.GAMES);
|
|
52
52
|
return r ? /* @__PURE__ */ e(L, { gamification: r }) : null;
|
|
53
53
|
}, E = () => {
|
|
54
|
-
const s =
|
|
54
|
+
const s = v();
|
|
55
55
|
return s ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e($, { sdk: s }) }) }) : null;
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
@@ -13395,7 +13395,7 @@ const Tk = (e, t, n) => {
|
|
|
13395
13395
|
if (!((l = a.data) != null && l.attributes))
|
|
13396
13396
|
return;
|
|
13397
13397
|
const { options: s, notification: r, ...o } = a.data.attributes, c = (s == null ? void 0 : s.options.case) === "promotion" ? s == null ? void 0 : s.options.value : void 0;
|
|
13398
|
-
return
|
|
13398
|
+
return { id: o.id, question: o, promotion: c, notification: r };
|
|
13399
13399
|
}, Ek = (e, t, n) => {
|
|
13400
13400
|
const { client: a, queryKey: s } = n.createPromiseClient(Ne, {
|
|
13401
13401
|
method: "list",
|
|
@@ -13486,18 +13486,17 @@ class Nk extends Bt {
|
|
|
13486
13486
|
}
|
|
13487
13487
|
}
|
|
13488
13488
|
const Ok = (e) => {
|
|
13489
|
-
var o, c, l, m, u
|
|
13489
|
+
var o, c, l, m, u;
|
|
13490
13490
|
const t = (c = (o = e.data) == null ? void 0 : o.attributes) == null ? void 0 : c.question;
|
|
13491
|
-
if ((((
|
|
13491
|
+
if ((((u = (m = (l = e.data) == null ? void 0 : l.attributes) == null ? void 0 : m.feedItem) == null ? void 0 : u.type) === "promotion" ? e.data.attributes.feedItem : void 0) === void 0 || !t)
|
|
13492
13492
|
return;
|
|
13493
13493
|
const { options: n, notification: a, ...s } = t, r = (n == null ? void 0 : n.options.case) === "promotion" ? n.options.value : void 0;
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
};
|
|
13494
|
+
return {
|
|
13495
|
+
id: s.id,
|
|
13496
|
+
question: s,
|
|
13497
|
+
notification: a,
|
|
13498
|
+
promotion: r
|
|
13499
|
+
};
|
|
13501
13500
|
}, vk = (e, t, n) => {
|
|
13502
13501
|
const a = n.transport, s = We("advertisement"), r = new Nk(), o = Ie({}), c = bk(e, a), l = (d, y) => {
|
|
13503
13502
|
y ? o.set({
|
|
@@ -13519,16 +13518,16 @@ const Ok = (e) => {
|
|
|
13519
13518
|
})));
|
|
13520
13519
|
};
|
|
13521
13520
|
c.subscribe((d, y) => {
|
|
13522
|
-
var T;
|
|
13521
|
+
var T, f;
|
|
13523
13522
|
d.data && (Ee.emit("advertisement", {
|
|
13524
13523
|
action: "received",
|
|
13525
13524
|
payload: {
|
|
13526
13525
|
advertisementId: d.data.question.id,
|
|
13527
|
-
advertisementType: (T = d.data) == null ? void 0 : T.promotion.type
|
|
13526
|
+
advertisementType: (f = (T = d.data) == null ? void 0 : T.promotion) == null ? void 0 : f.type
|
|
13528
13527
|
}
|
|
13529
13528
|
}), (!(y != null && y.data) || d.data.id !== y.data.id) && l(d.data.question.id, d.data));
|
|
13530
13529
|
}), o.subscribe((d, y) => {
|
|
13531
|
-
var T, f;
|
|
13530
|
+
var T, f, _;
|
|
13532
13531
|
d.data && (n.sdk.onAdvertisementActivate({
|
|
13533
13532
|
stage: "activate",
|
|
13534
13533
|
id: d.data.question.id,
|
|
@@ -13538,7 +13537,7 @@ const Ok = (e) => {
|
|
|
13538
13537
|
action: "opened",
|
|
13539
13538
|
payload: {
|
|
13540
13539
|
advertisementId: d.data.question.id,
|
|
13541
|
-
advertisementType: (f = d.data) == null ? void 0 : f.promotion.type
|
|
13540
|
+
advertisementType: (_ = (f = d.data) == null ? void 0 : f.promotion) == null ? void 0 : _.type
|
|
13542
13541
|
}
|
|
13543
13542
|
})), !(d != null && d.data) && (y != null && y.data) && n.sdk.onAdvertisementActivate({
|
|
13544
13543
|
stage: "deactivate",
|
|
@@ -17649,7 +17648,7 @@ const W_ = ({
|
|
|
17649
17648
|
m = !0;
|
|
17650
17649
|
};
|
|
17651
17650
|
const u = j_(e, n, a, {
|
|
17652
|
-
version: "1.5.
|
|
17651
|
+
version: "1.5.1",
|
|
17653
17652
|
onDeepLinkHandled: s,
|
|
17654
17653
|
videoPlayerController: r,
|
|
17655
17654
|
onContentActivate: o
|
|
@@ -17676,12 +17675,13 @@ export {
|
|
|
17676
17675
|
Jo as a,
|
|
17677
17676
|
dm as b,
|
|
17678
17677
|
gm as c,
|
|
17679
|
-
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17678
|
+
ym as d,
|
|
17679
|
+
P as e,
|
|
17680
|
+
ur as f,
|
|
17681
|
+
ft as g,
|
|
17682
|
+
me as h,
|
|
17683
|
+
Yr as i,
|
|
17684
|
+
Qt as j,
|
|
17685
17685
|
nl as p,
|
|
17686
17686
|
W_ as u
|
|
17687
17687
|
};
|