@streamlayer/react-ui 0.23.5 → 0.24.1
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 +20 -21
- package/lib/lib/demo/index.js +31 -32
- package/package.json +24 -24
package/lib/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { QuestionInApp as
|
|
2
|
-
import { Login as
|
|
3
|
-
import { Onboarding as
|
|
4
|
-
import { Question as
|
|
5
|
-
import { QuestionList as
|
|
6
|
-
import { UserStatistics as
|
|
7
|
-
import { Vote as
|
|
8
|
-
import { Demo as
|
|
9
|
-
import { StreamLayerThemeProvider as
|
|
10
|
-
import { theme as
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
};
|
package/lib/lib/demo/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { FeatureStatus as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useState as
|
|
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
|
|
7
|
+
import { Notifications as F } from "../notifications/index.js";
|
|
8
8
|
import { GamificationComponent as w } from "./Gamification.js";
|
|
9
|
-
import { HighlightsComponent as
|
|
10
|
-
import { LoginComponent as
|
|
11
|
-
import { Buttons as
|
|
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
|
|
77
|
-
const [e, p] =
|
|
78
|
-
const t = (
|
|
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,
|
|
81
|
-
|
|
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() ===
|
|
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() ===
|
|
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() ===
|
|
92
|
+
m.status.get() === f.Ready && m.disable();
|
|
94
93
|
};
|
|
95
94
|
}, [o, r]);
|
|
96
|
-
const
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */ i(
|
|
100
|
-
|
|
101
|
-
|
|
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
|
|
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
|
-
|
|
114
|
+
y
|
|
116
115
|
] });
|
|
117
|
-
},
|
|
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__ */
|
|
120
|
-
/* @__PURE__ */ i(
|
|
121
|
-
/* @__PURE__ */ i(
|
|
122
|
-
] }) : /* @__PURE__ */ i(
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -21,43 +21,43 @@
|
|
|
21
21
|
"package.json"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@streamlayer/sl-eslib": "
|
|
25
|
-
"@streamlayer/feature-gamification": "^0.
|
|
26
|
-
"@streamlayer/sdk-web": "^0.
|
|
27
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.
|
|
28
|
-
"@streamlayer/sdk-web-core": "^0.
|
|
29
|
-
"@streamlayer/sdk-web-features": "^0.
|
|
30
|
-
"@streamlayer/sdk-web-api": "^0.
|
|
31
|
-
"@streamlayer/sdk-web-interfaces": "^0.
|
|
32
|
-
"@streamlayer/sdk-web-notifications": "^0.
|
|
33
|
-
"@streamlayer/sdk-web-storage": "^0.
|
|
34
|
-
"@streamlayer/sdk-web-types": "^0.
|
|
24
|
+
"@streamlayer/sl-eslib": "^5.45.1",
|
|
25
|
+
"@streamlayer/feature-gamification": "^0.14.1",
|
|
26
|
+
"@streamlayer/sdk-web": "^0.26.1",
|
|
27
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.10.1",
|
|
28
|
+
"@streamlayer/sdk-web-core": "^0.11.1",
|
|
29
|
+
"@streamlayer/sdk-web-features": "^0.9.1",
|
|
30
|
+
"@streamlayer/sdk-web-api": "^0.1.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
|
-
"@connectrpc/connect": "^1.1.
|
|
38
|
-
"@connectrpc/connect-web": "^1.1.
|
|
37
|
+
"@connectrpc/connect": "^1.1.3",
|
|
38
|
+
"@connectrpc/connect-web": "^1.1.3",
|
|
39
39
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
40
40
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
41
|
-
"@linaria/babel-preset": "
|
|
42
|
-
"@linaria/core": "
|
|
43
|
-
"@linaria/esbuild": "
|
|
44
|
-
"@linaria/react": "
|
|
45
|
-
"@linaria/vite": "
|
|
41
|
+
"@linaria/babel-preset": "^5.0.3",
|
|
42
|
+
"@linaria/core": "^5.0.2",
|
|
43
|
+
"@linaria/esbuild": "^5.0.3",
|
|
44
|
+
"@linaria/react": "^5.0.3",
|
|
45
|
+
"@linaria/vite": "^5.0.3",
|
|
46
46
|
"@nanostores/react": "^0.7.1",
|
|
47
47
|
"@storybook/addon-styling": "^1.3.7",
|
|
48
48
|
"@storybook/jest": "~0.2.3",
|
|
49
|
-
"@storybook/react": "^7.
|
|
50
|
-
"@storybook/testing-library": "~0.2.
|
|
49
|
+
"@storybook/react": "^7.5.3",
|
|
50
|
+
"@storybook/testing-library": "~0.2.2",
|
|
51
51
|
"esbuild-plugin-babel": "^0.2.3",
|
|
52
52
|
"glob": "^10.3.10",
|
|
53
|
-
"react": "
|
|
53
|
+
"react": "18.2.0",
|
|
54
54
|
"react-auth-code-input": "^3.2.1",
|
|
55
55
|
"react-countdown-circle-timer": "^3.2.1",
|
|
56
|
-
"react-phone-number-input": "^3.3.
|
|
56
|
+
"react-phone-number-input": "^3.3.7",
|
|
57
57
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
58
58
|
"tslib": "^2.6.2",
|
|
59
59
|
"vite": "~4.5.0",
|
|
60
|
-
"vite-plugin-node-polyfills": "^0.
|
|
60
|
+
"vite-plugin-node-polyfills": "^0.16.0",
|
|
61
61
|
"vite-svg-loader": "^4.0.0",
|
|
62
62
|
"vite-tsconfig-paths": "^4.2.1"
|
|
63
63
|
}
|