@streamlayer/react-ui 0.78.2 → 0.79.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.
@@ -1,6 +1,6 @@
1
- import { useStore as l } from "@nanostores/react";
2
- import { useRef as F, useState as d, useCallback as y, useEffect as v } from "react";
3
- import { FeatureType as I } from "@streamlayer/sdk-web-types";
1
+ import { useStore as m } from "@nanostores/react";
2
+ import { useRef as h, useState as d, useCallback as F, useEffect as v } from "react";
3
+ import { FeatureType as y } from "@streamlayer/sdk-web-types";
4
4
  import "react/jsx-runtime";
5
5
  import { ChannelsButtonId as c } from "../navigation/button/Channels.js";
6
6
  import { FeaturedGroupsButtonId as n } from "../navigation/button/FeaturedGroups.js";
@@ -11,53 +11,53 @@ import "../../LeaderBoard_16p26hz-4ed993c7.js";
11
11
  import "../../index_4nhkck-4ed993c7.js";
12
12
  import "../../masters_k70xsy-4ed993c7.js";
13
13
  import "../navigation/button/index.js";
14
- const U = (e) => {
15
- const a = F(""), [m, f] = d(!1), A = l(e.status), r = l(e.userId()), i = A === "ready", [s, u] = d(n), p = y(
16
- (t, o) => {
17
- u(o), o === n ? (t && e.createEventSession(t), window.requestAnimationFrame(() => {
18
- e.openFeature(I.GAMES);
19
- })) : e.closeFeature();
14
+ const U = (t) => {
15
+ const a = h(""), [f, l] = d(!1), A = m(t.status), r = m(t.userId()), i = A === "ready", [s, u] = d(n), p = F(
16
+ (e, o) => {
17
+ u(o), o === n ? (e && t.createEventSession(e), window.requestAnimationFrame(() => {
18
+ t.openFeature(y.GAMES);
19
+ })) : t.closeFeature(!1);
20
20
  },
21
- [e]
21
+ [t]
22
22
  );
23
23
  v(() => {
24
- !i && s === n && (u(c), e.closeFeature());
25
- }, [i, s, e]);
26
- const E = (t) => {
27
- a.current = t, f(!0), e.initializeApp().then(({ enabled: o, err: b }) => {
24
+ !i && s === n && (u(c), t.closeFeature(!0));
25
+ }, [i, s, t]);
26
+ const S = (e) => {
27
+ a.current = e, l(!0), t.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: o, err: b }) => {
28
28
  if (b) {
29
- p(t, c);
29
+ p(e, c);
30
30
  return;
31
31
  }
32
32
  if (o) {
33
- e.isUserAuthorized().then((h) => {
34
- if (h) {
35
- p(t, n);
33
+ t.isUserAuthorized().then((g) => {
34
+ if (g) {
35
+ p(e, n);
36
36
  return;
37
37
  } else
38
- e.disableApp();
38
+ t.disableApp();
39
39
  });
40
40
  return;
41
41
  }
42
42
  });
43
- }, S = () => {
44
- f(!1), e.disableApp();
43
+ }, E = () => {
44
+ l(!1), t.disableApp();
45
45
  };
46
46
  return v(() => {
47
47
  if (!r) {
48
- i && (u(c), e.disableApp());
48
+ i && (u(c), t.disableApp());
49
49
  return;
50
50
  }
51
- r && a.current && m && e.initializeApp().then(() => {
52
- e.createEventSession(a.current);
51
+ r && a.current && f && t.initializeApp({ skipOrganizationSettings: !0 }).then(() => {
52
+ t.createEventSession(a.current);
53
53
  });
54
54
  }, [r]), {
55
- sdkEnabled: m,
55
+ sdkEnabled: f,
56
56
  sdkReady: i,
57
57
  activeOverlay: s,
58
58
  activateAndLoadOverlay: p,
59
- activateEventWithId: E,
60
- deactivate: S,
59
+ activateEventWithId: S,
60
+ deactivate: E,
61
61
  isLogged: !!r
62
62
  };
63
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.78.2",
3
+ "version": "0.79.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -40,13 +40,13 @@
40
40
  "react-virtualized-auto-sizer": "^1.0.20",
41
41
  "react-window": "^1.8.9",
42
42
  "react-window-infinite-loader": "^1.0.9",
43
- "@streamlayer/feature-gamification": "^0.29.2",
43
+ "@streamlayer/feature-gamification": "^0.30.0",
44
44
  "@streamlayer/sdk-web": "^0.29.5",
45
45
  "@streamlayer/sdk-web-anonymous-auth": "^0.11.30",
46
46
  "@streamlayer/sdk-web-api": "^0.1.0",
47
- "@streamlayer/sdk-web-core": "^0.0.7",
48
- "@streamlayer/sdk-web-features": "^0.10.37",
49
- "@streamlayer/sdk-web-interfaces": "^0.0.1",
47
+ "@streamlayer/sdk-web-core": "^0.1.0",
48
+ "@streamlayer/sdk-web-features": "^0.11.0",
49
+ "@streamlayer/sdk-web-interfaces": "^0.1.0",
50
50
  "@streamlayer/sdk-web-notifications": "^0.1.0",
51
51
  "@streamlayer/sdk-web-storage": "^0.0.4",
52
52
  "@streamlayer/sdk-web-logger": "^0.0.1",