@streamlayer/react 1.11.3-rc.4 → 1.11.3

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/app/masters.d.ts +28 -0
  2. package/lib/cjs/advertisement.js +1 -1
  3. package/lib/cjs/gamification-feature.js +1 -1
  4. package/lib/cjs/gamification-feature2.js +1 -0
  5. package/lib/cjs/index.js +1 -1
  6. package/lib/cjs/insight.js +1 -1
  7. package/lib/cjs/masters.js +1 -0
  8. package/lib/cjs/masters2.js +9 -0
  9. package/lib/cjs/notification.js +1 -1
  10. package/lib/cjs/points.js +1 -1
  11. package/lib/cjs/provider.js +90 -78
  12. package/lib/cjs/useStreamLayerApp2.js +12 -12
  13. package/lib/classic/app/masters.d.ts +28 -0
  14. package/lib/classic/cjs/advertisement.js +1 -1
  15. package/lib/classic/cjs/gamification-feature.js +1 -1
  16. package/lib/classic/cjs/gamification-feature2.js +1 -0
  17. package/lib/classic/cjs/index.js +1 -1
  18. package/lib/classic/cjs/insight.js +1 -1
  19. package/lib/classic/cjs/masters.js +1 -0
  20. package/lib/classic/cjs/masters2.js +9 -0
  21. package/lib/classic/cjs/notification.js +1 -1
  22. package/lib/classic/cjs/points.js +1 -1
  23. package/lib/classic/cjs/provider.js +90 -78
  24. package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
  25. package/lib/classic/es/advertisement.js +605 -704
  26. package/lib/classic/es/gamification-feature.js +1 -1
  27. package/lib/classic/es/gamification-feature2.js +4 -0
  28. package/lib/classic/es/index.js +14 -11
  29. package/lib/classic/es/insight.js +35 -34
  30. package/lib/classic/es/masters.js +8 -0
  31. package/lib/classic/es/masters2.js +1106 -0
  32. package/lib/classic/es/notification.js +378 -452
  33. package/lib/classic/es/points.js +44 -67
  34. package/lib/classic/es/provider.js +17477 -15544
  35. package/lib/classic/es/useStreamLayerApp2.js +2967 -3251
  36. package/lib/classic/index.d.ts +10 -1
  37. package/lib/classic/masters.d.ts +5 -0
  38. package/lib/classic/style.css +1 -455
  39. package/lib/dist/cjs/gamification-feature.js +1 -0
  40. package/lib/dist/cjs/gamification-feature2.js +1 -0
  41. package/lib/dist/cjs/index.js +1 -0
  42. package/lib/dist/cjs/masters.js +219 -0
  43. package/lib/dist/cjs/package.json +1 -0
  44. package/lib/dist/es/gamification-feature.js +4 -0
  45. package/lib/dist/es/gamification-feature2.js +123 -0
  46. package/lib/dist/es/index.js +9 -0
  47. package/lib/dist/es/masters.js +42736 -0
  48. package/lib/dist/es/package.json +1 -0
  49. package/lib/dist/style.css +1 -0
  50. package/lib/es/advertisement.js +605 -704
  51. package/lib/es/gamification-feature.js +1 -1
  52. package/lib/es/gamification-feature2.js +4 -0
  53. package/lib/es/index.js +14 -11
  54. package/lib/es/insight.js +35 -34
  55. package/lib/es/masters.js +8 -0
  56. package/lib/es/masters2.js +1106 -0
  57. package/lib/es/notification.js +378 -452
  58. package/lib/es/points.js +44 -67
  59. package/lib/es/provider.js +17477 -15545
  60. package/lib/es/useStreamLayerApp2.js +2967 -3251
  61. package/lib/index.d.ts +10 -1
  62. package/lib/masters.d.ts +5 -0
  63. package/lib/style.css +1 -1
  64. package/package.json +76 -1
package/lib/es/points.js CHANGED
@@ -1,82 +1,59 @@
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";
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";
4
4
  import { S as b } from "./useStreamLayerApp2.js";
5
- const g = () => f, k = /* @__PURE__ */ t("div")({
6
- name: "v",
7
- class: "vo74vtj",
5
+ const k = /* @__PURE__ */ r("div")({
6
+ name: "PointsContainer",
7
+ class: "psiob9b",
8
8
  propsAsIs: !1
9
- }), F = /* @__PURE__ */ t("div")({
10
- name: "S",
11
- class: "saa7tf1",
9
+ }), A = /* @__PURE__ */ r("div")({
10
+ name: "PointsIcon",
11
+ class: "p1gqe4lh",
12
12
  propsAsIs: !1
13
- }), I = /* @__PURE__ */ t(g())({
14
- name: "w",
15
- class: "we3ylu3",
13
+ }), I = () => d, P = /* @__PURE__ */ r(I())({
14
+ name: "PointsSvg",
15
+ class: "p15syg2y",
16
16
  propsAsIs: !0
17
- }), w = /* @__PURE__ */ t("div")({
18
- name: "b",
19
- class: "bw198ph",
17
+ }), T = /* @__PURE__ */ r("div")({
18
+ name: "PointsBody",
19
+ class: "p12n4f2h",
20
20
  propsAsIs: !1
21
- }), C = /* @__PURE__ */ t("div")({
22
- name: "P",
23
- class: "p1warvjl",
21
+ }), F = /* @__PURE__ */ r("div")({
22
+ name: "PointsTitle",
23
+ class: "poqmx89",
24
24
  propsAsIs: !1
25
- }), L = /* @__PURE__ */ t("div")({
26
- name: "C",
27
- class: "conlc3z",
25
+ }), L = /* @__PURE__ */ r("div")({
26
+ name: "PointsValue",
27
+ class: "prj9b3v",
28
28
  propsAsIs: !1
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) => {
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) => {
55
39
  var n;
56
- (n = o == null ? void 0 : o.summary) != null && n.points && c(o.summary.points);
40
+ (n = o == null ? void 0 : o.summary) != null && n.points && m(o.summary.points);
57
41
  });
58
42
  return () => {
59
- m();
43
+ c();
60
44
  };
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;
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;
72
51
  const e = s.getFeature(b.GAMES);
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;
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;
79
56
  };
80
57
  export {
81
- E as StreamLayerSDKPoints
58
+ K as StreamLayerSDKPoints
82
59
  };