@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
@@ -1,4 +1,4 @@
1
- import { G as f } from "./provider.js";
1
+ import { P as f } from "./provider.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,4 @@
1
+ import { z as f } from "./masters2.js";
2
+ export {
3
+ f as default
4
+ };
package/lib/es/index.js CHANGED
@@ -1,13 +1,16 @@
1
- import { S as r, a as t, b as S, h as m, u as o, d as s, c as y } from "./provider.js";
2
- import { StreamLayerSDKNotification as i, StreamLayerSDKNotificationUI as c } from "./notification.js";
1
+ import { a2 as S, S as o, a9 as i, h as s, u as y, b as L, j as p } from "./provider.js";
2
+ import "./useStreamLayerApp2.js";
3
+ import "react/jsx-runtime";
4
+ import "react";
5
+ import { StreamLayerSDKNotification as u, StreamLayerSDKNotificationUI as D } from "./notification.js";
3
6
  export {
4
- r as StreamLayerProvider,
5
- t as StreamLayerSDKEvent,
6
- i as StreamLayerSDKNotification,
7
- c as StreamLayerSDKNotificationUI,
8
- S as StreamLayerSDKReact,
9
- m as StreamLayerThemeProvider,
10
- o as useStreamLayer,
11
- s as useStreamLayerTheme,
12
- y as useStreamLayerUI
7
+ S as StreamLayerProvider,
8
+ o as StreamLayerSDKEvent,
9
+ u as StreamLayerSDKNotification,
10
+ D as StreamLayerSDKNotificationUI,
11
+ i as StreamLayerSDKReact,
12
+ s as StreamLayerThemeProvider,
13
+ y as useStreamLayer,
14
+ L as useStreamLayerTheme,
15
+ p as useStreamLayerUI
13
16
  };
package/lib/es/insight.js CHANGED
@@ -1,74 +1,75 @@
1
1
  import { jsx as u, jsxs as c } from "react/jsx-runtime";
2
- import { e as m, s as l, m as h, u as p, d as f, h as S, a as g } from "./provider.js";
3
- import { useRef as I, useEffect as y } from "react";
4
- import { S as v } from "./useStreamLayerApp2.js";
5
- const k = () => h, L = /* @__PURE__ */ l(k())({
6
- name: "y",
7
- class: "y1tj7gx6",
2
+ import { useRef as l, useEffect as h } from "react";
3
+ import { a as m, s as p, z as f, u as S, b as I, h as g, S as v } from "./provider.js";
4
+ import { S as y } from "./useStreamLayerApp2.js";
5
+ const Q = () => f, b = /* @__PURE__ */ p(Q())({
6
+ name: "QuestionWrap",
7
+ class: "q10hhsxv",
8
8
  propsAsIs: !0
9
- }), Q = ({
9
+ }), k = ({
10
10
  gamification: e,
11
11
  persistent: r,
12
- skipAutoClose: a,
13
- hideHeader: n,
12
+ skipAutoClose: n,
13
+ hideHeader: o,
14
14
  insightId: s
15
15
  }) => {
16
- const t = I(""), d = m(e.openedQuestion.$store);
17
- return y(() => s ? (!r || e.isOpenedQuestion(s) || (t.current = s, e.getFeedItem(s).then((i) => {
18
- var o;
19
- t.current === s && ((o = i == null ? void 0 : i.attributes) == null ? void 0 : o.attributes.case) === "insight" && e.openQuestion(s, i);
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);
20
20
  })), () => {
21
21
  t.current = "";
22
22
  }) : (e.activeQuestionId.subscribe(({
23
23
  data: i
24
24
  }) => {
25
- var o;
26
- i && ((o = i.feedItem) == null ? void 0 : o.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 = "");
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 = "");
27
27
  }), () => {
28
- }), [e, r, s]), d ? /* @__PURE__ */ u(L, {
29
- skipAutoClose: a,
30
- hideHeader: n,
28
+ }), [e, r, s]), d ? /* @__PURE__ */ u(b, {
29
+ skipAutoClose: n,
30
+ hideHeader: o,
31
31
  gamification: e,
32
32
  hideSponsor: !0
33
33
  }) : null;
34
34
  }, A = ({
35
35
  sdk: e,
36
36
  persistent: r,
37
- skipAutoClose: a,
38
- insightId: n,
37
+ skipAutoClose: n,
38
+ insightId: o,
39
39
  hideHeader: s
40
40
  }) => {
41
- if (!m(e.featuresList.getStore())) return null;
42
- const t = e.getFeature(v.GAMES);
43
- return t ? /* @__PURE__ */ u(Q, {
44
- insightId: n,
41
+ if (!m(e.featuresList.getStore()))
42
+ return null;
43
+ const t = e.getFeature(y.GAMES);
44
+ return t ? /* @__PURE__ */ u(k, {
45
+ insightId: o,
45
46
  persistent: r,
46
47
  hideHeader: s,
47
48
  gamification: t,
48
- skipAutoClose: a
49
+ skipAutoClose: n
49
50
  }) : null;
50
- }, D = ({
51
+ }, H = ({
51
52
  event: e,
52
53
  theme: r,
53
- hideHeader: a,
54
- skipAutoClose: n,
54
+ hideHeader: n,
55
+ skipAutoClose: o,
55
56
  persistent: s
56
57
  }) => {
57
- const t = p(), d = f();
58
+ const t = S(), d = I();
58
59
  return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
59
- /* @__PURE__ */ u(S, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
60
+ /* @__PURE__ */ u(g, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
60
61
  A,
61
62
  {
62
- skipAutoClose: n,
63
+ skipAutoClose: o,
63
64
  sdk: t,
64
- hideHeader: a,
65
+ hideHeader: n,
65
66
  persistent: s
66
67
  }
67
68
  ) }),
68
- e !== void 0 && /* @__PURE__ */ u(g, { event: e })
69
+ e !== void 0 && /* @__PURE__ */ u(v, { event: e })
69
70
  ] }) : null;
70
71
  };
71
72
  export {
72
- D as StreamLayerSDKInsight,
73
+ H as StreamLayerSDKInsight,
73
74
  A as StreamLayerSDKInsightUI
74
75
  };
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import { M as o, a as s } from "./masters2.js";
3
+ import "react";
4
+ import "./provider.js";
5
+ export {
6
+ o as MastersStreamLayerProvider,
7
+ s as MastersStreamLayerSDKReact
8
+ };