@streamlayer/react 1.9.8 → 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/app/app.d.ts +3 -2
- package/lib/app/notification.d.ts +5 -0
- package/lib/app/provider.d.ts +1 -1
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/auth.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/masters.js +1 -1
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/notification.js +1 -0
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +195 -0
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- 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 +70 -62
- package/lib/dist/es/gamification-feature2.js +21 -21
- package/lib/dist/es/index.js +3 -3
- package/lib/dist/es/masters.js +10484 -10391
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +32 -32
- package/lib/es/auth.js +1 -1
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/index.js +10 -6
- package/lib/es/insight.js +15 -15
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +31 -31
- package/lib/es/notification.js +468 -0
- package/lib/es/points.js +13 -13
- package/lib/es/{index2.js → provider.js} +6936 -6848
- package/lib/es/useStreamLayerApp2.js +1106 -1078
- package/lib/index.d.ts +2 -1
- package/lib/style.css +1 -1
- package/package.json +54 -13
- package/lib/cjs/index2.js +0 -187
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as s, jsxs as g, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useRef as
|
|
4
|
-
const
|
|
2
|
+
import { A as y, M as $, s as I, u as l, T as L, S as M, C as D, p as T, k as E, O as A, m as h, a as F, l as O, c as P, b as R, d as V, e as Q, f as H, n as K, g as U } from "./masters.js";
|
|
3
|
+
import { useRef as j, useState as w, useEffect as v } from "react";
|
|
4
|
+
const q = (e, t, o) => {
|
|
5
5
|
const r = t >= y.lg && t < y.xl ? 75 : 52;
|
|
6
6
|
e.current && window.scrollTo({
|
|
7
7
|
top: e.current.offsetTop - r,
|
|
8
8
|
...o
|
|
9
9
|
});
|
|
10
|
-
},
|
|
10
|
+
}, z = /* @__PURE__ */ I("div")({
|
|
11
11
|
name: "InviteFriendsContainer",
|
|
12
12
|
class: "i1c9dygq",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
14
|
+
}), B = ({
|
|
15
15
|
deepLink: e
|
|
16
|
-
}) => /* @__PURE__ */ s(
|
|
16
|
+
}) => /* @__PURE__ */ s(z, {
|
|
17
17
|
children: /* @__PURE__ */ s($, {
|
|
18
18
|
inviteLink: e,
|
|
19
19
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
20
20
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
21
21
|
})
|
|
22
|
-
}),
|
|
22
|
+
}), W = /* @__PURE__ */ I("div")({
|
|
23
23
|
name: "InviteLinkContainer",
|
|
24
24
|
class: "i1odbhm4",
|
|
25
25
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
26
|
+
}), _ = ({
|
|
27
27
|
gamification: e,
|
|
28
28
|
scrollNode: t,
|
|
29
29
|
scrollStore: o
|
|
30
30
|
}) => {
|
|
31
|
-
const r =
|
|
31
|
+
const r = j(null), {
|
|
32
32
|
data: n,
|
|
33
33
|
hasMore: i,
|
|
34
34
|
loading: c,
|
|
@@ -36,7 +36,7 @@ const j = (e, t, o) => {
|
|
|
36
36
|
} = l(e.leaderboardList.$store), {
|
|
37
37
|
data: a
|
|
38
38
|
} = l(e.deepLink.$store), [d, m] = L(r);
|
|
39
|
-
return !n.length && !c ? /* @__PURE__ */ s(
|
|
39
|
+
return !n.length && !c ? /* @__PURE__ */ s(B, {
|
|
40
40
|
deepLink: a
|
|
41
41
|
}) : /* @__PURE__ */ g(k, {
|
|
42
42
|
children: [/* @__PURE__ */ s(M, {
|
|
@@ -47,7 +47,7 @@ const j = (e, t, o) => {
|
|
|
47
47
|
hasMore: i,
|
|
48
48
|
openItemDetail: e.openUser,
|
|
49
49
|
currentUserId: e.currentUserId.get()
|
|
50
|
-
}, p), a && /* @__PURE__ */ s(
|
|
50
|
+
}, p), a && /* @__PURE__ */ s(W, {
|
|
51
51
|
ref: r,
|
|
52
52
|
children: /* @__PURE__ */ s(D, {
|
|
53
53
|
onClick: () => d(a),
|
|
@@ -61,7 +61,7 @@ const j = (e, t, o) => {
|
|
|
61
61
|
return /* @__PURE__ */ s(E, { openQuestion: t, questions: r.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
|
|
62
62
|
}, J = ({ userSummary: e }) => {
|
|
63
63
|
var t;
|
|
64
|
-
const [o, r] =
|
|
64
|
+
const [o, r] = w(void 0);
|
|
65
65
|
return v(() => {
|
|
66
66
|
const n = e.$store.subscribe((i) => {
|
|
67
67
|
i && r(i);
|
|
@@ -71,10 +71,10 @@ const j = (e, t, o) => {
|
|
|
71
71
|
};
|
|
72
72
|
}, [e]), /* @__PURE__ */ s(A, { loading: !(o != null && o.summary), ...o == null ? void 0 : o.summary, successRate: (t = o == null ? void 0 : o.percentage) == null ? void 0 : t.correct });
|
|
73
73
|
}, X = ({ gamification: e, className: t, scrollStore: o, scrollNode: r, appNode: n, style: i, responsiveStore: c }) => {
|
|
74
|
-
const { tabsShown: p } = l(o, { keys: ["tabsShown"] }), a = l(e.friendsTabEnabled), [d, m] =
|
|
75
|
-
|
|
74
|
+
const { tabsShown: p } = l(o, { keys: ["tabsShown"] }), a = l(e.friendsTabEnabled), [d, m] = w(h.HOME), [, N] = F(), { sdkInDesktopView: S, screen: x } = l(c, { keys: ["sdkInDesktopView"] }), C = (u) => {
|
|
75
|
+
N(() => {
|
|
76
76
|
var b;
|
|
77
|
-
m(u), S === !1 && (((b = n.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 &&
|
|
77
|
+
m(u), S === !1 && (((b = n.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && q(n, x.size, { behavior: "instant" });
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
80
|
v(() => o.subscribe((u) => {
|
|
@@ -87,21 +87,21 @@ const j = (e, t, o) => {
|
|
|
87
87
|
a || m(h.HOME);
|
|
88
88
|
}, [a]);
|
|
89
89
|
let f = "0px";
|
|
90
|
-
return S ? f = p ? "0px" : "calc(0px - var(--header-height))" : f = p ? "var(--header-height)" : "0px", /* @__PURE__ */ g(
|
|
90
|
+
return S ? f = p ? "0px" : "calc(0px - var(--header-height))" : f = p ? "var(--header-height)" : "0px", /* @__PURE__ */ g(O, { className: P(t, "SL-Tabs"), style: i, children: [
|
|
91
91
|
a && /* @__PURE__ */ s(
|
|
92
|
-
|
|
92
|
+
R,
|
|
93
93
|
{
|
|
94
94
|
style: {
|
|
95
95
|
top: f
|
|
96
96
|
},
|
|
97
|
-
children: /* @__PURE__ */ s(
|
|
97
|
+
children: /* @__PURE__ */ s(V, { activePage: d, toggleActivePage: C })
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
100
|
d === h.HOME && /* @__PURE__ */ g(k, { children: [
|
|
101
|
-
/* @__PURE__ */ s(
|
|
102
|
-
/* @__PURE__ */ s(
|
|
101
|
+
/* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(J, { userSummary: e.userSummary }) }) }),
|
|
102
|
+
/* @__PURE__ */ s(K, { style: { flex: 1 }, children: /* @__PURE__ */ s(G, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
103
103
|
] }),
|
|
104
|
-
d === h.LEADERBOARD && /* @__PURE__ */ s(
|
|
104
|
+
d === h.LEADERBOARD && /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(_, { scrollStore: o, scrollNode: r, gamification: e }) })
|
|
105
105
|
] });
|
|
106
106
|
}, oe = ({
|
|
107
107
|
gamification: e,
|
package/lib/dist/es/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { i as s, j as o, o as m, h as i } from "./masters.js";
|
|
3
3
|
import "react";
|
|
4
4
|
export {
|
|
5
5
|
s as MastersStreamLayerProvider,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
o as MastersStreamLayerSDKReact,
|
|
7
|
+
m as StreamLayerLogin,
|
|
8
8
|
i as StreamLayerSDKPoints
|
|
9
9
|
};
|