@stokr/components-library 3.0.77 → 3.1.0-alpha.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/dist/components/Input/InputPassword.js +3 -5
- package/dist/components/Input/OtpInput.js +1 -3
- package/dist/components/MenuNav/MenuNav.styles.js +1 -2
- package/dist/components/Modal/Modal.styles.js +2 -3
- package/dist/components/Newsletter/Newsletter.js +1 -3
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +1 -2
- package/dist/components/SmartLink/SmartLink.js +0 -2
- package/dist/components/StepController/StepController.js +3 -5
- package/dist/components/StepController/StepController.styles.js +102 -1
- package/dist/components/StepController/StepControllerProgress.js +1 -1
- package/dist/components/Switch/Switch.js +1 -3
- package/dist/components/ToDoList/ToDoListTask.js +15 -3
- package/dist/components/taxId/register-taxid.js +7 -5
- package/dist/index.js +67 -141
- package/dist/runtime-config.js +4 -70
- package/dist/styles/global.js +1 -2
- package/dist/utils/check-todo-status.js +1 -2
- package/package.json +8 -14
- package/dist/api/authenticationApi.js +0 -13
- package/dist/auth/index.js +0 -34
- package/dist/components/2FA/Connect2FA.js +0 -58
- package/dist/components/2FA/EnterCode.js +0 -74
- package/dist/components/2FA/InstallAuthApp.js +0 -68
- package/dist/components/2FA/ResetCode.js +0 -34
- package/dist/components/2FA/Sucess2FA.js +0 -63
- package/dist/components/2FA/disable-2fa-flow.js +0 -104
- package/dist/components/2FA/enable-2fa-flow.js +0 -167
- package/dist/components/2FA/login-with-otp-flow.js +0 -262
- package/dist/components/2FA/main-flow.js +0 -273
- package/dist/components/Footer/Footer.js +0 -69
- package/dist/components/Footer/Footer.styles.js +0 -277
- package/dist/components/Footer/FooterLayout.js +0 -150
- package/dist/components/Footer/FooterMenu.js +0 -107
- package/dist/components/Footer/FooterMenu.styles.js +0 -334
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -121
- package/dist/components/Header/Header.js +0 -441
- package/dist/components/Header/Header.styles.js +0 -568
- package/dist/components/Layout/Layout.js +0 -76
- package/dist/components/LoginModal/LoginModal.js +0 -165
- package/dist/components/MainMenu/DynamicMainMenu.js +0 -38
- package/dist/components/MainMenu/MainMenu.js +0 -220
- package/dist/components/MainMenu/MainMenu.styles.js +0 -362
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +0 -273
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -74
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -20
- package/dist/components/RegisterModal/RegisterModal.js +0 -278
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +0 -40
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +0 -41
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +0 -145
- package/dist/components/StepsProgress/StepIndicator.js +0 -40
- package/dist/components/StepsProgress/StepIndicator.styles.js +0 -69
- package/dist/components/StepsProgress/StepsProgress.js +0 -67
- package/dist/components/StepsProgress/StepsProgress.styles.js +0 -105
- package/dist/components/TermsModal/TermsModal.js +0 -145
- package/dist/components/TermsModal/_styles.js +0 -313
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +0 -122
- package/dist/components/headerHo/HeaderHo.js +0 -707
- package/dist/config.js +0 -33
- package/dist/context/Auth.js +0 -423
- package/dist/context/AuthContext.js +0 -1016
- package/dist/firebase-config.js +0 -56
- package/dist/hooks/useNewVentureForm.js +0 -235
- package/dist/static/images/background3.png.js +0 -4
- package/dist/static/images/google_auth.png.js +0 -4
- package/dist/static/images/iso27001-black.svg.js +0 -4
- package/dist/static/images/mangopay.svg.js +0 -4
- package/dist/static/images/social/Facebook_Logo.png.js +0 -4
- package/dist/static/images/social/LI-In-Bug.png.js +0 -4
- package/dist/static/images/social/Telegram-Logo.png.js +0 -4
- package/dist/static/images/social/X-logo-black.png.js +0 -4
- package/dist/static/images/social/youtube_social_circle_red.png.js +0 -4
- package/dist/utils/show-account-locked-modal.js +0 -23
- package/dist/utils/user-identity.js +0 -10
- package/dist/utils/withRouter.js +0 -26
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import styled, { css } from "styled-components";
|
|
2
|
-
import rwd from "../../styles/rwd.js";
|
|
3
|
-
const StyledMainMenu = styled.div.withConfig({
|
|
4
|
-
shouldForwardProp: (props) => !["admin"].includes(props)
|
|
5
|
-
})`
|
|
6
|
-
display: none;
|
|
7
|
-
z-index: 10;
|
|
8
|
-
background: white;
|
|
9
|
-
|
|
10
|
-
${rwd.Medium`
|
|
11
|
-
display: block;
|
|
12
|
-
width: 100%;
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 100%;
|
|
15
|
-
left: 0;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
margin-top: -1px;
|
|
18
|
-
border-bottom: 1px solid #e1e1e1;
|
|
19
|
-
// box-shadow: inset 0 -1px 0 0 #e1e1e1;
|
|
20
|
-
|
|
21
|
-
${(props) => props.admin && `
|
|
22
|
-
padding-left: 100px;
|
|
23
|
-
`}
|
|
24
|
-
`}
|
|
25
|
-
|
|
26
|
-
@media screen and (max-width: 991px) {
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
30
|
-
const MainMenuContainer = styled.div`
|
|
31
|
-
display: block;
|
|
32
|
-
background-color: ${(props) => props.theme.cWhite};
|
|
33
|
-
border-top: 1px solid #e1e1e1;
|
|
34
|
-
/* box-shadow: inset 0 -1px 0 0 #e1e1e1; */
|
|
35
|
-
`;
|
|
36
|
-
const MainMenuOptions = styled.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
height: 100%;
|
|
40
|
-
|
|
41
|
-
${rwd.Medium`
|
|
42
|
-
flex-direction: row;
|
|
43
|
-
height: 92px;
|
|
44
|
-
`}
|
|
45
|
-
`;
|
|
46
|
-
const MainMenuOption = styled.div.withConfig({
|
|
47
|
-
shouldForwardProp: (props) => !["isSettings", "isDashboard", "isOpened", "isVenture", "nameOption", "noBorder", "button", ""].includes(props)
|
|
48
|
-
})`
|
|
49
|
-
background-color: white !important;
|
|
50
|
-
position: relative;
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-basis: 33.3333%;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
align-items: center;
|
|
55
|
-
width: 100%;
|
|
56
|
-
padding: 4px 16px;
|
|
57
|
-
outline: none;
|
|
58
|
-
|
|
59
|
-
&:hover {
|
|
60
|
-
font-weight: bold;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
${({ isSettings }) => isSettings && css`
|
|
64
|
-
border-right: none !important;
|
|
65
|
-
`}
|
|
66
|
-
|
|
67
|
-
& {
|
|
68
|
-
border-top: 1px solid #e1e1e1;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
${rwd.Medium`
|
|
72
|
-
padding: 10px;
|
|
73
|
-
border-bottom: 1px solid #e1e1e1;
|
|
74
|
-
margin-bottom: -1px;
|
|
75
|
-
transition: border-bottom-color .2s;
|
|
76
|
-
|
|
77
|
-
& {
|
|
78
|
-
border-top: 0;
|
|
79
|
-
border-left: 1px solid #e1e1e1;
|
|
80
|
-
|
|
81
|
-
${({ isDashboard }) => isDashboard && css`
|
|
82
|
-
border-right: 0;
|
|
83
|
-
`}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
${(props) => props.isOpened && `
|
|
87
|
-
border-bottom-color: transparent;
|
|
88
|
-
`};
|
|
89
|
-
|
|
90
|
-
${({ isVenture }) => isVenture && css`
|
|
91
|
-
flex-basis: 66.6%;
|
|
92
|
-
`}
|
|
93
|
-
|
|
94
|
-
${(props) => props.nameOption && `
|
|
95
|
-
display: flex;
|
|
96
|
-
`}
|
|
97
|
-
|
|
98
|
-
`}
|
|
99
|
-
|
|
100
|
-
${(props) => props.nameOption && `
|
|
101
|
-
display: none;
|
|
102
|
-
`}
|
|
103
|
-
|
|
104
|
-
${rwd.Large`
|
|
105
|
-
|
|
106
|
-
${({ isVenture }) => isVenture && css`
|
|
107
|
-
flex-basis: 75.5%;
|
|
108
|
-
`}
|
|
109
|
-
|
|
110
|
-
${(props) => props.nameOption && `
|
|
111
|
-
display: flex;
|
|
112
|
-
`};
|
|
113
|
-
`}
|
|
114
|
-
|
|
115
|
-
${(props) => props.noBorder && `
|
|
116
|
-
border: none !important;
|
|
117
|
-
`}
|
|
118
|
-
|
|
119
|
-
${(props) => props.button && `
|
|
120
|
-
cursor: pointer;
|
|
121
|
-
transition: color .2s;
|
|
122
|
-
outline: 0;
|
|
123
|
-
|
|
124
|
-
& > span {
|
|
125
|
-
display: inline-block;
|
|
126
|
-
vertical-align: middle;
|
|
127
|
-
text-transform: uppercase;
|
|
128
|
-
font-size: 11px;
|
|
129
|
-
line-height: 20px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&:hover {
|
|
133
|
-
color: ${props.theme.cPrimary};
|
|
134
|
-
}
|
|
135
|
-
`}
|
|
136
|
-
|
|
137
|
-
span {
|
|
138
|
-
-webkit-font-smoothing: antialiased;
|
|
139
|
-
-moz-osx-font-smoothing: grayscale;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
button {
|
|
143
|
-
color: #ee220d;
|
|
144
|
-
border-color: #ee220d;
|
|
145
|
-
background-color: white;
|
|
146
|
-
|
|
147
|
-
&:hover {
|
|
148
|
-
color: #be1b09;
|
|
149
|
-
border-color: #be1b09;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
`;
|
|
153
|
-
styled.h3`
|
|
154
|
-
font-weight: 600;
|
|
155
|
-
font-size: 16px;
|
|
156
|
-
line-height: 24px;
|
|
157
|
-
text-transform: initial;
|
|
158
|
-
margin: 0;
|
|
159
|
-
|
|
160
|
-
&:hover {
|
|
161
|
-
color: initial;
|
|
162
|
-
}
|
|
163
|
-
`;
|
|
164
|
-
const ExpandArrow = styled.i.withConfig({
|
|
165
|
-
shouldForwardProp: (props) => !["isOpened"].includes(props)
|
|
166
|
-
}).attrs({
|
|
167
|
-
className: "ion ion-ios-arrow-down"
|
|
168
|
-
})`
|
|
169
|
-
position: absolute;
|
|
170
|
-
top: 50%;
|
|
171
|
-
right: 32px;
|
|
172
|
-
display: block;
|
|
173
|
-
margin-top: -8px;
|
|
174
|
-
transition: 0.3s transform;
|
|
175
|
-
transform: rotate(0);
|
|
176
|
-
text-align: center;
|
|
177
|
-
font-size: 16px;
|
|
178
|
-
line-height: 16px;
|
|
179
|
-
height: 16px;
|
|
180
|
-
|
|
181
|
-
${(props) => props.isOpened && `
|
|
182
|
-
transform: rotate(180deg);
|
|
183
|
-
`}
|
|
184
|
-
|
|
185
|
-
${rwd.Medium`
|
|
186
|
-
display: inline-block;
|
|
187
|
-
vertical-align: middle;
|
|
188
|
-
margin-left: 20px;
|
|
189
|
-
margin-top: 0;
|
|
190
|
-
position: relative;
|
|
191
|
-
top: 0;
|
|
192
|
-
right: auto;
|
|
193
|
-
`}
|
|
194
|
-
`;
|
|
195
|
-
const Settings = styled.div`
|
|
196
|
-
overflow: hidden;
|
|
197
|
-
`;
|
|
198
|
-
const SettingsOptions = styled.div`
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
height: 100%;
|
|
202
|
-
|
|
203
|
-
${rwd.Medium`
|
|
204
|
-
flex-wrap: wrap;
|
|
205
|
-
padding: 27px 64px;
|
|
206
|
-
flex-direction: row;
|
|
207
|
-
height: auto;
|
|
208
|
-
`}
|
|
209
|
-
|
|
210
|
-
button {
|
|
211
|
-
border: none;
|
|
212
|
-
-webkit-font-smoothing: antialiased;
|
|
213
|
-
-moz-osx-font-smoothing: grayscale;
|
|
214
|
-
padding: 0;
|
|
215
|
-
}
|
|
216
|
-
`;
|
|
217
|
-
const SettingsOption = styled.button.withConfig({
|
|
218
|
-
shouldForwardProp: (props) => !["back", "isActive", "scrollDown"].includes(props)
|
|
219
|
-
})`
|
|
220
|
-
position: relative;
|
|
221
|
-
flex-grow: 1;
|
|
222
|
-
cursor: pointer;
|
|
223
|
-
transition: font-weight 0.2s;
|
|
224
|
-
color: ${(props) => props.theme.cWhite};
|
|
225
|
-
background-color: ${(props) => props.theme.cWarning};
|
|
226
|
-
border-top: 1px solid ${(props) => props.theme.cWarningDark};
|
|
227
|
-
outline: 0;
|
|
228
|
-
|
|
229
|
-
${(props) => props.back && `
|
|
230
|
-
color: ${props.theme.cBlack};
|
|
231
|
-
background-color: transparent;
|
|
232
|
-
border-top: 0;
|
|
233
|
-
|
|
234
|
-
${props.isActive && `
|
|
235
|
-
color: ${props.theme.cBlack};
|
|
236
|
-
background-color: transparent;
|
|
237
|
-
`}
|
|
238
|
-
|
|
239
|
-
${rwd.Medium`
|
|
240
|
-
background-color: transparent;
|
|
241
|
-
|
|
242
|
-
${props.isActive && `
|
|
243
|
-
background-color: transparent;
|
|
244
|
-
`}
|
|
245
|
-
`}
|
|
246
|
-
`};
|
|
247
|
-
|
|
248
|
-
${rwd.Medium`
|
|
249
|
-
flex-grow: 0;
|
|
250
|
-
text-align: left;
|
|
251
|
-
flex-basis: 33.3333%;
|
|
252
|
-
color: ${(props) => props.theme.cBlack};
|
|
253
|
-
background-color: transparent;
|
|
254
|
-
border-top: 0;
|
|
255
|
-
`}
|
|
256
|
-
|
|
257
|
-
${rwd.Large`
|
|
258
|
-
flex-basis: 25%;
|
|
259
|
-
|
|
260
|
-
${(props) => props.scrollDown && `
|
|
261
|
-
flex-basis: 20%;
|
|
262
|
-
`}
|
|
263
|
-
`}
|
|
264
|
-
|
|
265
|
-
& > span {
|
|
266
|
-
position: relative;
|
|
267
|
-
display: inline-block;
|
|
268
|
-
font-size: 11px;
|
|
269
|
-
line-height: 20px;
|
|
270
|
-
text-transform: uppercase;
|
|
271
|
-
transition: font-weight 0.2s;
|
|
272
|
-
|
|
273
|
-
${rwd.Medium`
|
|
274
|
-
padding: 7px 0;
|
|
275
|
-
margin: 3px 0;
|
|
276
|
-
`}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
${(props) => props.isActive && `
|
|
280
|
-
background-color: ${props.theme.cPrimary};
|
|
281
|
-
|
|
282
|
-
& > span {
|
|
283
|
-
font-weight: bold;
|
|
284
|
-
}
|
|
285
|
-
`}
|
|
286
|
-
|
|
287
|
-
${rwd.Medium`
|
|
288
|
-
${(props) => props.isActive && `
|
|
289
|
-
background-color: transparent;
|
|
290
|
-
|
|
291
|
-
& > span {
|
|
292
|
-
&:before {
|
|
293
|
-
content: '';
|
|
294
|
-
display: block;
|
|
295
|
-
height: 4px;
|
|
296
|
-
width: 100%;
|
|
297
|
-
position: absolute;
|
|
298
|
-
bottom: 0;
|
|
299
|
-
left: 0;
|
|
300
|
-
background-color: ${props.theme.cPrimary};
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
`}
|
|
304
|
-
`}
|
|
305
|
-
|
|
306
|
-
&:hover {
|
|
307
|
-
& > span {
|
|
308
|
-
font-weight: bold;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
`;
|
|
312
|
-
styled.div.withConfig({
|
|
313
|
-
shouldForwardProp: (props) => !["isActive"].includes(props)
|
|
314
|
-
})`
|
|
315
|
-
display: block;
|
|
316
|
-
visibility: hidden;
|
|
317
|
-
opacity: 0;
|
|
318
|
-
z-index: 5;
|
|
319
|
-
position: absolute;
|
|
320
|
-
top: 64px;
|
|
321
|
-
left: 0;
|
|
322
|
-
width: 100%;
|
|
323
|
-
height: calc(100% - 64px);
|
|
324
|
-
background-color: ${(props) => props.theme.cWhite};
|
|
325
|
-
border-top: 1px solid #e1e1e1;
|
|
326
|
-
transition:
|
|
327
|
-
opacity 0.2s,
|
|
328
|
-
visibility 0.2s;
|
|
329
|
-
|
|
330
|
-
${(props) => props.isActive && `
|
|
331
|
-
visibility: visible;
|
|
332
|
-
opacity: 1;
|
|
333
|
-
`}
|
|
334
|
-
`;
|
|
335
|
-
styled.div`
|
|
336
|
-
position: relative;
|
|
337
|
-
top: -1px;
|
|
338
|
-
right: -5px;
|
|
339
|
-
width: 16px;
|
|
340
|
-
height: 16px;
|
|
341
|
-
color: #ffffff;
|
|
342
|
-
font-size: 11px;
|
|
343
|
-
font-weight: 700;
|
|
344
|
-
line-height: 16px;
|
|
345
|
-
text-align: center;
|
|
346
|
-
background-color: #ee220d;
|
|
347
|
-
border-radius: 50%;
|
|
348
|
-
|
|
349
|
-
@media screen and (max-width: 991px) {
|
|
350
|
-
display: none;
|
|
351
|
-
}
|
|
352
|
-
`;
|
|
353
|
-
export {
|
|
354
|
-
ExpandArrow,
|
|
355
|
-
MainMenuContainer,
|
|
356
|
-
MainMenuOption,
|
|
357
|
-
MainMenuOptions,
|
|
358
|
-
Settings,
|
|
359
|
-
SettingsOption,
|
|
360
|
-
SettingsOptions,
|
|
361
|
-
StyledMainMenu
|
|
362
|
-
};
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { useNavigate } from "react-router-dom";
|
|
4
|
-
import PropTypes from "prop-types";
|
|
5
|
-
import { Formik } from "formik";
|
|
6
|
-
import * as Yup from "yup";
|
|
7
|
-
import { AuthContext } from "../../../context/AuthContext.js";
|
|
8
|
-
import { emailRegex, ProjectTypes } from "../../../constants/globalVariables.js";
|
|
9
|
-
import { Modal } from "../Modal.js";
|
|
10
|
-
import { Row, Column } from "../../Grid/Grid.styles.js";
|
|
11
|
-
import { Text } from "../../Text/Text.styles.js";
|
|
12
|
-
import stdin_default$1 from "../../Form/Form.js";
|
|
13
|
-
import { ComponentWrapper } from "../../ComponentWrapper/ComponentWrapper.styles.js";
|
|
14
|
-
import { Input } from "../../Input/Input.js";
|
|
15
|
-
import stdin_default$2 from "../../Checkbox/Checkbox.js";
|
|
16
|
-
import stdin_default from "../../Button/Button.styles.js";
|
|
17
|
-
import { useNewVentureForm } from "../../../hooks/useNewVentureForm.js";
|
|
18
|
-
import { getConfig } from "../../../runtime-config.js";
|
|
19
|
-
import { ModalInner } from "../Modal.styles.js";
|
|
20
|
-
import { navigateToHref } from "../../../routing/navigate-app.js";
|
|
21
|
-
import { FormField, FormError } from "../../Form/Form.styles.js";
|
|
22
|
-
const defaultProject = {
|
|
23
|
-
_id: "",
|
|
24
|
-
name: "",
|
|
25
|
-
type: "fund",
|
|
26
|
-
title: "",
|
|
27
|
-
description: ""
|
|
28
|
-
};
|
|
29
|
-
const NewVentureModal = (props) => {
|
|
30
|
-
const navigate = useNavigate();
|
|
31
|
-
const { user } = useContext(AuthContext);
|
|
32
|
-
const isLoggedIn = !!user?._id;
|
|
33
|
-
const {
|
|
34
|
-
title = "Register Your Interest",
|
|
35
|
-
description = "Register your interest and learn more about this investment opportunity.",
|
|
36
|
-
isModalOpen,
|
|
37
|
-
onModalClose,
|
|
38
|
-
onFormSend,
|
|
39
|
-
popupError = null,
|
|
40
|
-
project = defaultProject,
|
|
41
|
-
salesChannel = "investor",
|
|
42
|
-
modalBotContent,
|
|
43
|
-
onSuccessMessageBtnClick,
|
|
44
|
-
customSuccessMessage
|
|
45
|
-
} = props;
|
|
46
|
-
const {
|
|
47
|
-
email,
|
|
48
|
-
name,
|
|
49
|
-
mailingList,
|
|
50
|
-
privateInvestorList,
|
|
51
|
-
mailingListText,
|
|
52
|
-
privateInvestorListText,
|
|
53
|
-
mailingListDisabled,
|
|
54
|
-
privateInvestorListDisabled,
|
|
55
|
-
optionalCheckBox,
|
|
56
|
-
optionalCheckBoxText,
|
|
57
|
-
optionalCheckBoxChecked,
|
|
58
|
-
checkedCheckboxes,
|
|
59
|
-
isSubmitting,
|
|
60
|
-
successMessage,
|
|
61
|
-
errorMessage,
|
|
62
|
-
handleSubmit,
|
|
63
|
-
updateCheckedCheckboxes
|
|
64
|
-
} = useNewVentureForm({
|
|
65
|
-
project: props.project,
|
|
66
|
-
user,
|
|
67
|
-
salesChannel,
|
|
68
|
-
customSuccessMessage
|
|
69
|
-
});
|
|
70
|
-
const validationSchema = isLoggedIn ? Yup.object().shape({
|
|
71
|
-
email: Yup.string().nullable(),
|
|
72
|
-
name: Yup.string().nullable()
|
|
73
|
-
}) : Yup.object().shape({
|
|
74
|
-
email: Yup.string().matches(emailRegex, "Oops, that's not a valid address").required("Oops, this can't be blank"),
|
|
75
|
-
name: Yup.string().required("Oops, this can't be blank")
|
|
76
|
-
});
|
|
77
|
-
return /* @__PURE__ */ jsx(
|
|
78
|
-
Modal,
|
|
79
|
-
{
|
|
80
|
-
isOpen: isModalOpen,
|
|
81
|
-
onClose: (e) => {
|
|
82
|
-
onModalClose(e);
|
|
83
|
-
},
|
|
84
|
-
children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
85
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
86
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
87
|
-
/* @__PURE__ */ jsx("h3", { children: errorMessage ? "OOPS.." : successMessage ? "AWESOME!" : title }),
|
|
88
|
-
!(successMessage || errorMessage) && /* @__PURE__ */ jsx("p", { children: description })
|
|
89
|
-
] }) }),
|
|
90
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: modalBotContent })
|
|
91
|
-
] }),
|
|
92
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: successMessage || errorMessage ? /* @__PURE__ */ jsxs(Text, { children: [
|
|
93
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
94
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
95
|
-
/* @__PURE__ */ jsx("p", { children: errorMessage ? errorMessage : successMessage }),
|
|
96
|
-
successMessage && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
97
|
-
stdin_default,
|
|
98
|
-
{
|
|
99
|
-
fluid: true,
|
|
100
|
-
id: "private-investor-success-button",
|
|
101
|
-
"data-cy": "new-venture-modal-success-continue",
|
|
102
|
-
onClick: () => {
|
|
103
|
-
if (onSuccessMessageBtnClick) {
|
|
104
|
-
onSuccessMessageBtnClick();
|
|
105
|
-
} else {
|
|
106
|
-
if (user?._id) {
|
|
107
|
-
navigateToHref(navigate, `${getConfig("dashboardUrl")}/checklist`);
|
|
108
|
-
} else {
|
|
109
|
-
navigate(`/signup?email=${encodeURIComponent(email)}`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
children: "Continue"
|
|
114
|
-
}
|
|
115
|
-
) })
|
|
116
|
-
] }) : /* @__PURE__ */ jsx(
|
|
117
|
-
Formik,
|
|
118
|
-
{
|
|
119
|
-
enableReinitialize: true,
|
|
120
|
-
initialValues: {
|
|
121
|
-
email: email || "",
|
|
122
|
-
name: name || "",
|
|
123
|
-
mailingList: mailingList || false,
|
|
124
|
-
privateInvestorList: privateInvestorList || false,
|
|
125
|
-
optionalCheckBoxChecked: optionalCheckBoxChecked || false
|
|
126
|
-
},
|
|
127
|
-
validationSchema,
|
|
128
|
-
onSubmit: (values) => {
|
|
129
|
-
onFormSend(values);
|
|
130
|
-
handleSubmit(values);
|
|
131
|
-
},
|
|
132
|
-
id: "register-interest-form",
|
|
133
|
-
children: ({ values, errors, touched, handleBlur, handleChange, setFieldValue, setFieldTouched }) => {
|
|
134
|
-
const onChangeWithTouch = async (e) => {
|
|
135
|
-
const field = e.target;
|
|
136
|
-
await setFieldValue(field.name, field.value, false);
|
|
137
|
-
await setFieldTouched(field.name);
|
|
138
|
-
};
|
|
139
|
-
const oneOfCheckbox = values.mailingList && !mailingListDisabled || values.privateInvestorList && !privateInvestorListDisabled;
|
|
140
|
-
const optionalCheckBoxForm = optionalCheckBox ? values.optionalCheckBoxChecked : true;
|
|
141
|
-
const handleCheckboxChange = (e) => {
|
|
142
|
-
handleChange(e);
|
|
143
|
-
if (e.target.checked) {
|
|
144
|
-
updateCheckedCheckboxes([...checkedCheckboxes, e.target.id]);
|
|
145
|
-
} else {
|
|
146
|
-
updateCheckedCheckboxes(checkedCheckboxes.filter((item) => item !== e.target.id));
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const requiresIdentityFields = !isLoggedIn;
|
|
150
|
-
const submitDisabled = requiresIdentityFields && (!values.email || !!errors.email || !values.name || !!errors.name) || isSubmitting || !oneOfCheckbox || !optionalCheckBoxForm;
|
|
151
|
-
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
152
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
153
|
-
!isLoggedIn && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
154
|
-
/* @__PURE__ */ jsx(
|
|
155
|
-
Input,
|
|
156
|
-
{
|
|
157
|
-
id: "new-venture-email",
|
|
158
|
-
name: "email",
|
|
159
|
-
type: "email",
|
|
160
|
-
label: "Your email",
|
|
161
|
-
value: values.email,
|
|
162
|
-
onChange: onChangeWithTouch,
|
|
163
|
-
onBlur: handleBlur,
|
|
164
|
-
error: !!errors.email,
|
|
165
|
-
touched: !!touched.email,
|
|
166
|
-
"data-cy": "new-venture-modal-email-input"
|
|
167
|
-
}
|
|
168
|
-
),
|
|
169
|
-
/* @__PURE__ */ jsx(FormError, { show: touched.email && errors.email, children: errors.email }),
|
|
170
|
-
/* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, paddingVeticalHalf: true, noPaddingBottom: true, children: [
|
|
171
|
-
/* @__PURE__ */ jsx(
|
|
172
|
-
Input,
|
|
173
|
-
{
|
|
174
|
-
id: "new-venture-name",
|
|
175
|
-
name: "name",
|
|
176
|
-
type: "text",
|
|
177
|
-
label: "Your name",
|
|
178
|
-
value: values.name,
|
|
179
|
-
onChange: onChangeWithTouch,
|
|
180
|
-
onBlur: handleBlur,
|
|
181
|
-
error: !!errors.name,
|
|
182
|
-
touched: !!touched.name,
|
|
183
|
-
"data-cy": "new-venture-modal-name-input"
|
|
184
|
-
}
|
|
185
|
-
),
|
|
186
|
-
/* @__PURE__ */ jsx(FormError, { show: touched.name && errors.name, children: errors.name })
|
|
187
|
-
] })
|
|
188
|
-
] }),
|
|
189
|
-
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "1rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
190
|
-
stdin_default$2,
|
|
191
|
-
{
|
|
192
|
-
id: "createPrivateInvestor",
|
|
193
|
-
name: "privateInvestorList",
|
|
194
|
-
text: privateInvestorListText,
|
|
195
|
-
checked: values.privateInvestorList,
|
|
196
|
-
disabled: privateInvestorListDisabled,
|
|
197
|
-
onChange: handleCheckboxChange,
|
|
198
|
-
onBlur: handleBlur,
|
|
199
|
-
"data-cy": "new-venture-modal-private-investor-checkbox"
|
|
200
|
-
}
|
|
201
|
-
) }),
|
|
202
|
-
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
203
|
-
stdin_default$2,
|
|
204
|
-
{
|
|
205
|
-
id: "subscribeToProject",
|
|
206
|
-
name: "mailingList",
|
|
207
|
-
text: mailingListText,
|
|
208
|
-
checked: values.mailingList,
|
|
209
|
-
disabled: mailingListDisabled,
|
|
210
|
-
onChange: handleCheckboxChange,
|
|
211
|
-
onBlur: handleBlur,
|
|
212
|
-
"data-cy": "new-venture-modal-mailing-list-checkbox"
|
|
213
|
-
}
|
|
214
|
-
) }),
|
|
215
|
-
optionalCheckBox && /* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
216
|
-
stdin_default$2,
|
|
217
|
-
{
|
|
218
|
-
id: "optionalCheckBox",
|
|
219
|
-
name: "optionalCheckBoxChecked",
|
|
220
|
-
text: optionalCheckBoxText,
|
|
221
|
-
value: values.optionalCheckBoxChecked,
|
|
222
|
-
checked: values.optionalCheckBoxChecked,
|
|
223
|
-
onChange: handleChange,
|
|
224
|
-
onBlur: handleBlur,
|
|
225
|
-
"data-cy": "new-venture-modal-optional-checkbox"
|
|
226
|
-
}
|
|
227
|
-
) }),
|
|
228
|
-
project.type === ProjectTypes.FUND && /* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
229
|
-
"p",
|
|
230
|
-
{
|
|
231
|
-
style: {
|
|
232
|
-
margin: 0,
|
|
233
|
-
fontSize: 12
|
|
234
|
-
},
|
|
235
|
-
children: /* @__PURE__ */ jsx("strong", { children: "The fund, as well as its fund manager(s) and affiliates, may not be subject to any registration or other local marketing or private placement laws in your jurisdiction." })
|
|
236
|
-
}
|
|
237
|
-
) })
|
|
238
|
-
] }) }),
|
|
239
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsx(
|
|
240
|
-
stdin_default,
|
|
241
|
-
{
|
|
242
|
-
type: "submit",
|
|
243
|
-
id: "private-investor-subscribe-button",
|
|
244
|
-
"data-cy": "new-venture-modal-register-submit",
|
|
245
|
-
disabled: submitDisabled,
|
|
246
|
-
children: "register"
|
|
247
|
-
}
|
|
248
|
-
) }),
|
|
249
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError, children: popupError }) })
|
|
250
|
-
] });
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
) }) })
|
|
254
|
-
] })
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
};
|
|
258
|
-
NewVentureModal.propTypes = {
|
|
259
|
-
isModalOpen: PropTypes.bool.isRequired,
|
|
260
|
-
onModalClose: PropTypes.func.isRequired,
|
|
261
|
-
onFormSend: PropTypes.func.isRequired,
|
|
262
|
-
onModalSwitch: PropTypes.func,
|
|
263
|
-
title: PropTypes.string,
|
|
264
|
-
description: PropTypes.string,
|
|
265
|
-
popupError: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
266
|
-
project: PropTypes.object,
|
|
267
|
-
successMsg: PropTypes.node,
|
|
268
|
-
errorMsg: PropTypes.node,
|
|
269
|
-
modalBotContent: PropTypes.node
|
|
270
|
-
};
|
|
271
|
-
export {
|
|
272
|
-
NewVentureModal
|
|
273
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
import { RED_BASE_HEX } from "../../constants/style.js";
|
|
6
|
-
import { Modal } from "../Modal/Modal.js";
|
|
7
|
-
import { Text } from "../Text/Text.styles.js";
|
|
8
|
-
import { TextLink } from "../TextLink/TextLink.styles.js";
|
|
9
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
|
-
import { ContainerWithLine } from "./RegisterConfirmModal.styles.js";
|
|
11
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
12
|
-
import { FormError } from "../Form/Form.styles.js";
|
|
13
|
-
import { ModalInner } from "../Modal/Modal.styles.js";
|
|
14
|
-
const RedBar = styled.div`
|
|
15
|
-
background: ${RED_BASE_HEX};
|
|
16
|
-
bottom: 0;
|
|
17
|
-
height: 30%;
|
|
18
|
-
position: absolute;
|
|
19
|
-
right: 0;
|
|
20
|
-
width: 50%;
|
|
21
|
-
`;
|
|
22
|
-
const RegisterConfirmModal = ({
|
|
23
|
-
id,
|
|
24
|
-
userInfo,
|
|
25
|
-
isModalOpen,
|
|
26
|
-
onModalClose,
|
|
27
|
-
onResend,
|
|
28
|
-
popupError,
|
|
29
|
-
popupSuccess,
|
|
30
|
-
isActionLoading,
|
|
31
|
-
cooldown
|
|
32
|
-
}) => {
|
|
33
|
-
const userEmail = userInfo && userInfo.email;
|
|
34
|
-
return /* @__PURE__ */ jsxs(Modal, { isOpen: isModalOpen, onClose: onModalClose, closeIsFullHeight: true, id, children: [
|
|
35
|
-
/* @__PURE__ */ jsx(Row, { isConfirmModal: true, children: /* @__PURE__ */ jsx(Column, { part: 10, isConfirmModal: true, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsxs(ContainerWithLine, { children: [
|
|
36
|
-
/* @__PURE__ */ jsxs(Text, { children: [
|
|
37
|
-
/* @__PURE__ */ jsx("h3", { children: "VERIFY YOUR EMAIL ADDRESS" }),
|
|
38
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
39
|
-
"A verification link has been sent to ",
|
|
40
|
-
userEmail,
|
|
41
|
-
". Please follow the link in the email to confirm your email address and activate your account."
|
|
42
|
-
] })
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ jsxs(Text.Caption, { children: [
|
|
45
|
-
"Email not received?",
|
|
46
|
-
/* @__PURE__ */ jsx("br", {})
|
|
47
|
-
] }),
|
|
48
|
-
/* @__PURE__ */ jsx(
|
|
49
|
-
TextLink,
|
|
50
|
-
{
|
|
51
|
-
to: "",
|
|
52
|
-
"data-cy": "register-confirm-modal-resend-email",
|
|
53
|
-
onClick: onResend,
|
|
54
|
-
disabled: cooldown?.isDisabled,
|
|
55
|
-
children: isActionLoading === "resend" ? "Resending email" : "Resend verification email"
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "resend", children: popupError.message }) }),
|
|
59
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupSuccess.popup === "resend", children: popupSuccess.message }) }),
|
|
60
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: cooldown?.isDisabled && /* @__PURE__ */ jsx(FormError, { show: cooldown?.isDisabled, children: `You can resend email in ${cooldown?.secondsRemaining} seconds` }) })
|
|
61
|
-
] }) }) }) }),
|
|
62
|
-
/* @__PURE__ */ jsx(RedBar, {})
|
|
63
|
-
] });
|
|
64
|
-
};
|
|
65
|
-
RegisterConfirmModal.propTypes = {
|
|
66
|
-
isModalOpen: PropTypes.bool.isRequired,
|
|
67
|
-
onModalClose: PropTypes.func.isRequired
|
|
68
|
-
};
|
|
69
|
-
var stdin_default = RegisterConfirmModal;
|
|
70
|
-
export {
|
|
71
|
-
ContainerWithLine,
|
|
72
|
-
RegisterConfirmModal,
|
|
73
|
-
stdin_default as default
|
|
74
|
-
};
|