@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.
Files changed (74) hide show
  1. package/dist/components/Input/InputPassword.js +3 -5
  2. package/dist/components/Input/OtpInput.js +1 -3
  3. package/dist/components/MenuNav/MenuNav.styles.js +1 -2
  4. package/dist/components/Modal/Modal.styles.js +2 -3
  5. package/dist/components/Newsletter/Newsletter.js +1 -3
  6. package/dist/components/NotificationCounter/NotificationCounter.styles.js +1 -2
  7. package/dist/components/SmartLink/SmartLink.js +0 -2
  8. package/dist/components/StepController/StepController.js +3 -5
  9. package/dist/components/StepController/StepController.styles.js +102 -1
  10. package/dist/components/StepController/StepControllerProgress.js +1 -1
  11. package/dist/components/Switch/Switch.js +1 -3
  12. package/dist/components/ToDoList/ToDoListTask.js +15 -3
  13. package/dist/components/taxId/register-taxid.js +7 -5
  14. package/dist/index.js +67 -141
  15. package/dist/runtime-config.js +4 -70
  16. package/dist/styles/global.js +1 -2
  17. package/dist/utils/check-todo-status.js +1 -2
  18. package/package.json +8 -14
  19. package/dist/api/authenticationApi.js +0 -13
  20. package/dist/auth/index.js +0 -34
  21. package/dist/components/2FA/Connect2FA.js +0 -58
  22. package/dist/components/2FA/EnterCode.js +0 -74
  23. package/dist/components/2FA/InstallAuthApp.js +0 -68
  24. package/dist/components/2FA/ResetCode.js +0 -34
  25. package/dist/components/2FA/Sucess2FA.js +0 -63
  26. package/dist/components/2FA/disable-2fa-flow.js +0 -104
  27. package/dist/components/2FA/enable-2fa-flow.js +0 -167
  28. package/dist/components/2FA/login-with-otp-flow.js +0 -262
  29. package/dist/components/2FA/main-flow.js +0 -273
  30. package/dist/components/Footer/Footer.js +0 -69
  31. package/dist/components/Footer/Footer.styles.js +0 -277
  32. package/dist/components/Footer/FooterLayout.js +0 -150
  33. package/dist/components/Footer/FooterMenu.js +0 -107
  34. package/dist/components/Footer/FooterMenu.styles.js +0 -334
  35. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -121
  36. package/dist/components/Header/Header.js +0 -441
  37. package/dist/components/Header/Header.styles.js +0 -568
  38. package/dist/components/Layout/Layout.js +0 -76
  39. package/dist/components/LoginModal/LoginModal.js +0 -165
  40. package/dist/components/MainMenu/DynamicMainMenu.js +0 -38
  41. package/dist/components/MainMenu/MainMenu.js +0 -220
  42. package/dist/components/MainMenu/MainMenu.styles.js +0 -362
  43. package/dist/components/Modal/NewVentureModal/NewVentureModal.js +0 -273
  44. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -74
  45. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -20
  46. package/dist/components/RegisterModal/RegisterModal.js +0 -278
  47. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +0 -40
  48. package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +0 -41
  49. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +0 -145
  50. package/dist/components/StepsProgress/StepIndicator.js +0 -40
  51. package/dist/components/StepsProgress/StepIndicator.styles.js +0 -69
  52. package/dist/components/StepsProgress/StepsProgress.js +0 -67
  53. package/dist/components/StepsProgress/StepsProgress.styles.js +0 -105
  54. package/dist/components/TermsModal/TermsModal.js +0 -145
  55. package/dist/components/TermsModal/_styles.js +0 -313
  56. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +0 -122
  57. package/dist/components/headerHo/HeaderHo.js +0 -707
  58. package/dist/config.js +0 -33
  59. package/dist/context/Auth.js +0 -423
  60. package/dist/context/AuthContext.js +0 -1016
  61. package/dist/firebase-config.js +0 -56
  62. package/dist/hooks/useNewVentureForm.js +0 -235
  63. package/dist/static/images/background3.png.js +0 -4
  64. package/dist/static/images/google_auth.png.js +0 -4
  65. package/dist/static/images/iso27001-black.svg.js +0 -4
  66. package/dist/static/images/mangopay.svg.js +0 -4
  67. package/dist/static/images/social/Facebook_Logo.png.js +0 -4
  68. package/dist/static/images/social/LI-In-Bug.png.js +0 -4
  69. package/dist/static/images/social/Telegram-Logo.png.js +0 -4
  70. package/dist/static/images/social/X-logo-black.png.js +0 -4
  71. package/dist/static/images/social/youtube_social_circle_red.png.js +0 -4
  72. package/dist/utils/show-account-locked-modal.js +0 -23
  73. package/dist/utils/user-identity.js +0 -10
  74. package/dist/utils/withRouter.js +0 -26
@@ -1,165 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import React__default from "react";
3
- import PropTypes from "prop-types";
4
- import { useLocation } from "react-router-dom";
5
- import { Formik } from "formik";
6
- import * as Yup from "yup";
7
- import { Modal } from "../Modal/Modal.js";
8
- import stdin_default$1 from "../Form/Form.js";
9
- import { Text } from "../Text/Text.styles.js";
10
- import { Input } from "../Input/Input.js";
11
- import stdin_default$2 from "../Input/InputPassword.js";
12
- import stdin_default$3 from "../Button/Button.styles.js";
13
- import { TextLink } from "../TextLink/TextLink.styles.js";
14
- import { Row, Column } from "../Grid/Grid.styles.js";
15
- import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
16
- import { emailRegex } from "../../constants/globalVariables.js";
17
- import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
18
- import { FormField, FormError } from "../Form/Form.styles.js";
19
- const LoginModal = (props) => {
20
- const [email, setEmail] = React__default.useState();
21
- const location = useLocation();
22
- React__default.useEffect(() => {
23
- const { search } = location;
24
- const query = new URLSearchParams(search);
25
- const _email = query.get("email");
26
- if (_email) {
27
- setEmail(_email);
28
- }
29
- }, [location]);
30
- const validationSchema = Yup.object().shape({
31
- email: Yup.string().matches(emailRegex, "Oops, that's not a valid address").required("Oops, this can't be blank"),
32
- password: Yup.string().min(6, "Password must be at least 6 characters").required("Password is required")
33
- });
34
- const {
35
- popupError,
36
- isModalOpen,
37
- onModalClose,
38
- onFormSend,
39
- onModalSwitch,
40
- onForgotPassword,
41
- isActionLoading,
42
- background
43
- } = props;
44
- return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
45
- /* @__PURE__ */ jsxs(Column, { part: 8, children: [
46
- /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
47
- /* @__PURE__ */ jsx("h3", { children: "Log in" }),
48
- /* @__PURE__ */ jsx("p", { children: "Access your account and manage your investments." })
49
- ] }) }),
50
- /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
51
- "Don't have an account? ",
52
- /* @__PURE__ */ jsx(
53
- ModalLink,
54
- {
55
- type: "button",
56
- to: "#",
57
- as: "button",
58
- "data-cy": "login-modal-switch-to-signup",
59
- onClick: onModalSwitch,
60
- children: "Sign up"
61
- }
62
- )
63
- ] }) })
64
- ] }),
65
- /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
66
- Formik,
67
- {
68
- initialValues: { email: email || "", password: "" },
69
- validateOnChange: true,
70
- validateOnBlur: true,
71
- validationSchema,
72
- onSubmit: (values) => {
73
- onFormSend(values);
74
- },
75
- children: ({ values, errors, touched, handleChange, handleBlur }) => {
76
- const submitDisabled = !values.email || !values.password || !!errors.email || !!errors.password || isActionLoading === "login";
77
- return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
78
- /* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
79
- /* @__PURE__ */ jsx(
80
- Input,
81
- {
82
- id: "sign-up-email",
83
- name: "email",
84
- type: "email",
85
- label: "Your email",
86
- value: values.email,
87
- onChange: handleChange,
88
- onBlur: handleBlur,
89
- error: !!errors.email,
90
- touched: !!touched.email,
91
- autoComplete: "email",
92
- autoFocus: true,
93
- "data-cy": "login-modal-email-input"
94
- }
95
- ),
96
- /* @__PURE__ */ jsx(FormError, { show: errors.email && touched.email, children: errors.email })
97
- ] }) }),
98
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
99
- /* @__PURE__ */ jsx(
100
- stdin_default$2,
101
- {
102
- id: "sign-up-password",
103
- name: "password",
104
- type: "password",
105
- label: "Password",
106
- value: values.password,
107
- onChange: handleChange,
108
- onBlur: handleBlur,
109
- error: !!errors.password,
110
- touched: !!touched.password,
111
- autoComplete: "current-password",
112
- "data-cy": "login-modal-password-input"
113
- }
114
- ),
115
- /* @__PURE__ */ jsx(FormError, { show: errors.password && touched.password, children: errors.password })
116
- ] }) }),
117
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
118
- stdin_default$3,
119
- {
120
- type: "submit",
121
- id: "login-submit-btn",
122
- "data-cy": "login-modal-submit",
123
- fluid: true,
124
- disabled: submitDisabled,
125
- children: isActionLoading === "login" ? "Logging in" : "Login"
126
- }
127
- ) }),
128
- /* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "login", children: popupError.message }) }),
129
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
130
- TextLink,
131
- {
132
- type: "button",
133
- as: "button",
134
- "data-cy": "login-modal-forgot-password",
135
- onClick: (...args) => {
136
- values.password = "";
137
- onForgotPassword(...args);
138
- },
139
- children: "Forgot password?"
140
- }
141
- ) })
142
- ] });
143
- }
144
- }
145
- ) }) })
146
- ] }) });
147
- };
148
- LoginModal.propTypes = {
149
- isModalOpen: PropTypes.bool.isRequired,
150
- onModalClose: PropTypes.func.isRequired,
151
- onFormSend: PropTypes.func.isRequired,
152
- onModalSwitch: PropTypes.func.isRequired,
153
- onForgotPassword: PropTypes.func.isRequired,
154
- isActionLoading: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
155
- popupError: PropTypes.shape({
156
- popup: PropTypes.string,
157
- message: PropTypes.string
158
- }).isRequired,
159
- background: PropTypes.string
160
- };
161
- var stdin_default = LoginModal;
162
- export {
163
- LoginModal,
164
- stdin_default as default
165
- };
@@ -1,38 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import "react";
3
- import PropTypes from "prop-types";
4
- import { Collapse } from "react-collapse";
5
- import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption } from "./MainMenu.styles.js";
6
- const DynamicMainMenu = (props) => {
7
- const spanStyleForMenu = {
8
- letterSpacing: "2px",
9
- cursor: "pointer"
10
- };
11
- const { options = [], isMenuActive = false } = props;
12
- return /* @__PURE__ */ jsx(StyledMainMenu, { children: /* @__PURE__ */ jsx(Collapse, { isOpened: isMenuActive, children: /* @__PURE__ */ jsx(MainMenuContainer, { children: /* @__PURE__ */ jsx(MainMenuOptions, { children: options?.map((item, index) => {
13
- return /* @__PURE__ */ jsx(
14
- MainMenuOption,
15
- {
16
- type: "button",
17
- as: "button",
18
- button: true,
19
- onClick: item.onClick,
20
- noBorder: true,
21
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: item.name })
22
- },
23
- item.name + index.toString()
24
- );
25
- }) }) }) }) });
26
- };
27
- const optionsShape = PropTypes.shape({
28
- name: PropTypes.string.isRequired,
29
- onClick: PropTypes.func.isRequired
30
- });
31
- DynamicMainMenu.propTypes = {
32
- isMenuActive: PropTypes.bool.isRequired,
33
- options: PropTypes.arrayOf(optionsShape)
34
- };
35
- var stdin_default = DynamicMainMenu;
36
- export {
37
- stdin_default as default
38
- };
@@ -1,220 +0,0 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { PureComponent } from "react";
3
- import PropTypes from "prop-types";
4
- import { Collapse } from "react-collapse";
5
- import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption, ExpandArrow, Settings, SettingsOptions, SettingsOption } from "./MainMenu.styles.js";
6
- import stdin_default$1 from "../Button/Button.styles.js";
7
- import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
8
- import { getConfig } from "../../runtime-config.js";
9
- import { withRouter } from "../../utils/withRouter.js";
10
- import { hasLoggedInSession } from "../../utils/user-identity.js";
11
- import { navigateToHref } from "../../routing/navigate-app.js";
12
- class MainMenuClass extends PureComponent {
13
- state = {
14
- isSettingsActive: false,
15
- isScrollDown: false,
16
- lastScroll: 0,
17
- overrideHeightNeeded: true
18
- };
19
- componentDidMount() {
20
- }
21
- componentWillUnmount() {
22
- }
23
- toggleSettings = () => {
24
- this.setState((prevState) => ({
25
- isSettingsActive: !prevState.isSettingsActive
26
- }));
27
- };
28
- // onScroll = () => {
29
- // const { lastScroll, isScrollDown, overrideHeightNeeded } = this.state
30
- // const { scrollY } = window
31
- // const newScrollDown = scrollY > lastScroll
32
- // const newState = {
33
- // lastScroll: scrollY,
34
- // }
35
- // if (newScrollDown !== isScrollDown) {
36
- // newState.isScrollDown = newScrollDown
37
- // }
38
- // if (overrideHeightNeeded) {
39
- // newState.overrideHeightNeeded = false
40
- // }
41
- // this.setState(newState)
42
- // }
43
- setScrollUp = () => {
44
- this.setState({
45
- isScrollDown: false
46
- });
47
- };
48
- checkActive = (url) => typeof window !== "undefined" ? window.location.href.split("/").indexOf(url) > 0 : false;
49
- render() {
50
- const { isSettingsActive, isScrollDown, overrideHeightNeeded } = this.state;
51
- const {
52
- isMenuActive,
53
- user,
54
- logoutUser,
55
- admin: isAdmin = false,
56
- platformUrlForUserMenu,
57
- isVentureDashboard,
58
- navigate
59
- } = this.props;
60
- const spanStyleForMenu = {
61
- letterSpacing: "1.5px",
62
- cursor: "pointer"
63
- };
64
- const isUserLogged = hasLoggedInSession(user);
65
- return /* @__PURE__ */ jsxs(StyledMainMenu, { children: [
66
- /* @__PURE__ */ jsx(IoniconsStyles, {}),
67
- /* @__PURE__ */ jsx(Collapse, { isOpened: isMenuActive && isUserLogged, hasNestedCollapse: true, children: /* @__PURE__ */ jsxs(MainMenuContainer, { children: [
68
- /* @__PURE__ */ jsxs(
69
- Collapse,
70
- {
71
- isOpened: !isScrollDown || isVentureDashboard,
72
- style: overrideHeightNeeded ? { height: "auto" } : {},
73
- hasNestedCollapse: true,
74
- children: [
75
- /* @__PURE__ */ jsxs(MainMenuOptions, { children: [
76
- !isVentureDashboard && /* @__PURE__ */ jsx(
77
- MainMenuOption,
78
- {
79
- as: "button",
80
- type: "button",
81
- button: true,
82
- nameOption: true,
83
- isVenture: isAdmin,
84
- isDashboard: true,
85
- onClick: () => {
86
- if (isAdmin) {
87
- navigateToHref(navigate, getConfig("adminUrl"));
88
- } else if (!platformUrlForUserMenu) {
89
- navigate("/overview");
90
- } else {
91
- navigateToHref(navigate, `${getConfig("dashboardUrl")}/overview`);
92
- }
93
- },
94
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Dashboard" })
95
- }
96
- ),
97
- isAdmin ? /* @__PURE__ */ jsx(Fragment, { children: isVentureDashboard && /* @__PURE__ */ jsx(
98
- MainMenuOption,
99
- {
100
- as: "button",
101
- type: "button",
102
- button: true,
103
- onClick: () => {
104
- this.props.navigate("/settings");
105
- },
106
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Settings" })
107
- }
108
- ) }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
109
- MainMenuOption,
110
- {
111
- as: "button",
112
- type: "button",
113
- button: true,
114
- isOpened: isSettingsActive,
115
- onClick: this.toggleSettings,
116
- isSettings: true,
117
- children: [
118
- /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Settings" }),
119
- /* @__PURE__ */ jsx(ExpandArrow, { isOpened: isSettingsActive })
120
- ]
121
- }
122
- ) }),
123
- /* @__PURE__ */ jsx(MainMenuOption, { children: /* @__PURE__ */ jsx(stdin_default$1, { negative: true, onClick: () => logoutUser(), children: "log out" }) })
124
- ] }),
125
- !isAdmin && /* @__PURE__ */ jsx(Settings, { children: /* @__PURE__ */ jsx(Collapse, { isOpened: isSettingsActive, children: /* @__PURE__ */ jsxs(SettingsOptions, { children: [
126
- /* @__PURE__ */ jsx(
127
- SettingsOption,
128
- {
129
- isActive: this.checkActive("profile-and-privacy"),
130
- onClick: () => {
131
- window.location.replace(`${platformUrlForUserMenu}/settings/profile-and-privacy`);
132
- },
133
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Profile & Privacy" })
134
- }
135
- ),
136
- /* @__PURE__ */ jsx(
137
- SettingsOption,
138
- {
139
- isActive: this.checkActive("liquid-address"),
140
- onClick: () => {
141
- window.location.replace(`${platformUrlForUserMenu}/settings/liquid-address`);
142
- },
143
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Liquid Addresses" })
144
- }
145
- ),
146
- /* @__PURE__ */ jsx(
147
- SettingsOption,
148
- {
149
- isActive: this.checkActive("investment-eligibility"),
150
- onClick: () => {
151
- window.location.replace(`${platformUrlForUserMenu}/settings/investment-eligibility`);
152
- },
153
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Investment eligibility" })
154
- }
155
- )
156
- ] }) }) })
157
- ]
158
- }
159
- ),
160
- !isAdmin && /* @__PURE__ */ jsx(Collapse, { isOpened: isScrollDown, hasNestedCollapse: true, children: /* @__PURE__ */ jsxs(SettingsOptions, { children: [
161
- /* @__PURE__ */ jsx(
162
- SettingsOption,
163
- {
164
- scrollDown: true,
165
- isActive: this.checkActive("profile-and-privacy"),
166
- onClick: () => {
167
- window.location.replace(`${platformUrlForUserMenu}/settings/profile-and-privacy`);
168
- },
169
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Profile & Privacy" })
170
- }
171
- ),
172
- /* @__PURE__ */ jsx(
173
- SettingsOption,
174
- {
175
- scrollDown: true,
176
- isActive: this.checkActive("liquid-address"),
177
- onClick: () => {
178
- window.location.replace(`${platformUrlForUserMenu}/settings/liquid-address`);
179
- },
180
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Liquid Addresses" })
181
- }
182
- ),
183
- /* @__PURE__ */ jsx(
184
- SettingsOption,
185
- {
186
- scrollDown: true,
187
- isActive: this.checkActive("investment-eligibility"),
188
- onClick: () => {
189
- window.location.replace(`${platformUrlForUserMenu}/settings/investment-eligibility`);
190
- },
191
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "Investment eligiblity" })
192
- }
193
- ),
194
- /* @__PURE__ */ jsx(
195
- SettingsOption,
196
- {
197
- scrollDown: true,
198
- onClick: () => {
199
- this.setScrollUp();
200
- },
201
- children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: "More" })
202
- }
203
- )
204
- ] }) })
205
- ] }) })
206
- ] });
207
- }
208
- }
209
- MainMenuClass.propTypes = {
210
- isMenuActive: PropTypes.bool.isRequired,
211
- admin: PropTypes.bool,
212
- navigate: PropTypes.func
213
- };
214
- const MainMenu = withRouter(MainMenuClass);
215
- var stdin_default = MainMenu;
216
- export {
217
- MainMenu,
218
- MainMenuClass,
219
- stdin_default as default
220
- };