@streamlayer/react 1.11.2 → 1.11.3-rc.4

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 (64) hide show
  1. package/lib/cjs/advertisement.js +1 -1
  2. package/lib/cjs/gamification-feature.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/insight.js +1 -1
  5. package/lib/cjs/notification.js +1 -1
  6. package/lib/cjs/points.js +1 -1
  7. package/lib/cjs/provider.js +78 -90
  8. package/lib/cjs/useStreamLayerApp2.js +12 -12
  9. package/lib/classic/cjs/advertisement.js +1 -1
  10. package/lib/classic/cjs/gamification-feature.js +1 -1
  11. package/lib/classic/cjs/index.js +1 -1
  12. package/lib/classic/cjs/insight.js +1 -1
  13. package/lib/classic/cjs/notification.js +1 -1
  14. package/lib/classic/cjs/points.js +1 -1
  15. package/lib/classic/cjs/provider.js +78 -90
  16. package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
  17. package/lib/classic/es/advertisement.js +704 -605
  18. package/lib/classic/es/gamification-feature.js +1 -1
  19. package/lib/classic/es/index.js +11 -14
  20. package/lib/classic/es/insight.js +34 -35
  21. package/lib/classic/es/notification.js +452 -378
  22. package/lib/classic/es/points.js +67 -44
  23. package/lib/classic/es/provider.js +13981 -15913
  24. package/lib/classic/es/useStreamLayerApp2.js +3253 -2969
  25. package/lib/classic/index.d.ts +1 -10
  26. package/lib/classic/style.css +455 -1
  27. package/lib/es/advertisement.js +704 -605
  28. package/lib/es/gamification-feature.js +1 -1
  29. package/lib/es/index.js +11 -14
  30. package/lib/es/insight.js +34 -35
  31. package/lib/es/notification.js +452 -378
  32. package/lib/es/points.js +67 -44
  33. package/lib/es/provider.js +13979 -15910
  34. package/lib/es/useStreamLayerApp2.js +3253 -2969
  35. package/lib/index.d.ts +1 -10
  36. package/lib/style.css +1 -1
  37. package/package.json +1 -76
  38. package/lib/app/masters.d.ts +0 -28
  39. package/lib/cjs/gamification-feature2.js +0 -1
  40. package/lib/cjs/masters.js +0 -1
  41. package/lib/cjs/masters2.js +0 -9
  42. package/lib/classic/app/masters.d.ts +0 -28
  43. package/lib/classic/cjs/gamification-feature2.js +0 -1
  44. package/lib/classic/cjs/masters.js +0 -1
  45. package/lib/classic/cjs/masters2.js +0 -9
  46. package/lib/classic/es/gamification-feature2.js +0 -4
  47. package/lib/classic/es/masters.js +0 -8
  48. package/lib/classic/es/masters2.js +0 -1066
  49. package/lib/classic/masters.d.ts +0 -5
  50. package/lib/dist/cjs/gamification-feature.js +0 -1
  51. package/lib/dist/cjs/gamification-feature2.js +0 -1
  52. package/lib/dist/cjs/index.js +0 -1
  53. package/lib/dist/cjs/masters.js +0 -219
  54. package/lib/dist/cjs/package.json +0 -1
  55. package/lib/dist/es/gamification-feature.js +0 -4
  56. package/lib/dist/es/gamification-feature2.js +0 -123
  57. package/lib/dist/es/index.js +0 -9
  58. package/lib/dist/es/masters.js +0 -42696
  59. package/lib/dist/es/package.json +0 -1
  60. package/lib/dist/style.css +0 -1
  61. package/lib/es/gamification-feature2.js +0 -4
  62. package/lib/es/masters.js +0 -8
  63. package/lib/es/masters2.js +0 -1066
  64. package/lib/masters.d.ts +0 -5
package/lib/es/points.js CHANGED
@@ -1,59 +1,82 @@
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, f as d, c as h, d as f, a as S, F as l, u as y, b as v, h as g } from "./provider.js";
1
+ import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
+ import { e as u, l as p, F as i, f as d, s as t, p as f, u as S, d as h, h as v } from "./provider.js";
3
+ import { useState as y, useEffect as A } from "react";
4
4
  import { S as b } from "./useStreamLayerApp2.js";
5
- const k = /* @__PURE__ */ r("div")({
6
- name: "PointsContainer",
7
- class: "psiob9b",
5
+ const g = () => f, k = /* @__PURE__ */ t("div")({
6
+ name: "v",
7
+ class: "vo74vtj",
8
8
  propsAsIs: !1
9
- }), A = /* @__PURE__ */ r("div")({
10
- name: "PointsIcon",
11
- class: "p1gqe4lh",
9
+ }), F = /* @__PURE__ */ t("div")({
10
+ name: "S",
11
+ class: "saa7tf1",
12
12
  propsAsIs: !1
13
- }), I = () => d, P = /* @__PURE__ */ r(I())({
14
- name: "PointsSvg",
15
- class: "p15syg2y",
13
+ }), I = /* @__PURE__ */ t(g())({
14
+ name: "w",
15
+ class: "we3ylu3",
16
16
  propsAsIs: !0
17
- }), T = /* @__PURE__ */ r("div")({
18
- name: "PointsBody",
19
- class: "p12n4f2h",
17
+ }), w = /* @__PURE__ */ t("div")({
18
+ name: "b",
19
+ class: "bw198ph",
20
20
  propsAsIs: !1
21
- }), F = /* @__PURE__ */ r("div")({
22
- name: "PointsTitle",
23
- class: "poqmx89",
21
+ }), C = /* @__PURE__ */ t("div")({
22
+ name: "P",
23
+ class: "p1warvjl",
24
24
  propsAsIs: !1
25
- }), L = /* @__PURE__ */ r("div")({
26
- name: "PointsValue",
27
- class: "prj9b3v",
25
+ }), L = /* @__PURE__ */ t("div")({
26
+ name: "C",
27
+ class: "conlc3z",
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(f, { value: s }) })
34
- ] })
35
- ] }), C = ({ gamification: s }) => {
36
- const e = s.userSummary.$store, [a, m] = u(0);
37
- return p(() => {
38
- const c = e.subscribe((o) => {
29
+ }), T = ({
30
+ points: s,
31
+ onClick: e,
32
+ className: r
33
+ }) => /* @__PURE__ */ l(k, {
34
+ className: r,
35
+ onClick: e,
36
+ children: [/* @__PURE__ */ a(F, {
37
+ children: /* @__PURE__ */ a(I, {
38
+ name: "icon-trophy-solid"
39
+ })
40
+ }), /* @__PURE__ */ l(w, {
41
+ children: [/* @__PURE__ */ a(C, {
42
+ children: "Total points"
43
+ }), /* @__PURE__ */ a(L, {
44
+ children: /* @__PURE__ */ a(d, {
45
+ value: s
46
+ })
47
+ })]
48
+ })]
49
+ }), j = ({
50
+ gamification: s
51
+ }) => {
52
+ const e = s.userSummary.$store, [r, c] = y(0);
53
+ return A(() => {
54
+ const m = e.subscribe((o) => {
39
55
  var n;
40
- (n = o == null ? void 0 : o.summary) != null && n.points && m(o.summary.points);
56
+ (n = o == null ? void 0 : o.summary) != null && n.points && c(o.summary.points);
41
57
  });
42
58
  return () => {
43
- c();
59
+ m();
44
60
  };
45
- }, [e]), /* @__PURE__ */ t(x, { points: a, onClick: () => {
46
- s.status.get() === l.Suspended ? s.openFeature() : s.status.get() === l.Ready && s.closeFeature(!1);
47
- } });
48
- }, j = ({ sdk: s }) => {
49
- if (!S(s.featuresList.getStore()))
50
- return null;
61
+ }, [e]), /* @__PURE__ */ a(T, {
62
+ className: p,
63
+ points: r,
64
+ onClick: () => {
65
+ s.status.get() === i.Suspended ? s.openFeature() : s.status.get() === i.Ready && s.closeFeature(!1);
66
+ }
67
+ });
68
+ }, x = ({
69
+ sdk: s
70
+ }) => {
71
+ if (!u(s.featuresList.getStore())) return null;
51
72
  const e = s.getFeature(b.GAMES);
52
- return e ? /* @__PURE__ */ t(C, { gamification: e }) : null;
53
- }, K = ({ theme: s }) => {
54
- const e = y(), 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;
73
+ return e ? /* @__PURE__ */ a(j, {
74
+ gamification: e
75
+ }) : null;
76
+ }, E = ({ theme: s }) => {
77
+ const e = S(), r = h();
78
+ return e ? /* @__PURE__ */ a("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ a(v, { customTheme: s ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ a(x, { sdk: e }) }) }) : null;
56
79
  };
57
80
  export {
58
- K as StreamLayerSDKPoints
81
+ E as StreamLayerSDKPoints
59
82
  };