@streamlayer/react 1.17.1 → 1.18.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/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 +36 -36
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +2 -2
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +3 -3
- 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 +36 -36
- package/lib/classic/cjs/bet-pack.js +2 -2
- package/lib/classic/cjs/gamification-feature.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 -14
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
- package/lib/classic/es/advertisement.js +6778 -6620
- package/lib/classic/es/bet-pack.js +245 -245
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/index.js +3 -3
- package/lib/classic/es/insight.js +41 -38
- package/lib/classic/es/notification.js +739 -230
- package/lib/classic/es/points.js +10 -10
- package/lib/classic/es/provider.js +7175 -4742
- package/lib/classic/es/useStreamLayerApp.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +4007 -3787
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/masters.js +47 -43
- package/lib/dist/es/gamification-feature2.js +15 -15
- package/lib/dist/es/index.js +3 -3
- package/lib/dist/es/masters.js +14631 -12156
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +6778 -6620
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +362 -362
- package/lib/es/insight.js +41 -38
- package/lib/es/masters2.js +28 -26
- package/lib/es/notification.js +739 -230
- package/lib/es/points.js +10 -10
- package/lib/es/provider.js +7162 -4706
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +4007 -3787
- package/lib/style.css +1 -1
- package/package.json +14 -14
package/lib/classic/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
4
|
+
import { StreamLayerSDKNotification as f, StreamLayerSDKNotificationUI as u } from "./notification.js";
|
|
5
5
|
export {
|
|
6
6
|
m as StreamLayerProvider,
|
|
7
7
|
S as StreamLayerSDKEvent,
|
|
8
|
-
|
|
8
|
+
f as StreamLayerSDKNotification,
|
|
9
9
|
u as StreamLayerSDKNotificationUI,
|
|
10
10
|
o as StreamLayerSDKReact,
|
|
11
11
|
i as StreamLayerThemeProvider,
|
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { a as m, s as
|
|
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
|
+
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(
|
|
61
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 {
|