@streamlayer/react 0.30.6 → 0.31.1
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/gamification-feature.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +1 -0
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +18 -17
- package/lib/dist/es/gamification-feature.js +512 -499
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +1929 -1544
- package/lib/es/gamification-feature.js +372 -358
- package/lib/es/index3.js +6 -148
- package/lib/es/index4.js +151 -0
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +1 -1
- package/lib/es/points.js +12 -11
- package/package.json +11 -10
- package/lib/cjs/common.js +0 -1
- package/lib/es/common.js +0 -15
package/lib/es/points.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { FeatureType as c } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { d as l, s as u } from "./index2.js";
|
|
4
|
-
import {
|
|
5
|
-
import { s as t, i as f } from "./
|
|
4
|
+
import { m as d } from "./index3.js";
|
|
5
|
+
import { s as t, i as f } from "./index4.js";
|
|
6
6
|
import { useState as y, useEffect as S } from "react";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import "react-countup";
|
|
8
|
+
import { useStore as v } from "@nanostores/react";
|
|
9
|
+
import { u as P } from "./app.js";
|
|
9
10
|
import "./useStreamLayerApp.js";
|
|
10
11
|
import "@streamlayer/sdk-web";
|
|
11
|
-
const
|
|
12
|
+
const h = /* @__PURE__ */ t("div")({
|
|
12
13
|
name: "PointsContainer",
|
|
13
14
|
class: "psiob9b",
|
|
14
15
|
propsAsIs: !1
|
|
@@ -32,11 +33,11 @@ const v = /* @__PURE__ */ t("div")({
|
|
|
32
33
|
name: "PointsValue",
|
|
33
34
|
class: "prj9b3v",
|
|
34
35
|
propsAsIs: !1
|
|
35
|
-
}), j = ({ points: s }) => /* @__PURE__ */ m(
|
|
36
|
+
}), j = ({ points: s }) => /* @__PURE__ */ m(h, { className: l, children: [
|
|
36
37
|
/* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(g, { name: "icon-trophy" }) }),
|
|
37
38
|
/* @__PURE__ */ m(b, { children: [
|
|
38
39
|
/* @__PURE__ */ r(x, { children: "Total points" }),
|
|
39
|
-
/* @__PURE__ */ r(L, { children: d
|
|
40
|
+
/* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(d, { value: s }) })
|
|
40
41
|
] })
|
|
41
42
|
] }), D = ({ userSummary: s }) => {
|
|
42
43
|
const [e, o] = y(0);
|
|
@@ -50,14 +51,14 @@ const v = /* @__PURE__ */ t("div")({
|
|
|
50
51
|
};
|
|
51
52
|
}, [s]), /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(j, { points: e }) }) });
|
|
52
53
|
}, K = ({ sdk: s }) => {
|
|
53
|
-
if (
|
|
54
|
+
if (v(s.sdkStore.status) !== "ready")
|
|
54
55
|
return null;
|
|
55
56
|
const o = s.getFeature(c.GAMES);
|
|
56
57
|
return o ? /* @__PURE__ */ r(D, { userSummary: o.userSummary.getStore() }) : null;
|
|
57
|
-
},
|
|
58
|
-
const s =
|
|
58
|
+
}, _ = () => {
|
|
59
|
+
const s = P();
|
|
59
60
|
return s ? /* @__PURE__ */ r(K, { sdk: s }) : null;
|
|
60
61
|
};
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
_ as StreamLayerSDKPoints
|
|
63
64
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "StreamLayer, Inc (https://streamlayer.io)",
|
|
6
6
|
"maintainers": [
|
|
@@ -54,30 +54,31 @@
|
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@streamlayer/feature-gamification": "^0.26.
|
|
58
|
-
"@streamlayer/sdk-web": "^0.28.
|
|
57
|
+
"@streamlayer/feature-gamification": "^0.26.5",
|
|
58
|
+
"@streamlayer/sdk-web": "^0.28.27",
|
|
59
59
|
"@streamlayer/sdk-web-api": "^0.0.1",
|
|
60
|
-
"@streamlayer/sdk-web-core": "^0.0.
|
|
61
|
-
"@streamlayer/sdk-web-features": "^0.10.
|
|
60
|
+
"@streamlayer/sdk-web-core": "^0.0.3",
|
|
61
|
+
"@streamlayer/sdk-web-features": "^0.10.30",
|
|
62
62
|
"@streamlayer/sdk-web-interfaces": "^0.0.1",
|
|
63
63
|
"@streamlayer/sdk-web-logger": "^0.0.4",
|
|
64
|
-
"@streamlayer/sdk-web-notifications": "^0.13.
|
|
65
|
-
"@streamlayer/sdk-web-
|
|
66
|
-
"@streamlayer/sdk-web-
|
|
64
|
+
"@streamlayer/sdk-web-notifications": "^0.13.3",
|
|
65
|
+
"@streamlayer/sdk-web-storage": "^0.0.4",
|
|
66
|
+
"@streamlayer/sdk-web-types": "^0.0.1"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bufbuild/protobuf": "^1.4.2",
|
|
70
70
|
"@connectrpc/connect": "^1.1.3",
|
|
71
71
|
"@connectrpc/connect-web": "^1.1.3",
|
|
72
72
|
"@fastify/deepmerge": "*",
|
|
73
|
+
"@lottiefiles/react-lottie-player": "*",
|
|
73
74
|
"@nanostores/logger": "^0.2.4",
|
|
74
75
|
"@nanostores/query": "^0.2.8",
|
|
75
76
|
"@nanostores/react": "^0.7.1",
|
|
76
77
|
"nanostores": "^0.9.5",
|
|
77
78
|
"pino": "^8.16.1",
|
|
78
79
|
"react-auth-code-input": "^3.2.1",
|
|
79
|
-
"@lottiefiles/react-lottie-player": "*",
|
|
80
80
|
"react-countdown-circle-timer": "^3.2.1",
|
|
81
|
+
"react-countup": "^6.5.0",
|
|
81
82
|
"react-phone-number-input": "^3.3.7"
|
|
82
83
|
},
|
|
83
84
|
"devDependencies": {
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
"size-limit": "^11.0.0",
|
|
115
116
|
"url-loader": "^4.1.1",
|
|
116
117
|
"vite-plugin-dts": "^3.6.3",
|
|
117
|
-
"@streamlayer/react-ui": "^0.
|
|
118
|
+
"@streamlayer/react-ui": "^0.68.1"
|
|
118
119
|
},
|
|
119
120
|
"scripts": {
|
|
120
121
|
"size-limit": "size-limit"
|
package/lib/cjs/common.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=t=>t.split(/\s+/).map(e=>e[0]).join("").toUpperCase(),o=t=>t?t.toLocaleString("en-US"):"0",n=t=>t.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),a=t=>t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),r=t=>!isNaN(t.getTime());exports.a=n;exports.i=o;exports.n=a;exports.o=i;exports.r=r;
|
package/lib/es/common.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const i = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), o = (e) => e ? e.toLocaleString("en-US") : "0", n = (e) => e.toLocaleDateString("en-US", {
|
|
2
|
-
weekday: "short",
|
|
3
|
-
month: "short",
|
|
4
|
-
day: "numeric"
|
|
5
|
-
}), a = (e) => e.toLocaleTimeString("en-US", {
|
|
6
|
-
hour: "2-digit",
|
|
7
|
-
minute: "2-digit"
|
|
8
|
-
}), r = (e) => !isNaN(e.getTime());
|
|
9
|
-
export {
|
|
10
|
-
n as a,
|
|
11
|
-
o as i,
|
|
12
|
-
a as n,
|
|
13
|
-
i as o,
|
|
14
|
-
r
|
|
15
|
-
};
|