@streamlayer/react 1.17.0 → 1.18.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.
- package/lib/app/advertisement.d.ts +1 -0
- package/lib/app/app.d.ts +3 -0
- package/lib/app/provider.d.ts +4 -1
- package/lib/app/useStreamLayerApp.d.ts +2 -1
- package/lib/cjs/advertisement.js +40 -40
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +2 -2
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +62 -19
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/app/advertisement.d.ts +1 -0
- package/lib/classic/app/app.d.ts +3 -0
- package/lib/classic/app/provider.d.ts +4 -1
- package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
- package/lib/classic/cjs/advertisement.js +40 -40
- package/lib/classic/cjs/bet-pack.js +5 -1
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/index.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 +57 -30
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/es/advertisement.js +6989 -6764
- package/lib/classic/es/bet-pack.js +3431 -12
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/index.js +4 -6
- package/lib/classic/es/insight.js +44 -41
- package/lib/classic/es/notification.js +739 -230
- package/lib/classic/es/points.js +13 -13
- package/lib/classic/es/provider.js +7109 -4730
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +4044 -3824
- package/lib/classic/index.d.ts +1 -2
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/masters.js +48 -44
- package/lib/dist/es/gamification-feature2.js +15 -15
- package/lib/dist/es/index.js +3 -3
- package/lib/dist/es/masters.js +12653 -10178
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +6989 -6764
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +3 -5
- package/lib/es/index2.js +380 -380
- package/lib/es/insight.js +44 -41
- package/lib/es/masters2.js +22 -20
- package/lib/es/notification.js +739 -230
- package/lib/es/points.js +13 -13
- package/lib/es/provider.js +7162 -4706
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +4044 -3824
- package/lib/index.d.ts +1 -2
- package/lib/style.css +1 -1
- package/package.json +16 -26
- package/lib/app/tvos.d.ts +0 -5
- package/lib/cjs/index3.js +0 -1
- package/lib/cjs/tvos.js +0 -1
- package/lib/classic/app/tvos.d.ts +0 -5
- package/lib/classic/cjs/gamification-feature2.js +0 -1
- package/lib/classic/cjs/index2.js +0 -5
- package/lib/classic/cjs/index3.js +0 -1
- package/lib/classic/cjs/masters.js +0 -1
- package/lib/classic/cjs/masters2.js +0 -13
- package/lib/classic/cjs/tvos.js +0 -1
- package/lib/classic/es/gamification-feature2.js +0 -4
- package/lib/classic/es/index2.js +0 -3426
- package/lib/classic/es/index3.js +0 -76
- package/lib/classic/es/masters.js +0 -9
- package/lib/classic/es/masters2.js +0 -868
- package/lib/classic/es/tvos.js +0 -1352
- package/lib/classic/style.css +0 -1
- package/lib/es/index3.js +0 -76
- package/lib/es/tvos.js +0 -1352
package/lib/classic/es/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as m, S, w as o, h as i, u as s, b as y, p as L } from "./provider.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { StreamLayerSDKNotification as
|
|
5
|
-
import { StreamLayerSDKTv as c } from "./tvos.js";
|
|
4
|
+
import { StreamLayerSDKNotification as f, StreamLayerSDKNotificationUI as u } from "./notification.js";
|
|
6
5
|
export {
|
|
7
6
|
m as StreamLayerProvider,
|
|
8
7
|
S as StreamLayerSDKEvent,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
f as StreamLayerSDKNotification,
|
|
9
|
+
u as StreamLayerSDKNotificationUI,
|
|
11
10
|
o as StreamLayerSDKReact,
|
|
12
|
-
c as StreamLayerSDKTv,
|
|
13
11
|
i as StreamLayerThemeProvider,
|
|
14
12
|
s as useStreamLayer,
|
|
15
13
|
y as useStreamLayerTheme,
|
|
@@ -1,75 +1,78 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as u, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useEffect as p } from "react";
|
|
3
|
+
import { a as m, s as f, T as S, u as I, b as g, h as v, S as k } from "./provider.js";
|
|
4
4
|
import { S as y } from "./useStreamLayerApp2.js";
|
|
5
|
-
const Q = () =>
|
|
5
|
+
const Q = () => S, b = /* @__PURE__ */ f(Q())({
|
|
6
6
|
name: "QuestionWrap",
|
|
7
7
|
class: "q10hhsxv",
|
|
8
8
|
propsAsIs: !0
|
|
9
|
-
}),
|
|
9
|
+
}), L = ({
|
|
10
10
|
gamification: e,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
sdk: n,
|
|
12
|
+
persistent: i,
|
|
13
|
+
skipAutoClose: a,
|
|
13
14
|
hideHeader: o,
|
|
14
|
-
insightId:
|
|
15
|
+
insightId: t
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
var
|
|
19
|
-
|
|
17
|
+
const r = h(""), c = m(e.openedQuestion.$store);
|
|
18
|
+
return p(() => t ? (!i || e.isOpenedQuestion(t) || (r.current = t, e.getFeedItem(t).then((s) => {
|
|
19
|
+
var d;
|
|
20
|
+
r.current === t && ((d = s == null ? void 0 : s.attributes) == null ? void 0 : d.attributes.case) === "insight" && e.openQuestion(t, s);
|
|
20
21
|
})), () => {
|
|
21
|
-
|
|
22
|
+
r.current = "";
|
|
22
23
|
}) : (e.activeQuestionId.subscribe(({
|
|
23
|
-
data:
|
|
24
|
+
data: s
|
|
24
25
|
}) => {
|
|
25
|
-
var
|
|
26
|
-
|
|
26
|
+
var d;
|
|
27
|
+
s && ((d = s.feedItem) == null ? void 0 : d.type) === "insight" && (!i || e.isOpenedQuestion(s.feedItem.id) || (r.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && r.current && (e.closeQuestion(r.current), r.current = "");
|
|
27
28
|
}), () => {
|
|
28
|
-
}), [e,
|
|
29
|
-
|
|
29
|
+
}), [e, i, t]), c ? /* @__PURE__ */ u(b, {
|
|
30
|
+
sdk: n,
|
|
31
|
+
skipAutoClose: a,
|
|
30
32
|
hideHeader: o,
|
|
31
33
|
gamification: e,
|
|
32
34
|
hideSponsor: !0
|
|
33
35
|
}) : null;
|
|
34
|
-
},
|
|
36
|
+
}, A = ({
|
|
35
37
|
sdk: e,
|
|
36
|
-
persistent:
|
|
37
|
-
skipAutoClose:
|
|
38
|
-
insightId:
|
|
39
|
-
hideHeader:
|
|
38
|
+
persistent: n,
|
|
39
|
+
skipAutoClose: i,
|
|
40
|
+
insightId: a,
|
|
41
|
+
hideHeader: o
|
|
40
42
|
}) => {
|
|
41
43
|
if (!m(e.featuresList.getStore()))
|
|
42
44
|
return null;
|
|
43
45
|
const t = e.getFeature(y.GAMES);
|
|
44
|
-
return t ? /* @__PURE__ */ u(
|
|
45
|
-
insightId:
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
return t ? /* @__PURE__ */ u(L, {
|
|
47
|
+
insightId: a,
|
|
48
|
+
sdk: e,
|
|
49
|
+
persistent: n,
|
|
50
|
+
hideHeader: o,
|
|
48
51
|
gamification: t,
|
|
49
|
-
skipAutoClose:
|
|
52
|
+
skipAutoClose: i
|
|
50
53
|
}) : null;
|
|
51
54
|
}, H = ({
|
|
52
55
|
event: e,
|
|
53
|
-
theme:
|
|
54
|
-
hideHeader:
|
|
55
|
-
skipAutoClose:
|
|
56
|
-
persistent:
|
|
56
|
+
theme: n,
|
|
57
|
+
hideHeader: i,
|
|
58
|
+
skipAutoClose: a,
|
|
59
|
+
persistent: o
|
|
57
60
|
}) => {
|
|
58
|
-
const t =
|
|
59
|
-
return t ? /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */ u(
|
|
61
|
-
|
|
61
|
+
const t = I(), r = g();
|
|
62
|
+
return t ? /* @__PURE__ */ l("div", { className: "StreamLayerSDK", children: [
|
|
63
|
+
/* @__PURE__ */ u(v, { customTheme: n ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ u(
|
|
64
|
+
A,
|
|
62
65
|
{
|
|
63
|
-
skipAutoClose:
|
|
66
|
+
skipAutoClose: a,
|
|
64
67
|
sdk: t,
|
|
65
|
-
hideHeader:
|
|
66
|
-
persistent:
|
|
68
|
+
hideHeader: i,
|
|
69
|
+
persistent: o
|
|
67
70
|
}
|
|
68
71
|
) }),
|
|
69
|
-
e !== void 0 && /* @__PURE__ */ u(
|
|
72
|
+
e !== void 0 && /* @__PURE__ */ u(k, { event: e })
|
|
70
73
|
] }) : null;
|
|
71
74
|
};
|
|
72
75
|
export {
|
|
73
76
|
H as StreamLayerSDKInsight,
|
|
74
|
-
|
|
77
|
+
A as StreamLayerSDKInsightUI
|
|
75
78
|
};
|