@stokr/components-library 3.0.21 → 3.0.22
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/README.md +467 -261
- package/dist/analytics/index.js +5 -1
- package/dist/api/authenticationApi.js +13 -0
- package/dist/auth/index.js +4 -2
- package/dist/components/2FA/login-with-otp-flow.js +9 -4
- package/dist/components/Footer/FooterLayout.js +98 -95
- package/dist/components/Footer/FooterMenu.js +1 -1
- package/dist/components/Header/Header.js +102 -54
- package/dist/components/MainMenu/MainMenu.js +14 -4
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +6 -2
- package/dist/components/Payment/PaymentDetailsCard.js +1 -1
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +2 -1
- package/dist/components/headerHo/HeaderHo.js +8 -5
- package/dist/components/icons/LinkIcon.js +2 -2
- package/dist/config.js +5 -21
- package/dist/constants/globalVariables.js +6 -4
- package/dist/context/Auth.js +5 -2
- package/dist/context/AuthContext.js +22 -8
- package/dist/firebase-config.js +4 -18
- package/dist/index.js +36 -5
- package/dist/model/axios.js +3 -1
- package/dist/model/axiosPublic.js +2 -2
- package/dist/routing/RouterWrapper.js +17 -0
- package/dist/routing/app-routes.js +22 -0
- package/dist/routing/navigate-app.js +36 -0
- package/dist/routing/resolve-app-href.js +149 -0
- package/dist/runtime-config.js +94 -0
- package/dist/static/country-list.json +251 -251
- package/dist/static/fonts/Ionicons/ionicons.min.css +2810 -2810
- package/dist/static/fonts/Ionicons/ionicons.min.css.js +1 -1
- package/dist/static/fonts/icomoon/selection.json +910 -910
- package/dist/static/fonts/icomoon/style.css +139 -139
- package/dist/static/images/copy_icon.svg +4 -4
- package/dist/static/images/download_icon.svg +3 -3
- package/dist/static/images/numbers/number_eight.svg +3 -3
- package/dist/static/images/numbers/number_five.svg +4 -4
- package/dist/static/images/numbers/number_four.svg +3 -3
- package/dist/static/images/numbers/number_nine.svg +4 -4
- package/dist/static/images/numbers/number_one.svg +4 -4
- package/dist/static/images/numbers/number_seven.svg +4 -4
- package/dist/static/images/numbers/number_six.svg +4 -4
- package/dist/static/images/numbers/number_three.svg +3 -3
- package/dist/static/images/numbers/number_two.svg +4 -4
- package/dist/static/images/numbers/number_zero.svg +3 -3
- package/dist/static/images/plus-icon.svg +4 -4
- package/dist/static/images/search-icon.svg +3 -3
- package/dist/static/images/transfer-icon.svg +10 -10
- package/dist/static/images/warning-filled.svg +3 -3
- package/dist/utils/app-urls-analytics-backoffice.js +30 -0
- package/dist/utils/app-urls.js +28 -0
- package/dist/utils/checklistGenerator.js +6 -5
- package/dist/utils/customHooks.js +1 -1
- package/dist/utils/formatCurrencyValue.js +2 -1
- package/dist/utils/get-cookie-domain.js +4 -1
- package/dist/utils/set-redirect-cookie.js +4 -1
- package/dist/utils/withRouter.js +5 -3
- package/package.json +1 -1
- package/dist/api/auth.js +0 -15
package/dist/analytics/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import mixpanel from "mixpanel-browser";
|
|
2
|
+
import "../constants/globalVariables.js";
|
|
3
|
+
import { getAnalyticsIngestUrl } from "../utils/app-urls-analytics-backoffice.js";
|
|
2
4
|
const BLOCKED_FIELDS = /* @__PURE__ */ new Set([
|
|
3
5
|
// PII
|
|
4
6
|
"email",
|
|
@@ -75,8 +77,10 @@ function initAnalytics({
|
|
|
75
77
|
app,
|
|
76
78
|
requireConsent = false,
|
|
77
79
|
scroll = true,
|
|
78
|
-
apiHost
|
|
80
|
+
apiHost: apiHostArg
|
|
79
81
|
} = {}) {
|
|
82
|
+
const analyticsUrl = getAnalyticsIngestUrl();
|
|
83
|
+
const apiHost = apiHostArg ?? (analyticsUrl || "https://api-eu.mixpanel.com");
|
|
80
84
|
if (initialized) return;
|
|
81
85
|
if (!token) return;
|
|
82
86
|
if (typeof navigator !== "undefined" && /Ghost Inspector/i.test(navigator.userAgent)) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import axiosInstance from "../model/axios.js";
|
|
2
|
+
const authenticationApi = {
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} pathSegment — appended to `auth/` (e.g. `forgotPass` → `POST auth/forgotPass`)
|
|
5
|
+
* @param {Record<string, unknown>} body
|
|
6
|
+
*/
|
|
7
|
+
post(pathSegment, body) {
|
|
8
|
+
return axiosInstance.post(`auth/${pathSegment}`, body);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
authenticationApi
|
|
13
|
+
};
|
package/dist/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { configure
|
|
1
|
+
import { configure } from "../config.js";
|
|
2
2
|
import { default as default2 } from "../components/2FA/Connect2FA.js";
|
|
3
3
|
import { default as default3 } from "../components/2FA/enable-2fa-flow.js";
|
|
4
4
|
import { default as default4 } from "../components/2FA/EnterCode.js";
|
|
@@ -10,6 +10,7 @@ import { default as default9 } from "../components/2FA/ResetCode.js";
|
|
|
10
10
|
import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "../context/Auth.js";
|
|
11
11
|
import { AuthConsumer, AuthContext, AuthProvider } from "../context/AuthContext.js";
|
|
12
12
|
import { LoadingDots, StokrLoader, StokrLoaderBox } from "../components/StokrLoader/StokrLoader.js";
|
|
13
|
+
import { getConfig, resetRuntimeConfig } from "../runtime-config.js";
|
|
13
14
|
export {
|
|
14
15
|
Auth,
|
|
15
16
|
AuthConsumer,
|
|
@@ -28,5 +29,6 @@ export {
|
|
|
28
29
|
StokrLoaderBox,
|
|
29
30
|
default7 as Sucess2FA,
|
|
30
31
|
configure,
|
|
31
|
-
getConfig
|
|
32
|
+
getConfig,
|
|
33
|
+
resetRuntimeConfig
|
|
32
34
|
};
|
|
@@ -7,8 +7,13 @@ import stdin_default$4 from "../ForgotPasswordModal/ForgotPasswordModal.js";
|
|
|
7
7
|
import stdin_default$2 from "./EnterCode.js";
|
|
8
8
|
import background from "../../static/images/background3.png.js";
|
|
9
9
|
import stdin_default$3 from "./ResetCode.js";
|
|
10
|
-
import {
|
|
10
|
+
import { authenticationApi } from "../../api/authenticationApi.js";
|
|
11
|
+
import { AppSurface } from "../../routing/app-routes.js";
|
|
12
|
+
import "../../constants/globalVariables.js";
|
|
13
|
+
import { navigateApp } from "../../routing/navigate-app.js";
|
|
14
|
+
import { useNavigate } from "react-router-dom";
|
|
11
15
|
const LoginWithOTP = ({ withBackground }) => {
|
|
16
|
+
const navigate = useNavigate();
|
|
12
17
|
const { loginUser, waitingFor2fa, firebaseError, loginUserWithTotp, reset2faFlow } = useContext(AuthContext);
|
|
13
18
|
const [isModalOpen, setIsModalOpen] = useState({
|
|
14
19
|
login: true,
|
|
@@ -65,10 +70,10 @@ const LoginWithOTP = ({ withBackground }) => {
|
|
|
65
70
|
background: withBackground && backgroundProp,
|
|
66
71
|
isModalOpen: isModalOpen.login,
|
|
67
72
|
onModalClose: () => {
|
|
68
|
-
|
|
73
|
+
navigateApp(navigate, AppSurface.INVESTOR_ROOT, "");
|
|
69
74
|
},
|
|
70
75
|
onModalSwitch: () => {
|
|
71
|
-
|
|
76
|
+
navigateApp(navigate, AppSurface.REGISTER, "");
|
|
72
77
|
},
|
|
73
78
|
onForgotPassword: () => {
|
|
74
79
|
switchOpenModal("login", "forgot");
|
|
@@ -177,7 +182,7 @@ const LoginWithOTP = ({ withBackground }) => {
|
|
|
177
182
|
clearPopupError();
|
|
178
183
|
setIsActionLoading("forgot");
|
|
179
184
|
try {
|
|
180
|
-
await
|
|
185
|
+
await authenticationApi.post("forgotPass", {
|
|
181
186
|
email
|
|
182
187
|
});
|
|
183
188
|
handleSetPopupSuccess(
|
|
@@ -4,99 +4,102 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import stdin_default$1 from "./FooterMenu.js";
|
|
5
5
|
import stdin_default$2 from "../Newsletter/Newsletter.js";
|
|
6
6
|
import stdin_default$3 from "./Footer.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
]
|
|
7
|
+
import { getPlatformURL } from "../../constants/globalVariables.js";
|
|
8
|
+
function getFooterGroups() {
|
|
9
|
+
const platformURL = getPlatformURL();
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
name: "New to STOKR",
|
|
13
|
+
collapse: true,
|
|
14
|
+
items: [
|
|
15
|
+
{
|
|
16
|
+
name: "Solutions",
|
|
17
|
+
url: `${platformURL}/solutions`
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "101s",
|
|
21
|
+
url: `${platformURL}/101`
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Support",
|
|
25
|
+
url: "https://support.stokr.io/",
|
|
26
|
+
external: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "STOKE POST",
|
|
30
|
+
url: `${platformURL}/stoke-post`
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "About us",
|
|
36
|
+
collapse: true,
|
|
37
|
+
items: [
|
|
38
|
+
{
|
|
39
|
+
name: "Team",
|
|
40
|
+
url: `${platformURL}/team`
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "Careers",
|
|
44
|
+
url: `${platformURL}/careers`,
|
|
45
|
+
showNumber: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "Memberships",
|
|
49
|
+
url: `${platformURL}/memberships`
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Press Releases",
|
|
53
|
+
url: `${platformURL}/press-releases`
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "General",
|
|
59
|
+
collapse: true,
|
|
60
|
+
items: [
|
|
61
|
+
{
|
|
62
|
+
name: "Legal",
|
|
63
|
+
url: `${platformURL}/legal`
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Privacy Terms",
|
|
67
|
+
url: `${platformURL}/privacy`
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Cookie policy",
|
|
71
|
+
url: `${platformURL}/cookie-policy`
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Let’s connect",
|
|
77
|
+
social: true,
|
|
78
|
+
items: [
|
|
79
|
+
{
|
|
80
|
+
name: "linkedin",
|
|
81
|
+
url: "https://www.linkedin.com/company/stokr/"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "twitter",
|
|
85
|
+
url: "https://twitter.com/stokr_io"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "telegram",
|
|
89
|
+
url: "https://t.me/joinchat/G2o5yBCe7FiYvv1YiZhNZg"
|
|
90
|
+
},
|
|
91
|
+
// {
|
|
92
|
+
// name: 'medium',
|
|
93
|
+
// url: 'https://medium.com/sicos-publication',
|
|
94
|
+
// },
|
|
95
|
+
{
|
|
96
|
+
name: "youtube",
|
|
97
|
+
url: "https://www.youtube.com/channel/UCUuQtRhbcFcU4xeTrDl3iQQ"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
}
|
|
100
103
|
function FooterLayout({
|
|
101
104
|
withNewsLetter = true,
|
|
102
105
|
withFooterMenu = true,
|
|
@@ -112,7 +115,7 @@ function FooterLayout({
|
|
|
112
115
|
withFooterMenu && /* @__PURE__ */ jsx(
|
|
113
116
|
stdin_default$1,
|
|
114
117
|
{
|
|
115
|
-
groups:
|
|
118
|
+
groups: getFooterGroups(),
|
|
116
119
|
jobOpeningsNumber,
|
|
117
120
|
dropdownCollapsed,
|
|
118
121
|
footnotes,
|
|
@@ -141,5 +144,5 @@ FooterLayout.propTypes = {
|
|
|
141
144
|
var stdin_default = FooterLayout;
|
|
142
145
|
export {
|
|
143
146
|
stdin_default as default,
|
|
144
|
-
|
|
147
|
+
getFooterGroups
|
|
145
148
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
2
|
+
import { useMemo, useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Button } from "../Button/Button.styles.js";
|
|
5
5
|
import stdin_default$1 from "../SvgIcons/LogoSvg.js";
|
|
@@ -18,46 +18,14 @@ import { checkTodoStatus } from "../../utils/check-todo-status.js";
|
|
|
18
18
|
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
19
19
|
import { socialSvg } from "../Footer/FooterMenu.js";
|
|
20
20
|
import { Wrapper, FlexContainer } from "../Grid/Grid.styles.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { getFooterGroups } from "../Footer/FooterLayout.js";
|
|
22
|
+
import { getPlatformURL } from "../../constants/globalVariables.js";
|
|
23
|
+
import { getDashboardBaseUrl, getAdminAppUrl } from "../../utils/app-urls.js";
|
|
24
|
+
import { withRouter } from "../../utils/withRouter.js";
|
|
23
25
|
import { sizes } from "../../styles/rwd.js";
|
|
24
26
|
import { track } from "../../analytics/index.js";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
name: "End-to-End Tokenization",
|
|
28
|
-
onClick: () => {
|
|
29
|
-
track("header_link_clicked", { link: "end-to-end tokenization" });
|
|
30
|
-
window.location.href = `${platformURL}/solutions/asset-tokenization`;
|
|
31
|
-
},
|
|
32
|
-
link: "/solutions/asset-tokenization"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "Tokenization-as-a-Service",
|
|
36
|
-
onClick: () => {
|
|
37
|
-
track("header_link_clicked", { link: "tokenization-as-a-service" });
|
|
38
|
-
window.location.href = `${platformURL}/solutions/tokenization-as-service`;
|
|
39
|
-
},
|
|
40
|
-
link: "/solutions/tokenization-as-service"
|
|
41
|
-
}
|
|
42
|
-
];
|
|
43
|
-
const mediaMenuItems = [
|
|
44
|
-
{
|
|
45
|
-
name: "Press Releases",
|
|
46
|
-
onClick: () => {
|
|
47
|
-
track("header_link_clicked", { link: "press releases" });
|
|
48
|
-
window.location.href = `${platformURL}/press-releases`;
|
|
49
|
-
},
|
|
50
|
-
link: "/press-releases"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "Stoke Post",
|
|
54
|
-
onClick: () => {
|
|
55
|
-
track("header_link_clicked", { link: "stoke post" });
|
|
56
|
-
window.location.href = `${platformURL}/stoke-post`;
|
|
57
|
-
},
|
|
58
|
-
link: "/stoke-post"
|
|
59
|
-
}
|
|
60
|
-
];
|
|
27
|
+
import { navigateToHref, navigateApp } from "../../routing/navigate-app.js";
|
|
28
|
+
import { AppSurface, AppRoute } from "../../routing/app-routes.js";
|
|
61
29
|
const UserAvatarComponent = ({ avatar }) => {
|
|
62
30
|
const [photo, setphoto] = useState(avatarPlaceholder);
|
|
63
31
|
const prevAvatar = usePrevious(avatar);
|
|
@@ -83,18 +51,26 @@ const UserAvatarComponent = ({ avatar }) => {
|
|
|
83
51
|
}, [avatar]);
|
|
84
52
|
return /* @__PURE__ */ jsx(UserAvatar, { src: photo });
|
|
85
53
|
};
|
|
86
|
-
const RenderSubMenu = ({
|
|
87
|
-
|
|
54
|
+
const RenderSubMenu = ({
|
|
55
|
+
title,
|
|
56
|
+
isActive,
|
|
57
|
+
subMenuItems = [],
|
|
58
|
+
onClick = () => {
|
|
59
|
+
},
|
|
60
|
+
_platformURL = "",
|
|
61
|
+
platformURL: platformURLProp = ""
|
|
62
|
+
}) => {
|
|
63
|
+
const basePlatformUrl = _platformURL || platformURLProp;
|
|
88
64
|
return /* @__PURE__ */ jsxs(MobileMenuWrapper, { onClick, children: [
|
|
89
65
|
/* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsxs(StyledSubMenu, { children: [
|
|
90
66
|
/* @__PURE__ */ jsx("a", { children: title }),
|
|
91
67
|
/* @__PURE__ */ jsx(ArrowDown, { displayAlways: true, isOpened: isActive, style: { right: "-2em", position: "absolute" } })
|
|
92
68
|
] }) }),
|
|
93
|
-
/* @__PURE__ */ jsx(Collapse, { isOpened: isActive, children: subMenuItems.map((item) => /* @__PURE__ */ jsx(MobileMenuItem, { red: true, children: /* @__PURE__ */ jsx(MobileMenuLink, { href:
|
|
69
|
+
/* @__PURE__ */ jsx(Collapse, { isOpened: isActive, children: subMenuItems.map((item) => /* @__PURE__ */ jsx(MobileMenuItem, { red: true, children: /* @__PURE__ */ jsx(MobileMenuLink, { href: basePlatformUrl + item.link, children: item.name }) }, item.name)) })
|
|
94
70
|
] });
|
|
95
71
|
};
|
|
96
|
-
|
|
97
|
-
|
|
72
|
+
function HeaderView({
|
|
73
|
+
navigate = null,
|
|
98
74
|
activeMenu = null,
|
|
99
75
|
activateMenu = () => {
|
|
100
76
|
},
|
|
@@ -116,7 +92,49 @@ const Header = ({
|
|
|
116
92
|
signupFlow = false,
|
|
117
93
|
noFixedPosition = false,
|
|
118
94
|
withoutLoginSignupButton = false
|
|
119
|
-
})
|
|
95
|
+
}) {
|
|
96
|
+
const productMenuItems = useMemo(
|
|
97
|
+
() => [
|
|
98
|
+
{
|
|
99
|
+
name: "End-to-End Tokenization",
|
|
100
|
+
onClick: () => {
|
|
101
|
+
track("header_link_clicked", { link: "end-to-end tokenization" });
|
|
102
|
+
navigateToHref(navigate, `${getPlatformURL()}/solutions/asset-tokenization`);
|
|
103
|
+
},
|
|
104
|
+
link: "/solutions/asset-tokenization"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "Tokenization-as-a-Service",
|
|
108
|
+
onClick: () => {
|
|
109
|
+
track("header_link_clicked", { link: "tokenization-as-a-service" });
|
|
110
|
+
navigateToHref(navigate, `${getPlatformURL()}/solutions/tokenization-as-service`);
|
|
111
|
+
},
|
|
112
|
+
link: "/solutions/tokenization-as-service"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
[navigate]
|
|
116
|
+
);
|
|
117
|
+
const mediaMenuItems = useMemo(
|
|
118
|
+
() => [
|
|
119
|
+
{
|
|
120
|
+
name: "Press Releases",
|
|
121
|
+
onClick: () => {
|
|
122
|
+
track("header_link_clicked", { link: "press releases" });
|
|
123
|
+
navigateToHref(navigate, `${getPlatformURL()}/press-releases`);
|
|
124
|
+
},
|
|
125
|
+
link: "/press-releases"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "Stoke Post",
|
|
129
|
+
onClick: () => {
|
|
130
|
+
track("header_link_clicked", { link: "stoke post" });
|
|
131
|
+
navigateToHref(navigate, `${getPlatformURL()}/stoke-post`);
|
|
132
|
+
},
|
|
133
|
+
link: "/stoke-post"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
[navigate]
|
|
137
|
+
);
|
|
120
138
|
const [currentActiveMenu, setcurrentActiveMenu] = useState(null);
|
|
121
139
|
const [currentActiveSubMenu, setcurrentActiveSubMenu] = useState(null);
|
|
122
140
|
const prevActiveMenu = usePrevious(activeMenu);
|
|
@@ -164,13 +182,14 @@ const Header = ({
|
|
|
164
182
|
const userType = user && user.user_type;
|
|
165
183
|
const isAdmin = userType === "company_pa" || userType === "company_sa" || userType === "sa";
|
|
166
184
|
const isVentureDashboard = withSidebar;
|
|
167
|
-
const
|
|
168
|
-
const
|
|
185
|
+
const socialLinks = getFooterGroups()?.filter((group) => group.social)[0]?.items || [];
|
|
186
|
+
const newPlatformUrl = useRelativePathForMenu ? "" : getPlatformURL();
|
|
187
|
+
const newPlatformUrlForUserMenu = useRelativePathForUserMenu ? "" : getDashboardBaseUrl();
|
|
169
188
|
return /* @__PURE__ */ jsx(StyledHeader, { noFixedPosition, children: /* @__PURE__ */ jsxs(Wrapper, { flex: withSidebar, children: [
|
|
170
189
|
withSidebar && /* @__PURE__ */ jsx(SidebarToggle, { isSidebarExpanded, onClick: sidebarHandler, children: /* @__PURE__ */ jsx(HamburgerIcon, {}) }),
|
|
171
190
|
/* @__PURE__ */ jsxs(HeaderInner, { withSidebar, children: [
|
|
172
191
|
/* @__PURE__ */ jsxs(MainNavWrap, { hasProgress: progress, children: [
|
|
173
|
-
/* @__PURE__ */ jsx(Logo, { isHighlight: currentActiveMenu === "main", children: /* @__PURE__ */ jsx("a", { href:
|
|
192
|
+
/* @__PURE__ */ jsx(Logo, { isHighlight: currentActiveMenu === "main", children: /* @__PURE__ */ jsx("a", { href: getPlatformURL(), "data-cy": "logo-nav-link", children: /* @__PURE__ */ jsx(stdin_default$1, {}) }) }),
|
|
174
193
|
!progress && /* @__PURE__ */ jsx(HeaderMainNav, { children: /* @__PURE__ */ jsx(MenuNav, { children: /* @__PURE__ */ jsxs("ul", { children: [
|
|
175
194
|
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
176
195
|
"a",
|
|
@@ -242,7 +261,7 @@ const Header = ({
|
|
|
242
261
|
LoginButton,
|
|
243
262
|
{
|
|
244
263
|
onClick: () => {
|
|
245
|
-
isAdmin ?
|
|
264
|
+
isAdmin ? navigateApp(navigate, AppSurface.ADMIN, "") : !newPlatformUrlForUserMenu ? navigate(AppRoute.OVERVIEW) : navigateApp(navigate, AppSurface.DASHBOARD, AppRoute.OVERVIEW);
|
|
246
265
|
},
|
|
247
266
|
"data-cy": "dashboard-nav-link",
|
|
248
267
|
children: "Dashboard"
|
|
@@ -307,9 +326,35 @@ const Header = ({
|
|
|
307
326
|
/* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(MobileMenuLink, { href: newPlatformUrl + "/team", children: "Team" }) })
|
|
308
327
|
] }) }) }) }),
|
|
309
328
|
user?._id || user?.uid ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
310
|
-
!signupFlow && /* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, borderTop: true, children: /* @__PURE__ */ jsx(MenuNav, { mobile: true, children: /* @__PURE__ */ jsx("ul", { children: isAdmin ? /* @__PURE__ */ jsx(Fragment, { children: isVentureDashboard ? /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx("a", { href: "/settings", children: "Settings" }) }) : /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
|
|
329
|
+
!signupFlow && /* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, borderTop: true, children: /* @__PURE__ */ jsx(MenuNav, { mobile: true, children: /* @__PURE__ */ jsx("ul", { children: isAdmin ? /* @__PURE__ */ jsx(Fragment, { children: isVentureDashboard ? /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx("a", { href: "/settings", children: "Settings" }) }) : /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
|
|
330
|
+
"a",
|
|
331
|
+
{
|
|
332
|
+
href: getAdminAppUrl(),
|
|
333
|
+
onClick: (e) => {
|
|
334
|
+
e.preventDefault();
|
|
335
|
+
navigateApp(navigate, AppSurface.ADMIN, "");
|
|
336
|
+
toggleMenu("main");
|
|
337
|
+
},
|
|
338
|
+
children: "Dashboard"
|
|
339
|
+
}
|
|
340
|
+
) }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
311
341
|
/* @__PURE__ */ jsxs(MobileMenuItem, { children: [
|
|
312
|
-
/* @__PURE__ */ jsx(
|
|
342
|
+
/* @__PURE__ */ jsx(
|
|
343
|
+
"a",
|
|
344
|
+
{
|
|
345
|
+
href: newPlatformUrlForUserMenu ? `${newPlatformUrlForUserMenu}${AppRoute.OVERVIEW}` : AppRoute.OVERVIEW,
|
|
346
|
+
onClick: (e) => {
|
|
347
|
+
e.preventDefault();
|
|
348
|
+
if (newPlatformUrlForUserMenu) {
|
|
349
|
+
navigateApp(navigate, AppSurface.DASHBOARD, AppRoute.OVERVIEW);
|
|
350
|
+
} else {
|
|
351
|
+
navigate(AppRoute.OVERVIEW);
|
|
352
|
+
}
|
|
353
|
+
toggleMenu("main");
|
|
354
|
+
},
|
|
355
|
+
children: "Dashboard"
|
|
356
|
+
}
|
|
357
|
+
),
|
|
313
358
|
checkTodoStatus(user) > 0 && /* @__PURE__ */ jsx(NotificationCounter, { mobileMenu: true, children: checkTodoStatus(user) })
|
|
314
359
|
] }),
|
|
315
360
|
/* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
|
|
@@ -391,13 +436,16 @@ const Header = ({
|
|
|
391
436
|
isAdmin,
|
|
392
437
|
notifications: checkTodoStatus(user),
|
|
393
438
|
isVentureDashboard,
|
|
394
|
-
platformUrlForUserMenu: newPlatformUrlForUserMenu
|
|
439
|
+
platformUrlForUserMenu: newPlatformUrlForUserMenu,
|
|
440
|
+
navigate
|
|
395
441
|
}
|
|
396
442
|
)
|
|
397
443
|
] })
|
|
398
444
|
] }) });
|
|
399
|
-
}
|
|
400
|
-
Header
|
|
445
|
+
}
|
|
446
|
+
const Header = withRouter(HeaderView);
|
|
447
|
+
HeaderView.propTypes = {
|
|
448
|
+
navigate: PropTypes.func,
|
|
401
449
|
progress: PropTypes.shape({
|
|
402
450
|
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
403
451
|
doneIndex: PropTypes.number,
|
|
@@ -5,7 +5,9 @@ import { Collapse } from "react-collapse";
|
|
|
5
5
|
import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption, ExpandArrow, Settings, SettingsOptions, SettingsOption } from "./MainMenu.styles.js";
|
|
6
6
|
import { Button } from "../Button/Button.styles.js";
|
|
7
7
|
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
8
|
-
import {
|
|
8
|
+
import { AppSurface, AppRoute } from "../../routing/app-routes.js";
|
|
9
|
+
import "../../constants/globalVariables.js";
|
|
10
|
+
import { navigateApp } from "../../routing/navigate-app.js";
|
|
9
11
|
import { withRouter } from "../../utils/withRouter.js";
|
|
10
12
|
class MainMenuClass extends PureComponent {
|
|
11
13
|
state = {
|
|
@@ -52,7 +54,8 @@ class MainMenuClass extends PureComponent {
|
|
|
52
54
|
logoutUser,
|
|
53
55
|
admin: isAdmin = false,
|
|
54
56
|
platformUrlForUserMenu,
|
|
55
|
-
isVentureDashboard
|
|
57
|
+
isVentureDashboard,
|
|
58
|
+
navigate
|
|
56
59
|
} = this.props;
|
|
57
60
|
const spanStyleForMenu = {
|
|
58
61
|
letterSpacing: "1.5px",
|
|
@@ -80,7 +83,13 @@ class MainMenuClass extends PureComponent {
|
|
|
80
83
|
isVenture: isAdmin,
|
|
81
84
|
isDashboard: true,
|
|
82
85
|
onClick: () => {
|
|
83
|
-
isAdmin
|
|
86
|
+
if (isAdmin) {
|
|
87
|
+
navigateApp(navigate, AppSurface.ADMIN, "");
|
|
88
|
+
} else if (!platformUrlForUserMenu) {
|
|
89
|
+
navigate(AppRoute.OVERVIEW);
|
|
90
|
+
} else {
|
|
91
|
+
navigateApp(navigate, AppSurface.DASHBOARD, AppRoute.OVERVIEW);
|
|
92
|
+
}
|
|
84
93
|
},
|
|
85
94
|
children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Dashboard" })
|
|
86
95
|
}
|
|
@@ -199,7 +208,8 @@ class MainMenuClass extends PureComponent {
|
|
|
199
208
|
}
|
|
200
209
|
MainMenuClass.propTypes = {
|
|
201
210
|
isMenuActive: PropTypes.bool.isRequired,
|
|
202
|
-
admin: PropTypes.bool
|
|
211
|
+
admin: PropTypes.bool,
|
|
212
|
+
navigate: PropTypes.func
|
|
203
213
|
};
|
|
204
214
|
const MainMenu = withRouter(MainMenuClass);
|
|
205
215
|
var stdin_default = MainMenu;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useContext } from "react";
|
|
3
|
+
import { useNavigate } from "react-router-dom";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
5
|
import { Formik } from "formik";
|
|
5
6
|
import * as Yup from "yup";
|
|
@@ -14,6 +15,8 @@ import { Input } from "../../Input/Input.js";
|
|
|
14
15
|
import stdin_default$1 from "../../Checkbox/Checkbox.js";
|
|
15
16
|
import { Button } from "../../Button/Button.styles.js";
|
|
16
17
|
import { useNewVentureForm } from "../../../hooks/useNewVentureForm.js";
|
|
18
|
+
import { AppRoute, AppSurface } from "../../../routing/app-routes.js";
|
|
19
|
+
import { navigateApp } from "../../../routing/navigate-app.js";
|
|
17
20
|
import { ModalInner } from "../Modal.styles.js";
|
|
18
21
|
import { FormField, FormError } from "../../Form/Form.styles.js";
|
|
19
22
|
const defaultProject = {
|
|
@@ -24,6 +27,7 @@ const defaultProject = {
|
|
|
24
27
|
description: ""
|
|
25
28
|
};
|
|
26
29
|
const NewVentureModal = (props) => {
|
|
30
|
+
const navigate = useNavigate();
|
|
27
31
|
const { user } = useContext(AuthContext);
|
|
28
32
|
const {
|
|
29
33
|
title = "Register Your Interest",
|
|
@@ -95,9 +99,9 @@ const NewVentureModal = (props) => {
|
|
|
95
99
|
onSuccessMessageBtnClick();
|
|
96
100
|
} else {
|
|
97
101
|
if (user?._id) {
|
|
98
|
-
|
|
102
|
+
navigateApp(navigate, AppSurface.DASHBOARD, AppRoute.CHECKLIST);
|
|
99
103
|
} else {
|
|
100
|
-
|
|
104
|
+
navigate(`/signup?email=${encodeURIComponent(email)}`);
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
},
|
|
@@ -258,7 +258,7 @@ const AmountBlock = ({ config }) => {
|
|
|
258
258
|
return /* @__PURE__ */ jsx(CurrencyLogo, { color: logoColor });
|
|
259
259
|
};
|
|
260
260
|
return /* @__PURE__ */ jsxs(AmountSection, { children: [
|
|
261
|
-
/* @__PURE__ */ jsx(AmountLabel, {
|
|
261
|
+
/* @__PURE__ */ jsx(AmountLabel, { children: label }),
|
|
262
262
|
/* @__PURE__ */ jsxs(AmountDisplay, { children: [
|
|
263
263
|
/* @__PURE__ */ jsxs(AmountLeft, { children: [
|
|
264
264
|
renderCurrencyLogo(),
|
|
@@ -26,8 +26,9 @@ import "../../model/axios.js";
|
|
|
26
26
|
import "../Layout/Layout.js";
|
|
27
27
|
import "../LoginModal/LoginModal.js";
|
|
28
28
|
import "../ForgotPasswordModal/ForgotPasswordModal.js";
|
|
29
|
-
import "../2FA/main-flow.js";
|
|
30
29
|
import { emailRegex } from "../../constants/globalVariables.js";
|
|
30
|
+
import "react-router-dom";
|
|
31
|
+
import "../2FA/main-flow.js";
|
|
31
32
|
const renderSuccessModal = (continueUrl) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
32
33
|
stdin_default$1,
|
|
33
34
|
{
|