@streamlayer/react-ui 0.27.3 → 0.28.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/fedex-a8dcc7b2.js +4 -0
- package/lib/index.js +44 -40
- package/lib/ui/app/Features/FeatureProvider.js +14 -0
- package/lib/ui/app/Features/Gamification/Leaderboard.js +48 -0
- package/lib/ui/app/Features/Gamification/Question.js +102 -0
- package/lib/ui/app/Features/Gamification/QuestionsList.js +16 -0
- package/lib/ui/app/Features/Gamification/Tabs.js +47 -0
- package/lib/ui/app/Features/Gamification/UserSummary.js +17 -0
- package/lib/ui/app/Features/Gamification/index.js +67 -0
- package/lib/ui/app/Features/Highlights/Insight.js +31 -0
- package/lib/ui/app/Features/Highlights/Insights.js +16 -0
- package/lib/ui/app/Features/Highlights/index.js +33 -0
- package/lib/ui/app/Features/index.js +64 -0
- package/lib/ui/app/Navigation/index.js +31 -0
- package/lib/ui/app/Notifications/index.js +18 -0
- package/lib/ui/app/index.js +91 -0
- package/lib/ui/app/styles.js +8 -0
- package/lib/ui/app/useSdkFeature.js +24 -0
- package/lib/ui/demo/DemoPoints.js +14 -14
- package/lib/ui/demo/Gamification.js +10 -9
- package/lib/ui/demo/Highlights.js +8 -7
- package/lib/ui/demo/Login.js +8 -7
- package/lib/ui/demo/components/Leaderboard.js +2 -2
- package/lib/ui/demo/components/Question.js +52 -51
- package/lib/ui/demo/components/UserSummary.js +4 -10
- package/lib/ui/demo/components/index.js +23 -22
- package/lib/ui/demo/index.js +65 -53
- package/lib/ui/gamification/leaderboard-invite-link/index.js +4 -4
- package/lib/ui/gamification/leaderboard-item-detail/index.js +2 -2
- package/lib/ui/gamification/onboarding/index.js +17 -17
- package/lib/ui/gamification/points/styles.js +2 -3
- package/lib/ui/gamification/question/index.js +6 -6
- package/lib/ui/gamification/user-statistics/index.js +3 -3
- package/lib/ui/gamification/vote/components/voting-header/index.js +6 -6
- package/lib/ui/gamification/vote/index.js +5 -5
- package/lib/ui/icons/index.js +27 -27
- package/lib/ui/login/index.js +15 -15
- package/lib/ui/navigation/index.js +13 -0
- package/lib/ui/navigation/styles.js +46 -0
- package/lib/ui/notifications/decorator.js +6 -6
- package/lib/ui/notifications/index.js +1 -1
- package/lib/ui/notifications/notification/index.js +1 -1
- package/lib/utils/components/developer.js +18 -18
- package/lib/utils/components/envToggle.js +1 -1
- package/lib/utils/components/eventInput.js +12 -12
- package/lib/utils/components/sdkKey.js +10 -3
- package/lib/utils/createDemo.js +37 -24
- package/lib/utils/decorators/styles.js +3 -7
- package/lib/utils/login.js +8 -8
- package/lib/utils/useStreamLayerApp.js +5 -5
- package/package.json +6 -6
- package/lib/module.d.js +0 -1
package/lib/utils/createDemo.js
CHANGED
|
@@ -1,40 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Developer as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as S, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as d, useState as m, useEffect as y } from "react";
|
|
3
|
+
import { anonymous as E } from "@streamlayer/sdk-web-anonymous-auth";
|
|
4
|
+
import { Developer as l } from "./components/developer.js";
|
|
5
|
+
import { DeveloperStorage as D } from "./storage.js";
|
|
6
|
+
import { useStreamLayerApp as w } from "./useStreamLayerApp.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
|
+
import "./components/bypassLogin.js";
|
|
9
|
+
import "./components/envToggle.js";
|
|
8
10
|
import "./components/eventInput.js";
|
|
9
|
-
import "@streamlayer/sdk-web-core";
|
|
10
11
|
import "@nanostores/react";
|
|
12
|
+
import "@streamlayer/sdk-web-core";
|
|
11
13
|
import "./components/styles.js";
|
|
12
|
-
import "./components/bypassLogin.js";
|
|
13
14
|
import "./components/sdkKey.js";
|
|
14
|
-
import "./components/envToggle.js";
|
|
15
|
-
import "@streamlayer/sdk-web";
|
|
16
15
|
import "@streamlayer/sdk-web-storage";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
import "@streamlayer/sdk-web";
|
|
17
|
+
function x({
|
|
18
|
+
Component: o,
|
|
19
|
+
Story: r,
|
|
20
|
+
args: u
|
|
21
21
|
}) {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
}, []),
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const n = d(() => new D(), []), [i, a] = m(n.getEnv()), [p, f] = m(n.getSdkKey() || "set-sdk-key"), [s, v] = m(n.getEvent() || ""), k = d(() => {
|
|
23
|
+
const c = /* @__PURE__ */ new Set();
|
|
24
|
+
return c.add(E), c;
|
|
25
|
+
}, []), t = w(p, k, i === "production");
|
|
26
|
+
return y(() => {
|
|
27
|
+
s && t && t.createEventSession(s);
|
|
28
|
+
}, [t]), /* @__PURE__ */ S(g, { children: [
|
|
29
|
+
t ? /* @__PURE__ */ e(o, { Story: r, sdk: t, args: u }) : /* @__PURE__ */ e("div", { children: "wait sdk..." }),
|
|
30
|
+
/* @__PURE__ */ e(
|
|
31
|
+
l,
|
|
32
|
+
{
|
|
33
|
+
sdk: t,
|
|
34
|
+
sdkKey: p,
|
|
35
|
+
setSdkKey: f,
|
|
36
|
+
env: i,
|
|
37
|
+
setEnv: a,
|
|
38
|
+
event: s,
|
|
39
|
+
setEvent: v
|
|
40
|
+
}
|
|
41
|
+
)
|
|
29
42
|
] });
|
|
30
43
|
}
|
|
31
|
-
function
|
|
44
|
+
function N(o) {
|
|
32
45
|
return {
|
|
33
46
|
decorators: [
|
|
34
|
-
(
|
|
47
|
+
(r) => /* @__PURE__ */ e(x, { Story: r, Component: o })
|
|
35
48
|
]
|
|
36
49
|
};
|
|
37
50
|
}
|
|
38
51
|
export {
|
|
39
|
-
|
|
52
|
+
N as createDemo
|
|
40
53
|
};
|