@streamlayer/react 0.27.2 → 0.28.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/app-c9828ece.cjs +1 -0
- package/lib/app-e4b43a5c.js +16 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/common-0311b835.js +5 -0
- package/lib/common-dc2f2d4f.cjs +1 -0
- package/lib/es/auth.js +4 -22
- package/lib/es/index.js +5 -17
- package/lib/es/masters.js +11 -231
- package/lib/es/points.js +30 -44
- package/lib/index-0006746d.cjs +6 -0
- package/lib/index-0d23b24e.js +88 -0
- package/lib/index-3a549ff3.cjs +1 -0
- package/lib/index-89c19a6e.cjs +4 -0
- package/lib/index-c325cc40.js +2699 -0
- package/lib/index-ed9cc1f5.js +791 -0
- package/lib/masters-56975aec.js +393 -0
- package/lib/masters-e1de41e7.cjs +1 -0
- package/lib/style.css +1 -1
- package/package.json +10 -10
- package/lib/app-8f6a0c0b.cjs +0 -1
- package/lib/app-ce9ea1e1.js +0 -29
- package/lib/index-6ab0a925.cjs +0 -14
- package/lib/index-b7b4d84f.js +0 -228
- package/lib/index-ed4f12f6.js +0 -5464
- package/lib/index-f77b7ac2.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("./index-89c19a6e.cjs"),s=require("react"),n=()=>null,i=()=>{const{sdk:t}=s.useContext(r.StreamLayerContext);return t},S=()=>{const{sdk:t,status:a}=s.useContext(r.StreamLayerContext);if(a===r.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return a===r.StreamLayerStatus.CONNECTED?e.jsx("div",{className:"StreamLayerSDK",children:"wait"}):t===null?e.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(r.p,{children:e.jsx(n,{sdk:t})})})};exports.StreamLayerSDKReact=S;exports.useStreamLayer=i;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { a as s, b as a, p as i } from "./index-0d23b24e.js";
|
|
3
|
+
import { useContext as n } from "react";
|
|
4
|
+
const o = () => null, d = () => {
|
|
5
|
+
const { sdk: e } = n(s);
|
|
6
|
+
return e;
|
|
7
|
+
}, l = () => {
|
|
8
|
+
const { sdk: e, status: t } = n(s);
|
|
9
|
+
if (t === a.UNSET)
|
|
10
|
+
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
11
|
+
return t === a.CONNECTED ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: "wait" }) : e === null ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(o, { sdk: e }) }) });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
l as S,
|
|
15
|
+
d as u
|
|
16
|
+
};
|
package/lib/cjs/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("../app-c9828ece.cjs");require("react/jsx-runtime");require("../index-89c19a6e.cjs");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const o=({token:e,schema:r})=>{const i=u.useStreamLayer();return t.useEffect(()=>{e&&r&&i&&i.authorizationBypass(r,e)},[e,r,i]),null};exports.StreamLayerLogin=o;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-core");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-logger");require("@streamlayer/sdk-web-storage");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@streamlayer/feature-gamification");const r=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@streamlayer/sdk-web-api");require("@streamlayer/sdk-web-core");require("@streamlayer/sdk-web-types");require("@streamlayer/sdk-web-logger");require("@streamlayer/sdk-web-storage");require("@streamlayer/sdk-web-features");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@streamlayer/feature-gamification");const r=require("../index-89c19a6e.cjs"),e=require("../app-c9828ece.cjs");require("react/jsx-runtime");require("react");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");exports.StreamLayerProvider=r.StreamLayerProvider;exports.StreamLayerSDKReact=e.StreamLayerSDKReact;exports.useStreamLayer=e.useStreamLayer;
|
package/lib/cjs/masters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../index-89c19a6e.cjs");const e=require("../masters-e1de41e7.cjs");require("react");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");require("@streamlayer/sdk-web-types");require("@nanostores/react");require("@streamlayer/sdk-web-interfaces");require("../index-3a549ff3.cjs");require("@streamlayer/sdk-web-notifications");exports.MastersStreamLayerProvider=e.MastersStreamLayerProvider;exports.MastersStreamLayerSDKReact=e.MastersStreamLayerSDKReact;
|
package/lib/cjs/points.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("@streamlayer/sdk-web-types"),i=require("../index-89c19a6e.cjs"),c=require("../common-dc2f2d4f.cjs"),t=require("../index-3a549ff3.cjs"),u=require("react"),o=require("@nanostores/react"),d=require("../app-c9828ece.cjs");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const m=()=>t.q,p=t.styled_default("div")({name:"l",class:"l4qld3l",propsAsIs:!1}),y=t.styled_default("div")({name:"a",class:"ainhtok",propsAsIs:!1}),f=t.styled_default(m())({name:"x",class:"xk8yd5t",propsAsIs:!0}),x=t.styled_default("div")({name:"h",class:"h6rf9gb",propsAsIs:!1}),S=t.styled_default("div")({name:"c",class:"c18f5pxx",propsAsIs:!1}),j=t.styled_default("div")({name:"m",class:"m1jwsyj1",propsAsIs:!1}),h=({points:s})=>e.jsxs(p,{className:i.f,children:[e.jsx(y,{children:e.jsx(f,{name:"icon-trophy"})}),e.jsxs(x,{children:[e.jsx(S,{children:"Total points"}),e.jsx(j,{children:c.a(s)})]})]}),q=({userSummary:s})=>{var a,r;const n=o.useStore(s.getStore());return((r=(a=n.data)==null?void 0:a.summary)==null?void 0:r.points)===void 0?null:e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(i.p,{children:e.jsx(h,{points:n.data.summary.points})})})},g=({sdk:s})=>{const{organizationSettings:n,streamSettings:a}=o.useStore(s.sdkStore),r=u.useMemo(()=>s.getFeature(l.FeatureType.GAMES),[s,n,a]);return r?e.jsx(q,{userSummary:r.userSummary}):null},v=()=>{const s=d.useStreamLayer();return s?e.jsx(g,{sdk:s}):null};exports.StreamLayerSDKPoints=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=e=>e.split(/\s+/).map(s=>s[0]).join("").toUpperCase(),a=e=>e?e.toLocaleString("en-US"):"0";exports.a=a;exports.e=t;
|
package/lib/es/auth.js
CHANGED
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
import { useEffect as i } from "react";
|
|
2
|
-
import { u as m } from "../app-
|
|
2
|
+
import { u as m } from "../app-e4b43a5c.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-0d23b24e.js";
|
|
5
5
|
import "./useStreamLayerApp.js";
|
|
6
6
|
import "@streamlayer/sdk-web";
|
|
7
|
-
|
|
8
|
-
import "@streamlayer/sdk-web-types";
|
|
9
|
-
import "@streamlayer/sdk-web-features";
|
|
10
|
-
import "@streamlayer/sdk-web-api";
|
|
11
|
-
import "@streamlayer/sdk-web-storage";
|
|
12
|
-
import "@nanostores/react";
|
|
13
|
-
import "@streamlayer/sdk-web-notifications";
|
|
14
|
-
import "react-countdown-circle-timer";
|
|
15
|
-
import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
16
|
-
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
17
|
-
import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
18
|
-
import "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
19
|
-
import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
20
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
21
|
-
import "react-auth-code-input";
|
|
22
|
-
import "react-phone-number-input";
|
|
23
|
-
import "@connectrpc/connect";
|
|
24
|
-
import "@connectrpc/connect-web";
|
|
25
|
-
const C = ({ token: r, schema: o }) => {
|
|
7
|
+
const n = ({ token: r, schema: o }) => {
|
|
26
8
|
const t = m();
|
|
27
9
|
return i(() => {
|
|
28
10
|
r && o && t && t.authorizationBypass(o, r);
|
|
29
11
|
}, [r, o, t]), null;
|
|
30
12
|
};
|
|
31
13
|
export {
|
|
32
|
-
|
|
14
|
+
n as StreamLayerLogin
|
|
33
15
|
};
|
package/lib/es/index.js
CHANGED
|
@@ -7,26 +7,14 @@ import "@streamlayer/sdk-web-features";
|
|
|
7
7
|
import "@streamlayer/sdk-web-interfaces";
|
|
8
8
|
import "@streamlayer/sdk-web-notifications";
|
|
9
9
|
import "@streamlayer/feature-gamification";
|
|
10
|
-
import { S as
|
|
11
|
-
import { S as
|
|
10
|
+
import { S as c } from "../index-0d23b24e.js";
|
|
11
|
+
import { S as v, u as D } from "../app-e4b43a5c.js";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react";
|
|
14
14
|
import "./useStreamLayerApp.js";
|
|
15
15
|
import "@streamlayer/sdk-web";
|
|
16
|
-
import "@nanostores/react";
|
|
17
|
-
import "react-countdown-circle-timer";
|
|
18
|
-
import "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
19
|
-
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
20
|
-
import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
21
|
-
import "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
22
|
-
import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
23
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
24
|
-
import "react-auth-code-input";
|
|
25
|
-
import "react-phone-number-input";
|
|
26
|
-
import "@connectrpc/connect";
|
|
27
|
-
import "@connectrpc/connect-web";
|
|
28
16
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
c as StreamLayerProvider,
|
|
18
|
+
v as StreamLayerSDKReact,
|
|
19
|
+
D as useStreamLayer
|
|
32
20
|
};
|
package/lib/es/masters.js
CHANGED
|
@@ -1,235 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import "react
|
|
5
|
-
import "react-phone-number-input";
|
|
6
|
-
import "@connectrpc/connect";
|
|
7
|
-
import "@connectrpc/connect-web";
|
|
8
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
9
|
-
import "react-countdown-circle-timer";
|
|
10
|
-
import { FeatureType as $ } from "@streamlayer/sdk-web-types";
|
|
11
|
-
import { FeatureStatus as f } from "@streamlayer/sdk-web-interfaces";
|
|
12
|
-
import "@streamlayer/sdk-web-features";
|
|
13
|
-
import "@streamlayer/sdk-web-api";
|
|
14
|
-
import "@streamlayer/sdk-web-storage";
|
|
15
|
-
import { useStore as p } from "@nanostores/react";
|
|
16
|
-
import "@streamlayer/sdk-web-notifications";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../index-0d23b24e.js";
|
|
3
|
+
import { M as L, b } from "../masters-56975aec.js";
|
|
4
|
+
import "react";
|
|
17
5
|
import "./useStreamLayerApp.js";
|
|
18
6
|
import "@streamlayer/sdk-web";
|
|
19
|
-
import "@streamlayer/
|
|
20
|
-
import "@
|
|
21
|
-
import "@streamlayer/
|
|
22
|
-
import "
|
|
23
|
-
import "@streamlayer/
|
|
24
|
-
const z = ({ feature: e, sdk: a, children: t, className: n }) => {
|
|
25
|
-
const o = p(e.status), { slStreamId: r } = p(a.sdkStore);
|
|
26
|
-
return r != null && r.loading ? /* @__PURE__ */ s("div", { className: n, children: "event is loading..." }) : r != null && r.data ? o !== f.Ready ? /* @__PURE__ */ s("div", { className: n, children: "wait feature..." }) : t : /* @__PURE__ */ s("div", { className: n, children: "event is forbidden..." });
|
|
27
|
-
}, P = I(() => import("../index-b7b4d84f.js")), T = ({
|
|
28
|
-
sdk: e,
|
|
29
|
-
feature: a,
|
|
30
|
-
className: t
|
|
31
|
-
}) => {
|
|
32
|
-
const n = _(() => a && a.featureConfig.get().type === $.GAMES ? /* @__PURE__ */ s(z, { className: t, sdk: e, feature: a, children: /* @__PURE__ */ s(P, { className: t, gamification: a, sdk: e }) }) : null, [e, a, t]);
|
|
33
|
-
return /* @__PURE__ */ s(
|
|
34
|
-
F,
|
|
35
|
-
{
|
|
36
|
-
fallback: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
37
|
-
children: n
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
const U = /* @__PURE__ */ u("button")({
|
|
42
|
-
name: "e",
|
|
43
|
-
class: "enu64b2",
|
|
44
|
-
propsAsIs: !1
|
|
45
|
-
}), q = /* @__PURE__ */ u("span")({
|
|
46
|
-
name: "t",
|
|
47
|
-
class: "tw2meku",
|
|
48
|
-
propsAsIs: !1
|
|
49
|
-
}), B = /* @__PURE__ */ u("span")({
|
|
50
|
-
name: "a",
|
|
51
|
-
class: "aka8vam",
|
|
52
|
-
propsAsIs: !1
|
|
53
|
-
}), k = ({ disabled: e, active: a, onClick: t, label: n, icon: o }) => /* @__PURE__ */ s(U, { onClick: t, disabled: e, "data-selected": a, children: /* @__PURE__ */ S(L, { children: [
|
|
54
|
-
o && /* @__PURE__ */ s(q, { children: o }),
|
|
55
|
-
/* @__PURE__ */ s(B, { children: n })
|
|
56
|
-
] }) });
|
|
57
|
-
const D = () => g, K = /* @__PURE__ */ u(D())({
|
|
58
|
-
name: "a",
|
|
59
|
-
class: "a10lggiw",
|
|
60
|
-
propsAsIs: !0
|
|
61
|
-
}), y = "channels", W = (e) => {
|
|
62
|
-
var a;
|
|
63
|
-
return /* @__PURE__ */ s(k, {
|
|
64
|
-
...e,
|
|
65
|
-
id: "channels",
|
|
66
|
-
label: "Channels",
|
|
67
|
-
icon: /* @__PURE__ */ s(K, {
|
|
68
|
-
name: "icon-btn-channels",
|
|
69
|
-
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
const Y = () => g, H = /* @__PURE__ */ u(Y())({
|
|
74
|
-
name: "d",
|
|
75
|
-
class: "d1x5s8ie",
|
|
76
|
-
propsAsIs: !0
|
|
77
|
-
}), c = "featuredGroups", J = (e) => {
|
|
78
|
-
var a;
|
|
79
|
-
return /* @__PURE__ */ s(k, {
|
|
80
|
-
...e,
|
|
81
|
-
label: "FG+",
|
|
82
|
-
id: "featuredGroups",
|
|
83
|
-
icon: /* @__PURE__ */ s(H, {
|
|
84
|
-
name: "icon-btn-feature-groups",
|
|
85
|
-
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const Q = () => g, V = /* @__PURE__ */ u(Q())({
|
|
90
|
-
name: "n",
|
|
91
|
-
class: "ntav86o",
|
|
92
|
-
propsAsIs: !0
|
|
93
|
-
}), b = "leaderboard", X = (e) => {
|
|
94
|
-
var a;
|
|
95
|
-
return /* @__PURE__ */ s(k, {
|
|
96
|
-
...e,
|
|
97
|
-
label: "Leader Board",
|
|
98
|
-
id: "leaderboard",
|
|
99
|
-
icon: /* @__PURE__ */ s(V, {
|
|
100
|
-
name: "icon-btn-leaderboard",
|
|
101
|
-
"data-selected": (a = e.active) == null ? void 0 : a.toString()
|
|
102
|
-
})
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
const Z = /* @__PURE__ */ u("div")({
|
|
106
|
-
name: "n",
|
|
107
|
-
class: "n1rlvhvz",
|
|
108
|
-
propsAsIs: !1
|
|
109
|
-
}), ee = ({
|
|
110
|
-
children: e,
|
|
111
|
-
className: a
|
|
112
|
-
}) => /* @__PURE__ */ s(Z, {
|
|
113
|
-
className: a,
|
|
114
|
-
children: e
|
|
115
|
-
});
|
|
116
|
-
const ae = () => ee, se = /* @__PURE__ */ u(ae())({
|
|
117
|
-
name: "n",
|
|
118
|
-
class: "n9bnom",
|
|
119
|
-
propsAsIs: !0
|
|
120
|
-
}), te = ({ activeOverlay: e, setActiveOverlay: a, sdkReady: t, className: n }) => /* @__PURE__ */ S(se, { className: n, children: [
|
|
121
|
-
/* @__PURE__ */ s(W, { active: e === y, onClick: () => a(y) }),
|
|
122
|
-
/* @__PURE__ */ s(
|
|
123
|
-
J,
|
|
124
|
-
{
|
|
125
|
-
active: e === c,
|
|
126
|
-
disabled: !t,
|
|
127
|
-
onClick: () => {
|
|
128
|
-
a(c);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
/* @__PURE__ */ s(
|
|
133
|
-
X,
|
|
134
|
-
{
|
|
135
|
-
active: e === b,
|
|
136
|
-
onClick: () => a(b)
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
] }), ne = (e) => {
|
|
140
|
-
const [a, t] = h(!1), n = p(e.status), { data: o } = p(e.getUserStore()), r = n === "ready", [l, i] = h(c), v = E(
|
|
141
|
-
(d, m) => {
|
|
142
|
-
i(m), m === c ? (d && e.createEventSession(d), e.openFeature($.GAMES)) : e.closeFeature();
|
|
143
|
-
},
|
|
144
|
-
[e]
|
|
145
|
-
);
|
|
146
|
-
return x(() => {
|
|
147
|
-
!r && l === c && (i(y), e.closeFeature());
|
|
148
|
-
}, [r, l, e]), {
|
|
149
|
-
sdkEnabled: a,
|
|
150
|
-
sdkReady: r,
|
|
151
|
-
activeOverlay: l,
|
|
152
|
-
activateAndLoadOverlay: v,
|
|
153
|
-
enableSdk: (d) => {
|
|
154
|
-
e.initializeApp().then(({ enabled: m, err: C }) => {
|
|
155
|
-
if (t(!0), C) {
|
|
156
|
-
v(d, y);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (m) {
|
|
160
|
-
v(d, c);
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
},
|
|
165
|
-
disableSdk: () => {
|
|
166
|
-
t(!1), e.disableApp();
|
|
167
|
-
},
|
|
168
|
-
isLogged: !!o
|
|
169
|
-
};
|
|
170
|
-
}, re = (e) => {
|
|
171
|
-
const a = p(e.getActiveFeature()), t = p(e.streamStore()), [n, o] = h(null);
|
|
172
|
-
return x(() => {
|
|
173
|
-
const r = e.getFeatures();
|
|
174
|
-
if (a)
|
|
175
|
-
for (const [l, i] of r)
|
|
176
|
-
l === a ? i.status.get() === f.Suspended && (i.enable(), o(i)) : i.status.get() === f.Ready && i.disable();
|
|
177
|
-
else {
|
|
178
|
-
for (const [, l] of r)
|
|
179
|
-
l.status.get() === f.Ready && l.disable();
|
|
180
|
-
o(null);
|
|
181
|
-
}
|
|
182
|
-
return () => {
|
|
183
|
-
for (const [, l] of r)
|
|
184
|
-
l.status.get() === f.Ready && l.disable();
|
|
185
|
-
};
|
|
186
|
-
}, [a, e, t]), [a, n];
|
|
187
|
-
}, le = ({ sdk: e, className: a }) => {
|
|
188
|
-
const [, t] = re(e);
|
|
189
|
-
return /* @__PURE__ */ s(T, { className: a, feature: t, sdk: e });
|
|
190
|
-
}, oe = ({ sdk: e, overlays: a, children: t }) => {
|
|
191
|
-
const { sdkEnabled: n, sdkReady: o, activeOverlay: r, activateAndLoadOverlay: l, enableSdk: i, disableSdk: v, isLogged: d } = ne(e);
|
|
192
|
-
return /* @__PURE__ */ S(O, { children: [
|
|
193
|
-
n && /* @__PURE__ */ s(
|
|
194
|
-
te,
|
|
195
|
-
{
|
|
196
|
-
sdkReady: o,
|
|
197
|
-
activeOverlay: r,
|
|
198
|
-
className: A,
|
|
199
|
-
setActiveOverlay: (m) => l("", m)
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
/* @__PURE__ */ s(
|
|
203
|
-
N,
|
|
204
|
-
{
|
|
205
|
-
"data-nav": n.toString(),
|
|
206
|
-
style: { display: !n || r === y ? "block" : "none" },
|
|
207
|
-
children: t && t({ enableSdk: i, disableSdk: v })
|
|
208
|
-
}
|
|
209
|
-
),
|
|
210
|
-
/* @__PURE__ */ s(
|
|
211
|
-
N,
|
|
212
|
-
{
|
|
213
|
-
"data-nav": n.toString(),
|
|
214
|
-
style: { display: r === b ? "block" : "none" },
|
|
215
|
-
children: a && r === b && a[r]
|
|
216
|
-
}
|
|
217
|
-
),
|
|
218
|
-
d && n && r === c && /* @__PURE__ */ s(le, { className: A, sdk: e }),
|
|
219
|
-
!d && n && r === c && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
|
|
220
|
-
] });
|
|
221
|
-
}, Ee = ({
|
|
222
|
-
sdkKey: e,
|
|
223
|
-
plugins: a,
|
|
224
|
-
children: t,
|
|
225
|
-
production: n = !0
|
|
226
|
-
}) => /* @__PURE__ */ s(w, { sdkKey: e, plugins: a, production: n, autoEnable: !1, children: t }), Re = ({ children: e, overlays: a }) => {
|
|
227
|
-
const { sdk: t, status: n } = R(G);
|
|
228
|
-
if (n === j.UNSET)
|
|
229
|
-
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
230
|
-
return t ? /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(M, { children: /* @__PURE__ */ s(oe, { sdk: t, overlays: a, children: e }) }) }) : e({});
|
|
231
|
-
};
|
|
7
|
+
import "@streamlayer/sdk-web-types";
|
|
8
|
+
import "@nanostores/react";
|
|
9
|
+
import "@streamlayer/sdk-web-interfaces";
|
|
10
|
+
import "../index-ed9cc1f5.js";
|
|
11
|
+
import "@streamlayer/sdk-web-notifications";
|
|
232
12
|
export {
|
|
233
|
-
|
|
234
|
-
|
|
13
|
+
L as MastersStreamLayerProvider,
|
|
14
|
+
b as MastersStreamLayerSDKReact
|
|
235
15
|
};
|
package/lib/es/points.js
CHANGED
|
@@ -1,68 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FeatureType as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import "react
|
|
7
|
-
import "@
|
|
8
|
-
import "
|
|
9
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
10
|
-
import "react-countdown-circle-timer";
|
|
11
|
-
import "@streamlayer/sdk-web-interfaces";
|
|
12
|
-
import "@streamlayer/sdk-web-features";
|
|
13
|
-
import "@streamlayer/sdk-web-api";
|
|
14
|
-
import "@streamlayer/sdk-web-storage";
|
|
15
|
-
import { useStore as a } from "@nanostores/react";
|
|
16
|
-
import "@streamlayer/sdk-web-notifications";
|
|
17
|
-
import { u as f } from "../app-ce9ea1e1.js";
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { FeatureType as m } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { f as l, p } from "../index-0d23b24e.js";
|
|
4
|
+
import { a as c } from "../common-0311b835.js";
|
|
5
|
+
import { s as t, q as u } from "../index-ed9cc1f5.js";
|
|
6
|
+
import { useMemo as d } from "react";
|
|
7
|
+
import { useStore as i } from "@nanostores/react";
|
|
8
|
+
import { u as f } from "../app-e4b43a5c.js";
|
|
18
9
|
import "./useStreamLayerApp.js";
|
|
19
10
|
import "@streamlayer/sdk-web";
|
|
20
|
-
|
|
21
|
-
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
22
|
-
import "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
23
|
-
import "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
24
|
-
import "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
25
|
-
const S = () => l, y = /* @__PURE__ */ s("div")({
|
|
11
|
+
const S = () => u, y = /* @__PURE__ */ t("div")({
|
|
26
12
|
name: "l",
|
|
27
13
|
class: "l4qld3l",
|
|
28
14
|
propsAsIs: !1
|
|
29
|
-
}), h = /* @__PURE__ */
|
|
15
|
+
}), h = /* @__PURE__ */ t("div")({
|
|
30
16
|
name: "a",
|
|
31
17
|
class: "ainhtok",
|
|
32
18
|
propsAsIs: !1
|
|
33
|
-
}), v = /* @__PURE__ */
|
|
19
|
+
}), v = /* @__PURE__ */ t(S())({
|
|
34
20
|
name: "x",
|
|
35
21
|
class: "xk8yd5t",
|
|
36
22
|
propsAsIs: !0
|
|
37
|
-
}), x = /* @__PURE__ */
|
|
23
|
+
}), x = /* @__PURE__ */ t("div")({
|
|
38
24
|
name: "h",
|
|
39
25
|
class: "h6rf9gb",
|
|
40
26
|
propsAsIs: !1
|
|
41
|
-
}), g = /* @__PURE__ */
|
|
27
|
+
}), g = /* @__PURE__ */ t("div")({
|
|
42
28
|
name: "c",
|
|
43
29
|
class: "c18f5pxx",
|
|
44
30
|
propsAsIs: !1
|
|
45
|
-
}), A = /* @__PURE__ */
|
|
31
|
+
}), A = /* @__PURE__ */ t("div")({
|
|
46
32
|
name: "m",
|
|
47
33
|
class: "m1jwsyj1",
|
|
48
34
|
propsAsIs: !1
|
|
49
|
-
}), I = ({ points:
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
35
|
+
}), I = ({ points: s }) => /* @__PURE__ */ n(y, { className: l, children: [
|
|
36
|
+
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(v, { name: "icon-trophy" }) }),
|
|
37
|
+
/* @__PURE__ */ n(x, { children: [
|
|
38
|
+
/* @__PURE__ */ r(g, { children: "Total points" }),
|
|
39
|
+
/* @__PURE__ */ r(A, { children: c(s) })
|
|
54
40
|
] })
|
|
55
|
-
] }), j = ({ userSummary:
|
|
56
|
-
var
|
|
57
|
-
const
|
|
58
|
-
return ((
|
|
59
|
-
}, L = ({ sdk:
|
|
60
|
-
const { organizationSettings:
|
|
61
|
-
return
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
return
|
|
41
|
+
] }), j = ({ userSummary: s }) => {
|
|
42
|
+
var a, e;
|
|
43
|
+
const o = i(s.getStore());
|
|
44
|
+
return ((e = (a = o.data) == null ? void 0 : a.summary) == null ? void 0 : e.points) === void 0 ? null : /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(I, { points: o.data.summary.points }) }) });
|
|
45
|
+
}, L = ({ sdk: s }) => {
|
|
46
|
+
const { organizationSettings: o, streamSettings: a } = i(s.sdkStore), e = d(() => s.getFeature(m.GAMES), [s, o, a]);
|
|
47
|
+
return e ? /* @__PURE__ */ r(j, { userSummary: e.userSummary }) : null;
|
|
48
|
+
}, M = () => {
|
|
49
|
+
const s = f();
|
|
50
|
+
return s ? /* @__PURE__ */ r(L, { sdk: s }) : null;
|
|
65
51
|
};
|
|
66
52
|
export {
|
|
67
|
-
|
|
53
|
+
M as StreamLayerSDKPoints
|
|
68
54
|
};
|