@stokr/components-library 3.0.16-alpha.7 → 3.0.16-alpha.9
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/analytics/index.js +180 -0
- package/dist/api/auth.js +15 -0
- package/dist/api/fetchData.js +27 -0
- package/dist/api/fetchDataPublic.js +19 -0
- package/dist/auth/index.js +30 -19
- package/dist/components/2FA/Connect2FA.js +55 -0
- package/dist/components/2FA/EnterCode.js +63 -0
- package/dist/components/2FA/InstallAuthApp.js +64 -0
- package/dist/components/2FA/ResetCode.js +33 -0
- package/dist/components/2FA/Sucess2FA.js +51 -0
- package/dist/components/2FA/disable-2fa-flow.js +91 -0
- package/dist/components/2FA/enable-2fa-flow.js +137 -0
- package/dist/components/2FA/login-with-otp-flow.js +206 -0
- package/dist/components/2FA/main-flow.js +217 -0
- package/dist/components/AccountBalance/AccountBalance.js +35 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +48 -0
- package/dist/components/AdminDashboard/Table/ReactTable.js +266 -0
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +65 -0
- package/dist/components/AdminDashboard/Table/Table.js +123 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +263 -0
- package/dist/components/AgreementItem/AgreementItem.js +39 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +32 -0
- package/dist/components/BackButton/BackButton.js +34 -0
- package/dist/components/BackButton/BackButton.styles.js +123 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.styles.js +119 -0
- package/dist/components/BasicTable/BasicTable.js +25 -0
- package/dist/components/BasicTable/BasicTable.styles.js +76 -0
- package/dist/components/BlogPost/BlogPost.js +98 -0
- package/dist/components/BlogPost/BlogPost.styles.js +230 -0
- package/dist/components/Button/Button.styles.js +207 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +51 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +18 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +41 -0
- package/dist/components/Card/Card.styles.js +97 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +133 -0
- package/dist/components/Checkbox/Checkbox.js +80 -0
- package/dist/components/Checkbox/Checkbox.styles.js +133 -0
- package/dist/components/Checklist/ChecklistCard.js +71 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +82 -0
- package/dist/components/Chips/Chip.js +23 -0
- package/dist/components/Chips/Chip.styles.js +72 -0
- package/dist/components/Chips/ChipWrapper.js +50 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +70 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +127 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +165 -0
- package/dist/components/ConfirmModal/ConfirmModal.js +185 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +44 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +16 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +151 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +443 -0
- package/dist/components/CryptoAddress/RadioWrap.js +47 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +34 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +125 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +25 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +111 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +27 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/components/FAQ/FAQ.js +73 -0
- package/dist/components/FAQ/FAQ.styles.js +128 -0
- package/dist/components/Footer/Footer.js +55 -0
- package/dist/components/Footer/Footer.styles.js +256 -0
- package/dist/components/Footer/FooterLayout.js +145 -0
- package/dist/components/Footer/FooterMenu.js +100 -0
- package/dist/components/Footer/FooterMenu.styles.js +321 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +100 -0
- package/dist/components/Form/Form.js +21 -0
- package/dist/components/Form/Form.styles.js +72 -0
- package/dist/components/Grid/Grid.styles.js +212 -0
- package/dist/components/Header/Header.js +425 -0
- package/dist/components/Header/Header.styles.js +567 -0
- package/dist/components/HeroBlock/HeroVideoBlock.js +105 -0
- package/dist/components/Icon/Icon.style.js +92 -0
- package/dist/components/Icon/Icon2.js +12 -0
- package/dist/components/InfoIcon/InfoIcon.js +62 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +64 -0
- package/dist/components/Input/DatePickerInput.js +139 -0
- package/dist/components/Input/DatePickerInput.styles.js +165 -0
- package/dist/components/Input/Input.js +108 -0
- package/dist/components/Input/Input.styles.js +154 -0
- package/dist/components/Input/InputPassword.js +122 -0
- package/dist/components/Input/InputPassword.styles.js +166 -0
- package/dist/components/Input/InputUsername.js +92 -0
- package/dist/components/Input/InputWithButton.js +53 -0
- package/dist/components/Input/InputWithButton.styles.js +57 -0
- package/dist/components/Input/MultiSelect.js +306 -0
- package/dist/components/Input/OtpInput.js +70 -0
- package/dist/components/Input/RangeInput.js +80 -0
- package/dist/components/Input/RangeInput.styles.js +129 -0
- package/dist/components/Input/SearchInput.js +68 -0
- package/dist/components/Input/SearchInput.styles.js +92 -0
- package/dist/components/Input/Select.js +151 -0
- package/dist/components/Input/Select.styles.js +148 -0
- package/dist/components/Input/TableFilterDropdown.js +247 -0
- package/dist/components/Input/Textarea.js +51 -0
- package/dist/components/Input/Textarea.styles.js +62 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +283 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +94 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +24 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +62 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +24 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +90 -0
- package/dist/components/Layout/Layout.js +69 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +32 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +208 -0
- package/dist/components/LearnMorePage/LearnMore.js +190 -0
- package/dist/components/LearnMorePage/LearnMore.propTypes.js +20 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +56 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +276 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +57 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +234 -0
- package/dist/components/LearnMoreSection/LearnMore.js +138 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +147 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +33 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +60 -0
- package/dist/components/LoginModal/LoginModal.js +142 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +38 -0
- package/dist/components/MainMenu/MainMenu.js +210 -0
- package/dist/components/MainMenu/MainMenu.styles.js +362 -0
- package/dist/components/MenuNav/MenuNav.styles.js +66 -0
- package/dist/components/Modal/Modal.js +119 -0
- package/dist/components/Modal/Modal.styles.js +450 -0
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +262 -0
- package/dist/components/Modal/PaymentModal.js +149 -0
- package/dist/components/Modal/SideModal.js +89 -0
- package/dist/components/Modal/SideModal.styles.js +55 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.js +170 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +53 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +30 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +105 -0
- package/dist/components/Newsletter/Newsletter.js +122 -0
- package/dist/components/Newsletter/Newsletter.styles.js +186 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +38 -0
- package/dist/components/Number/Number.js +50 -0
- package/dist/components/Number/Number.styles.js +23 -0
- package/dist/components/PageTransition/PageTransition.js +51 -0
- package/dist/components/Pagination/Pagination.js +58 -0
- package/dist/components/Pagination/Pagination.styles.js +59 -0
- package/dist/components/Pagination/PaginationControls.js +113 -0
- package/dist/components/Pagination/usePagination.js +40 -0
- package/dist/components/Payment/PaymentDetailsCard.js +224 -0
- package/dist/components/Payment/PaymentDisplay.js +199 -0
- package/dist/components/Payment/TimerComponent.js +92 -0
- package/dist/components/Process/Process.styles.js +84 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +35 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +53 -0
- package/dist/components/ProfileBox/ProfileBox.js +27 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +67 -0
- package/dist/components/ProfileStat/ProfileStat.js +29 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +90 -0
- package/dist/components/QRCode/QRCode.js +51 -0
- package/dist/components/Radio/Radio.js +51 -0
- package/dist/components/Radio/Radio.styles.js +100 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +64 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +65 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +20 -0
- package/dist/components/RegisterModal/RegisterModal.js +248 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +43 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +44 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +41 -0
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +134 -0
- package/dist/components/SEO/SEO.js +66 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +26 -0
- package/dist/components/SideLine/SideLine.js +7 -0
- package/dist/components/SideLine/SideLine.styles.js +33 -0
- package/dist/components/Slider/Slider.js +31 -0
- package/dist/components/Slider/Slider.styles.js +120 -0
- package/dist/components/Snackbar/Snackbar.js +111 -0
- package/dist/components/Snackbar/Snackbar.styles.js +230 -0
- package/dist/components/Snackbar/SnackbarProvider.js +66 -0
- package/dist/components/Snackbar/useSnackbar.js +12 -0
- package/dist/components/SpanButton/SpanButton.styles.js +19 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +18 -0
- package/dist/components/StatusTag/StatusTag.js +105 -0
- package/dist/components/StatusTag/StatusTag.styles.js +88 -0
- package/dist/components/StepController/StepController.js +86 -0
- package/dist/components/StepController/StepController.styles.js +33 -0
- package/dist/components/StepController/StepControllerContext.js +65 -0
- package/dist/components/StepController/StepControllerProgress.js +37 -0
- package/dist/components/StepsProgress/StepIndicator.js +40 -0
- package/dist/components/StepsProgress/StepIndicator.styles.js +69 -0
- package/dist/components/StepsProgress/StepsProgress.js +67 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +105 -0
- package/dist/components/StokrLoader/StokrLoader.js +111 -0
- package/dist/components/StokrLoader/media.js +23 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +27 -0
- package/dist/components/SvgIcons/CameraSvg.js +31 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +36 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +20 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +41 -0
- package/dist/components/SvgIcons/DocumentSvg.js +39 -0
- package/dist/components/SvgIcons/EthSvg.js +28 -0
- package/dist/components/SvgIcons/EurSvg.js +27 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +17 -0
- package/dist/components/SvgIcons/FourSvg.js +7 -0
- package/dist/components/SvgIcons/Glassess.js +26 -0
- package/dist/components/SvgIcons/LogoSvg.js +17 -0
- package/dist/components/SvgIcons/OneSvg.js +10 -0
- package/dist/components/SvgIcons/PassportSvg.js +37 -0
- package/dist/components/SvgIcons/RefreshSvg.js +28 -0
- package/dist/components/SvgIcons/SocialFacebook.js +22 -0
- package/dist/components/SvgIcons/SocialInstagram.js +13 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +31 -0
- package/dist/components/SvgIcons/SocialMedium.js +21 -0
- package/dist/components/SvgIcons/SocialReddit.js +21 -0
- package/dist/components/SvgIcons/SocialTelegram.js +60 -0
- package/dist/components/SvgIcons/SocialTwitter.js +62 -0
- package/dist/components/SvgIcons/SocialYoutube.js +22 -0
- package/dist/components/SvgIcons/ThreeSvg.js +7 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +48 -0
- package/dist/components/SvgIcons/TwoSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +12 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +11 -0
- package/dist/components/SvgIcons/UploadSvg.js +12 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +16 -0
- package/dist/components/Switch/Switch.js +63 -0
- package/dist/components/Switch/Switch.styles.js +126 -0
- package/dist/components/Tabs/Tabs.js +54 -0
- package/dist/components/Tabs/Tabs.styles.js +15 -0
- package/dist/components/TabsNav/TabNav.js +16 -0
- package/dist/components/TabsNav/TabsNav.js +30 -0
- package/dist/components/TabsNav/TabsNav.styles.js +103 -0
- package/dist/components/TeamOverview/TeamOverview.js +80 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +167 -0
- package/dist/components/TermsModal/TermsModal.js +145 -0
- package/dist/components/TermsModal/_styles.js +313 -0
- package/dist/components/Text/Text.styles.js +220 -0
- package/dist/components/TextLink/TextLink.styles.js +67 -0
- package/dist/components/Timeline/Timeline.js +44 -0
- package/dist/components/Timeline/Timeline.styles.js +147 -0
- package/dist/components/Timeline/TimelineStep.js +58 -0
- package/dist/components/ToDoList/ToDoList.js +172 -0
- package/dist/components/ToDoList/ToDoList.styles.js +122 -0
- package/dist/components/ToDoList/ToDoListTask.js +95 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +119 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +38 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +41 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +75 -0
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +126 -0
- package/dist/components/headerHo/HeaderHo.js +709 -0
- package/dist/components/icons/Arrow.js +38 -0
- package/dist/components/icons/ArrowSimple.js +34 -0
- package/dist/components/icons/Check.js +16 -0
- package/dist/components/icons/Facebook.js +10 -0
- package/dist/components/icons/Info.js +27 -0
- package/dist/components/icons/Instagram.js +10 -0
- package/dist/components/icons/LinkIcon.js +49 -0
- package/dist/components/icons/LinkedIn.js +13 -0
- package/dist/components/icons/Medium.js +13 -0
- package/dist/components/icons/Reddit.js +16 -0
- package/dist/components/icons/Share.js +31 -0
- package/dist/components/icons/Telegram.js +13 -0
- package/dist/components/icons/Twitter.js +10 -0
- package/dist/components/icons/X.js +10 -0
- package/dist/components/icons/Youtube.js +10 -0
- package/dist/components/icons/index.js +32 -0
- package/dist/components/landing-page/List.js +51 -0
- package/dist/components/landing-page/PageContent.js +65 -0
- package/dist/components/landing-page/PageText.js +171 -0
- package/dist/components/landing-page/PageTitle.js +259 -0
- package/dist/components/logo/Logo.js +57 -0
- package/dist/components/taxId/complete.js +24 -0
- package/dist/components/taxId/flow.js +53 -0
- package/dist/components/taxId/register-taxid.js +166 -0
- package/dist/config.js +44 -0
- package/dist/constants/globalVariables.js +87 -0
- package/dist/constants/style.js +48 -0
- package/dist/context/Auth.js +396 -0
- package/dist/context/AuthContext.js +783 -0
- package/dist/context/Checkbox/CheckboxContext.js +151 -0
- package/dist/firebase-config.js +73 -0
- package/dist/hooks/useNewVentureForm.js +262 -0
- package/dist/hooks/useTimer.js +89 -0
- package/dist/index.js +628 -13862
- package/dist/model/axios.js +10 -0
- package/dist/model/axiosPublic.js +9 -0
- package/dist/services/TimerService.js +80 -0
- package/dist/static/animations/checked.lottie.js +4 -0
- package/dist/static/animations/progress.lottie.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.ttf.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff2.js +4 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.eot.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.svg.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.ttf.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.woff.js +4 -0
- package/dist/static/images/add-folder-icon.svg.js +5 -0
- package/dist/static/images/address-refreshing.gif.js +4 -0
- package/dist/static/images/arrow-down-black.svg.js +4 -0
- package/dist/static/images/avatar-placeholder.png.js +4 -0
- package/dist/static/images/background3.png.js +4 -0
- package/dist/static/images/bitcoin-logo.svg.js +4 -0
- package/dist/static/images/bmn2-logo.svg.js +4 -0
- package/dist/static/images/check-icon.svg.js +5 -0
- package/dist/static/images/checkmark-circle-icon.svg.js +5 -0
- package/dist/static/images/close-circle-icon.svg.js +5 -0
- package/dist/static/images/copy_icon.svg.js +5 -0
- package/dist/static/images/cross-icon.svg.js +5 -0
- package/dist/static/images/early-adopter.png.js +4 -0
- package/dist/static/images/eth_logo.svg.js +4 -0
- package/dist/static/images/filter-icon.svg.js +5 -0
- package/dist/static/images/google_auth.png.js +4 -0
- package/dist/static/images/graduation.png.js +4 -0
- package/dist/static/images/mangopay.svg.js +4 -0
- package/dist/static/images/numbers/number_eight.svg.js +5 -0
- package/dist/static/images/numbers/number_five.svg.js +5 -0
- package/dist/static/images/numbers/number_four.svg.js +5 -0
- package/dist/static/images/numbers/number_nine.svg.js +5 -0
- package/dist/static/images/numbers/number_one.svg.js +5 -0
- package/dist/static/images/numbers/number_seven.svg.js +5 -0
- package/dist/static/images/numbers/number_six.svg.js +5 -0
- package/dist/static/images/numbers/number_three.svg.js +5 -0
- package/dist/static/images/numbers/number_two.svg.js +5 -0
- package/dist/static/images/numbers/number_zero.svg.js +5 -0
- package/dist/static/images/process-waiting.gif.js +4 -0
- package/dist/static/images/search-icon.svg.js +5 -0
- package/dist/static/images/social/Facebook_Logo.png.js +4 -0
- package/dist/static/images/social/LI-In-Bug.png.js +4 -0
- package/dist/static/images/social/Telegram-Logo.png.js +4 -0
- package/dist/static/images/social/X-logo-black.png.js +4 -0
- package/dist/static/images/social/youtube_social_circle_red.png.js +4 -0
- package/dist/static/images/transfer-icon.svg.js +5 -0
- package/dist/static/images/usdc-logo.svg.js +4 -0
- package/dist/static/images/usdq-logo.png.js +4 -0
- package/dist/static/images/warning-filled.svg.js +5 -0
- package/dist/styles/colors.js +56 -0
- package/dist/styles/fonts.js +100 -0
- package/dist/styles/global.js +74 -0
- package/dist/styles/grid.js +11 -0
- package/dist/styles/ioniconsStyles.js +31 -0
- package/dist/styles/reactTippy.js +40 -0
- package/dist/styles/rwd.js +56 -0
- package/dist/styles/semanticUi.js +84 -0
- package/dist/styles/spacing.js +8 -0
- package/dist/styles/theme.js +34 -0
- package/dist/utils/check-sale-time-left.js +85 -0
- package/dist/utils/check-todo-status.js +11 -0
- package/dist/utils/checklistGenerator.js +195 -0
- package/dist/utils/copyToClipboard.js +92 -0
- package/dist/utils/customHooks.js +126 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +12 -0
- package/dist/utils/fix-decimals.js +5 -0
- package/dist/utils/formatCurrencyValue.js +95 -0
- package/dist/utils/get-cookie-domain.js +10 -0
- package/dist/utils/get-short-address.js +4 -0
- package/dist/utils/isUSInvestor.js +6 -0
- package/dist/utils/km_ify.js +33 -0
- package/dist/utils/moment.js +26 -0
- package/dist/utils/redirect-url.js +5 -0
- package/dist/utils/saveAs.js +17 -0
- package/dist/utils/scrollUtils.js +63 -0
- package/dist/utils/set-redirect-cookie.js +16 -0
- package/dist/utils/transition.js +101 -0
- package/dist/utils/withRouter.js +24 -0
- package/package.json +6 -10
- package/dist/main-flow-BRH4NPpH.js +0 -11937
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import mixpanel from "mixpanel-browser";
|
|
2
|
+
const BLOCKED_FIELDS = /* @__PURE__ */ new Set([
|
|
3
|
+
// PII
|
|
4
|
+
"email",
|
|
5
|
+
"first_name",
|
|
6
|
+
"last_name",
|
|
7
|
+
"full_name",
|
|
8
|
+
"name",
|
|
9
|
+
"phone",
|
|
10
|
+
"date_of_birth",
|
|
11
|
+
"address",
|
|
12
|
+
"nationality",
|
|
13
|
+
"passport_number",
|
|
14
|
+
// Blockchain
|
|
15
|
+
"wallet_address",
|
|
16
|
+
"tx_hash",
|
|
17
|
+
"transaction_hash",
|
|
18
|
+
"block_hash",
|
|
19
|
+
"contract_address",
|
|
20
|
+
"signing_address",
|
|
21
|
+
// Financial precision — server sends bucketed values only
|
|
22
|
+
"amount",
|
|
23
|
+
"exact_amount",
|
|
24
|
+
"investment_amount",
|
|
25
|
+
"token_quantity",
|
|
26
|
+
"token_price",
|
|
27
|
+
"token_value",
|
|
28
|
+
"price",
|
|
29
|
+
"value",
|
|
30
|
+
"balance",
|
|
31
|
+
"nav",
|
|
32
|
+
"net_asset_value",
|
|
33
|
+
// Banking
|
|
34
|
+
"iban",
|
|
35
|
+
"bic",
|
|
36
|
+
"swift",
|
|
37
|
+
"bank_account",
|
|
38
|
+
"routing_number",
|
|
39
|
+
// KYC
|
|
40
|
+
"kyc_data",
|
|
41
|
+
"kyb_data",
|
|
42
|
+
"document_id",
|
|
43
|
+
"tax_id",
|
|
44
|
+
"ssn"
|
|
45
|
+
]);
|
|
46
|
+
const BLOCKED_PATTERNS = [
|
|
47
|
+
/address$/i,
|
|
48
|
+
// wallet_address, contract_address, billing_address
|
|
49
|
+
/hash$/i,
|
|
50
|
+
// tx_hash, block_hash
|
|
51
|
+
/^raw_/i,
|
|
52
|
+
/password/i,
|
|
53
|
+
/secret/i,
|
|
54
|
+
/private.*key/i,
|
|
55
|
+
/\bprice\b/i,
|
|
56
|
+
/exact/i
|
|
57
|
+
];
|
|
58
|
+
function sanitize(props) {
|
|
59
|
+
if (!props || typeof props !== "object" || Array.isArray(props)) {
|
|
60
|
+
return props ?? {};
|
|
61
|
+
}
|
|
62
|
+
const cleaned = {};
|
|
63
|
+
for (const [key, val] of Object.entries(props)) {
|
|
64
|
+
const isBlocked = BLOCKED_FIELDS.has(key.toLowerCase()) || BLOCKED_PATTERNS.some((re) => re.test(key));
|
|
65
|
+
if (isBlocked) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
cleaned[key] = val && typeof val === "object" && !Array.isArray(val) ? sanitize(val) : val;
|
|
69
|
+
}
|
|
70
|
+
return cleaned;
|
|
71
|
+
}
|
|
72
|
+
let initialized = false;
|
|
73
|
+
function initAnalytics({
|
|
74
|
+
token,
|
|
75
|
+
app,
|
|
76
|
+
requireConsent = false,
|
|
77
|
+
scroll = true,
|
|
78
|
+
apiHost = `https://analytics.${"stokr.info"}`
|
|
79
|
+
} = {}) {
|
|
80
|
+
if (initialized) return;
|
|
81
|
+
if (!token) return;
|
|
82
|
+
mixpanel.init(token, {
|
|
83
|
+
api_host: apiHost,
|
|
84
|
+
autocapture: {
|
|
85
|
+
pageview: "full-url",
|
|
86
|
+
click: false,
|
|
87
|
+
dead_click: false,
|
|
88
|
+
input: false,
|
|
89
|
+
rage_click: true,
|
|
90
|
+
scroll,
|
|
91
|
+
submit: true,
|
|
92
|
+
capture_text_content: false
|
|
93
|
+
},
|
|
94
|
+
record_sessions_percent: 100,
|
|
95
|
+
record_heatmap_data: true,
|
|
96
|
+
opt_out_tracking_by_default: requireConsent,
|
|
97
|
+
persistence: "localStorage",
|
|
98
|
+
debug: false
|
|
99
|
+
});
|
|
100
|
+
if (app) {
|
|
101
|
+
mixpanel.register({ app });
|
|
102
|
+
}
|
|
103
|
+
mixpanel.register({ source: "frontend" });
|
|
104
|
+
initialized = true;
|
|
105
|
+
}
|
|
106
|
+
function optIn() {
|
|
107
|
+
if (!initialized) return;
|
|
108
|
+
mixpanel.opt_in_tracking();
|
|
109
|
+
}
|
|
110
|
+
function optOut() {
|
|
111
|
+
if (!initialized) return;
|
|
112
|
+
mixpanel.opt_out_tracking();
|
|
113
|
+
}
|
|
114
|
+
function hasOptedIn() {
|
|
115
|
+
if (!initialized) return false;
|
|
116
|
+
return mixpanel.has_opted_in_tracking();
|
|
117
|
+
}
|
|
118
|
+
function track(eventName, props = {}) {
|
|
119
|
+
if (!initialized) return;
|
|
120
|
+
mixpanel.track(eventName, sanitize(props));
|
|
121
|
+
}
|
|
122
|
+
function timeEvent(eventName) {
|
|
123
|
+
if (!initialized) return;
|
|
124
|
+
mixpanel.time_event(eventName);
|
|
125
|
+
}
|
|
126
|
+
function identify(userId, traits = {}) {
|
|
127
|
+
if (!initialized) return;
|
|
128
|
+
mixpanel.identify(userId);
|
|
129
|
+
const sanitizedTraits = sanitize(traits);
|
|
130
|
+
if (Object.keys(sanitizedTraits).length > 0) {
|
|
131
|
+
mixpanel.people.set(sanitizedTraits);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function setUserProperties(props = {}) {
|
|
135
|
+
if (!initialized) return;
|
|
136
|
+
const sanitized = sanitize(props);
|
|
137
|
+
if (Object.keys(sanitized).length > 0) {
|
|
138
|
+
mixpanel.people.set(sanitized);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function alias(userId) {
|
|
142
|
+
if (!initialized) return;
|
|
143
|
+
mixpanel.alias(userId);
|
|
144
|
+
}
|
|
145
|
+
function reset() {
|
|
146
|
+
if (!initialized) return;
|
|
147
|
+
mixpanel.reset();
|
|
148
|
+
}
|
|
149
|
+
function getAmountBucket(amount) {
|
|
150
|
+
if (amount < 125e3) return "<125k";
|
|
151
|
+
if (amount < 25e4) return "125k-250k";
|
|
152
|
+
if (amount < 5e5) return "250k-500k";
|
|
153
|
+
if (amount < 1e6) return "500k-1M";
|
|
154
|
+
if (amount < 5e6) return "1M-5M";
|
|
155
|
+
return "5M+";
|
|
156
|
+
}
|
|
157
|
+
function getTokenBucket(qty) {
|
|
158
|
+
if (qty <= 1) return "0-1";
|
|
159
|
+
if (qty <= 10) return "2-10";
|
|
160
|
+
if (qty <= 100) return "11-100";
|
|
161
|
+
if (qty <= 1e3) return "101-1k";
|
|
162
|
+
if (qty <= 1e4) return "1k-10k";
|
|
163
|
+
if (qty <= 1e5) return "10k-100k";
|
|
164
|
+
if (qty <= 1e6) return "100k-1M";
|
|
165
|
+
return "1M+";
|
|
166
|
+
}
|
|
167
|
+
export {
|
|
168
|
+
alias,
|
|
169
|
+
getAmountBucket,
|
|
170
|
+
getTokenBucket,
|
|
171
|
+
hasOptedIn,
|
|
172
|
+
identify,
|
|
173
|
+
initAnalytics,
|
|
174
|
+
optIn,
|
|
175
|
+
optOut,
|
|
176
|
+
reset,
|
|
177
|
+
setUserProperties,
|
|
178
|
+
timeEvent,
|
|
179
|
+
track
|
|
180
|
+
};
|
package/dist/api/auth.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import axiosInstance from "../model/axios.js";
|
|
2
|
+
const authAPI = async (url, data) => {
|
|
3
|
+
try {
|
|
4
|
+
const result = await axiosInstance.post(`auth/${url}`, data);
|
|
5
|
+
console.log("Success!");
|
|
6
|
+
return result;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.log(`Error: ${error}`);
|
|
9
|
+
throw error;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
authAPI,
|
|
14
|
+
authAPI as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Cookies from "js-cookie";
|
|
2
|
+
import axiosInstance from "../model/axios.js";
|
|
3
|
+
const fetchData = async (url, data) => {
|
|
4
|
+
const accessToken = Cookies.get("STOKR_ACCESS_TOKEN");
|
|
5
|
+
const parsedData = JSON.stringify(data ?? {});
|
|
6
|
+
if (!accessToken) {
|
|
7
|
+
console.log("no access token");
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
const result = await axiosInstance({
|
|
11
|
+
method: "POST",
|
|
12
|
+
url,
|
|
13
|
+
data: parsedData,
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${accessToken}`
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return result.data;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.log(`Error: ${error}`);
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
fetchData as default,
|
|
26
|
+
fetchData
|
|
27
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import axiosInstance from "../model/axiosPublic.js";
|
|
2
|
+
const fetchDataPublic = async (url, data) => {
|
|
3
|
+
const parsedData = JSON.stringify(data);
|
|
4
|
+
try {
|
|
5
|
+
const result = await axiosInstance({
|
|
6
|
+
method: "POST",
|
|
7
|
+
url,
|
|
8
|
+
data: parsedData
|
|
9
|
+
});
|
|
10
|
+
return result.data;
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.log(`Error: ${error}`);
|
|
13
|
+
throw error;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
fetchDataPublic as default,
|
|
18
|
+
fetchDataPublic
|
|
19
|
+
};
|
package/dist/auth/index.js
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { configure, getConfig } from "../config.js";
|
|
2
|
+
import { default as default2 } from "../components/2FA/Connect2FA.js";
|
|
3
|
+
import { default as default3 } from "../components/2FA/enable-2fa-flow.js";
|
|
4
|
+
import { default as default4 } from "../components/2FA/EnterCode.js";
|
|
5
|
+
import { default as default5 } from "../components/2FA/InstallAuthApp.js";
|
|
6
|
+
import { default as default6 } from "../components/2FA/login-with-otp-flow.js";
|
|
7
|
+
import { default as default7 } from "../components/2FA/Sucess2FA.js";
|
|
8
|
+
import { default as default8 } from "../components/2FA/main-flow.js";
|
|
9
|
+
import { default as default9 } from "../components/2FA/ResetCode.js";
|
|
10
|
+
import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "../context/Auth.js";
|
|
11
|
+
import { AuthConsumer, AuthContext, AuthProvider } from "../context/AuthContext.js";
|
|
12
|
+
import { LoadingDots, StokrLoader, StokrLoaderBox } from "../components/StokrLoader/StokrLoader.js";
|
|
2
13
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
Auth,
|
|
15
|
+
AuthConsumer,
|
|
16
|
+
AuthContext,
|
|
17
|
+
AuthProvider,
|
|
18
|
+
default2 as Connect2FA,
|
|
19
|
+
DEFAULT_TOKEN_EXPIRY_MS,
|
|
20
|
+
default3 as Enable2FAFlow,
|
|
21
|
+
default4 as EnterCode,
|
|
22
|
+
default5 as InstallAuthApp,
|
|
23
|
+
LoadingDots,
|
|
24
|
+
default6 as LoginWithOTPFlow,
|
|
25
|
+
default8 as Main2FAFlow,
|
|
26
|
+
default9 as ResetCode,
|
|
27
|
+
StokrLoader,
|
|
28
|
+
StokrLoaderBox,
|
|
29
|
+
default7 as Sucess2FA,
|
|
30
|
+
configure,
|
|
31
|
+
getConfig
|
|
21
32
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { sizes } from "../../styles/rwd.js";
|
|
4
|
+
import { Text } from "../Text/Text.styles.js";
|
|
5
|
+
import { Button } from "../Button/Button.styles.js";
|
|
6
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
|
+
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
8
|
+
import QRCode from "react-qr-code";
|
|
9
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
|
+
import stdin_default$1 from "../CryptoAddress/CryptoAddress.js";
|
|
11
|
+
import { useMobileView } from "../../utils/customHooks.js";
|
|
12
|
+
const Connect2FA = (props) => {
|
|
13
|
+
const { changeStep, totpData } = props;
|
|
14
|
+
const isMobile = useMobileView(sizes.Mobile);
|
|
15
|
+
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
16
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx("h3", { children: "Activate log in 2FA" }),
|
|
19
|
+
/* @__PURE__ */ jsx("p", { children: "1. Open your authenticator app" }),
|
|
20
|
+
/* @__PURE__ */ jsx("p", { children: isMobile ? "2. Copy the set up key" : "2. Scan the QR code or copy the set up key" })
|
|
21
|
+
] }) }),
|
|
22
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
25
|
+
totpData && /* @__PURE__ */ jsxs(ComponentWrapper, { center: true, noPaddingHorizontal: true, children: [
|
|
26
|
+
!isMobile && /* @__PURE__ */ jsx(
|
|
27
|
+
QRCode,
|
|
28
|
+
{
|
|
29
|
+
size: 180,
|
|
30
|
+
value: totpData?.totpUri,
|
|
31
|
+
viewBox: `0 0 256 256`
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
stdin_default$1,
|
|
36
|
+
{
|
|
37
|
+
data: {
|
|
38
|
+
value: totpData.totpSecret?.secretKey,
|
|
39
|
+
tooltip: true
|
|
40
|
+
},
|
|
41
|
+
fontSize: 11,
|
|
42
|
+
wrapperStyle: { paddingRight: 0 },
|
|
43
|
+
dataBoxStyle: { width: "100%", whiteSpace: "nowrap" }
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, center: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { minWidth: "150px", onClick: changeStep, fluid: true, children: "Continue" }) })
|
|
48
|
+
] }) })
|
|
49
|
+
] }) });
|
|
50
|
+
};
|
|
51
|
+
var stdin_default = Connect2FA;
|
|
52
|
+
export {
|
|
53
|
+
Connect2FA,
|
|
54
|
+
stdin_default as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Formik } from "formik";
|
|
4
|
+
import { Modal } from "../Modal/Modal.js";
|
|
5
|
+
import stdin_default$1 from "../Form/Form.js";
|
|
6
|
+
import { Text } from "../Text/Text.styles.js";
|
|
7
|
+
import { Button } from "../Button/Button.styles.js";
|
|
8
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
10
|
+
import stdin_default$2 from "../Input/OtpInput.js";
|
|
11
|
+
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
12
|
+
import { FormField, FormError } from "../Form/Form.styles.js";
|
|
13
|
+
const Wrapper = ({ isModal, children, isModalOpen, onModalClose, background }) => isModal ? /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
14
|
+
const EnterCode = (props) => {
|
|
15
|
+
const { popupError = {}, onFormSend, onModalSwitch, isModal, isActionLoading } = props;
|
|
16
|
+
return /* @__PURE__ */ jsx(Wrapper, { isModal, ...props, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
18
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx("h3", { children: "Enter 2FA code" }),
|
|
20
|
+
/* @__PURE__ */ jsx("p", { children: "Enter the log in 2FA code from your authenticator app" })
|
|
21
|
+
] }) }),
|
|
22
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: onModalSwitch && /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", onClick: onModalSwitch, children: "Lost your device?" }) }) })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
|
|
25
|
+
Formik,
|
|
26
|
+
{
|
|
27
|
+
initialValues: { otpInput: "" },
|
|
28
|
+
onSubmit: (values) => {
|
|
29
|
+
onFormSend(values);
|
|
30
|
+
},
|
|
31
|
+
children: ({ values, errors, touched, setFieldValue, setFieldTouched }) => {
|
|
32
|
+
const submitDisabled = !touched.otpInput || !values.otpInput || isActionLoading === "enter2fa";
|
|
33
|
+
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
34
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
stdin_default$2,
|
|
37
|
+
{
|
|
38
|
+
id: "otp-input",
|
|
39
|
+
name: "otpInput",
|
|
40
|
+
numInputs: 6,
|
|
41
|
+
value: values.otpInput,
|
|
42
|
+
onChange: (e) => {
|
|
43
|
+
setFieldValue("otpInput", e);
|
|
44
|
+
setFieldTouched("otpInput");
|
|
45
|
+
},
|
|
46
|
+
label: "2FA code"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(FormError, { show: errors.otpInput && touched.otpInput, children: errors.otpInput })
|
|
50
|
+
] }) }),
|
|
51
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "2fa-enter-code-btn", fluid: true, disabled: submitDisabled, children: "Continue" }) }),
|
|
52
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError?.popup === "enter2fa", children: popupError.message }) })
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
) }) })
|
|
57
|
+
] }) });
|
|
58
|
+
};
|
|
59
|
+
var stdin_default = EnterCode;
|
|
60
|
+
export {
|
|
61
|
+
EnterCode,
|
|
62
|
+
stdin_default as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Text } from "../Text/Text.styles.js";
|
|
4
|
+
import { Button } from "../Button/Button.styles.js";
|
|
5
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
6
|
+
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
7
|
+
import GoogleAuthLogo from "../../static/images/google_auth.png.js";
|
|
8
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
9
|
+
const InstallAuthApp = (props) => {
|
|
10
|
+
const { changeStep } = props;
|
|
11
|
+
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
12
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
13
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h3", { children: "Install 2FA APP" }),
|
|
15
|
+
/* @__PURE__ */ jsx("p", { children: "Download and install a 2FA app on your device. We recommend using Google Authenticator" })
|
|
16
|
+
] }) }),
|
|
17
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { small: true, children: /* @__PURE__ */ jsx("p", { children: "Click 'Continue' if you already have an app installed." }) }) }),
|
|
21
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsxs(
|
|
22
|
+
Button,
|
|
23
|
+
{
|
|
24
|
+
minWidth: "150px",
|
|
25
|
+
fluid: true,
|
|
26
|
+
onClick: () => {
|
|
27
|
+
window.open("https://onelink.to/ev63j9", "_blank");
|
|
28
|
+
},
|
|
29
|
+
secondary: true,
|
|
30
|
+
children: [
|
|
31
|
+
"DOWNLOAD THE APP",
|
|
32
|
+
" ",
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
"img",
|
|
35
|
+
{
|
|
36
|
+
src: GoogleAuthLogo,
|
|
37
|
+
width: 20,
|
|
38
|
+
style: {
|
|
39
|
+
verticalAlign: "middle",
|
|
40
|
+
marginLeft: "6px",
|
|
41
|
+
marginTop: "-3px"
|
|
42
|
+
},
|
|
43
|
+
alt: "google auth logo"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, center: true, children: /* @__PURE__ */ jsx(
|
|
50
|
+
Button,
|
|
51
|
+
{
|
|
52
|
+
minWidth: "150px",
|
|
53
|
+
onClick: changeStep,
|
|
54
|
+
fluid: true,
|
|
55
|
+
children: "Continue"
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
] }) })
|
|
59
|
+
] }) });
|
|
60
|
+
};
|
|
61
|
+
var stdin_default = InstallAuthApp;
|
|
62
|
+
export {
|
|
63
|
+
stdin_default as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Text } from "../Text/Text.styles.js";
|
|
4
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
5
|
+
import { Modal } from "../Modal/Modal.js";
|
|
6
|
+
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
7
|
+
const ResetCode = (props) => {
|
|
8
|
+
const { onModalSwitch, onModalClose, background, isModalOpen } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
11
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx("h3", { children: "Lost your device?" }),
|
|
13
|
+
/* @__PURE__ */ jsx("p", { children: "No problem! We are here to help you..." })
|
|
14
|
+
] }) }),
|
|
15
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", onClick: onModalSwitch, children: "Enter 2FA code" }) }) })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(
|
|
18
|
+
"a",
|
|
19
|
+
{
|
|
20
|
+
href: "https://stokr.zendesk.com/hc/en-us/requests/new",
|
|
21
|
+
target: "_blank",
|
|
22
|
+
rel: "noreferrer",
|
|
23
|
+
style: { textDecoration: "underline" },
|
|
24
|
+
children: "Contact us to reset your 2FA."
|
|
25
|
+
}
|
|
26
|
+
) }) }) }) })
|
|
27
|
+
] }) });
|
|
28
|
+
};
|
|
29
|
+
var stdin_default = ResetCode;
|
|
30
|
+
export {
|
|
31
|
+
ResetCode,
|
|
32
|
+
stdin_default as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Text } from "../Text/Text.styles.js";
|
|
5
|
+
import { Button } from "../Button/Button.styles.js";
|
|
6
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
8
|
+
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
9
|
+
const Sucess2FA = ({
|
|
10
|
+
onClick = () => {
|
|
11
|
+
},
|
|
12
|
+
titleText = "Success!",
|
|
13
|
+
subTitleLeft = "",
|
|
14
|
+
textRight = "",
|
|
15
|
+
buttonText = "Continue"
|
|
16
|
+
}) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
18
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("h3", { children: [
|
|
21
|
+
titleText,
|
|
22
|
+
" "
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx("p", { children: subTitleLeft })
|
|
25
|
+
] }) }),
|
|
26
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: textRight }) }) }),
|
|
30
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
31
|
+
Button,
|
|
32
|
+
{
|
|
33
|
+
minWidth: "240px",
|
|
34
|
+
onClick: () => {
|
|
35
|
+
onClick();
|
|
36
|
+
},
|
|
37
|
+
fluid: true,
|
|
38
|
+
children: buttonText
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
41
|
+
] }) })
|
|
42
|
+
] }) });
|
|
43
|
+
};
|
|
44
|
+
Sucess2FA.propTypes = {
|
|
45
|
+
onClick: PropTypes.func.isRequired
|
|
46
|
+
};
|
|
47
|
+
var stdin_default = Sucess2FA;
|
|
48
|
+
export {
|
|
49
|
+
Sucess2FA,
|
|
50
|
+
stdin_default as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useState, useEffect } from "react";
|
|
3
|
+
import { AuthContext } from "../../context/AuthContext.js";
|
|
4
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
5
|
+
import { Modal } from "../Modal/Modal.js";
|
|
6
|
+
import { ModalInner, ModalWrapper } from "../Modal/Modal.styles.js";
|
|
7
|
+
import { Text } from "../Text/Text.styles.js";
|
|
8
|
+
import { Button } from "../Button/Button.styles.js";
|
|
9
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
|
+
import stdin_default$1 from "./Sucess2FA.js";
|
|
11
|
+
import fetchData from "../../api/fetchData.js";
|
|
12
|
+
const Disable2FA = ({ showFlow, setShowFlow, onSuccess, onRequiresRecentLoginError }) => {
|
|
13
|
+
const { unenrollUser2FA, refreshIdToken } = useContext(AuthContext);
|
|
14
|
+
const [isModalOpen, setIsModalOpen] = useState({
|
|
15
|
+
confirmDisable: false,
|
|
16
|
+
sucess: false
|
|
17
|
+
});
|
|
18
|
+
const refreshToken = async () => {
|
|
19
|
+
try {
|
|
20
|
+
refreshIdToken();
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.log("🚀 ~ error in refreshToken:", error);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (showFlow) {
|
|
27
|
+
refreshToken();
|
|
28
|
+
setIsModalOpen({
|
|
29
|
+
...isModalOpen,
|
|
30
|
+
confirmDisable: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}, [showFlow]);
|
|
34
|
+
const handleDisableClick = async () => {
|
|
35
|
+
try {
|
|
36
|
+
await unenrollUser2FA();
|
|
37
|
+
setIsModalOpen({
|
|
38
|
+
...isModalOpen,
|
|
39
|
+
sucess: true
|
|
40
|
+
});
|
|
41
|
+
try {
|
|
42
|
+
await fetchData("auth/disable-2fa-email");
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.log("🚀 ~ error while sending email:", error);
|
|
45
|
+
}
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.log("🚀 ~ file: disable-2fa-flow.js ~ error:", error);
|
|
48
|
+
if (error.code === "auth/requires-recent-login") {
|
|
49
|
+
onRequiresRecentLoginError?.();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
54
|
+
Modal,
|
|
55
|
+
{
|
|
56
|
+
isOpen: isModalOpen.confirmDisable,
|
|
57
|
+
onClose: () => {
|
|
58
|
+
setShowFlow(false);
|
|
59
|
+
},
|
|
60
|
+
children: /* @__PURE__ */ jsx(ModalInner, { noPadding: true, children: isModalOpen.sucess ? /* @__PURE__ */ jsx(
|
|
61
|
+
stdin_default$1,
|
|
62
|
+
{
|
|
63
|
+
onClick: () => {
|
|
64
|
+
setShowFlow(false);
|
|
65
|
+
onSuccess?.();
|
|
66
|
+
},
|
|
67
|
+
subTitleLeft: "Your log in 2FA authentication is removed",
|
|
68
|
+
textRight: "You will not be asked for your 2FA code next time you log in."
|
|
69
|
+
}
|
|
70
|
+
) : /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
71
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
72
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("h3", { children: "Remove your log in 2FA authentication? " }),
|
|
74
|
+
/* @__PURE__ */ jsx("p", { children: "We recommend you to keep 2FA authentication and protect your account with an additional layer of security" })
|
|
75
|
+
] }) }),
|
|
76
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: "Do you want to remove your log in 2FA authentication?" }) }) }),
|
|
80
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { secondary: true, style: { marginRight: 20 }, onClick: () => setShowFlow(false), fluid: true, children: "NO" }) }),
|
|
81
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, children: /* @__PURE__ */ jsx(Button, { onClick: handleDisableClick, fluid: true, children: "Yes" }) })
|
|
82
|
+
] }) })
|
|
83
|
+
] }) }) })
|
|
84
|
+
}
|
|
85
|
+
) });
|
|
86
|
+
};
|
|
87
|
+
var stdin_default = Disable2FA;
|
|
88
|
+
export {
|
|
89
|
+
Disable2FA,
|
|
90
|
+
stdin_default as default
|
|
91
|
+
};
|