@streamlayer/react-ui 0.69.0 → 0.69.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CountUpProps } from 'react-countup';
|
|
3
|
-
export declare const AnimatedCounter: React.FC<Omit<CountUpProps, 'end' | 'start'
|
|
3
|
+
export declare const AnimatedCounter: React.FC<Omit<CountUpProps, 'end' | 'start'> & {
|
|
4
4
|
value?: number;
|
|
5
5
|
}>;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const [, t] =
|
|
5
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import p from "react-countup";
|
|
3
|
+
const d = ({ value: n = 0, decimals: o, duration: r = 1, preserveValue: e = !0, ...s }) => {
|
|
4
|
+
const [, t] = n.toString().split("."), i = o ?? ((t == null ? void 0 : t.length) || 0);
|
|
5
|
+
return /* @__PURE__ */ m(
|
|
6
|
+
p,
|
|
7
|
+
{
|
|
8
|
+
end: n,
|
|
9
|
+
...s,
|
|
10
|
+
duration: r,
|
|
11
|
+
decimals: i,
|
|
12
|
+
enableScrollSpy: !1,
|
|
13
|
+
preserveValue: e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
6
16
|
};
|
|
7
17
|
export {
|
|
8
|
-
|
|
18
|
+
d as AnimatedCounter
|
|
9
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { styled as u } from "@linaria/react";
|
|
3
3
|
import { useStore as g } from "@nanostores/react";
|
|
4
4
|
import { useState as y } from "react";
|
|
@@ -27,19 +27,19 @@ const v = () => f, S = /* @__PURE__ */ u(v())({
|
|
|
27
27
|
propsAsIs: !0
|
|
28
28
|
}), L = ({
|
|
29
29
|
hiding: n,
|
|
30
|
-
deepLink:
|
|
30
|
+
deepLink: t,
|
|
31
31
|
onboardingOpts: e,
|
|
32
|
-
setOpened:
|
|
33
|
-
notification:
|
|
34
|
-
gamification:
|
|
32
|
+
setOpened: i,
|
|
33
|
+
notification: r,
|
|
34
|
+
gamification: o
|
|
35
35
|
}) => {
|
|
36
|
-
var
|
|
36
|
+
var p, d, l, c, m, b;
|
|
37
37
|
const {
|
|
38
|
-
data:
|
|
39
|
-
} = g(
|
|
40
|
-
return /* @__PURE__ */
|
|
38
|
+
data: a
|
|
39
|
+
} = g(t.$store);
|
|
40
|
+
return /* @__PURE__ */ s(S, {
|
|
41
41
|
hiding: n,
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ s(w, {
|
|
43
43
|
rules: [{
|
|
44
44
|
label: "Answer as many questions as you like.",
|
|
45
45
|
icon: "icon-btn-feature-groups"
|
|
@@ -50,7 +50,7 @@ const v = () => f, S = /* @__PURE__ */ u(v())({
|
|
|
50
50
|
label: "Top the leader board and best your friends.",
|
|
51
51
|
icon: "icon-trophy"
|
|
52
52
|
}],
|
|
53
|
-
rulesBtnLabel: (
|
|
53
|
+
rulesBtnLabel: (p = e.rules) == null ? void 0 : p.buttonLabel,
|
|
54
54
|
rulesTitle: (d = e.rules) == null ? void 0 : d.heading,
|
|
55
55
|
steps: [{
|
|
56
56
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_01.json",
|
|
@@ -69,13 +69,13 @@ const v = () => f, S = /* @__PURE__ */ u(v())({
|
|
|
69
69
|
headline: "Compete against friends on the leaderboard"
|
|
70
70
|
}],
|
|
71
71
|
primaryColor: (l = e.inviteCard) == null ? void 0 : l.iconColor,
|
|
72
|
-
inviteLink:
|
|
72
|
+
inviteLink: a == null ? void 0 : a.url,
|
|
73
73
|
inviteCardTitle: (c = e.inviteCard) == null ? void 0 : c.heading,
|
|
74
74
|
inviteCardSubtext: (m = e.inviteCard) == null ? void 0 : m.subtext,
|
|
75
75
|
inviteCardBtnLabel: (b = e.inviteCard) == null ? void 0 : b.buttonLabel,
|
|
76
76
|
onClose: () => {
|
|
77
77
|
var h;
|
|
78
|
-
|
|
78
|
+
i(!1), (h = r.close) == null || h.call(r);
|
|
79
79
|
},
|
|
80
80
|
socialLinks: [{
|
|
81
81
|
icon: "icon-facebook",
|
|
@@ -86,30 +86,25 @@ const v = () => f, S = /* @__PURE__ */ u(v())({
|
|
|
86
86
|
link: "https://twitter.com/@TheMasters",
|
|
87
87
|
label: "X"
|
|
88
88
|
}],
|
|
89
|
-
gamification:
|
|
89
|
+
gamification: o
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
}, Q = ({
|
|
93
93
|
sdk: n,
|
|
94
|
-
|
|
95
|
-
notification: e,
|
|
96
|
-
NotificationContainer: p
|
|
94
|
+
notification: t
|
|
97
95
|
}) => {
|
|
98
|
-
const [
|
|
99
|
-
return
|
|
100
|
-
notification:
|
|
96
|
+
const [e, i] = y(!1), r = n.getFeature(k.GAMES), o = t.data.onboarding;
|
|
97
|
+
return e && r && o ? /* @__PURE__ */ s(L, {
|
|
98
|
+
notification: t,
|
|
101
99
|
setOpened: i,
|
|
102
100
|
gamification: r,
|
|
103
|
-
onboardingOpts:
|
|
101
|
+
onboardingOpts: o,
|
|
104
102
|
deepLink: r.deepLink
|
|
105
|
-
}) : /* @__PURE__ */
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
action: () => i(!0),
|
|
111
|
-
onboarding: t
|
|
112
|
-
})
|
|
103
|
+
}) : /* @__PURE__ */ s("div", {
|
|
104
|
+
children: /* @__PURE__ */ s(C, {
|
|
105
|
+
close: t.close,
|
|
106
|
+
action: () => i(!0),
|
|
107
|
+
onboarding: o
|
|
113
108
|
})
|
|
114
109
|
});
|
|
115
110
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { NotificationType as
|
|
5
|
-
import { Notification as
|
|
6
|
-
import { Onboarding as
|
|
7
|
-
import { Container as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as f } from "@nanostores/react";
|
|
3
|
+
import { useState as u, useMemo as s } from "react";
|
|
4
|
+
import { NotificationType as m } from "@streamlayer/sdk-web-notifications";
|
|
5
|
+
import { Notification as n } from "../../gamification/question/notification/index.js";
|
|
6
|
+
import { Onboarding as c } from "./Onboarding/index.js";
|
|
7
|
+
import { Container as l } from "./styles.js";
|
|
8
8
|
import "@streamlayer/sdk-web-types";
|
|
9
9
|
import "../../gamification/constants.js";
|
|
10
10
|
import "../../gamification/question/notification/insight/index.js";
|
|
@@ -39,25 +39,17 @@ import "../../show-in/index.js";
|
|
|
39
39
|
import "@linaria/core";
|
|
40
40
|
import "./Onboarding/Notification/index.js";
|
|
41
41
|
import "./Onboarding/Notification/styles.js";
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
if (!(
|
|
42
|
+
const N = ({ sdk: o, notification: r }) => r.type === m.QUESTION ? /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(n, { ...r }) }) : r.type === m.QUESTION_RESOLVED ? /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(n, { ...r }) }) : r.type === m.ONBOARDING ? /* @__PURE__ */ t(c, { sdk: o, notification: r, hiding: r.hiding }) : null, ir = ({ sdk: o }) => {
|
|
43
|
+
const [r] = u(o.getNotificationsStore()), i = f(r), p = s(() => {
|
|
44
|
+
if (!(i != null && i.size))
|
|
45
45
|
return null;
|
|
46
|
-
for (const
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
49
|
-
return
|
|
50
|
-
}, [
|
|
51
|
-
return
|
|
52
|
-
s,
|
|
53
|
-
{
|
|
54
|
-
NotificationContainer: m,
|
|
55
|
-
sdk: p,
|
|
56
|
-
notification: i,
|
|
57
|
-
hiding: i.hiding
|
|
58
|
-
}
|
|
59
|
-
) : null;
|
|
46
|
+
for (const e of i.values())
|
|
47
|
+
if (e.type === m.ONBOARDING)
|
|
48
|
+
return e;
|
|
49
|
+
return i.values().next().value;
|
|
50
|
+
}, [i]);
|
|
51
|
+
return p ? /* @__PURE__ */ t(l, { hiding: p.hiding, children: /* @__PURE__ */ t(N, { sdk: o, notification: p }) }) : null;
|
|
60
52
|
};
|
|
61
53
|
export {
|
|
62
|
-
|
|
54
|
+
ir as SDKNotifications
|
|
63
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -40,15 +40,16 @@
|
|
|
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/
|
|
44
|
-
"@streamlayer/
|
|
45
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.11.
|
|
43
|
+
"@streamlayer/sdk-web": "^0.28.29",
|
|
44
|
+
"@streamlayer/feature-gamification": "^0.26.7",
|
|
45
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.24",
|
|
46
46
|
"@streamlayer/sdk-web-api": "^0.0.1",
|
|
47
|
-
"@streamlayer/sdk-web-core": "^0.0.
|
|
48
|
-
"@streamlayer/sdk-web-features": "^0.10.
|
|
47
|
+
"@streamlayer/sdk-web-core": "^0.0.4",
|
|
48
|
+
"@streamlayer/sdk-web-features": "^0.10.32",
|
|
49
49
|
"@streamlayer/sdk-web-interfaces": "^0.0.1",
|
|
50
|
-
"@streamlayer/sdk-web-notifications": "^0.13.
|
|
50
|
+
"@streamlayer/sdk-web-notifications": "^0.13.4",
|
|
51
51
|
"@streamlayer/sdk-web-storage": "^0.0.4",
|
|
52
|
+
"@streamlayer/sdk-web-logger": "^0.0.1",
|
|
52
53
|
"@streamlayer/sdk-web-types": "^0.0.1"
|
|
53
54
|
},
|
|
54
55
|
"nx": {
|
|
@@ -89,6 +90,6 @@
|
|
|
89
90
|
"vite-plugin-svgr": "^4.1.0",
|
|
90
91
|
"vite-svg-loader": "^4.0.0",
|
|
91
92
|
"vite-tsconfig-paths": "^4.2.1",
|
|
92
|
-
"@streamlayer/react": "^0.31.
|
|
93
|
+
"@streamlayer/react": "^0.31.6"
|
|
93
94
|
}
|
|
94
95
|
}
|