@streamlayer/react 1.11.2 → 1.11.3-rc.3
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/cjs/advertisement.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index.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 +78 -90
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/cjs/advertisement.js +1 -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 +78 -90
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +704 -605
- package/lib/classic/es/gamification-feature.js +1 -1
- package/lib/classic/es/index.js +11 -14
- package/lib/classic/es/insight.js +34 -35
- package/lib/classic/es/notification.js +452 -378
- package/lib/classic/es/points.js +67 -44
- package/lib/classic/es/provider.js +13981 -15913
- package/lib/classic/es/useStreamLayerApp2.js +3253 -2969
- package/lib/classic/index.d.ts +1 -10
- package/lib/classic/style.css +455 -1
- package/lib/es/advertisement.js +704 -605
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +11 -14
- package/lib/es/insight.js +34 -35
- package/lib/es/notification.js +452 -378
- package/lib/es/points.js +67 -44
- package/lib/es/provider.js +13979 -15910
- package/lib/es/useStreamLayerApp2.js +3253 -2969
- package/lib/index.d.ts +1 -10
- package/lib/style.css +1 -1
- package/package.json +16 -22
- package/lib/app/masters.d.ts +0 -28
- package/lib/cjs/gamification-feature2.js +0 -1
- package/lib/cjs/masters.js +0 -1
- package/lib/cjs/masters2.js +0 -9
- package/lib/classic/app/masters.d.ts +0 -28
- package/lib/classic/cjs/gamification-feature2.js +0 -1
- package/lib/classic/cjs/masters.js +0 -1
- package/lib/classic/cjs/masters2.js +0 -9
- package/lib/classic/es/gamification-feature2.js +0 -4
- package/lib/classic/es/masters.js +0 -8
- package/lib/classic/es/masters2.js +0 -1066
- package/lib/classic/masters.d.ts +0 -5
- package/lib/dist/cjs/gamification-feature.js +0 -1
- package/lib/dist/cjs/gamification-feature2.js +0 -1
- package/lib/dist/cjs/index.js +0 -1
- package/lib/dist/cjs/masters.js +0 -219
- package/lib/dist/cjs/package.json +0 -1
- package/lib/dist/es/gamification-feature.js +0 -4
- package/lib/dist/es/gamification-feature2.js +0 -123
- package/lib/dist/es/index.js +0 -9
- package/lib/dist/es/masters.js +0 -42696
- package/lib/dist/es/package.json +0 -1
- package/lib/dist/style.css +0 -1
- package/lib/es/gamification-feature2.js +0 -4
- package/lib/es/masters.js +0 -8
- package/lib/es/masters2.js +0 -1066
- package/lib/masters.d.ts +0 -5
package/lib/es/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react";
|
|
5
|
-
import { StreamLayerSDKNotification as u, StreamLayerSDKNotificationUI as D } from "./notification.js";
|
|
1
|
+
import { S as r, a as t, b as S, h as m, u as o, d as s, c as y } from "./provider.js";
|
|
2
|
+
import { StreamLayerSDKNotification as i, StreamLayerSDKNotificationUI as c } from "./notification.js";
|
|
6
3
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
r as StreamLayerProvider,
|
|
5
|
+
t as StreamLayerSDKEvent,
|
|
6
|
+
i as StreamLayerSDKNotification,
|
|
7
|
+
c as StreamLayerSDKNotificationUI,
|
|
8
|
+
S as StreamLayerSDKReact,
|
|
9
|
+
m as StreamLayerThemeProvider,
|
|
10
|
+
o as useStreamLayer,
|
|
11
|
+
s as useStreamLayerTheme,
|
|
12
|
+
y as useStreamLayerUI
|
|
16
13
|
};
|
package/lib/es/insight.js
CHANGED
|
@@ -1,75 +1,74 @@
|
|
|
1
1
|
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { S as
|
|
5
|
-
const
|
|
6
|
-
name: "
|
|
7
|
-
class: "
|
|
2
|
+
import { e as m, s as l, m as h, u as p, d as f, h as S, a as g } from "./provider.js";
|
|
3
|
+
import { useRef as I, useEffect as y } from "react";
|
|
4
|
+
import { S as v } from "./useStreamLayerApp2.js";
|
|
5
|
+
const k = () => h, L = /* @__PURE__ */ l(k())({
|
|
6
|
+
name: "y",
|
|
7
|
+
class: "y1tj7gx6",
|
|
8
8
|
propsAsIs: !0
|
|
9
|
-
}),
|
|
9
|
+
}), Q = ({
|
|
10
10
|
gamification: e,
|
|
11
11
|
persistent: r,
|
|
12
|
-
skipAutoClose:
|
|
13
|
-
hideHeader:
|
|
12
|
+
skipAutoClose: a,
|
|
13
|
+
hideHeader: n,
|
|
14
14
|
insightId: s
|
|
15
15
|
}) => {
|
|
16
|
-
const t =
|
|
17
|
-
return
|
|
18
|
-
var
|
|
19
|
-
t.current === s && ((
|
|
16
|
+
const t = I(""), d = m(e.openedQuestion.$store);
|
|
17
|
+
return y(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
|
|
18
|
+
var o;
|
|
19
|
+
t.current === s && ((o = i == null ? void 0 : i.attributes) == null ? void 0 : o.attributes.case) === "insight" && e.openQuestion(s, i);
|
|
20
20
|
})), () => {
|
|
21
21
|
t.current = "";
|
|
22
22
|
}) : (e.activeQuestionId.subscribe(({
|
|
23
23
|
data: i
|
|
24
24
|
}) => {
|
|
25
|
-
var
|
|
26
|
-
i && ((
|
|
25
|
+
var o;
|
|
26
|
+
i && ((o = i.feedItem) == null ? void 0 : o.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
27
|
}), () => {
|
|
28
|
-
}), [e, r, s]), d ? /* @__PURE__ */ u(
|
|
29
|
-
skipAutoClose:
|
|
30
|
-
hideHeader:
|
|
28
|
+
}), [e, r, s]), d ? /* @__PURE__ */ u(L, {
|
|
29
|
+
skipAutoClose: a,
|
|
30
|
+
hideHeader: n,
|
|
31
31
|
gamification: e,
|
|
32
32
|
hideSponsor: !0
|
|
33
33
|
}) : null;
|
|
34
34
|
}, A = ({
|
|
35
35
|
sdk: e,
|
|
36
36
|
persistent: r,
|
|
37
|
-
skipAutoClose:
|
|
38
|
-
insightId:
|
|
37
|
+
skipAutoClose: a,
|
|
38
|
+
insightId: n,
|
|
39
39
|
hideHeader: s
|
|
40
40
|
}) => {
|
|
41
|
-
if (!m(e.featuresList.getStore()))
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
insightId: o,
|
|
41
|
+
if (!m(e.featuresList.getStore())) return null;
|
|
42
|
+
const t = e.getFeature(v.GAMES);
|
|
43
|
+
return t ? /* @__PURE__ */ u(Q, {
|
|
44
|
+
insightId: n,
|
|
46
45
|
persistent: r,
|
|
47
46
|
hideHeader: s,
|
|
48
47
|
gamification: t,
|
|
49
|
-
skipAutoClose:
|
|
48
|
+
skipAutoClose: a
|
|
50
49
|
}) : null;
|
|
51
|
-
},
|
|
50
|
+
}, D = ({
|
|
52
51
|
event: e,
|
|
53
52
|
theme: r,
|
|
54
|
-
hideHeader:
|
|
55
|
-
skipAutoClose:
|
|
53
|
+
hideHeader: a,
|
|
54
|
+
skipAutoClose: n,
|
|
56
55
|
persistent: s
|
|
57
56
|
}) => {
|
|
58
|
-
const t =
|
|
57
|
+
const t = p(), d = f();
|
|
59
58
|
return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
|
|
60
|
-
/* @__PURE__ */ u(
|
|
59
|
+
/* @__PURE__ */ u(S, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
|
|
61
60
|
A,
|
|
62
61
|
{
|
|
63
|
-
skipAutoClose:
|
|
62
|
+
skipAutoClose: n,
|
|
64
63
|
sdk: t,
|
|
65
|
-
hideHeader:
|
|
64
|
+
hideHeader: a,
|
|
66
65
|
persistent: s
|
|
67
66
|
}
|
|
68
67
|
) }),
|
|
69
|
-
e !== void 0 && /* @__PURE__ */ u(
|
|
68
|
+
e !== void 0 && /* @__PURE__ */ u(g, { event: e })
|
|
70
69
|
] }) : null;
|
|
71
70
|
};
|
|
72
71
|
export {
|
|
73
|
-
|
|
72
|
+
D as StreamLayerSDKInsight,
|
|
74
73
|
A as StreamLayerSDKInsightUI
|
|
75
74
|
};
|