@streamlayer/react 1.0.0 → 1.1.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 +2 -2
- package/lib/app/auth.d.ts +0 -1
- package/lib/app/masters.d.ts +2 -1
- package/lib/app/provider.d.ts +4 -4
- package/lib/app/useStreamLayerApp.d.ts +8 -7
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/index2.js +55 -51
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +90 -86
- package/lib/dist/es/gamification-feature.js +1 -1
- package/lib/dist/es/gamification-feature2.js +18 -18
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +31784 -35347
- package/lib/dist/index.d.ts +222 -135
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +438 -414
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/gamification-feature2.js +1 -1
- package/lib/es/index2.js +10263 -10726
- package/lib/es/masters2.js +393 -432
- package/lib/es/points.js +9 -9
- package/lib/es/useStreamLayerApp2.js +8732 -11851
- package/lib/style.css +1 -1
- package/package.json +45 -40
package/lib/es/points.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useState as c, useEffect as u } from "react";
|
|
3
|
+
import { s as t, c as m, p as d, d as S, u as f, F as y } from "./index2.js";
|
|
4
4
|
import { u as v, i as h } from "./app.js";
|
|
5
5
|
import { S as g } from "./useStreamLayerApp2.js";
|
|
6
6
|
const A = /* @__PURE__ */ t("div")({
|
|
@@ -11,7 +11,7 @@ const A = /* @__PURE__ */ t("div")({
|
|
|
11
11
|
name: "PointsIcon",
|
|
12
12
|
class: "p1gqe4lh",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}), P = () =>
|
|
14
|
+
}), P = () => m, k = /* @__PURE__ */ t(P())({
|
|
15
15
|
name: "PointsSvg",
|
|
16
16
|
class: "p15syg2y",
|
|
17
17
|
propsAsIs: !0
|
|
@@ -27,15 +27,15 @@ const A = /* @__PURE__ */ t("div")({
|
|
|
27
27
|
name: "PointsValue",
|
|
28
28
|
class: "prj9b3v",
|
|
29
29
|
propsAsIs: !1
|
|
30
|
-
}), F = ({ points: s, onClick: e }) => /* @__PURE__ */ a(A, { className:
|
|
30
|
+
}), F = ({ points: s, onClick: e }) => /* @__PURE__ */ a(A, { className: d, onClick: e, children: [
|
|
31
31
|
/* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(k, { name: "icon-trophy" }) }),
|
|
32
32
|
/* @__PURE__ */ a(b, { children: [
|
|
33
33
|
/* @__PURE__ */ r(x, { children: "Total points" }),
|
|
34
|
-
/* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(
|
|
34
|
+
/* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(S, { value: s }) })
|
|
35
35
|
] })
|
|
36
36
|
] }), L = ({ gamification: s }) => {
|
|
37
|
-
const e = s.userSummary.$store, [i, l] =
|
|
38
|
-
return
|
|
37
|
+
const e = s.userSummary.$store, [i, l] = c(0);
|
|
38
|
+
return u(() => {
|
|
39
39
|
const p = e.subscribe((n) => {
|
|
40
40
|
var o;
|
|
41
41
|
(o = n == null ? void 0 : n.summary) != null && o.points && l(n.summary.points);
|
|
@@ -44,10 +44,10 @@ const A = /* @__PURE__ */ t("div")({
|
|
|
44
44
|
p();
|
|
45
45
|
};
|
|
46
46
|
}, [e]), /* @__PURE__ */ r(F, { points: i, onClick: () => {
|
|
47
|
-
s.status.get() ===
|
|
47
|
+
s.status.get() === y.Suspended && s.openFeature();
|
|
48
48
|
} });
|
|
49
49
|
}, $ = ({ sdk: s }) => {
|
|
50
|
-
if (!
|
|
50
|
+
if (!f(s.featuresList.getStore()))
|
|
51
51
|
return null;
|
|
52
52
|
const e = s.getFeature(g.GAMES);
|
|
53
53
|
return e ? /* @__PURE__ */ r(L, { gamification: e }) : null;
|