@streamlayer/react 1.17.0 → 1.18.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.
Files changed (77) hide show
  1. package/lib/app/advertisement.d.ts +1 -0
  2. package/lib/app/app.d.ts +3 -0
  3. package/lib/app/provider.d.ts +4 -1
  4. package/lib/app/useStreamLayerApp.d.ts +2 -1
  5. package/lib/cjs/advertisement.js +40 -40
  6. package/lib/cjs/gamification-feature.js +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/index2.js +2 -2
  9. package/lib/cjs/insight.js +1 -1
  10. package/lib/cjs/masters2.js +4 -4
  11. package/lib/cjs/notification.js +1 -1
  12. package/lib/cjs/points.js +1 -1
  13. package/lib/cjs/provider.js +62 -19
  14. package/lib/cjs/useStreamLayerApp2.js +15 -15
  15. package/lib/classic/app/advertisement.d.ts +1 -0
  16. package/lib/classic/app/app.d.ts +3 -0
  17. package/lib/classic/app/provider.d.ts +4 -1
  18. package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
  19. package/lib/classic/cjs/advertisement.js +40 -40
  20. package/lib/classic/cjs/bet-pack.js +5 -1
  21. package/lib/classic/cjs/gamification-feature.js +1 -1
  22. package/lib/classic/cjs/index.js +1 -1
  23. package/lib/classic/cjs/insight.js +1 -1
  24. package/lib/classic/cjs/notification.js +1 -1
  25. package/lib/classic/cjs/points.js +1 -1
  26. package/lib/classic/cjs/provider.js +57 -30
  27. package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
  28. package/lib/classic/es/advertisement.js +6989 -6764
  29. package/lib/classic/es/bet-pack.js +3431 -12
  30. package/lib/classic/es/gamification-feature.js +1 -1
  31. package/lib/classic/es/index.js +4 -6
  32. package/lib/classic/es/insight.js +44 -41
  33. package/lib/classic/es/notification.js +739 -230
  34. package/lib/classic/es/points.js +13 -13
  35. package/lib/classic/es/provider.js +7109 -4730
  36. package/lib/classic/es/useStreamLayerApp.js +1 -1
  37. package/lib/classic/es/useStreamLayerApp2.js +4044 -3824
  38. package/lib/classic/index.d.ts +1 -2
  39. package/lib/dist/cjs/gamification-feature2.js +1 -1
  40. package/lib/dist/cjs/masters.js +48 -44
  41. package/lib/dist/es/gamification-feature2.js +15 -15
  42. package/lib/dist/es/index.js +3 -3
  43. package/lib/dist/es/masters.js +12653 -10178
  44. package/lib/dist/style.css +1 -1
  45. package/lib/es/advertisement.js +6989 -6764
  46. package/lib/es/gamification-feature.js +1 -1
  47. package/lib/es/index.js +3 -5
  48. package/lib/es/index2.js +380 -380
  49. package/lib/es/insight.js +44 -41
  50. package/lib/es/masters2.js +22 -20
  51. package/lib/es/notification.js +739 -230
  52. package/lib/es/points.js +13 -13
  53. package/lib/es/provider.js +7162 -4706
  54. package/lib/es/useStreamLayerApp.js +1 -1
  55. package/lib/es/useStreamLayerApp2.js +4044 -3824
  56. package/lib/index.d.ts +1 -2
  57. package/lib/style.css +1 -1
  58. package/package.json +16 -26
  59. package/lib/app/tvos.d.ts +0 -5
  60. package/lib/cjs/index3.js +0 -1
  61. package/lib/cjs/tvos.js +0 -1
  62. package/lib/classic/app/tvos.d.ts +0 -5
  63. package/lib/classic/cjs/gamification-feature2.js +0 -1
  64. package/lib/classic/cjs/index2.js +0 -5
  65. package/lib/classic/cjs/index3.js +0 -1
  66. package/lib/classic/cjs/masters.js +0 -1
  67. package/lib/classic/cjs/masters2.js +0 -13
  68. package/lib/classic/cjs/tvos.js +0 -1
  69. package/lib/classic/es/gamification-feature2.js +0 -4
  70. package/lib/classic/es/index2.js +0 -3426
  71. package/lib/classic/es/index3.js +0 -76
  72. package/lib/classic/es/masters.js +0 -9
  73. package/lib/classic/es/masters2.js +0 -868
  74. package/lib/classic/es/tvos.js +0 -1352
  75. package/lib/classic/style.css +0 -1
  76. package/lib/es/index3.js +0 -76
  77. package/lib/es/tvos.js +0 -1352
@@ -1,4 +1,4 @@
1
- import { P as f } from "./provider.js";
1
+ import { g as f } from "./provider.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,15 +1,13 @@
1
- import { S as m, a as S, b as o, h as i, u as s, d as y, c as L } from "./provider.js";
1
+ import { v as m, S, w as o, h as i, u as s, b as y, p as L } from "./provider.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
- import { StreamLayerSDKNotification as p, StreamLayerSDKNotificationUI as D } from "./notification.js";
5
- import { StreamLayerSDKTv as c } from "./tvos.js";
4
+ import { StreamLayerSDKNotification as f, StreamLayerSDKNotificationUI as u } from "./notification.js";
6
5
  export {
7
6
  m as StreamLayerProvider,
8
7
  S as StreamLayerSDKEvent,
9
- p as StreamLayerSDKNotification,
10
- D as StreamLayerSDKNotificationUI,
8
+ f as StreamLayerSDKNotification,
9
+ u as StreamLayerSDKNotificationUI,
11
10
  o as StreamLayerSDKReact,
12
- c as StreamLayerSDKTv,
13
11
  i as StreamLayerThemeProvider,
14
12
  s as useStreamLayer,
15
13
  y as useStreamLayerTheme,
@@ -1,75 +1,78 @@
1
- import { jsx as u, jsxs as c } from "react/jsx-runtime";
2
- import { useRef as l, useEffect as h } from "react";
3
- import { f as m, s as p, z as f, u as S, d as I, h as g, a as v } from "./provider.js";
1
+ import { jsx as u, jsxs as l } from "react/jsx-runtime";
2
+ import { useRef as h, useEffect as p } from "react";
3
+ import { a as m, s as f, T as S, u as I, b as g, h as v, S as k } from "./provider.js";
4
4
  import { S as y } from "./useStreamLayerApp2.js";
5
- const Q = () => f, k = /* @__PURE__ */ p(Q())({
5
+ const Q = () => S, b = /* @__PURE__ */ f(Q())({
6
6
  name: "QuestionWrap",
7
7
  class: "q10hhsxv",
8
8
  propsAsIs: !0
9
- }), A = ({
9
+ }), L = ({
10
10
  gamification: e,
11
- persistent: r,
12
- skipAutoClose: n,
11
+ sdk: n,
12
+ persistent: i,
13
+ skipAutoClose: a,
13
14
  hideHeader: o,
14
- insightId: s
15
+ insightId: t
15
16
  }) => {
16
- const t = l(""), d = m(e.openedQuestion.$store);
17
- return h(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
18
- var a;
19
- t.current === s && ((a = i == null ? void 0 : i.attributes) == null ? void 0 : a.attributes.case) === "insight" && e.openQuestion(s, i);
17
+ const r = h(""), c = m(e.openedQuestion.$store);
18
+ return p(() => t ? (!i || e.isOpenedQuestion(t) || (r.current = t, e.getFeedItem(t).then((s) => {
19
+ var d;
20
+ r.current === t && ((d = s == null ? void 0 : s.attributes) == null ? void 0 : d.attributes.case) === "insight" && e.openQuestion(t, s);
20
21
  })), () => {
21
- t.current = "";
22
+ r.current = "";
22
23
  }) : (e.activeQuestionId.subscribe(({
23
- data: i
24
+ data: s
24
25
  }) => {
25
- var a;
26
- i && ((a = i.feedItem) == null ? void 0 : a.type) === "insight" && (!r || e.isOpenedQuestion(i.feedItem.id) || (t.current = i.feedItem.id, e.openQuestion(i.feedItem.id, i.feedItem))), !i && t.current && (e.closeQuestion(t.current), t.current = "");
26
+ var d;
27
+ s && ((d = s.feedItem) == null ? void 0 : d.type) === "insight" && (!i || e.isOpenedQuestion(s.feedItem.id) || (r.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && r.current && (e.closeQuestion(r.current), r.current = "");
27
28
  }), () => {
28
- }), [e, r, s]), d ? /* @__PURE__ */ u(k, {
29
- skipAutoClose: n,
29
+ }), [e, i, t]), c ? /* @__PURE__ */ u(b, {
30
+ sdk: n,
31
+ skipAutoClose: a,
30
32
  hideHeader: o,
31
33
  gamification: e,
32
34
  hideSponsor: !0
33
35
  }) : null;
34
- }, L = ({
36
+ }, A = ({
35
37
  sdk: e,
36
- persistent: r,
37
- skipAutoClose: n,
38
- insightId: o,
39
- hideHeader: s
38
+ persistent: n,
39
+ skipAutoClose: i,
40
+ insightId: a,
41
+ hideHeader: o
40
42
  }) => {
41
43
  if (!m(e.featuresList.getStore()))
42
44
  return null;
43
45
  const t = e.getFeature(y.GAMES);
44
- return t ? /* @__PURE__ */ u(A, {
45
- insightId: o,
46
- persistent: r,
47
- hideHeader: s,
46
+ return t ? /* @__PURE__ */ u(L, {
47
+ insightId: a,
48
+ sdk: e,
49
+ persistent: n,
50
+ hideHeader: o,
48
51
  gamification: t,
49
- skipAutoClose: n
52
+ skipAutoClose: i
50
53
  }) : null;
51
54
  }, H = ({
52
55
  event: e,
53
- theme: r,
54
- hideHeader: n,
55
- skipAutoClose: o,
56
- persistent: s
56
+ theme: n,
57
+ hideHeader: i,
58
+ skipAutoClose: a,
59
+ persistent: o
57
60
  }) => {
58
- const t = S(), d = I();
59
- return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
60
- /* @__PURE__ */ u(g, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
61
- L,
61
+ const t = I(), r = g();
62
+ return t ? /* @__PURE__ */ l("div", { className: "StreamLayerSDK", children: [
63
+ /* @__PURE__ */ u(v, { customTheme: n ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ u(
64
+ A,
62
65
  {
63
- skipAutoClose: o,
66
+ skipAutoClose: a,
64
67
  sdk: t,
65
- hideHeader: n,
66
- persistent: s
68
+ hideHeader: i,
69
+ persistent: o
67
70
  }
68
71
  ) }),
69
- e !== void 0 && /* @__PURE__ */ u(v, { event: e })
72
+ e !== void 0 && /* @__PURE__ */ u(k, { event: e })
70
73
  ] }) : null;
71
74
  };
72
75
  export {
73
76
  H as StreamLayerSDKInsight,
74
- L as StreamLayerSDKInsightUI
77
+ A as StreamLayerSDKInsightUI
75
78
  };