@streamlayer/react 1.17.1 → 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 +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 +7285 -4829
- 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/es/points.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useEffect as d } from "react";
|
|
3
|
-
import { s as a,
|
|
4
|
-
import { S as
|
|
3
|
+
import { s as a, B as y, m as h, d as S, a as f, F as p, e as r, u as v, b as g, h as b } from "./provider.js";
|
|
4
|
+
import { S as k } from "./useStreamLayerApp2.js";
|
|
5
5
|
const A = /* @__PURE__ */ a("div")({
|
|
6
6
|
name: "PointsContainer",
|
|
7
7
|
class: "psiob9b",
|
|
@@ -26,13 +26,13 @@ const A = /* @__PURE__ */ a("div")({
|
|
|
26
26
|
name: "PointsValue",
|
|
27
27
|
class: "prj9b3v",
|
|
28
28
|
propsAsIs: !1
|
|
29
|
-
}),
|
|
29
|
+
}), B = ({ points: s, onClick: e }) => /* @__PURE__ */ l(A, { className: h, onClick: e, children: [
|
|
30
30
|
/* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(T, { name: "icon-trophy-solid" }) }),
|
|
31
31
|
/* @__PURE__ */ l(F, { children: [
|
|
32
32
|
/* @__PURE__ */ t(L, { children: "Total points" }),
|
|
33
33
|
/* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(S, { value: s }) })
|
|
34
34
|
] })
|
|
35
|
-
] }),
|
|
35
|
+
] }), C = ({ gamification: s }) => {
|
|
36
36
|
const e = s.userSummary.$store, [n, m] = u(0);
|
|
37
37
|
return d(() => {
|
|
38
38
|
const o = e.subscribe((i) => {
|
|
@@ -42,7 +42,7 @@ const A = /* @__PURE__ */ a("div")({
|
|
|
42
42
|
return () => {
|
|
43
43
|
o();
|
|
44
44
|
};
|
|
45
|
-
}, [e]), /* @__PURE__ */ t(
|
|
45
|
+
}, [e]), /* @__PURE__ */ t(B, { points: n, onClick: () => {
|
|
46
46
|
const o = s.status.get();
|
|
47
47
|
o === p.Suspended ? (s.openFeature(), r.emit("app", {
|
|
48
48
|
action: "open",
|
|
@@ -58,14 +58,14 @@ const A = /* @__PURE__ */ a("div")({
|
|
|
58
58
|
payload: {}
|
|
59
59
|
}));
|
|
60
60
|
} });
|
|
61
|
-
},
|
|
61
|
+
}, j = ({ sdk: s }) => {
|
|
62
62
|
if (!f(s.featuresList.getStore()))
|
|
63
63
|
return null;
|
|
64
|
-
const e = s.getFeature(
|
|
65
|
-
return e ? /* @__PURE__ */ t(
|
|
64
|
+
const e = s.getFeature(k.GAMES);
|
|
65
|
+
return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
|
|
66
66
|
}, K = ({ theme: s }) => {
|
|
67
|
-
const e = v(), n =
|
|
68
|
-
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(
|
|
67
|
+
const e = v(), n = g();
|
|
68
|
+
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(b, { customTheme: s ?? n.theme, themeMode: n.themeMode, children: /* @__PURE__ */ t(j, { sdk: e }) }) }) : null;
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
K as StreamLayerSDKPoints
|