@streamlayer/react 1.7.0 → 1.8.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.
@@ -14262,7 +14262,7 @@ const Ht = new It(), Wk = (e, t, n) => {
14262
14262
  e.ui.disableAppNotification();
14263
14263
  break;
14264
14264
  }
14265
- if (((m = c.slEventBus) == null ? void 0 : m.type) === "advertisement") {
14265
+ if (((m = c.slEventBus) == null ? void 0 : m.type) === "advertisement" && t.withAd) {
14266
14266
  const u = c.slEventBus, { hasNotification: d, id: y, isViewed: T } = u.payload;
14267
14267
  switch (u.action) {
14268
14268
  case "received":
@@ -14455,7 +14455,7 @@ const ah = (e, t, n, a) => {
14455
14455
  let s = !1;
14456
14456
  const o = new Wi(), r = re(ae.Unset);
14457
14457
  r.subscribe((l) => {
14458
- console.log("onboardingStatus", l), l !== ae.Unset && (l === ae.Optional || l === ae.Required ? s === !1 && (ah(e, t, a, o), s = !0) : e.onboardingProcessed.set(!0), l === ae.Completed && t.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
14458
+ l !== ae.Unset && (l === ae.Optional || l === ae.Required ? s === !1 && (ah(e, t, a, o), s = !0) : e.onboardingProcessed.set(!0), l === ae.Completed && t.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
14459
14459
  userId: t.userId.get() || "",
14460
14460
  organizationId: t.organizationId.get() || "",
14461
14461
  eventId: t.slStreamId.get() || ""
@@ -14558,7 +14558,7 @@ class ch extends Qi {
14558
14558
  });
14559
14559
  p(this, "connect", () => {
14560
14560
  this.onboardingProcessed.subscribe((n) => {
14561
- console.log("onboardingProcessed status", n), n && this.advertisement.connect();
14561
+ n && this.advertisement.connect();
14562
14562
  }), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (n) => {
14563
14563
  var m, u, d, y, T, f, _, N, E, b, w;
14564
14564
  if (!this.isInteractiveAllowed)
@@ -17791,7 +17791,11 @@ const W_ = /* @__PURE__ */ bh(K_);
17791
17791
  })();
17792
17792
  function z_(e, t = !0, n = !0, a) {
17793
17793
  const s = t ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = t ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", r = W_(/* @__PURE__ */ Object.create({}), { autostart: !1 });
17794
- return r.use(Zk), r.use(jk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(zk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(Xk, { onContentActivate: a == null ? void 0 : a.onContentActivate, withAdNotification: a == null ? void 0 : a.withAdNotification }), r.use(dk, { sdkKey: e, host: s, analyticsHost: o, version: a == null ? void 0 : a.version }), r.use(gk), r.use(Wk), r.use(dh), r.use(Uk), r.use(Eh), r.after((c, l, m) => {
17794
+ return r.use(Zk), r.use(jk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(zk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(Xk, {
17795
+ onContentActivate: a == null ? void 0 : a.onContentActivate,
17796
+ withAd: a == null ? void 0 : a.withAd,
17797
+ withAdNotification: a == null ? void 0 : a.withAdNotification
17798
+ }), r.use(dk, { sdkKey: e, host: s, analyticsHost: o, version: a == null ? void 0 : a.version }), r.use(gk), r.use(Wk), r.use(dh), r.use(Uk), r.use(Eh), r.after((c, l, m) => {
17795
17799
  if (c)
17796
17800
  throw c;
17797
17801
  l.ready(), m();
@@ -17811,33 +17815,35 @@ const Z_ = ({
17811
17815
  onDeepLinkHandled: s,
17812
17816
  videoPlayerController: o,
17813
17817
  onContentActivate: r,
17814
- withAdNotification: c
17818
+ withAdNotification: c,
17819
+ withAd: l
17815
17820
  }) => {
17816
- const [l, m] = Dc(null);
17821
+ const [m, u] = Dc(null);
17817
17822
  return Cc(() => {
17818
- let u = !1;
17823
+ let d = !1;
17819
17824
  if (!e)
17820
- return console.error("streamlayer sdk key should be provided"), m((y) => (y !== null && typeof y.disableApp == "function" && y.disableApp(), null)), () => {
17821
- u = !0;
17825
+ return console.error("streamlayer sdk key should be provided"), u((T) => (T !== null && typeof T.disableApp == "function" && T.disableApp(), null)), () => {
17826
+ d = !0;
17822
17827
  };
17823
- const d = z_(e, n, a, {
17824
- version: "1.7.0",
17828
+ const y = z_(e, n, a, {
17829
+ version: "1.8.0",
17825
17830
  onDeepLinkHandled: s,
17826
17831
  videoPlayerController: o,
17827
17832
  onContentActivate: r,
17828
- withAdNotification: c
17833
+ withAdNotification: c,
17834
+ withAd: l
17829
17835
  });
17830
17836
  if (t)
17831
- for (const y of t)
17832
- d.use(y);
17833
- return d.ready().then((y) => {
17834
- u || (m(y.sdk), typeof window < "u");
17835
- }).catch((y) => console.log(y)), () => {
17836
- u = !0, d.close(function(y) {
17837
- if (y) throw y;
17837
+ for (const T of t)
17838
+ y.use(T);
17839
+ return y.ready().then((T) => {
17840
+ d || (u(T.sdk), typeof window < "u");
17841
+ }).catch((T) => console.log(T)), () => {
17842
+ d = !0, y.close(function(T) {
17843
+ if (T) throw T;
17838
17844
  });
17839
17845
  };
17840
- }, [e, n]), l;
17846
+ }, [e, n]), m;
17841
17847
  };
17842
17848
  export {
17843
17849
  ms as A,