@streamlayer/react-ui 0.24.3 → 0.25.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/{icon-exit-d3f9fc80.js → icon-exit-6a55bb8f.js} +1 -1
- package/lib/{index-d5620d2c.js → index-7045fbb2.js} +1 -1
- package/lib/index.js +84 -70
- package/lib/ui/demo/Gamification.js +113 -0
- package/lib/{lib → ui}/demo/Highlights.js +9 -5
- package/lib/{lib → ui}/demo/components/Insight.js +1 -1
- package/lib/ui/demo/components/Leaderboard.js +48 -0
- package/lib/{lib → ui}/demo/components/Question.js +2 -2
- package/lib/ui/demo/components/UserSummary.js +23 -0
- package/lib/{lib → ui}/demo/components/index.js +24 -14
- package/lib/{lib → ui}/demo/index.js +51 -39
- package/lib/{lib → ui}/demo/styles.js +1 -1
- package/lib/{lib → ui}/gamification/common-header/index.js +8 -8
- package/lib/{lib → ui}/gamification/detailed-insight/index.js +1 -1
- package/lib/ui/gamification/leaderboard-invite-link/index.js +15 -0
- package/lib/ui/gamification/leaderboard-invite-link/styles.js +59 -0
- package/lib/ui/gamification/leaderboard-item/index.js +18 -0
- package/lib/ui/gamification/leaderboard-item/styles.js +80 -0
- package/lib/ui/gamification/leaderboard-item-detail/index.js +20 -0
- package/lib/ui/gamification/leaderboard-item-detail/styles.js +7 -0
- package/lib/ui/gamification/leaderboard-list/index.js +16 -0
- package/lib/ui/gamification/leaderboard-list/styles.js +18 -0
- package/lib/ui/gamification/navigation/index.js +34 -0
- package/lib/ui/gamification/navigation/styles.js +26 -0
- package/lib/{lib → ui}/gamification/onboarding/index.js +18 -18
- package/lib/{lib → ui}/gamification/user-statistics/index.js +16 -16
- package/lib/{lib → ui}/gamification/user-statistics/styles.js +6 -6
- package/lib/{lib → ui}/gamification/vote/components/voting-header/index.js +1 -1
- package/lib/{lib → ui}/gamification/vote/components/voting-option/index.js +1 -1
- package/lib/{lib → ui}/gamification/vote/index.js +1 -1
- package/lib/{lib → ui}/notifications/decorator.js +1 -1
- package/lib/{lib → ui}/notifications/index.js +1 -1
- package/lib/{lib → ui}/notifications/notification/index.js +1 -1
- package/lib/{lib → ui}/notifications/notification/question-inapp/index.js +8 -8
- package/lib/{lib → ui}/theme/constants.js +3 -2
- package/lib/{lib → ui}/theme/theme.js +4 -2
- package/lib/utils/decorators/container.js +3 -3
- package/package.json +9 -9
- package/lib/lib/demo/Gamification.js +0 -95
- package/lib/lib/demo/components/UserSummary.js +0 -32
- /package/lib/{lib → ui}/demo/Login.js +0 -0
- /package/lib/{lib → ui}/demo/components/EventProvider.js +0 -0
- /package/lib/{lib → ui}/demo/components/Insights.js +0 -0
- /package/lib/{lib → ui}/demo/components/QuestionsList.js +0 -0
- /package/lib/{lib → ui}/gamification/common-header/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/detailed-insight/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/insight/index.js +0 -0
- /package/lib/{lib → ui}/gamification/insight/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/insight-list/index.js +0 -0
- /package/lib/{lib → ui}/gamification/insight-list/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/onboarding/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/question/index.js +0 -0
- /package/lib/{lib → ui}/gamification/question/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/question-list/index.js +0 -0
- /package/lib/{lib → ui}/gamification/question-list/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/user-statistics/components/rank/index.js +0 -0
- /package/lib/{lib → ui}/gamification/user-statistics/components/rank/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/user-statistics/components/statistics/index.js +0 -0
- /package/lib/{lib → ui}/gamification/user-statistics/components/statistics/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/points/index.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/points/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/timer/index.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/timer/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-header/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/components/voting-option/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/styles.js +0 -0
- /package/lib/{lib → ui}/gamification/vote/types.d.js +0 -0
- /package/lib/{lib → ui}/login/index.js +0 -0
- /package/lib/{lib → ui}/login/styles.js +0 -0
- /package/lib/{lib → ui}/notifications/notification/onboarding-inapp/index.js +0 -0
- /package/lib/{lib → ui}/notifications/notification/onboarding-inapp/styles.js +0 -0
- /package/lib/{lib → ui}/notifications/notification/question-inapp/styles.js +0 -0
- /package/lib/{lib → ui}/notifications/notification/styles.js +0 -0
- /package/lib/{lib → ui}/notifications/styles.js +0 -0
- /package/lib/{lib → ui}/theme/index.js +0 -0
- /package/lib/{lib → ui}/user-account/index.js +0 -0
- /package/lib/{lib → ui}/user-account/styles.js +0 -0
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { FeatureStatus as
|
|
3
|
-
import { FeatureType as
|
|
4
|
-
import { AvailableFeatures as
|
|
5
|
-
import { useState as b, useMemo as
|
|
1
|
+
import { jsx as i, jsxs as f, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { FeatureStatus as l } from "@streamlayer/sdk-web-interfaces";
|
|
3
|
+
import { FeatureType as g } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { AvailableFeatures as S } from "@streamlayer/sdk-web-features";
|
|
5
|
+
import { useState as b, useMemo as h, useEffect as C } from "react";
|
|
6
6
|
import { useStore as c } from "@nanostores/react";
|
|
7
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 G } from "./Highlights.js";
|
|
10
|
+
import { LoginComponent as H } from "./Login.js";
|
|
11
|
+
import { Buttons as x, Button as s } 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";
|
|
15
15
|
import "../notifications/notification/onboarding-inapp/styles.js";
|
|
16
16
|
import "@linaria/react";
|
|
17
17
|
import "../notifications/notification/question-inapp/index.js";
|
|
18
|
-
import "../../icon-exit-
|
|
18
|
+
import "../../icon-exit-6a55bb8f.js";
|
|
19
19
|
import "../notifications/notification/question-inapp/styles.js";
|
|
20
20
|
import "../notifications/notification/styles.js";
|
|
21
21
|
import "../notifications/styles.js";
|
|
22
|
+
import "../gamification/navigation/index.js";
|
|
23
|
+
import "../gamification/navigation/styles.js";
|
|
22
24
|
import "./components/UserSummary.js";
|
|
23
25
|
import "../gamification/user-statistics/index.js";
|
|
24
26
|
import "../../utils/common.js";
|
|
@@ -35,7 +37,7 @@ import "../gamification/question/styles.js";
|
|
|
35
37
|
import "../gamification/question-list/styles.js";
|
|
36
38
|
import "./components/Question.js";
|
|
37
39
|
import "../gamification/vote/index.js";
|
|
38
|
-
import "../../index-
|
|
40
|
+
import "../../index-7045fbb2.js";
|
|
39
41
|
import "../gamification/vote/components/voting-option/styles.js";
|
|
40
42
|
import "../gamification/vote/styles.js";
|
|
41
43
|
import "../gamification/vote/components/voting-header/index.js";
|
|
@@ -58,12 +60,21 @@ import "../gamification/insight/styles.js";
|
|
|
58
60
|
import "../gamification/insight-list/styles.js";
|
|
59
61
|
import "../gamification/common-header/styles.js";
|
|
60
62
|
import "../gamification/detailed-insight/styles.js";
|
|
63
|
+
import "./components/Leaderboard.js";
|
|
64
|
+
import "../gamification/leaderboard-item-detail/index.js";
|
|
65
|
+
import "../gamification/common-header/index.js";
|
|
66
|
+
import "../gamification/leaderboard-item-detail/styles.js";
|
|
67
|
+
import "../gamification/leaderboard-list/index.js";
|
|
68
|
+
import "../gamification/leaderboard-invite-link/index.js";
|
|
69
|
+
import "../gamification/leaderboard-invite-link/styles.js";
|
|
70
|
+
import "../gamification/leaderboard-item/index.js";
|
|
71
|
+
import "../gamification/leaderboard-item/styles.js";
|
|
72
|
+
import "../gamification/leaderboard-list/styles.js";
|
|
61
73
|
import "./components/Insights.js";
|
|
62
74
|
import "../gamification/insight-list/index.js";
|
|
63
75
|
import "../gamification/insight/index.js";
|
|
64
76
|
import "./components/Insight.js";
|
|
65
77
|
import "../gamification/detailed-insight/index.js";
|
|
66
|
-
import "../gamification/common-header/index.js";
|
|
67
78
|
import "../login/index.js";
|
|
68
79
|
import "react-phone-number-input";
|
|
69
80
|
import "react-auth-code-input";
|
|
@@ -72,37 +83,38 @@ import "@connectrpc/connect-web";
|
|
|
72
83
|
import "@connectrpc/connect";
|
|
73
84
|
import "@streamlayer/sl-eslib/users/users_connect";
|
|
74
85
|
import "../login/styles.js";
|
|
75
|
-
const
|
|
76
|
-
const [e,
|
|
86
|
+
const A = ({ activeFeature: r, sdk: o }) => {
|
|
87
|
+
const [e, n] = b(null), { organizationSettings: a, streamSettings: u } = c(o.sdkStore), y = h(() => {
|
|
77
88
|
const t = (u == null ? void 0 : u.data) || (a == null ? void 0 : a.data);
|
|
78
89
|
return t != null && t.overlays ? t.overlays : [];
|
|
79
90
|
}, [a, u]);
|
|
80
91
|
C(() => {
|
|
81
|
-
const t =
|
|
82
|
-
if (
|
|
83
|
-
for (const [m,
|
|
84
|
-
m ===
|
|
92
|
+
const t = o.getFeatures();
|
|
93
|
+
if (r)
|
|
94
|
+
for (const [m, p] of t)
|
|
95
|
+
m === r ? p.status.get() === l.Suspended && (p.enable(), n(p)) : p.status.get() === l.Ready && p.disable();
|
|
85
96
|
else {
|
|
86
97
|
for (const [, m] of t)
|
|
87
|
-
m.status.get() ===
|
|
88
|
-
|
|
98
|
+
m.status.get() === l.Ready && m.disable();
|
|
99
|
+
n(null);
|
|
89
100
|
}
|
|
90
101
|
return () => {
|
|
91
102
|
for (const [, m] of t)
|
|
92
|
-
m.status.get() ===
|
|
103
|
+
m.status.get() === l.Ready && m.disable();
|
|
93
104
|
};
|
|
94
|
-
}, [
|
|
95
|
-
const
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */ i(
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
}, [r, o]);
|
|
106
|
+
const d = h(() => e ? e.featureConfig.get().type === g.GAMES ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(w, { gamification: e, sdk: o }) }) : /* @__PURE__ */ i("div", { children: "wait gamification..." }) : e.featureConfig.get().type === g.HIGHLIGHTS ? e ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(G, { highlights: e, sdk: o }) }) : /* @__PURE__ */ i("div", { children: "wait highlights..." }) : /* @__PURE__ */ i("div", { children: "unknown feature" }) : null, [o, e]);
|
|
107
|
+
return /* @__PURE__ */ f("div", { children: [
|
|
108
|
+
/* @__PURE__ */ f(x, { children: [
|
|
109
|
+
/* @__PURE__ */ i(s, { onClick: () => o.closeFeature(), disabled: !d, children: "close" }),
|
|
110
|
+
/* @__PURE__ */ i(s, { onClick: () => o.logout(), children: "logout" }),
|
|
111
|
+
y.map((t) => /* @__PURE__ */ f(
|
|
112
|
+
s,
|
|
101
113
|
{
|
|
102
|
-
onClick: () =>
|
|
103
|
-
disabled: !(t.type in
|
|
104
|
-
"data-
|
|
105
|
-
"data-selected": t.type ===
|
|
114
|
+
onClick: () => o.openFeature(t.type),
|
|
115
|
+
disabled: !(t.type in S),
|
|
116
|
+
"data-enable_sdk_button": t.enableSdkButton.toString(),
|
|
117
|
+
"data-selected": t.type === r,
|
|
106
118
|
children: [
|
|
107
119
|
/* @__PURE__ */ i("img", { src: t.icon, alt: "" }),
|
|
108
120
|
t.name
|
|
@@ -111,15 +123,15 @@ const x = ({ activeFeature: o, sdk: r }) => {
|
|
|
111
123
|
t.name
|
|
112
124
|
))
|
|
113
125
|
] }),
|
|
114
|
-
|
|
126
|
+
d
|
|
115
127
|
] });
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
/* @__PURE__ */ i(F, { notificationsStore:
|
|
120
|
-
/* @__PURE__ */ i(
|
|
121
|
-
] }) : /* @__PURE__ */ i(
|
|
128
|
+
}, mi = ({ sdk: r }) => {
|
|
129
|
+
const o = c(r.organizationStore()), e = c(r.getUserStore()), n = c(r.getActiveFeature());
|
|
130
|
+
return o.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : o.data ? e.loading ? /* @__PURE__ */ i("div", { children: "authentication..." }) : e.data ? /* @__PURE__ */ f(v, { children: [
|
|
131
|
+
/* @__PURE__ */ i(F, { notificationsStore: r.getNotificationsStore() }),
|
|
132
|
+
/* @__PURE__ */ i(A, { sdk: r, activeFeature: n })
|
|
133
|
+
] }) : /* @__PURE__ */ i(H, { sdk: r }) : /* @__PURE__ */ i("div", { children: "wrong sdk key..." });
|
|
122
134
|
};
|
|
123
135
|
export {
|
|
124
|
-
|
|
136
|
+
mi as Demo
|
|
125
137
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { Container as
|
|
1
|
+
import { jsxs as I, jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { i } from "../../../icon-exit-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uMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==", E = ({ icon: N, comeBack: D, close: j }) => /* @__PURE__ */ I(A, { children: [
|
|
6
|
+
/* @__PURE__ */ I("div", { children: [
|
|
7
7
|
D && /* @__PURE__ */ M(g, { onClick: D, children: /* @__PURE__ */ M("img", { alt: "header-back-icon", src: x }) }),
|
|
8
|
-
N && /* @__PURE__ */ M(
|
|
8
|
+
N && /* @__PURE__ */ M(z, { alt: "header-icon", src: N })
|
|
9
9
|
] }),
|
|
10
|
-
/* @__PURE__ */ M("div", { children:
|
|
10
|
+
/* @__PURE__ */ M("div", { children: j && /* @__PURE__ */ M(g, { onClick: j, children: /* @__PURE__ */ M("img", { alt: "header-close-icon", src: i }) }) })
|
|
11
11
|
] });
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
E as CommonHeader
|
|
14
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as I, jsx as M } from "react/jsx-runtime";
|
|
2
2
|
import { CommonHeader as Z } from "../common-header/index.js";
|
|
3
3
|
import { Container as g, Image as l, AdditionalContent as o, Title as n, Description as d, AdditionalBtn as r, LinkIcon as a } from "./styles.js";
|
|
4
|
-
import "../../../icon-exit-
|
|
4
|
+
import "../../../icon-exit-6a55bb8f.js";
|
|
5
5
|
import "../common-header/styles.js";
|
|
6
6
|
import "@linaria/react";
|
|
7
7
|
const u = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=", C = ({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as N, jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { Container as j, IconLink as T, FriendsIcon as A, Content as x, Title as y, Description as z, ArrowInviteIcon as E } from "./styles.js";
|
|
3
|
+
import "@linaria/react";
|
|
4
|
+
const L = "data:image/svg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{ onClick: g, children: [
|
|
5
|
+
/* @__PURE__ */ M(T, { alt: "icon-link", src: L }),
|
|
6
|
+
/* @__PURE__ */ M(A, { alt: "friends-icon", src: i }),
|
|
7
|
+
/* @__PURE__ */ N(x, { children: [
|
|
8
|
+
/* @__PURE__ */ M(y, { children: I }),
|
|
9
|
+
/* @__PURE__ */ M(z, { children: D })
|
|
10
|
+
] }),
|
|
11
|
+
/* @__PURE__ */ M(E, { alt: "arrow-invite-icon", src: u })
|
|
12
|
+
] });
|
|
13
|
+
export {
|
|
14
|
+
c as LeaderboardInviteLink
|
|
15
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { styled as i } from "@linaria/react";
|
|
2
|
+
const e = i.div`
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 4px 16px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 58px;
|
|
10
|
+
min-height: 58px;
|
|
11
|
+
max-height: 58px;
|
|
12
|
+
background-color: var(--color-blue-primary);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
`, t = i.img`
|
|
16
|
+
width: 16px;
|
|
17
|
+
height: 16px;
|
|
18
|
+
margin-right: 8px;
|
|
19
|
+
`, r = i.img`
|
|
20
|
+
width: 32px;
|
|
21
|
+
height: 32px;
|
|
22
|
+
margin-right: 4px;
|
|
23
|
+
`, n = i.div`
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
margin-right: 4px;
|
|
30
|
+
padding: 0px 4px;
|
|
31
|
+
`, p = i.div`
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
font-size: 10px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
color: var(--color-leaderboard-unit);
|
|
37
|
+
margin-bottom: 2px;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
`, d = i.div`
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
color: var(--color-white);
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
text-overflow: ellipsis;
|
|
47
|
+
`, x = i.img`
|
|
48
|
+
width: 18px;
|
|
49
|
+
height: 18px;
|
|
50
|
+
`;
|
|
51
|
+
export {
|
|
52
|
+
x as ArrowInviteIcon,
|
|
53
|
+
e as Container,
|
|
54
|
+
n as Content,
|
|
55
|
+
d as Description,
|
|
56
|
+
r as FriendsIcon,
|
|
57
|
+
t as IconLink,
|
|
58
|
+
p as Title
|
|
59
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { abbreviate as d } from "../../../utils/common.js";
|
|
3
|
+
import { Container as l, RankPosition as c, Avatar as m, AvatarPlaceholder as h, Content as s, NameWrap as p, Name as b, Rank as f, Units as k } from "./styles.js";
|
|
4
|
+
import "@linaria/react";
|
|
5
|
+
const j = ({ rank: t, avatar: i, name: n, points: a, openItemDetail: o }) => /* @__PURE__ */ e(l, { onClick: o, children: [
|
|
6
|
+
/* @__PURE__ */ r(c, { children: t || 0 }),
|
|
7
|
+
i ? /* @__PURE__ */ r(m, { alt: "leaderboard-item-avatar", src: i }) : /* @__PURE__ */ r(h, { children: d(n || "") }),
|
|
8
|
+
/* @__PURE__ */ e(s, { children: [
|
|
9
|
+
/* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(b, { children: n || "" }) }),
|
|
10
|
+
/* @__PURE__ */ e(f, { children: [
|
|
11
|
+
/* @__PURE__ */ r(k, { children: "PTS" }),
|
|
12
|
+
a || 0
|
|
13
|
+
] })
|
|
14
|
+
] })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
j as LeaderboardItem
|
|
18
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { styled as e } from "@linaria/react";
|
|
2
|
+
const t = e.div`
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 8px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-height: 50px;
|
|
10
|
+
max-height: 50px;
|
|
11
|
+
background-color: var(--color-bg-transparent-item-vote);
|
|
12
|
+
color: var(--color-white);
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
`, r = e.div`
|
|
18
|
+
width: 28px;
|
|
19
|
+
max-width: 28px;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
margin-right: 4px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
`, n = e.img`
|
|
26
|
+
width: 32px;
|
|
27
|
+
height: 32px;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
`, o = e.div`
|
|
30
|
+
background: var(--color-grey-primary-onboarding-inapp);
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
width: 32px;
|
|
33
|
+
height: 32px;
|
|
34
|
+
text-align: center;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
color: var(--color-white);
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
`, a = e.div`
|
|
43
|
+
flex: 1;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
align-items: center;
|
|
47
|
+
padding: 4px 4px 4px 0px;
|
|
48
|
+
margin-right: 4px;
|
|
49
|
+
margin-left: 8px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
`, p = e.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
flex: 1;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
`, d = e.span`
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
margin-right: 4px;
|
|
61
|
+
`, s = e.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
max-width: 75px;
|
|
65
|
+
`, l = e.span`
|
|
66
|
+
font-size: 10px;
|
|
67
|
+
color: var(--color-leaderboard-unit);
|
|
68
|
+
margin-right: 4px;
|
|
69
|
+
`;
|
|
70
|
+
export {
|
|
71
|
+
n as Avatar,
|
|
72
|
+
o as AvatarPlaceholder,
|
|
73
|
+
t as Container,
|
|
74
|
+
a as Content,
|
|
75
|
+
d as Name,
|
|
76
|
+
p as NameWrap,
|
|
77
|
+
s as Rank,
|
|
78
|
+
r as RankPosition,
|
|
79
|
+
l as Units
|
|
80
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { CommonHeader as i } from "../common-header/index.js";
|
|
3
|
+
import { UserStatistics as p } from "../user-statistics/index.js";
|
|
4
|
+
import { Container as e } from "./styles.js";
|
|
5
|
+
import "../../../icon-exit-6a55bb8f.js";
|
|
6
|
+
import "../common-header/styles.js";
|
|
7
|
+
import "@linaria/react";
|
|
8
|
+
import "../../../utils/common.js";
|
|
9
|
+
import "../user-statistics/components/statistics/index.js";
|
|
10
|
+
import "../user-statistics/components/statistics/styles.js";
|
|
11
|
+
import "../user-statistics/components/rank/index.js";
|
|
12
|
+
import "../user-statistics/components/rank/styles.js";
|
|
13
|
+
import "../user-statistics/styles.js";
|
|
14
|
+
const D = ({ comeBack: o, ...t }) => /* @__PURE__ */ m(e, { children: [
|
|
15
|
+
/* @__PURE__ */ r(i, { comeBack: o }),
|
|
16
|
+
/* @__PURE__ */ r(p, { ...t })
|
|
17
|
+
] });
|
|
18
|
+
export {
|
|
19
|
+
D as LeaderboardItemDetail
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { LeaderboardInviteLink as n } from "../leaderboard-invite-link/index.js";
|
|
3
|
+
import { LeaderboardItem as m } from "../leaderboard-item/index.js";
|
|
4
|
+
import { Container as p } from "./styles.js";
|
|
5
|
+
import "../leaderboard-invite-link/styles.js";
|
|
6
|
+
import "@linaria/react";
|
|
7
|
+
import "../../../utils/common.js";
|
|
8
|
+
import "../leaderboard-item/styles.js";
|
|
9
|
+
const b = ({ items: o, openItemDetail: i }) => /* @__PURE__ */ t(p, { children: [
|
|
10
|
+
o.map((r) => /* @__PURE__ */ e(m, { ...r, openItemDetail: () => i(r.userId) }, r.userId)),
|
|
11
|
+
/* @__PURE__ */ e(n, { title: "Invite Link", description: "Challenge friends!", onClick: () => {
|
|
12
|
+
} })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
b as LeaderboardList
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { styled as o } from "@linaria/react";
|
|
2
|
+
const t = o.div`
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
max-height: 100%;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 12px 0px;
|
|
11
|
+
|
|
12
|
+
& > div {
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
t as Container
|
|
18
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Container as n, PageTitle as l } from "./styles.js";
|
|
3
|
+
import "@linaria/react";
|
|
4
|
+
var m = /* @__PURE__ */ ((r) => (r.HOME = "home", r.LEADERBOARD = "leaderboard", r))(m || {});
|
|
5
|
+
const p = ({ activePage: r = "home", toggleActivePage: o }) => /* @__PURE__ */ d(n, { children: [
|
|
6
|
+
/* @__PURE__ */ e(
|
|
7
|
+
l,
|
|
8
|
+
{
|
|
9
|
+
style: { borderBottom: r === "home" ? "2px solid var(--color-blue-primary)" : "none" },
|
|
10
|
+
onClick: () => o(
|
|
11
|
+
"home"
|
|
12
|
+
/* HOME */
|
|
13
|
+
),
|
|
14
|
+
children: "Home"
|
|
15
|
+
}
|
|
16
|
+
),
|
|
17
|
+
/* @__PURE__ */ e(
|
|
18
|
+
l,
|
|
19
|
+
{
|
|
20
|
+
style: {
|
|
21
|
+
borderBottom: r === "leaderboard" ? "2px solid var(--color-blue-primary)" : "none"
|
|
22
|
+
},
|
|
23
|
+
onClick: () => o(
|
|
24
|
+
"leaderboard"
|
|
25
|
+
/* LEADERBOARD */
|
|
26
|
+
),
|
|
27
|
+
children: "Leader Board"
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
] });
|
|
31
|
+
export {
|
|
32
|
+
m as ActivePages,
|
|
33
|
+
p as Navigation
|
|
34
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { styled as e } from "@linaria/react";
|
|
2
|
+
const o = e.div`
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
color: var(--color-white);
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
margin-bottom: 12px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
`, i = e.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
width: 49%;
|
|
21
|
+
padding: 4px;
|
|
22
|
+
`;
|
|
23
|
+
export {
|
|
24
|
+
o as Container,
|
|
25
|
+
i as PageTitle
|
|
26
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useEffect as B, useCallback as w } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { Container as N, OnboardingHeader as T, LeftBlock as j, GameIcon as p, RightBlock as
|
|
3
|
+
import { i as D } from "../../../icon-exit-6a55bb8f.js";
|
|
4
|
+
import { Container as N, OnboardingHeader as T, LeftBlock as j, GameIcon as p, RightBlock as E, SponsorLogo as G, CloseBtn as R, IconClose as A, Content as H, OnboardingActionBtn as L } from "./styles.js";
|
|
5
5
|
import { OnboardingInstructions as P } from "./components/onboarding-slides/onboarding-instructions/index.js";
|
|
6
6
|
import { OnboardingRules as q } from "./components/onboarding-slides/onboarding-rules/index.js";
|
|
7
7
|
import { OnboardingInviteCard as z } from "./components/onboarding-slides/onboarding-invite-card/index.js";
|
|
@@ -27,29 +27,29 @@ const e = {
|
|
|
27
27
|
inviteCardSubtext: S,
|
|
28
28
|
inviteCardBtnLabel: y
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
30
|
+
const O = async () => {
|
|
31
31
|
await f.submitInplay();
|
|
32
|
-
},
|
|
32
|
+
}, k = () => {
|
|
33
33
|
b();
|
|
34
|
-
}, [a, h] = g(0), [o,
|
|
34
|
+
}, [a, h] = g(0), [o, r] = g(e);
|
|
35
35
|
B(() => {
|
|
36
|
-
n != null && n.length ?
|
|
36
|
+
n != null && n.length ? r({ ...e, steps: !0 }) : i != null && i.length ? r({ ...e, rules: !0 }) : r({ ...e, inviteCard: !0 });
|
|
37
37
|
}, []);
|
|
38
|
-
const
|
|
39
|
-
n != null && n.length && a < n.length - 1 ? h((
|
|
40
|
-
}, [a, n == null ? void 0 : n.length, i == null ? void 0 : i.length, o, h,
|
|
38
|
+
const x = w(() => {
|
|
39
|
+
n != null && n.length && a < n.length - 1 ? h((I) => ++I) : i != null && i.length && o.steps ? r({ ...e, rules: !0 }) : o.rules && r({ ...e, inviteCard: !0 });
|
|
40
|
+
}, [a, n == null ? void 0 : n.length, i == null ? void 0 : i.length, o, h, r]);
|
|
41
41
|
return /* @__PURE__ */ l(N, { children: [
|
|
42
42
|
/* @__PURE__ */ l(T, { children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ l(
|
|
45
|
-
d && /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ t(j, { children: c && /* @__PURE__ */ t(p, { alt: "sponsor-one-onboarding-icon", src: c }) }),
|
|
44
|
+
/* @__PURE__ */ l(E, { children: [
|
|
45
|
+
d && /* @__PURE__ */ t(G, { alt: "sponsor-two-onboarding-icon", src: d }),
|
|
46
|
+
/* @__PURE__ */ t(R, { onClick: k, children: /* @__PURE__ */ t(A, { alt: "icon-close-onboarding", src: D }) })
|
|
47
47
|
] })
|
|
48
48
|
] }),
|
|
49
49
|
/* @__PURE__ */ l(H, { children: [
|
|
50
|
-
o.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */
|
|
51
|
-
o.rules && /* @__PURE__ */
|
|
52
|
-
o.inviteCard && /* @__PURE__ */
|
|
50
|
+
o.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */ t(P, { graphic: n[a].graphic, headline: n[a].headline }),
|
|
51
|
+
o.rules && /* @__PURE__ */ t(q, { rules: i, rulesTitle: u, primaryColor: m }),
|
|
52
|
+
o.inviteCard && /* @__PURE__ */ t(
|
|
53
53
|
z,
|
|
54
54
|
{
|
|
55
55
|
inviteCardTitle: v,
|
|
@@ -58,7 +58,7 @@ const e = {
|
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ t(L, { onClick: o.inviteCard ? O : x, children: o.rules ? C || "Got it!" : o.inviteCard ? y || "Play now!" : "Next" })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
@@ -10,46 +10,46 @@ const a = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXd
|
|
|
10
10
|
avatar: j,
|
|
11
11
|
name: I,
|
|
12
12
|
points: g,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
friendsRank: T,
|
|
14
|
+
rank: z,
|
|
15
|
+
streak: O,
|
|
16
|
+
correct: i,
|
|
17
|
+
incorrect: u,
|
|
18
|
+
inTop: L,
|
|
19
|
+
average: y
|
|
20
20
|
}) => /* @__PURE__ */ N(x, { children: [
|
|
21
21
|
/* @__PURE__ */ N(U, { children: [
|
|
22
22
|
/* @__PURE__ */ N(w, { children: [
|
|
23
23
|
/* @__PURE__ */ N(k, { children: [
|
|
24
24
|
j && /* @__PURE__ */ M(r, { alt: "avatar", src: j }),
|
|
25
|
-
!j && /* @__PURE__ */ M(E, { children: c(I) })
|
|
25
|
+
!j && /* @__PURE__ */ M(E, { children: c(I || "") })
|
|
26
26
|
] }),
|
|
27
27
|
/* @__PURE__ */ N(Q, { children: [
|
|
28
28
|
/* @__PURE__ */ M(S, { children: I }),
|
|
29
29
|
/* @__PURE__ */ N(t, { children: [
|
|
30
30
|
/* @__PURE__ */ M(C, { alt: "rank-icon", src: a }),
|
|
31
31
|
/* @__PURE__ */ N(Y, { children: [
|
|
32
|
-
/* @__PURE__ */ M(o, { children: g
|
|
32
|
+
/* @__PURE__ */ M(o, { children: g }),
|
|
33
33
|
"RTS"
|
|
34
34
|
] }),
|
|
35
35
|
/* @__PURE__ */ N(n, { children: [
|
|
36
36
|
"TOP ",
|
|
37
|
-
|
|
37
|
+
L || 0,
|
|
38
38
|
"%"
|
|
39
39
|
] })
|
|
40
40
|
] })
|
|
41
41
|
] })
|
|
42
42
|
] }),
|
|
43
43
|
/* @__PURE__ */ N(e, { children: [
|
|
44
|
-
/* @__PURE__ */ M(A, { title: "Friends rank", indicator:
|
|
45
|
-
/* @__PURE__ */ M(A, { title: "Global rank", indicator:
|
|
44
|
+
/* @__PURE__ */ M(A, { title: "Friends rank", indicator: T || 0 }),
|
|
45
|
+
/* @__PURE__ */ M(A, { title: "Global rank", indicator: z || 0 })
|
|
46
46
|
] })
|
|
47
47
|
] }),
|
|
48
48
|
/* @__PURE__ */ N(l, { children: [
|
|
49
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
50
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
51
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
52
|
-
/* @__PURE__ */ M(D, { indicator: `${y ||
|
|
49
|
+
/* @__PURE__ */ M(D, { indicator: O || 0, title: "Win streak" }),
|
|
50
|
+
/* @__PURE__ */ M(D, { indicator: i || 0, title: "Correct" }),
|
|
51
|
+
/* @__PURE__ */ M(D, { indicator: u || 0, title: "Incorrect" }),
|
|
52
|
+
/* @__PURE__ */ M(D, { indicator: `${y || 0}%`, title: "Success rate" })
|
|
53
53
|
] })
|
|
54
54
|
] });
|
|
55
55
|
export {
|