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