@streamlayer/react 1.13.1 → 1.14.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.
Files changed (54) hide show
  1. package/lib/app/provider.d.ts +1 -0
  2. package/lib/app/useStreamLayerApp.d.ts +2 -1
  3. package/lib/cjs/advertisement.js +223 -1
  4. package/lib/cjs/bet-pack.js +1 -1
  5. package/lib/cjs/gamification-feature2.js +1 -1
  6. package/lib/cjs/index2.js +5 -5
  7. package/lib/cjs/masters2.js +3 -8
  8. package/lib/cjs/notification.js +1 -1
  9. package/lib/cjs/points.js +1 -1
  10. package/lib/cjs/provider.js +16 -28
  11. package/lib/cjs/useStreamLayerApp2.js +11 -11
  12. package/lib/classic/app/provider.d.ts +1 -0
  13. package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
  14. package/lib/classic/cjs/advertisement.js +223 -1
  15. package/lib/classic/cjs/bet-pack.js +1 -1
  16. package/lib/classic/cjs/gamification-feature2.js +1 -1
  17. package/lib/classic/cjs/index2.js +5 -5
  18. package/lib/classic/cjs/masters2.js +3 -8
  19. package/lib/classic/cjs/notification.js +1 -1
  20. package/lib/classic/cjs/points.js +1 -1
  21. package/lib/classic/cjs/provider.js +16 -28
  22. package/lib/classic/cjs/useStreamLayerApp2.js +11 -11
  23. package/lib/classic/es/advertisement.js +40824 -557
  24. package/lib/classic/es/bet-pack.js +1 -1
  25. package/lib/classic/es/gamification-feature2.js +1 -1
  26. package/lib/classic/es/index.js +4 -4
  27. package/lib/classic/es/index2.js +1125 -1088
  28. package/lib/classic/es/masters2.js +385 -439
  29. package/lib/classic/es/notification.js +205 -191
  30. package/lib/classic/es/points.js +39 -32
  31. package/lib/classic/es/provider.js +3852 -3908
  32. package/lib/classic/es/useStreamLayerApp.js +1 -1
  33. package/lib/classic/es/useStreamLayerApp2.js +3422 -3355
  34. package/lib/classic/style.css +1 -1
  35. package/lib/dist/cjs/gamification-feature.js +1 -1
  36. package/lib/dist/cjs/gamification-feature2.js +1 -1
  37. package/lib/dist/cjs/masters.js +29 -46
  38. package/lib/dist/es/gamification-feature.js +1 -1
  39. package/lib/dist/es/gamification-feature2.js +46 -46
  40. package/lib/dist/es/masters.js +8856 -8843
  41. package/lib/dist/style.css +1 -1
  42. package/lib/es/advertisement.js +40824 -557
  43. package/lib/es/bet-pack.js +1 -1
  44. package/lib/es/gamification-feature2.js +1 -1
  45. package/lib/es/index.js +4 -4
  46. package/lib/es/index2.js +1125 -1088
  47. package/lib/es/masters2.js +385 -439
  48. package/lib/es/notification.js +205 -191
  49. package/lib/es/points.js +39 -32
  50. package/lib/es/provider.js +3955 -4011
  51. package/lib/es/useStreamLayerApp.js +1 -1
  52. package/lib/es/useStreamLayerApp2.js +3422 -3355
  53. package/lib/style.css +1 -1
  54. package/package.json +16 -16
@@ -1,59 +1,66 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { useState as u, useEffect as p } from "react";
3
- import { s as r, Z as d, c as h, d as S, a as y, F as l, u as f, b as v, h as g } from "./provider.js";
4
- import { S as b } from "./useStreamLayerApp2.js";
5
- const k = /* @__PURE__ */ r("div")({
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { useState as u, useEffect as d } from "react";
3
+ import { s as a, c as h, d as y, e as S, a as f, F as c, f as p, u as v, b as g, h as b } from "./provider.js";
4
+ import { S as k } from "./useStreamLayerApp2.js";
5
+ const A = /* @__PURE__ */ a("div")({
6
6
  name: "PointsContainer",
7
7
  class: "psiob9b",
8
8
  propsAsIs: !1
9
- }), A = /* @__PURE__ */ r("div")({
9
+ }), I = /* @__PURE__ */ a("div")({
10
10
  name: "PointsIcon",
11
11
  class: "p1gqe4lh",
12
12
  propsAsIs: !1
13
- }), I = () => d, P = /* @__PURE__ */ r(I())({
13
+ }), P = () => h, T = /* @__PURE__ */ a(P())({
14
14
  name: "PointsSvg",
15
15
  class: "p15syg2y",
16
16
  propsAsIs: !0
17
- }), T = /* @__PURE__ */ r("div")({
17
+ }), F = /* @__PURE__ */ a("div")({
18
18
  name: "PointsBody",
19
19
  class: "p12n4f2h",
20
20
  propsAsIs: !1
21
- }), F = /* @__PURE__ */ r("div")({
21
+ }), L = /* @__PURE__ */ a("div")({
22
22
  name: "PointsTitle",
23
23
  class: "poqmx89",
24
24
  propsAsIs: !1
25
- }), L = /* @__PURE__ */ r("div")({
25
+ }), x = /* @__PURE__ */ a("div")({
26
26
  name: "PointsValue",
27
27
  class: "prj9b3v",
28
28
  propsAsIs: !1
29
- }), x = ({ points: s, onClick: e }) => /* @__PURE__ */ i(k, { className: h, onClick: e, children: [
30
- /* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(P, { name: "icon-trophy-solid" }) }),
31
- /* @__PURE__ */ i(T, { children: [
32
- /* @__PURE__ */ t(F, { children: "Total points" }),
33
- /* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(S, { value: s }) })
29
+ }), C = ({ points: s, onClick: e }) => /* @__PURE__ */ l(A, { className: y, onClick: e, children: [
30
+ /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(T, { name: "icon-trophy-solid" }) }),
31
+ /* @__PURE__ */ l(F, { children: [
32
+ /* @__PURE__ */ t(L, { children: "Total points" }),
33
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(S, { value: s }) })
34
34
  ] })
35
- ] }), C = ({ gamification: s }) => {
36
- const e = s.userSummary.$store, [a, m] = u(0);
37
- return p(() => {
38
- const c = e.subscribe((o) => {
39
- var n;
40
- (n = o == null ? void 0 : o.summary) != null && n.points && m(o.summary.points);
35
+ ] }), j = ({ gamification: s }) => {
36
+ const e = s.userSummary.$store, [o, m] = u(0);
37
+ return d(() => {
38
+ const n = e.subscribe((r) => {
39
+ var i;
40
+ (i = r == null ? void 0 : r.summary) != null && i.points && m(r.summary.points);
41
41
  });
42
42
  return () => {
43
- c();
43
+ n();
44
44
  };
45
- }, [e]), /* @__PURE__ */ t(x, { points: a, onClick: () => {
46
- s.status.get() === l.Suspended ? s.openFeature() : s.status.get() === l.Ready && s.closeFeature(!1);
45
+ }, [e]), /* @__PURE__ */ t(C, { points: o, onClick: () => {
46
+ const n = s.status.get();
47
+ n === c.Suspended ? (s.openFeature(), p.emit("app", {
48
+ action: "open",
49
+ payload: {}
50
+ })) : n === c.Ready && (s.closeFeature(!1), p.emit("app", {
51
+ action: "close",
52
+ payload: {}
53
+ }));
47
54
  } });
48
- }, j = ({ sdk: s }) => {
49
- if (!y(s.featuresList.getStore()))
55
+ }, M = ({ sdk: s }) => {
56
+ if (!f(s.featuresList.getStore()))
50
57
  return null;
51
- const e = s.getFeature(b.GAMES);
52
- return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
53
- }, E = ({ theme: s }) => {
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(j, { sdk: e }) }) }) : null;
58
+ const e = s.getFeature(k.GAMES);
59
+ return e ? /* @__PURE__ */ t(j, { gamification: e }) : null;
60
+ }, K = ({ theme: s }) => {
61
+ const e = v(), o = g();
62
+ return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(b, { customTheme: s ?? o.theme, themeMode: o.themeMode, children: /* @__PURE__ */ t(M, { sdk: e }) }) }) : null;
56
63
  };
57
64
  export {
58
- E as StreamLayerSDKPoints
65
+ K as StreamLayerSDKPoints
59
66
  };