@streamlayer/react-ui 0.24.0 → 0.24.2

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.
package/lib/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { QuestionInApp as So } from "./lib/notifications/notification/question-inapp/index.js";
2
- import { Login as co } from "./lib/login/index.js";
3
- import { Onboarding as yo } from "./lib/gamification/onboarding/index.js";
4
- import { Question as Do } from "./lib/gamification/question/index.js";
5
- import { QuestionList as Oo } from "./lib/gamification/question-list/index.js";
6
- import { UserStatistics as To } from "./lib/gamification/user-statistics/index.js";
7
- import { Vote as Vo } from "./lib/gamification/vote/index.js";
8
- import { Demo as ko } from "./lib/demo/index.js";
9
- import { StreamLayerThemeProvider as qo } from "./lib/theme/index.js";
10
- import { theme as zo } from "./lib/theme/theme.js";
1
+ import { QuestionInApp as ho } from "./lib/notifications/notification/question-inapp/index.js";
2
+ import { Login as bo } from "./lib/login/index.js";
3
+ import { Onboarding as vo } from "./lib/gamification/onboarding/index.js";
4
+ import { Question as Ao } from "./lib/gamification/question/index.js";
5
+ import { QuestionList as Io } from "./lib/gamification/question-list/index.js";
6
+ import { UserStatistics as Po } from "./lib/gamification/user-statistics/index.js";
7
+ import { Vote as Uo } from "./lib/gamification/vote/index.js";
8
+ import { Demo as jo } from "./lib/demo/index.js";
9
+ import { StreamLayerThemeProvider as lo } from "./lib/theme/index.js";
10
+ import { theme as wo } from "./lib/theme/theme.js";
11
11
  import "react/jsx-runtime";
12
12
  import "react";
13
13
  import "./icon-exit-d3f9fc80.js";
@@ -46,7 +46,6 @@ import "./lib/gamification/vote/components/voting-option/styles.js";
46
46
  import "./lib/gamification/vote/styles.js";
47
47
  import "@streamlayer/sdk-web-interfaces";
48
48
  import "@streamlayer/sdk-web-features";
49
- import "@streamlayer/feature-gamification";
50
49
  import "@nanostores/react";
51
50
  import "./lib/notifications/index.js";
52
51
  import "./lib/notifications/notification/index.js";
@@ -78,14 +77,14 @@ import "./lib/gamification/common-header/index.js";
78
77
  import "./lib/demo/Login.js";
79
78
  import "@linaria/core";
80
79
  export {
81
- ko as Demo,
82
- co as Login,
83
- yo as Onboarding,
84
- Do as Question,
85
- So as QuestionInApp,
86
- Oo as QuestionList,
87
- qo as StreamLayerThemeProvider,
88
- To as UserStatistics,
89
- Vo as Vote,
90
- zo as theme
80
+ jo as Demo,
81
+ bo as Login,
82
+ vo as Onboarding,
83
+ Ao as Question,
84
+ ho as QuestionInApp,
85
+ Io as QuestionList,
86
+ lo as StreamLayerThemeProvider,
87
+ Po as UserStatistics,
88
+ Uo as Vote,
89
+ wo as theme
91
90
  };
@@ -1,14 +1,14 @@
1
- import { jsx as i, jsxs as s, Fragment as v } from "react/jsx-runtime";
2
- import { FeatureStatus as l } from "@streamlayer/sdk-web-interfaces";
3
- import { AvailableFeatures as y } from "@streamlayer/sdk-web-features";
4
- import { Gamification as S, Highlights as b } from "@streamlayer/feature-gamification";
5
- import { useState as C, useMemo as u, useEffect as F } from "react";
1
+ import { jsx as i, jsxs as l, Fragment as S } from "react/jsx-runtime";
2
+ import { FeatureStatus as f } from "@streamlayer/sdk-web-interfaces";
3
+ import { FeatureType as s } from "@streamlayer/sdk-web-types";
4
+ import { AvailableFeatures as v } from "@streamlayer/sdk-web-features";
5
+ import { useState as b, useMemo as d, useEffect as C } from "react";
6
6
  import { useStore as c } from "@nanostores/react";
7
- import { Notifications as B } from "../notifications/index.js";
7
+ import { Notifications as F } from "../notifications/index.js";
8
8
  import { GamificationComponent as w } from "./Gamification.js";
9
- import { HighlightsComponent as x } from "./Highlights.js";
10
- import { LoginComponent as R } from "./Login.js";
11
- import { Buttons as j, Button as d } from "./styles.js";
9
+ import { HighlightsComponent as B } from "./Highlights.js";
10
+ import { LoginComponent as G } from "./Login.js";
11
+ import { Buttons as H, Button as g } from "./styles.js";
12
12
  import "../notifications/notification/index.js";
13
13
  import "@streamlayer/sdk-web-notifications";
14
14
  import "../notifications/notification/onboarding-inapp/index.js";
@@ -30,7 +30,6 @@ import "../gamification/user-statistics/styles.js";
30
30
  import "./components/QuestionsList.js";
31
31
  import "../gamification/question-list/index.js";
32
32
  import "../gamification/question/index.js";
33
- import "@streamlayer/sdk-web-types";
34
33
  import "../../icon-chevron-138a557c.js";
35
34
  import "../gamification/question/styles.js";
36
35
  import "../gamification/question-list/styles.js";
@@ -73,35 +72,35 @@ import "@connectrpc/connect-web";
73
72
  import "@connectrpc/connect";
74
73
  import "@streamlayer/sl-eslib/users/users_connect";
75
74
  import "../login/styles.js";
76
- const A = ({ activeFeature: o, sdk: r }) => {
77
- const [e, p] = C(null), { organizationSettings: a, streamSettings: f } = c(r.sdkStore), g = u(() => {
78
- const t = (f == null ? void 0 : f.data) || (a == null ? void 0 : a.data);
75
+ const x = ({ activeFeature: o, sdk: r }) => {
76
+ const [e, p] = b(null), { organizationSettings: a, streamSettings: u } = c(r.sdkStore), h = d(() => {
77
+ const t = (u == null ? void 0 : u.data) || (a == null ? void 0 : a.data);
79
78
  return t != null && t.overlays ? t.overlays : [];
80
- }, [a, f]);
81
- F(() => {
79
+ }, [a, u]);
80
+ C(() => {
82
81
  const t = r.getFeatures();
83
82
  if (o)
84
83
  for (const [m, n] of t)
85
- m === o ? n.status.get() === l.Suspended && (n.enable(), p(n)) : n.status.get() === l.Ready && n.disable();
84
+ m === o ? n.status.get() === f.Suspended && (n.enable(), p(n)) : n.status.get() === f.Ready && n.disable();
86
85
  else {
87
86
  for (const [, m] of t)
88
- m.status.get() === l.Ready && m.disable();
87
+ m.status.get() === f.Ready && m.disable();
89
88
  p(null);
90
89
  }
91
90
  return () => {
92
91
  for (const [, m] of t)
93
- m.status.get() === l.Ready && m.disable();
92
+ m.status.get() === f.Ready && m.disable();
94
93
  };
95
94
  }, [o, r]);
96
- const h = u(() => e instanceof S ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(w, { gamification: e, sdk: r }) }) : /* @__PURE__ */ i("div", { children: "wait gamification..." }) : e instanceof b ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(x, { highlights: e, sdk: r }) }) : /* @__PURE__ */ i("div", { children: "wait highlights..." }) : null, [r, e]);
97
- return /* @__PURE__ */ s("div", { children: [
98
- /* @__PURE__ */ s(j, { children: [
99
- /* @__PURE__ */ i(d, { onClick: () => r.logout(), children: "logout" }),
100
- g.map((t) => /* @__PURE__ */ s(
101
- d,
95
+ const y = d(() => e ? e.featureConfig.get().type === s.GAMES ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(w, { gamification: e, sdk: r }) }) : /* @__PURE__ */ i("div", { children: "wait gamification..." }) : e.featureConfig.get().type === s.HIGHLIGHTS ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(B, { highlights: e, sdk: r }) }) : /* @__PURE__ */ i("div", { children: "wait highlights..." }) : /* @__PURE__ */ i("div", { children: "unknown feature" }) : null, [r, e]);
96
+ return /* @__PURE__ */ l("div", { children: [
97
+ /* @__PURE__ */ l(H, { children: [
98
+ /* @__PURE__ */ i(g, { onClick: () => r.logout(), children: "logout" }),
99
+ h.map((t) => /* @__PURE__ */ l(
100
+ g,
102
101
  {
103
102
  onClick: () => r.openFeature(t.type),
104
- disabled: !(t.type in y),
103
+ disabled: !(t.type in v),
105
104
  "data-enableSdkButton": t.enableSdkButton.toString(),
106
105
  "data-selected": t.type === o,
107
106
  children: [
@@ -112,15 +111,15 @@ const A = ({ activeFeature: o, sdk: r }) => {
112
111
  t.name
113
112
  ))
114
113
  ] }),
115
- h
114
+ y
116
115
  ] });
117
- }, _t = ({ sdk: o }) => {
116
+ }, Yt = ({ sdk: o }) => {
118
117
  const r = c(o.organizationStore()), e = c(o.getUserStore()), p = c(o.getActiveFeature());
119
- return r.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : r.data ? e.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : e.data ? /* @__PURE__ */ s(v, { children: [
120
- /* @__PURE__ */ i(B, { notificationsStore: o.getNotificationsStore() }),
121
- /* @__PURE__ */ i(A, { sdk: o, activeFeature: p })
122
- ] }) : /* @__PURE__ */ i(R, { sdk: o }) : /* @__PURE__ */ i("div", { children: "wrong sdk key..." });
118
+ return r.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : r.data ? e.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : e.data ? /* @__PURE__ */ l(S, { children: [
119
+ /* @__PURE__ */ i(F, { notificationsStore: o.getNotificationsStore() }),
120
+ /* @__PURE__ */ i(x, { sdk: o, activeFeature: p })
121
+ ] }) : /* @__PURE__ */ i(G, { sdk: o }) : /* @__PURE__ */ i("div", { children: "wrong sdk key..." });
123
122
  };
124
123
  export {
125
- _t as Demo
124
+ Yt as Demo
126
125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -22,16 +22,16 @@
22
22
  ],
23
23
  "peerDependencies": {
24
24
  "@streamlayer/sl-eslib": "^5.45.1",
25
- "@streamlayer/feature-gamification": "^0.14.0",
26
- "@streamlayer/sdk-web": "^0.26.0",
27
- "@streamlayer/sdk-web-anonymous-auth": "^0.10.0",
28
- "@streamlayer/sdk-web-core": "^0.11.0",
29
- "@streamlayer/sdk-web-features": "^0.9.0",
25
+ "@streamlayer/feature-gamification": "^0.14.2",
26
+ "@streamlayer/sdk-web": "^0.26.2",
27
+ "@streamlayer/sdk-web-anonymous-auth": "^0.10.2",
28
+ "@streamlayer/sdk-web-core": "^0.11.2",
29
+ "@streamlayer/sdk-web-features": "^0.9.2",
30
30
  "@streamlayer/sdk-web-api": "^0.1.0",
31
- "@streamlayer/sdk-web-interfaces": "^0.17.0",
32
- "@streamlayer/sdk-web-notifications": "^0.9.0",
33
- "@streamlayer/sdk-web-storage": "^0.3.0",
34
- "@streamlayer/sdk-web-types": "^0.14.0"
31
+ "@streamlayer/sdk-web-interfaces": "^0.17.1",
32
+ "@streamlayer/sdk-web-notifications": "^0.9.1",
33
+ "@streamlayer/sdk-web-storage": "^0.3.1",
34
+ "@streamlayer/sdk-web-types": "^0.14.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@connectrpc/connect": "^1.1.3",