@streamlayer/react 1.11.3 → 1.12.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/bet-pack.d.ts +20 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/bet-pack.js +1 -0
- package/lib/cjs/index2.js +5 -0
- package/lib/cjs/masters2.js +9 -9
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +47 -47
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/app/bet-pack.d.ts +20 -0
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/bet-pack.js +1 -0
- package/lib/classic/cjs/index2.js +5 -0
- package/lib/classic/cjs/masters2.js +9 -9
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +48 -48
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +17 -17
- package/lib/classic/es/bet-pack.js +14 -0
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/index2.js +2890 -0
- package/lib/classic/es/masters2.js +372 -497
- package/lib/classic/es/notification.js +24 -24
- package/lib/classic/es/points.js +6 -6
- package/lib/classic/es/provider.js +8872 -8796
- package/lib/classic/es/useStreamLayerApp2.js +3014 -2725
- package/lib/classic/masters.d.ts +5 -1
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +97 -93
- package/lib/dist/es/index.js +7 -5
- package/lib/dist/es/masters.js +24855 -21687
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +17 -17
- package/lib/es/bet-pack.js +14 -0
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +2890 -0
- package/lib/es/masters2.js +372 -497
- package/lib/es/notification.js +24 -24
- package/lib/es/points.js +6 -6
- package/lib/es/provider.js +8866 -8790
- package/lib/es/useStreamLayerApp2.js +3014 -2725
- package/lib/masters.d.ts +5 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
package/lib/es/notification.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { E as m, s as e, a7 as L, a8 as z, a9 as B, R as O, aa as R, e as P, d as Q, a as U, g as V, N as T, u as F, b as W, i as G, h as K } from "./provider.js";
|
|
2
|
+
import { j as p, Q as I, k as Y, S as _ } from "./useStreamLayerApp2.js";
|
|
3
3
|
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import { useState as q, useEffect as E, useMemo as H } from "react";
|
|
5
5
|
const h = /* @__PURE__ */ e("div")({
|
|
@@ -63,7 +63,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
63
63
|
name: "NotificationContainer",
|
|
64
64
|
class: "ns1nzpg",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
66
|
+
}), M = /* @__PURE__ */ e("div")({
|
|
67
67
|
name: "Body",
|
|
68
68
|
class: "b1j59nzs",
|
|
69
69
|
propsAsIs: !1
|
|
@@ -111,7 +111,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
111
111
|
),
|
|
112
112
|
/* @__PURE__ */ s(vs, { children: z(n) })
|
|
113
113
|
] });
|
|
114
|
-
}, ys = ({ title: t, questionType: o, questionTypeData: i }) => /* @__PURE__ */ c(
|
|
114
|
+
}, ys = ({ title: t, questionType: o, questionTypeData: i }) => /* @__PURE__ */ c(M, { children: [
|
|
115
115
|
/* @__PURE__ */ s(
|
|
116
116
|
B,
|
|
117
117
|
{
|
|
@@ -121,7 +121,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
t && /* @__PURE__ */ s(ds, { children: t })
|
|
124
|
-
] }), fs = ({ tweet: t }) => t ? /* @__PURE__ */ s(
|
|
124
|
+
] }), fs = ({ tweet: t }) => t ? /* @__PURE__ */ s(M, { children: /* @__PURE__ */ s($s, { ...t, controlVideo: () => {
|
|
125
125
|
} }) }) : null, gs = ({ action: t, questionType: o, inApp: i, insight: a, tweet: n }) => {
|
|
126
126
|
var l;
|
|
127
127
|
const d = O[o], r = R[o];
|
|
@@ -170,11 +170,11 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
170
170
|
name: "Description",
|
|
171
171
|
class: "dmixjec",
|
|
172
172
|
propsAsIs: !1
|
|
173
|
-
}),
|
|
173
|
+
}), Ms = /* @__PURE__ */ e("button")({
|
|
174
174
|
name: "Button",
|
|
175
175
|
class: "b1ubkw1q",
|
|
176
176
|
propsAsIs: !1
|
|
177
|
-
}),
|
|
177
|
+
}), js = ({
|
|
178
178
|
open: t,
|
|
179
179
|
close: o,
|
|
180
180
|
...i
|
|
@@ -204,7 +204,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ c(Es, { children: [
|
|
206
206
|
/* @__PURE__ */ s("span", { children: (n = i == null ? void 0 : i.titleCard) == null ? void 0 : n.subtitle }),
|
|
207
|
-
/* @__PURE__ */ s(
|
|
207
|
+
/* @__PURE__ */ s(Ms, { name: "inapp-button", children: "Play Now" })
|
|
208
208
|
] })
|
|
209
209
|
] }),
|
|
210
210
|
/* @__PURE__ */ s(
|
|
@@ -246,7 +246,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
246
246
|
name: "Subtitle",
|
|
247
247
|
class: "sz7237i",
|
|
248
248
|
propsAsIs: !1
|
|
249
|
-
}),
|
|
249
|
+
}), Us = ({
|
|
250
250
|
step: t,
|
|
251
251
|
children: o,
|
|
252
252
|
answer: i,
|
|
@@ -268,7 +268,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
268
268
|
}), "Your Pick: ", i]
|
|
269
269
|
})
|
|
270
270
|
})]
|
|
271
|
-
}),
|
|
271
|
+
}), Vs = /* @__PURE__ */ e("div")({
|
|
272
272
|
name: "Container",
|
|
273
273
|
class: "ckyzolp",
|
|
274
274
|
propsAsIs: !1
|
|
@@ -276,11 +276,11 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
276
276
|
name: "Line",
|
|
277
277
|
class: "l16t1zr7",
|
|
278
278
|
propsAsIs: !1
|
|
279
|
-
}), Fs = () => y,
|
|
279
|
+
}), Fs = () => y, Ws = /* @__PURE__ */ e(Fs())({
|
|
280
280
|
name: "Line1",
|
|
281
281
|
class: "le78kvg",
|
|
282
282
|
propsAsIs: !0
|
|
283
|
-
}),
|
|
283
|
+
}), Gs = () => y, Ks = /* @__PURE__ */ e(Gs())({
|
|
284
284
|
name: "Line2",
|
|
285
285
|
class: "l1o7966d",
|
|
286
286
|
propsAsIs: !0
|
|
@@ -288,10 +288,10 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
288
288
|
name: "Line3",
|
|
289
289
|
class: "lu9lyxq",
|
|
290
290
|
propsAsIs: !0
|
|
291
|
-
}), Hs = () => /* @__PURE__ */ c(
|
|
292
|
-
children: [/* @__PURE__ */ s(
|
|
291
|
+
}), Hs = () => /* @__PURE__ */ c(Vs, {
|
|
292
|
+
children: [/* @__PURE__ */ s(Ws, {
|
|
293
293
|
children: /* @__PURE__ */ s("div", {})
|
|
294
|
-
}), /* @__PURE__ */ s(
|
|
294
|
+
}), /* @__PURE__ */ s(Ks, {
|
|
295
295
|
children: /* @__PURE__ */ s("div", {})
|
|
296
296
|
}), /* @__PURE__ */ s(_s, {
|
|
297
297
|
children: /* @__PURE__ */ s("div", {})
|
|
@@ -328,7 +328,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
328
328
|
}), /* @__PURE__ */ s(te, {
|
|
329
329
|
children: t
|
|
330
330
|
})]
|
|
331
|
-
}),
|
|
331
|
+
}), j = /* @__PURE__ */ e("div")({
|
|
332
332
|
name: "Container",
|
|
333
333
|
class: "c181a1as",
|
|
334
334
|
propsAsIs: !1
|
|
@@ -344,7 +344,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
344
344
|
name: "InCorrectIcon",
|
|
345
345
|
class: "i17n9o7e",
|
|
346
346
|
propsAsIs: !0
|
|
347
|
-
}), re = () => /* @__PURE__ */ c(
|
|
347
|
+
}), re = () => /* @__PURE__ */ c(j, {
|
|
348
348
|
children: [/* @__PURE__ */ c(x, {
|
|
349
349
|
children: ["Congratulations!", /* @__PURE__ */ s("br", {}), "You answered correctly."]
|
|
350
350
|
}), /* @__PURE__ */ s(D, {
|
|
@@ -352,7 +352,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
352
352
|
})]
|
|
353
353
|
}), le = ({
|
|
354
354
|
title: t
|
|
355
|
-
}) => /* @__PURE__ */ c(
|
|
355
|
+
}) => /* @__PURE__ */ c(j, {
|
|
356
356
|
children: [/* @__PURE__ */ c(x, {
|
|
357
357
|
children: ["Better luck next time!", /* @__PURE__ */ s("br", {}), "Correct: ", t]
|
|
358
358
|
}), /* @__PURE__ */ s(ce, {
|
|
@@ -413,7 +413,7 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
413
413
|
let v = "pending";
|
|
414
414
|
return (r === 3 || r === 4) && (v = n ? "correct" : "incorrect"), /* @__PURE__ */ s(b, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ c(w, { children: [
|
|
415
415
|
r !== 1 && /* @__PURE__ */ s(Hs, {}, r),
|
|
416
|
-
/* @__PURE__ */ c(
|
|
416
|
+
/* @__PURE__ */ c(Us, { state: v, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
|
|
417
417
|
r === 2 && /* @__PURE__ */ s(oe, { title: d || "unknown" }),
|
|
418
418
|
r === 3 && n && /* @__PURE__ */ s(re, {}),
|
|
419
419
|
r === 3 && !n && /* @__PURE__ */ s(le, { title: l || "unknown" }),
|
|
@@ -441,9 +441,9 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
441
441
|
class: "n1i4h28u",
|
|
442
442
|
propsAsIs: !1
|
|
443
443
|
}), $e = (t) => /* @__PURE__ */ s(Ae, { children: /* @__PURE__ */ s(ve, { ...t }) }), ye = ({ sdk: t }) => {
|
|
444
|
-
const [o] = q(t.getNotificationsStore()), i =
|
|
444
|
+
const [o] = q(t.getNotificationsStore()), i = U(o), a = t.getFeature(_.GAMES), n = H(() => t.getActiveNotification(), [t, i]);
|
|
445
445
|
return E(() => {
|
|
446
|
-
n &&
|
|
446
|
+
n && V.emit("notification", {
|
|
447
447
|
action: "rendered",
|
|
448
448
|
payload: {
|
|
449
449
|
questionId: n.data.questionId,
|
|
@@ -457,10 +457,10 @@ const h = /* @__PURE__ */ e("div")({
|
|
|
457
457
|
close: n.close,
|
|
458
458
|
...n.data.question
|
|
459
459
|
}
|
|
460
|
-
) : null : n && n.type === T.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ s(
|
|
460
|
+
) : null : n && n.type === T.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ s(js, { open: a == null ? void 0 : a.openFeature, close: n.close, ...n.data.onboarding }) : null : n && /* @__PURE__ */ s(gs, { ...n.data, action: n.action });
|
|
461
461
|
}, Ne = ({ theme: t }) => {
|
|
462
|
-
const o = F(), i =
|
|
463
|
-
return o && a.appNotification ? a.app ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(
|
|
462
|
+
const o = F(), i = W(), a = G();
|
|
463
|
+
return o && a.appNotification ? a.app ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(K, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ s(ye, { sdk: o }) }) }) : null;
|
|
464
464
|
};
|
|
465
465
|
export {
|
|
466
466
|
Ne as StreamLayerSDKNotification,
|
package/lib/es/points.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useEffect as p } from "react";
|
|
3
|
-
import { s as r,
|
|
3
|
+
import { s as r, E as d, f as h, d as S, a as y, F as l, u as f, b as v, h as g } from "./provider.js";
|
|
4
4
|
import { S as b } from "./useStreamLayerApp2.js";
|
|
5
5
|
const k = /* @__PURE__ */ r("div")({
|
|
6
6
|
name: "PointsContainer",
|
|
@@ -30,7 +30,7 @@ const k = /* @__PURE__ */ r("div")({
|
|
|
30
30
|
/* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(P, { name: "icon-trophy-solid" }) }),
|
|
31
31
|
/* @__PURE__ */ i(T, { children: [
|
|
32
32
|
/* @__PURE__ */ t(F, { children: "Total points" }),
|
|
33
|
-
/* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(
|
|
33
|
+
/* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(S, { value: s }) })
|
|
34
34
|
] })
|
|
35
35
|
] }), C = ({ gamification: s }) => {
|
|
36
36
|
const e = s.userSummary.$store, [a, m] = u(0);
|
|
@@ -45,14 +45,14 @@ const k = /* @__PURE__ */ r("div")({
|
|
|
45
45
|
}, [e]), /* @__PURE__ */ t(x, { points: a, onClick: () => {
|
|
46
46
|
s.status.get() === l.Suspended ? s.openFeature() : s.status.get() === l.Ready && s.closeFeature(!1);
|
|
47
47
|
} });
|
|
48
|
-
},
|
|
49
|
-
if (!
|
|
48
|
+
}, E = ({ sdk: s }) => {
|
|
49
|
+
if (!y(s.featuresList.getStore()))
|
|
50
50
|
return null;
|
|
51
51
|
const e = s.getFeature(b.GAMES);
|
|
52
52
|
return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
|
|
53
53
|
}, K = ({ theme: s }) => {
|
|
54
|
-
const e =
|
|
55
|
-
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(g, { customTheme: s ?? a.theme, themeMode: a.themeMode, children: /* @__PURE__ */ t(
|
|
54
|
+
const e = f(), a = v();
|
|
55
|
+
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(g, { customTheme: s ?? a.theme, themeMode: a.themeMode, children: /* @__PURE__ */ t(E, { sdk: e }) }) }) : null;
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
K as StreamLayerSDKPoints
|