@stokr/components-library 0.5.4 → 0.5.5
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/build/asset-manifest.json +9 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/build/static/js/main.31d6cfe0.js +0 -0
- package/dist/AccountBalance/AccountBalance.js +43 -0
- package/dist/AccountBalance/AccountBalance.stories.js +75 -0
- package/dist/AccountBalance/AccountBalance.styles.js +38 -0
- package/dist/AdminDashboard/Table/Table.js +120 -0
- package/dist/AdminDashboard/Table/Table.styles.js +111 -0
- package/dist/AgreementItem/AgreementItem.js +38 -0
- package/dist/AgreementItem/AgreementItem.stories.js +98 -0
- package/dist/AgreementItem/AgreementItem.styles.js +31 -0
- package/dist/AnalyticGraphs/Analytic.js +528 -0
- package/dist/AnalyticGraphs/Analytic.styles.js +49 -0
- package/dist/BackButton/BackButton.js +22 -0
- package/dist/BackButton/BackButton.stories.js +24 -0
- package/dist/BackButton/BackButton.styles.js +110 -0
- package/dist/Background/Background.js +34 -0
- package/dist/Background/Background.stories.js +50 -0
- package/dist/Background/Background.styles.js +113 -0
- package/dist/BarChart/BarChart.js +258 -0
- package/dist/BarChart/BarChart.stories.js +46 -0
- package/dist/BarChart/BarChart.styles.js +93 -0
- package/dist/BarChartLegend/BarChartLegend.js +74 -0
- package/dist/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/BasicTable/BasicTable.js +20 -0
- package/dist/BasicTable/BasicTable.stories.js +51 -0
- package/dist/BasicTable/BasicTable.styles.js +64 -0
- package/dist/Button/Button.stories.js +63 -0
- package/dist/Button/Button.styles.js +180 -0
- package/dist/ButtonContainer/ButtonContainer.styles.js +25 -0
- package/dist/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +35 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.js +23 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +36 -0
- package/dist/ChartBox/ChartBox.js +34 -0
- package/dist/ChartBox/ChartBox.stories.js +9 -0
- package/dist/ChartBox/ChartBox.styles.js +50 -0
- package/dist/ChartBox/ChartBoxDistribution.js +20 -0
- package/dist/ChartBox/ChartBoxDistribution.stories.js +10 -0
- package/dist/ChartLegend/ChartLegend.js +37 -0
- package/dist/ChartLegend/ChartLegend.stories.js +74 -0
- package/dist/ChartLegend/ChartLegend.styles.js +67 -0
- package/dist/Checkbox/Checkbox.js +108 -0
- package/dist/Checkbox/Checkbox.stories.js +82 -0
- package/dist/Checkbox/Checkbox.styles.js +123 -0
- package/dist/Checklist/UserChecklist.js +247 -0
- package/dist/Checklist/UserChecklist.stories.js +115 -0
- package/dist/ComponentScroll/ComponentScroll.js +99 -0
- package/dist/ComponentScroll/ComponentScroll.stories.js +92 -0
- package/dist/ComponentScroll/ComponentScroll.styles.js +104 -0
- package/dist/ComponentWrapper/ComponentWrapper.styles.js +128 -0
- package/dist/CryptoAddress/ComponentWrap.js +24 -0
- package/dist/CryptoAddress/CryptoAddress.js +124 -0
- package/dist/CryptoAddress/CryptoAddress.stories.js +163 -0
- package/dist/CryptoAddress/CryptoAddress.styles.js +399 -0
- package/dist/CryptoAddress/RadioWrap.js +36 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.js +42 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.stories.js +65 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.styles.js +114 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.js +30 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +98 -0
- package/dist/DonutChart/DonutChart.js +137 -0
- package/dist/DonutChart/DonutChart.stories.js +39 -0
- package/dist/DonutChart/DonutChart.styles.js +101 -0
- package/dist/DoubleButton/DoubleButton.styles.js +25 -0
- package/dist/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/FAQ/FAQ.js +40 -0
- package/dist/FAQ/FAQ.stories.js +63 -0
- package/dist/FAQ/FAQ.styles.js +69 -0
- package/dist/Footer/Footer.js +54 -0
- package/dist/Footer/Footer.stories.js +41 -0
- package/dist/Footer/Footer.styles.js +230 -0
- package/dist/Footer/FooterLayout.js +114 -0
- package/dist/Footer/FooterLayout.stories.js +20 -0
- package/dist/Footer/FooterMenu.js +83 -0
- package/dist/Footer/FooterMenu.stories.js +110 -0
- package/dist/Footer/FooterMenu.styles.js +274 -0
- package/dist/Footer/index.js +4 -0
- package/dist/{03f9f978feb2b015b6812ba10f689967.png → Footer/lemonway.png} +0 -0
- package/dist/Footer/sicos-logo.svg +1 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.js +89 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.stories.js +31 -0
- package/dist/Form/Form.js +38 -0
- package/dist/Form/Form.stories.js +24 -0
- package/dist/Form/Form.styles.js +66 -0
- package/dist/FullscreenCard/FullscreenCard.styles.js +36 -0
- package/dist/Grid/Grid.styles.js +109 -0
- package/dist/Header/Header.js +369 -0
- package/dist/Header/Header.stories.js +172 -0
- package/dist/Header/Header.styles.js +493 -0
- package/dist/Icon/Icon.style.js +75 -0
- package/dist/InfoIcon/InfoIcon.js +40 -0
- package/dist/InfoIcon/InfoIcon.stories.js +40 -0
- package/dist/InfoIcon/InfoIcon.styles.js +42 -0
- package/dist/InfoPanel/InfoPanel.js +115 -0
- package/dist/Input/DatePickerInput.js +64 -0
- package/dist/Input/DatePickerInput.stories.js +80 -0
- package/dist/Input/DatePickerInput.styles.js +67 -0
- package/dist/Input/Input.js +86 -0
- package/dist/Input/Input.stories.js +134 -0
- package/dist/Input/Input.styles.js +126 -0
- package/dist/Input/InputPassword.js +122 -0
- package/dist/Input/InputPassword.stories.js +72 -0
- package/dist/Input/InputPassword.styles.js +139 -0
- package/dist/Input/RangeInput.js +46 -0
- package/dist/Input/RangeInput.stories.js +48 -0
- package/dist/Input/RangeInput.styles.js +125 -0
- package/dist/Input/Select.js +130 -0
- package/dist/Input/Select.stories.js +129 -0
- package/dist/Input/Select.styles.js +143 -0
- package/dist/InvestCalculator/InvestCalculator.js +353 -0
- package/dist/InvestCalculator/InvestCalculator.stories.js +129 -0
- package/dist/InvestCalculator/InvestCalculator.styles.js +78 -0
- package/dist/InvestmentStat/InvestmentStat.js +33 -0
- package/dist/InvestmentStat/InvestmentStat.stories.js +44 -0
- package/dist/InvestmentStat/InvestmentStat.styles.js +53 -0
- package/dist/KYCFlow/BasicInfo.js +396 -0
- package/dist/KYCFlow/Confirmation.js +37 -0
- package/dist/KYCFlow/DocumentFileUpload.js +240 -0
- package/dist/KYCFlow/DocumentScan.js +66 -0
- package/dist/KYCFlow/DocumentScanUpload.js +228 -0
- package/dist/KYCFlow/DocumentSelect.js +101 -0
- package/dist/KYCFlow/DocumentSuccess.js +54 -0
- package/dist/KYCFlow/DocumentUpload.js +44 -0
- package/dist/KYCFlow/DocumentVerificationType.js +114 -0
- package/dist/KYCFlow/FaceScan.js +45 -0
- package/dist/KYCFlow/FaceScanRecognition.js +52 -0
- package/dist/KYCFlow/FaceScanSuccess.js +47 -0
- package/dist/KYCFlow/Terms.js +99 -0
- package/dist/KYCFlow/_styles.js +284 -0
- package/dist/KYCFlow/index.js +14 -0
- package/dist/KYCSelectBox/KYCSelectBox.styles.js +62 -0
- package/dist/LatestUpdate/LatestUpdate.js +35 -0
- package/dist/LatestUpdate/LatestUpdate.stories.js +51 -0
- package/dist/LatestUpdate/LatestUpdate.styles.js +77 -0
- package/dist/Layout/Layout-func-no-work.js +67 -0
- package/dist/Layout/Layout.js +68 -0
- package/dist/Layout/Layout.stories.js +55 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.js +39 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.stories.js +58 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.styles.js +205 -0
- package/dist/LearnMorePage/LearnMore.js +199 -0
- package/dist/LearnMorePage/LearnMore.shared.styles.js +49 -0
- package/dist/LearnMorePage/LearnMore.stories.js +41 -0
- package/dist/LearnMorePage/LearnMore.styles.js +250 -0
- package/dist/LearnMorePage/LearnMoreExampleObject.js +102 -0
- package/dist/LearnMorePage/LearnMoreItem.js +59 -0
- package/dist/LearnMorePage/LearnMoreItem.stories.js +54 -0
- package/dist/LearnMorePage/LearnMoreItem.styles.js +218 -0
- package/dist/LearnMoreSection/LearnMore.js +144 -0
- package/dist/LearnMoreSection/LearnMore.stories.js +23 -0
- package/dist/LearnMoreSection/LearnMore.styles.js +134 -0
- package/dist/LearnMoreSection/LearnMoreItem.js +39 -0
- package/dist/LearnMoreSection/LearnMoreItem.stories.js +52 -0
- package/dist/LearnMoreSection/LearnMoreItem.styles.js +54 -0
- package/dist/LoginModal/LoginModal.js +125 -0
- package/dist/MainMenu/DynamicMainMenu.js +41 -0
- package/dist/MainMenu/MainMenu.js +207 -0
- package/dist/MainMenu/MainMenu.styles.js +361 -0
- package/dist/MatomoConnect/Matomo.js +221 -0
- package/dist/MatomoConnect/Matomo_fuckup.js +185 -0
- package/dist/MenuNav/MenuNav.styles.js +88 -0
- package/dist/Modal/Modal.js +71 -0
- package/dist/Modal/Modal.stories.js +67 -0
- package/dist/Modal/Modal.styles.js +407 -0
- package/dist/MultiProgressBar/MultiProgressBar.js +33 -0
- package/dist/MultiProgressBar/MultiProgressBar.stories.js +61 -0
- package/dist/MultiProgressBar/MultiProgressBar.styles.js +92 -0
- package/dist/Newsletter/Newsletter.js +106 -0
- package/dist/Newsletter/Newsletter.stories.js +8 -0
- package/dist/Newsletter/Newsletter.styles.js +173 -0
- package/dist/NotificationContext/NotificationContext.js +126 -0
- package/dist/NotificationContext/NotificationContext.stories.js +32 -0
- package/dist/NotificationCounter/NotificationCounter.styles.js +23 -0
- package/dist/Number/Number.js +25 -0
- package/dist/Number/Number.stories.js +18 -0
- package/dist/Number/Number.styles.js +21 -0
- package/dist/PageTransition/PageTransition.js +42 -0
- package/dist/Process/Process.stories.js +34 -0
- package/dist/Process/Process.styles.js +87 -0
- package/dist/ProfileBadge/ProfileBadge.js +46 -0
- package/dist/ProfileBadge/ProfileBadge.stories.js +37 -0
- package/dist/ProfileBadge/ProfileBadge.styles.js +47 -0
- package/dist/ProfileBox/ProfileBox.js +29 -0
- package/dist/ProfileBox/ProfileBox.stories.js +27 -0
- package/dist/ProfileBox/ProfileBox.styles.js +60 -0
- package/dist/ProfileHeader/ProfileHeader-CLb4.js +401 -0
- package/dist/ProfileHeader/ProfileHeader.js +268 -0
- package/dist/ProfileHeader/ProfileHeader.styles.js +114 -0
- package/dist/ProfileStat/ProfileStat.js +32 -0
- package/dist/ProfileStat/ProfileStat.stories.js +58 -0
- package/dist/ProfileStat/ProfileStat.styles.js +80 -0
- package/dist/ProofOfAddress/ProofOfAddress.styles.js +76 -0
- package/dist/ROI/ROI.js +261 -0
- package/dist/ROI/ROI.styles.js +71 -0
- package/dist/ROI/ROIChart.js +348 -0
- package/dist/ROI/ROIChart.styles.js +98 -0
- package/dist/ROI/ROIModal.js +74 -0
- package/dist/ROI/ROIScenarioBox.js +46 -0
- package/dist/ROI/ROIScenarioBox.styles.js +131 -0
- package/dist/Radio/Radio.js +58 -0
- package/dist/Radio/Radio.stories.js +65 -0
- package/dist/Radio/Radio.styles.js +93 -0
- package/dist/RefreshButton/RefreshButton.js +14 -0
- package/dist/RefreshButton/RefreshButton.stories.js +31 -0
- package/dist/RefreshButton/RefreshButton.styles.js +57 -0
- package/dist/RegisterAlgorand/AlgoAddressName.js +103 -0
- package/dist/RegisterAlgorand/AlgoAdressSelect.js +274 -0
- package/dist/RegisterAlgorand/AlgoConnectWallet.js +37 -0
- package/dist/RegisterAlgorand/AlgoSuccess.js +28 -0
- package/dist/RegisterAlgorand/Algorand.stories.js +63 -0
- package/dist/RegisterAlgorand/ChooseWallet.js +77 -0
- package/dist/RegisterAlgorand/SelectProject.js +77 -0
- package/dist/RegisterAlgorand/_styles.js +30 -0
- package/dist/RegisterAlgorand/flow.js +243 -0
- package/dist/RegisterAlgorand/flowWithMemo.js +244 -0
- package/dist/RegisterAlgorand/index.js +7 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.js +30 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.stories.js +22 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.styles.js +19 -0
- package/dist/RegisterEthereum/EthAddressLedger.js +151 -0
- package/dist/RegisterEthereum/EthAddressMetamask.js +165 -0
- package/dist/RegisterEthereum/EthAddressName.js +101 -0
- package/dist/RegisterEthereum/EthConnectLedger.js +117 -0
- package/dist/RegisterEthereum/EthConnectMetamask.js +25 -0
- package/dist/RegisterEthereum/EthFinish.js +32 -0
- package/dist/RegisterEthereum/EthIntro.js +77 -0
- package/dist/RegisterEthereum/_styles.js +30 -0
- package/dist/RegisterEthereum/index.js +9 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.js +75 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +65 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +69 -0
- package/dist/RegisterLiquidSteps/assets/nav_green.svg +31 -0
- package/dist/RegisterLiquidSteps/assets/video.mp4 +0 -0
- package/dist/RegisterLiquidSteps/assets/videothumbnail.jpg +0 -0
- package/dist/RegisterLiquidSteps/complete.js +29 -0
- package/dist/RegisterLiquidSteps/flow.js +141 -0
- package/dist/RegisterLiquidSteps/index.js +29 -0
- package/dist/RegisterLiquidSteps/register-liquid.js +197 -0
- package/dist/RegisterModal/RegisterModal.js +143 -0
- package/dist/RegisterModal/RegisterModal.stories.js +35 -0
- package/dist/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/RequestDataBox/RequestDataBox.stories.js +29 -0
- package/dist/RequestDataBox/RequestDataBox.styles.js +40 -0
- package/dist/RiskQuestionnaire/RiskQuestionnaireContext.js +111 -0
- package/dist/RiskQuestionnaire/_styles.js +6 -0
- package/dist/SEO/SEO.js +63 -0
- package/dist/SEO/SEO.stories.js +53 -0
- package/dist/SectionTitle/SectionTitle.styles.js +23 -0
- package/dist/SideLine/SideLine.js +4 -0
- package/dist/SideLine/SideLine.stories.js +20 -0
- package/dist/SideLine/SideLine.styles.js +29 -0
- package/dist/SigningSubflow/SignSubAddressMetamask.js +105 -0
- package/dist/SigningSubflow/SignSubConnectLedger.js +114 -0
- package/dist/SigningSubflow/SignSubConnectMetamask.js +101 -0
- package/dist/SigningSubflow/SignSubIntro.js +45 -0
- package/dist/SigningSubflow/SignSubSendLedger.js +114 -0
- package/dist/SigningSubflow/SignSubSendMetamask.js +53 -0
- package/dist/SigningSubflow/SignSubTransactionLedger.js +125 -0
- package/dist/SigningSubflow/SignSubTransactionMetamask.js +130 -0
- package/dist/SigningSubflow/_styles.js +59 -0
- package/dist/SigningSubflow/index.js +9 -0
- package/dist/Slider/Slider.js +43 -0
- package/dist/Slider/Slider.stories.js +63 -0
- package/dist/Slider/Slider.styles.js +115 -0
- package/dist/SpanButton/SpanButton.styles.js +14 -0
- package/dist/StatusBadge/StatusBadge.styles.js +16 -0
- package/dist/StepController/StepController.js +73 -0
- package/dist/StepController/StepController.stories.js +52 -0
- package/dist/StepController/StepController.styles.js +27 -0
- package/dist/StepController/StepControllerContext.js +61 -0
- package/dist/StepController/StepControllerProgress.js +28 -0
- package/dist/StepController/StepControllerProgress.stories.js +41 -0
- package/dist/StepsProgress/StepsProgress.js +95 -0
- package/dist/StepsProgress/StepsProgress.stories.js +23 -0
- package/dist/StepsProgress/StepsProgress.styles.js +97 -0
- package/dist/StokrLoader/StokrLoader.js +60 -0
- package/dist/StokrLoader/media.js +22 -0
- package/dist/StokrLoader/stokr_loader_white_400x400.gif +0 -0
- package/dist/SvgIcons/AdminBadgeSvg.js +16 -0
- package/dist/SvgIcons/CameraSvg.js +26 -0
- package/dist/SvgIcons/CapsLockSvg.js +21 -0
- package/dist/SvgIcons/DocumentBackSvg.js +25 -0
- package/dist/SvgIcons/DocumentSmallSvg.js +51 -0
- package/dist/SvgIcons/DocumentSvg.js +28 -0
- package/dist/SvgIcons/Early.js +14 -0
- package/dist/SvgIcons/EthSvg.js +30 -0
- package/dist/SvgIcons/EurSvg.js +16 -0
- package/dist/SvgIcons/FaceScanIconSvg.js +21 -0
- package/dist/SvgIcons/FourSvg.js +11 -0
- package/dist/SvgIcons/Glassess.js +19 -0
- package/dist/SvgIcons/Icons_Badge.png +0 -0
- package/dist/SvgIcons/LogoSvg.js +14 -0
- package/dist/SvgIcons/OneSvg.js +13 -0
- package/dist/SvgIcons/PassportSvg.js +46 -0
- package/dist/SvgIcons/RefreshSvg.js +17 -0
- package/dist/SvgIcons/SocialFacebook.js +15 -0
- package/dist/SvgIcons/SocialInstagram.js +15 -0
- package/dist/SvgIcons/SocialLinkedIn.js +15 -0
- package/dist/SvgIcons/SocialMedium.js +15 -0
- package/dist/SvgIcons/SocialReddit.js +15 -0
- package/dist/SvgIcons/SocialTelegram.js +15 -0
- package/dist/SvgIcons/SocialTwitter.js +15 -0
- package/dist/SvgIcons/SocialYoutube.js +15 -0
- package/dist/SvgIcons/ThreeSvg.js +10 -0
- package/dist/SvgIcons/TwoSidedDocumentSvg.js +72 -0
- package/dist/SvgIcons/TwoSvg.js +13 -0
- package/dist/SvgIcons/UpdateDefaultSvg.js +19 -0
- package/dist/SvgIcons/UpdateHardSvg.js +15 -0
- package/dist/SvgIcons/UpdateSoftSvg.js +17 -0
- package/dist/SvgIcons/UploadSvg.js +24 -0
- package/dist/SvgIcons/VerifiedBadge.js +13 -0
- package/dist/SvgIcons/index.js +32 -0
- package/dist/Switch/Switch.js +45 -0
- package/dist/Switch/Switch.stories.js +73 -0
- package/dist/Switch/Switch.styles.js +105 -0
- package/dist/Tabs/Tabs.js +48 -0
- package/dist/Tabs/Tabs.stories.js +28 -0
- package/dist/Tabs/Tabs.styles.js +11 -0
- package/dist/TabsNav/TabNav.js +21 -0
- package/dist/TabsNav/TabNav.stories.js +32 -0
- package/dist/TabsNav/TabsNav.js +23 -0
- package/dist/TabsNav/TabsNav.stories.js +25 -0
- package/dist/TabsNav/TabsNav.styles.js +80 -0
- package/dist/TeamOverview/TeamOverview.js +69 -0
- package/dist/TeamOverview/TeamOverview.stories.js +68 -0
- package/dist/TeamOverview/TeamOverview.styles.js +152 -0
- package/dist/Text/Headline.js +34 -0
- package/dist/Text/Headline.stories.js +40 -0
- package/dist/Text/StyledText.js +30 -0
- package/dist/Text/Text.stories.js +59 -0
- package/dist/Text/Text.styles.js +166 -0
- package/dist/TextLink/TextLink.styles.js +50 -0
- package/dist/ToDoList/ToDoList.js +172 -0
- package/dist/ToDoList/ToDoList.stories.js +123 -0
- package/dist/ToDoList/ToDoList.styles.js +115 -0
- package/dist/ToDoList/ToDoListTask.js +96 -0
- package/dist/ToDoList/ToDoListTask.stories.js +60 -0
- package/dist/ToDoList/ToDoListTask.styles.js +104 -0
- package/dist/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/TransactionDetails/TransactionDetails.stories.js +47 -0
- package/dist/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/TransactionInfo/TransactionInfo.js +48 -0
- package/dist/TransactionInfo/TransactionInfo.stories.js +53 -0
- package/dist/TransactionInfo/TransactionInfo.styles.js +64 -0
- package/dist/TwoFactorModal/TwoFactorModal.js +84 -0
- package/dist/breakdown/Breakdown.js +124 -0
- package/dist/breakdown/index.js +2 -0
- package/dist/context/Auth.js +133 -0
- package/dist/context/AuthContext.js +154 -0
- package/dist/icons/Arrow.js +62 -0
- package/dist/icons/Arrow.stories.js +37 -0
- package/dist/icons/ArrowSimple.js +51 -0
- package/dist/icons/ArrowSimple.stories.js +41 -0
- package/dist/icons/Check.js +29 -0
- package/dist/icons/Check.stories.js +14 -0
- package/dist/icons/Facebook.js +15 -0
- package/dist/icons/Facebook.stories.js +15 -0
- package/dist/icons/Info.js +41 -0
- package/dist/icons/Info.stories.js +8 -0
- package/dist/icons/Instagram.js +15 -0
- package/dist/icons/Instagram.stories.js +15 -0
- package/dist/icons/LinkIcon.js +23 -0
- package/dist/icons/LinkIcon.stories.js +15 -0
- package/dist/icons/LinkedIn.js +29 -0
- package/dist/icons/LinkedIn.stories.js +8 -0
- package/dist/icons/Medium.js +28 -0
- package/dist/icons/Medium.stories.js +8 -0
- package/dist/icons/Reddit.js +18 -0
- package/dist/icons/Reddit.stories.js +15 -0
- package/dist/icons/Share.js +48 -0
- package/dist/icons/Share.stories.js +8 -0
- package/dist/icons/Telegram.js +28 -0
- package/dist/icons/Telegram.stories.js +8 -0
- package/dist/icons/Twitter.js +15 -0
- package/dist/icons/Twitter.stories.js +15 -0
- package/dist/icons/X.js +15 -0
- package/dist/icons/X.stories.js +8 -0
- package/dist/icons/Youtube.js +15 -0
- package/dist/icons/Youtube.stories.js +15 -0
- package/dist/icons/index.js +15 -0
- package/dist/index.js +177 -1
- package/dist/renderToBody/index.js +2 -0
- package/dist/renderToBody/renderToBody.js +26 -0
- package/dist/taxId/TaxId.stories.js +31 -0
- package/dist/taxId/complete.js +21 -0
- package/dist/taxId/flow.js +31 -0
- package/dist/taxId/index.js +4 -0
- package/dist/taxId/register-taxid.js +156 -0
- package/dist/video/Video.js +274 -0
- package/dist/video/Video.stories.js +45 -0
- package/dist/video/img/play-btn.svg +1 -0
- package/dist/video/index.js +2 -0
- package/package.json +128 -133
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/dist/07233f511246c9825a0d58e5ab2641f3.svg +0 -47
- package/dist/08418fc6c324f51f7e56.svg +0 -1
- package/dist/14aa35d4e84aebef77cf00b421fc393a.gif +0 -0
- package/dist/179ef2df02cb0b68c9fd.woff2 +0 -0
- package/dist/21e493d43617de76dbc7.woff2 +0 -0
- package/dist/2640959b1f9381cde047.eot +0 -0
- package/dist/2ba2db4ff86a2663686a100e75b50ba9.png +0 -0
- package/dist/311956ded96d3fd2813d.woff2 +0 -0
- package/dist/39f5961b2d3eb4aa5bf5.woff +0 -0
- package/dist/3caa0d4f9b7d58668066.woff2 +0 -0
- package/dist/4a510354f2f82b59fced805a8e3fe2bf.svg +0 -1
- package/dist/4c3c428d0ce82f840710.woff +0 -0
- package/dist/4e528d6445ca1974c313.woff +0 -0
- package/dist/55053cc0a8e6482eca64.ttf +0 -0
- package/dist/643c37f102b41f7f90c3.woff2 +0 -0
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/81f3ef07b7952e249da1.woff +0 -0
- package/dist/98b7d3182f652f021bc3.ttf +0 -0
- package/dist/9bea22b57dc165ed4382.ttf +0 -0
- package/dist/9ec738fbb66068dc1ca7.woff +0 -0
- package/dist/a1d7666a48f976227722.ttf +0 -0
- package/dist/a750292d6a0b5a760679.woff +0 -0
- package/dist/b85a961d44cc55c58050cbf7c53dd505.png +0 -0
- package/dist/bcb6531cf820152b7538.ttf +0 -0
- package/dist/c6a4bc1bd034d6303053.woff +0 -0
- package/dist/cbfc24090ef8bacab132.woff2 +0 -0
- package/dist/d2b1865643b98c0e8b54.ttf +0 -0
- package/dist/d97d7385fe8771611848.ttf +0 -0
- package/dist/index.js.LICENSE.txt +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components/macro';
|
|
2
|
+
import rwd from 'styles/rwd';
|
|
3
|
+
import theme from 'styles/theme';
|
|
4
|
+
export const Wrapper = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
text-align: center;
|
|
10
|
+
flex-grow: 1;
|
|
11
|
+
padding: 32px;
|
|
12
|
+
|
|
13
|
+
${rwd.Medium`
|
|
14
|
+
padding: 12px;
|
|
15
|
+
`}
|
|
16
|
+
|
|
17
|
+
${props => props.color === 'white' && `
|
|
18
|
+
color: ${theme.cBlack};
|
|
19
|
+
background-color: ${theme.cWhite};
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
stroke: ${theme.cBlack};
|
|
23
|
+
}
|
|
24
|
+
`}
|
|
25
|
+
|
|
26
|
+
${props => props.color === 'red' && `
|
|
27
|
+
color: ${theme.cWhite};
|
|
28
|
+
background-color: ${theme.cWarning};
|
|
29
|
+
|
|
30
|
+
svg {
|
|
31
|
+
stroke: ${theme.cWhite};
|
|
32
|
+
}
|
|
33
|
+
`}
|
|
34
|
+
`;
|
|
35
|
+
export const Title = styled.div`
|
|
36
|
+
font-size: 11px;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
letter-spacing: 2.06px;
|
|
39
|
+
text-transform: uppercase;
|
|
40
|
+
margin-bottom: 20px;
|
|
41
|
+
|
|
42
|
+
${({
|
|
43
|
+
centerVertically
|
|
44
|
+
}) => centerVertically && css`
|
|
45
|
+
margin-bottom: 0;
|
|
46
|
+
`}
|
|
47
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Background from 'components/Background/Background';
|
|
4
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
5
|
+
import { Container, ImageWrapper, EditButton, Name, EditIcon } from './ProfileBox.styles';
|
|
6
|
+
const lineBreaker = {
|
|
7
|
+
wordBreak: 'break-all'
|
|
8
|
+
};
|
|
9
|
+
export const ProfileBox = ({
|
|
10
|
+
pictureSrc,
|
|
11
|
+
name,
|
|
12
|
+
handleEdit
|
|
13
|
+
}) => /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(ImageWrapper, null, /*#__PURE__*/React.createElement(Background, {
|
|
14
|
+
src: pictureSrc
|
|
15
|
+
})), /*#__PURE__*/React.createElement(EditButton, {
|
|
16
|
+
onClick: handleEdit
|
|
17
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Name, {
|
|
18
|
+
style: lineBreaker
|
|
19
|
+
}, name, /*#__PURE__*/React.createElement(EditIcon, null)))));
|
|
20
|
+
ProfileBox.propTypes = {
|
|
21
|
+
pictureSrc: PropTypes.string.isRequired,
|
|
22
|
+
name: PropTypes.string,
|
|
23
|
+
handleEdit: PropTypes.func
|
|
24
|
+
};
|
|
25
|
+
ProfileBox.defaultProps = {
|
|
26
|
+
handleEdit: () => {},
|
|
27
|
+
name: ''
|
|
28
|
+
};
|
|
29
|
+
export default ProfileBox;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProfileBox } from './ProfileBox';
|
|
3
|
+
import { ComponentWrapper } from '../ComponentWrapper/ComponentWrapper.styles';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components Library/Profile Box',
|
|
6
|
+
component: ProfileBox,
|
|
7
|
+
argTypes: {
|
|
8
|
+
pictureSrc: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
name: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
defaultValue: ''
|
|
15
|
+
},
|
|
16
|
+
handleEdit: {
|
|
17
|
+
type: 'function',
|
|
18
|
+
action: 'handleEdit',
|
|
19
|
+
defaultValue: () => {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const Template = args => /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(ProfileBox, args));
|
|
24
|
+
export const ProfileBoxDefault = Template.bind({});
|
|
25
|
+
ProfileBoxDefault.args = {
|
|
26
|
+
pictureSrc: 'static/images/avatar.png'
|
|
27
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import styled from 'styled-components/macro';
|
|
2
|
+
import { Container as BackgroundContainer } from 'components/Background/Background.styles';
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
`;
|
|
9
|
+
export const ImageWrapper = styled.div`
|
|
10
|
+
flex-grow: 1;
|
|
11
|
+
min-height: 300px;
|
|
12
|
+
|
|
13
|
+
${BackgroundContainer} {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding-top: 100%;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
export const EditButton = styled.button`
|
|
19
|
+
display: block;
|
|
20
|
+
width: 100%;
|
|
21
|
+
color: ${props => props.theme.cBlack};
|
|
22
|
+
border-bottom: 1px solid ${props => props.theme.cLightGrey};
|
|
23
|
+
transition: color 0.2s;
|
|
24
|
+
|
|
25
|
+
&:focus,
|
|
26
|
+
&:hover {
|
|
27
|
+
color: ${props => props.theme.cPrimary};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:focus {
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& > div {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
export const Name = styled.div`
|
|
39
|
+
position: relative;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
line-height: 20px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
letter-spacing: 0.6px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
`;
|
|
46
|
+
export const EditIcon = styled.i.attrs({
|
|
47
|
+
className: 'ion-md-create'
|
|
48
|
+
})`
|
|
49
|
+
margin-left: 12px;
|
|
50
|
+
|
|
51
|
+
&:before {
|
|
52
|
+
transform: rotate(-15deg);
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export const AddmoreIcon = styled.i.attrs({
|
|
56
|
+
className: 'ion-ios-add-circle-outline'
|
|
57
|
+
})`
|
|
58
|
+
margin-left: 12px;
|
|
59
|
+
font-size: 30px;
|
|
60
|
+
`;
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import { Collapse } from 'react-collapse';
|
|
3
|
+
import { navigate } from '@reach/router';
|
|
4
|
+
import ProfileBox from 'components/ProfileBox/ProfileBox';
|
|
5
|
+
import ProfileBadge from 'components/ProfileBadge/ProfileBadge';
|
|
6
|
+
import ProfileStat from 'components/ProfileStat/ProfileStat';
|
|
7
|
+
import ExpandButton from 'components/ExpandButton/ExpandButton';
|
|
8
|
+
import NotificationItem from 'components/NotificationItem/NotificationItem';
|
|
9
|
+
import NotificationsCarousel from 'components/NotificationsCarousel/NotificationsCarousel';
|
|
10
|
+
import { NotificationSlide } from 'components/NotificationsCarousel/NotificationsCarousel.styles';
|
|
11
|
+
import ToDoList, { ToDoTaskState
|
|
12
|
+
// ToDoTaskMessage,
|
|
13
|
+
} from 'components/ToDoList/ToDoList';
|
|
14
|
+
import Tabs, { Tab } from 'components/Tabs/Tabs';
|
|
15
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
16
|
+
import { VerifiedBadge } from 'components/SvgIcons';
|
|
17
|
+
import { DisplayOnBreakpoint } from 'styles/rwd';
|
|
18
|
+
import { AuthConsumer } from 'components/AuthConnect/AuthContext';
|
|
19
|
+
import { NotificationConsumer } from 'components/NotificationContext/NotificationContext';
|
|
20
|
+
import { Container, Main, AvatarBox, InfoBox, InfoInner, Badges, Badge, Stats, Stat, Togglers, Toggler, TabsContainer } from './ProfileHeader.styles';
|
|
21
|
+
import { BigNumber } from 'bignumber.js';
|
|
22
|
+
import user from 'api/user';
|
|
23
|
+
import avatarPlaceholder from 'static/images/avatar-placeholder.png';
|
|
24
|
+
import Cookies from 'js-cookie';
|
|
25
|
+
import axios from '../../model/axios';
|
|
26
|
+
|
|
27
|
+
// const avatarInvestor = require('static/images/avatarinvestor.png')
|
|
28
|
+
|
|
29
|
+
class UserAvatarComponent extends React.Component {
|
|
30
|
+
state = {
|
|
31
|
+
finalAvatar: undefined
|
|
32
|
+
};
|
|
33
|
+
componentDidMount() {
|
|
34
|
+
const {
|
|
35
|
+
avatar
|
|
36
|
+
} = this.props;
|
|
37
|
+
|
|
38
|
+
// console.log(avatar);
|
|
39
|
+
|
|
40
|
+
this.checkUserPhoto(avatar);
|
|
41
|
+
}
|
|
42
|
+
componentDidUpdate(prevProps) {
|
|
43
|
+
const {
|
|
44
|
+
avatar
|
|
45
|
+
} = this.props;
|
|
46
|
+
if (!avatar && avatar !== prevProps.avatar) {
|
|
47
|
+
this.setState({
|
|
48
|
+
finalAvatar: undefined
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (avatar !== prevProps.avatar) {
|
|
52
|
+
this.checkUserPhoto(avatar);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
checkUserPhoto = avatar => {
|
|
56
|
+
const http = new XMLHttpRequest();
|
|
57
|
+
http.open('HEAD', avatar, false);
|
|
58
|
+
http.send();
|
|
59
|
+
// console.log(http);
|
|
60
|
+
|
|
61
|
+
if (http.status !== 404) {
|
|
62
|
+
this.setState({
|
|
63
|
+
finalAvatar: avatar
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
render() {
|
|
68
|
+
const {
|
|
69
|
+
finalAvatar
|
|
70
|
+
} = this.state;
|
|
71
|
+
const {
|
|
72
|
+
auth
|
|
73
|
+
} = this.props;
|
|
74
|
+
return /*#__PURE__*/React.createElement(ProfileBox, {
|
|
75
|
+
name: auth.name ? auth.name : auth.email,
|
|
76
|
+
pictureSrc: finalAvatar || avatarPlaceholder,
|
|
77
|
+
handleEdit: () => navigate('/settings/profile-and-privacy')
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// class UserAvatarComponent extends React.Component {
|
|
83
|
+
// state = {
|
|
84
|
+
// photo: avatarPlaceholder
|
|
85
|
+
// }
|
|
86
|
+
|
|
87
|
+
// componentDidMount() {
|
|
88
|
+
// const { avatar } = this.props;
|
|
89
|
+
|
|
90
|
+
// console.log(avatar);
|
|
91
|
+
|
|
92
|
+
// this.checkUserPhoto(avatar);
|
|
93
|
+
// }
|
|
94
|
+
|
|
95
|
+
// checkUserPhoto = (avatar) => {
|
|
96
|
+
// const http = new XMLHttpRequest();
|
|
97
|
+
// http.open('HEAD', avatar, false);
|
|
98
|
+
// http.send();
|
|
99
|
+
// // console.log(http);
|
|
100
|
+
|
|
101
|
+
// if (http.status !== 404) {
|
|
102
|
+
// this.setState({
|
|
103
|
+
// photo: avatar
|
|
104
|
+
// });
|
|
105
|
+
// }
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
// render() {
|
|
109
|
+
// const { photo } = this.state;
|
|
110
|
+
// const { auth } = this.props;
|
|
111
|
+
|
|
112
|
+
// return (
|
|
113
|
+
// <ProfileBox
|
|
114
|
+
// name={auth.name ? auth.name : auth.email}
|
|
115
|
+
// // pictureSrc={avatarPlaceholder}
|
|
116
|
+
// pictureSrc={photo}
|
|
117
|
+
// handleEdit={() => navigate("/settings/profile-and-privacy")}
|
|
118
|
+
// />
|
|
119
|
+
// )
|
|
120
|
+
// }
|
|
121
|
+
// }
|
|
122
|
+
|
|
123
|
+
const notificationTab = (isMobile = false) => /*#__PURE__*/React.createElement(NotificationConsumer, null, ({
|
|
124
|
+
notifications,
|
|
125
|
+
markAsRead
|
|
126
|
+
}) => /*#__PURE__*/React.createElement(NotificationsCarousel, {
|
|
127
|
+
dots: true,
|
|
128
|
+
isMobile: isMobile
|
|
129
|
+
}, notifications.map(notificationItem => {
|
|
130
|
+
const {
|
|
131
|
+
_id,
|
|
132
|
+
notification
|
|
133
|
+
} = notificationItem;
|
|
134
|
+
return /*#__PURE__*/React.createElement(NotificationSlide, {
|
|
135
|
+
key: _id
|
|
136
|
+
}, /*#__PURE__*/React.createElement(NotificationItem, {
|
|
137
|
+
type: notification.type,
|
|
138
|
+
title: notification.content.title,
|
|
139
|
+
text: notification.content.text,
|
|
140
|
+
progress: notification.content.progress,
|
|
141
|
+
transfer: notification.content.transfer,
|
|
142
|
+
handleCloseClick: () => {
|
|
143
|
+
markAsRead(_id);
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
}), !isMobile && /*#__PURE__*/React.createElement(NotificationSlide, null)));
|
|
147
|
+
|
|
148
|
+
// const todos = (
|
|
149
|
+
// <ComponentWrapper>
|
|
150
|
+
// <ToDoList
|
|
151
|
+
// successText="Almost done! Please complete all tasks in order to invest."
|
|
152
|
+
// tasks={[
|
|
153
|
+
// {
|
|
154
|
+
// title: "Verify Email",
|
|
155
|
+
// message: "Email verified",
|
|
156
|
+
// state: ToDoTaskState.APPROVED,
|
|
157
|
+
// link: "/"
|
|
158
|
+
// },
|
|
159
|
+
// {
|
|
160
|
+
// title: "Verify Identity",
|
|
161
|
+
// message: "Regected. Please re-apply",
|
|
162
|
+
// state: ToDoTaskState.REJECTED,
|
|
163
|
+
// link: "/verify-identity"
|
|
164
|
+
// },
|
|
165
|
+
// {
|
|
166
|
+
// title: "Register Ethereum Address",
|
|
167
|
+
// message: "In progress",
|
|
168
|
+
// state: ToDoTaskState.IN_PROGRESS,
|
|
169
|
+
// link: "/register-ethereum"
|
|
170
|
+
// },
|
|
171
|
+
// {
|
|
172
|
+
// title: "Complete Risk Questionnaire",
|
|
173
|
+
// message: "Approved",
|
|
174
|
+
// state: ToDoTaskState.APPROVED,
|
|
175
|
+
// link: "/risk-questionnaire"
|
|
176
|
+
// },
|
|
177
|
+
// {
|
|
178
|
+
// title: "Skipped task",
|
|
179
|
+
// message: "",
|
|
180
|
+
// state: ToDoTaskState.SKIPPED,
|
|
181
|
+
// link: "/"
|
|
182
|
+
// },
|
|
183
|
+
// {
|
|
184
|
+
// title: "Edited Task",
|
|
185
|
+
// message: "Draft",
|
|
186
|
+
// state: ToDoTaskState.DRAFT,
|
|
187
|
+
// link: "/"
|
|
188
|
+
// }
|
|
189
|
+
// ]}
|
|
190
|
+
// />
|
|
191
|
+
// </ComponentWrapper>
|
|
192
|
+
// );
|
|
193
|
+
|
|
194
|
+
const PANEL = {
|
|
195
|
+
NOTIFICATIONS: 'notifications',
|
|
196
|
+
TODOS: 'todos'
|
|
197
|
+
};
|
|
198
|
+
export class ProfileHeader extends PureComponent {
|
|
199
|
+
state = {
|
|
200
|
+
extendedPanel: null,
|
|
201
|
+
ether: 0,
|
|
202
|
+
euro: 0,
|
|
203
|
+
shouldRenderPage: false,
|
|
204
|
+
todoList: []
|
|
205
|
+
};
|
|
206
|
+
async componentDidMount() {
|
|
207
|
+
let addresses = [];
|
|
208
|
+
try {
|
|
209
|
+
const userData = await user('get');
|
|
210
|
+
if (userData.user.investor_eth_addresses) {
|
|
211
|
+
addresses = userData.user.investor_eth_addresses.map(obj => {
|
|
212
|
+
return obj.address;
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
this.setState(prevState => ({
|
|
216
|
+
...prevState,
|
|
217
|
+
shouldRenderPage: true
|
|
218
|
+
}));
|
|
219
|
+
this.generateTodos(this.props.user);
|
|
220
|
+
const accessToken = await Cookies.getJSON('STOKR_ACCESS_TOKEN');
|
|
221
|
+
const request = {
|
|
222
|
+
method: 'GET',
|
|
223
|
+
url: `${process.env.REACT_APP_EVENTDB_ENDPOINT}/investor/ether-balance?addresses=${addresses.join()}`,
|
|
224
|
+
headers: {
|
|
225
|
+
Authorization: `Bearer ${accessToken}`
|
|
226
|
+
//accept: `application/json`,
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const EDB_Request = await axios(request);
|
|
231
|
+
if (EDB_Request && EDB_Request.etherBalance && EDB_Request.currentEtherPrice) {
|
|
232
|
+
const ether = EDB_Request.etherBalance.totalEtherBalance;
|
|
233
|
+
const euro = EDB_Request.currentEtherPrice * ether;
|
|
234
|
+
this.setState({
|
|
235
|
+
ether: new BigNumber(ether).toFixed(5),
|
|
236
|
+
euro: new BigNumber(euro).toFixed(2)
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
} catch (error) {
|
|
240
|
+
console.log(error);
|
|
241
|
+
// TODO: TO BE CLEANED UP
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
setTodos = todos => {
|
|
246
|
+
this.setState(prevState => ({
|
|
247
|
+
...prevState,
|
|
248
|
+
todoList: todos
|
|
249
|
+
}));
|
|
250
|
+
};
|
|
251
|
+
generateTodos = userData => {
|
|
252
|
+
// console.log(userData);
|
|
253
|
+
|
|
254
|
+
if (userData.user_type === 'investor_entity') {
|
|
255
|
+
this.setTodos([{
|
|
256
|
+
title: 'Verify Email',
|
|
257
|
+
message: 'Verified',
|
|
258
|
+
state: ToDoTaskState.APPROVED
|
|
259
|
+
// tooltip: 'Example tooltip',
|
|
260
|
+
}, {
|
|
261
|
+
title: 'Register Ethereum Address',
|
|
262
|
+
message: userData.investor_eth_addresses ? 'Completed and approved' : 'Set up a blockchain address to safely store tokens and ether profit distributions.',
|
|
263
|
+
state: userData.investor_eth_addresses ? ToDoTaskState.APPROVED : ToDoTaskState.SKIPPED,
|
|
264
|
+
link: `https://signup.${process.env.REACT_APP_WEBSITE_DOMAIN}/register-ethereum`
|
|
265
|
+
|
|
266
|
+
// tooltip: 'Example tooltip',
|
|
267
|
+
}, {
|
|
268
|
+
title: 'Risk Questionnaire',
|
|
269
|
+
message: userData.is_risk_questionnaire_finished ? 'Completed and approved' : 'Read the risks, tick the boxes, ta-da!',
|
|
270
|
+
state: userData.is_risk_questionnaire_finished ? ToDoTaskState.APPROVED : ToDoTaskState.SKIPPED,
|
|
271
|
+
link: !userData.is_risk_questionnaire_finished && `https://signup.${process.env.REACT_APP_WEBSITE_DOMAIN}/risk-questionnaire`
|
|
272
|
+
|
|
273
|
+
// tooltip: 'Example tooltip',
|
|
274
|
+
}]);
|
|
275
|
+
} else {
|
|
276
|
+
this.setTodos([{
|
|
277
|
+
title: 'Verify Email',
|
|
278
|
+
message: 'Verified',
|
|
279
|
+
state: ToDoTaskState.APPROVED
|
|
280
|
+
// tooltip: 'Example tooltip',
|
|
281
|
+
}, {
|
|
282
|
+
title: 'Verify Identity',
|
|
283
|
+
message: userData.kyc_status === 'in_progress' ? 'Pending approval' : userData.kyc_status === 'approved' ? 'Completed and approved' : 'Scan your ID to get the green light from the anti-fraud squad.',
|
|
284
|
+
state: userData.kyc_status === 'in_progress' ? ToDoTaskState.IN_PROGRESS : userData.kyc_status === 'approved' ? ToDoTaskState.APPROVED : ToDoTaskState.SKIPPED,
|
|
285
|
+
link: !userData.kyc_status && `https://signup.${process.env.REACT_APP_WEBSITE_DOMAIN}/verify-identity`
|
|
286
|
+
|
|
287
|
+
// tooltip: 'Example tooltip',
|
|
288
|
+
}, {
|
|
289
|
+
title: 'Register Ethereum Address',
|
|
290
|
+
message: userData.investor_eth_addresses ? 'Completed and approved' : 'Set up a blockchain address to safely store tokens and ether profit distributions.',
|
|
291
|
+
state: userData.investor_eth_addresses ? ToDoTaskState.APPROVED : ToDoTaskState.SKIPPED,
|
|
292
|
+
link: `https://signup.${process.env.REACT_APP_WEBSITE_DOMAIN}/register-ethereum`
|
|
293
|
+
|
|
294
|
+
// tooltip: 'Example tooltip',
|
|
295
|
+
}, {
|
|
296
|
+
title: 'Risk Questionnaire',
|
|
297
|
+
message: userData.is_risk_questionnaire_finished ? 'Completed and approved' : 'Read the risks, tick the boxes, ta-da!',
|
|
298
|
+
state: userData.is_risk_questionnaire_finished ? ToDoTaskState.APPROVED : ToDoTaskState.SKIPPED,
|
|
299
|
+
link: !userData.is_risk_questionnaire_finished && `https://signup.${process.env.REACT_APP_WEBSITE_DOMAIN}/risk-questionnaire`
|
|
300
|
+
// tooltip: 'Example tooltip',
|
|
301
|
+
}]);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
this.setState(prevState => ({
|
|
305
|
+
...prevState,
|
|
306
|
+
shouldRenderPage: true
|
|
307
|
+
}));
|
|
308
|
+
};
|
|
309
|
+
togglePanel = panelId => {
|
|
310
|
+
const {
|
|
311
|
+
extendedPanel
|
|
312
|
+
} = this.state;
|
|
313
|
+
this.setState({
|
|
314
|
+
extendedPanel: extendedPanel !== panelId ? panelId : null
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
render() {
|
|
318
|
+
const {
|
|
319
|
+
extendedPanel,
|
|
320
|
+
ether,
|
|
321
|
+
euro,
|
|
322
|
+
todoList
|
|
323
|
+
// shouldRenderPage,
|
|
324
|
+
} = this.state;
|
|
325
|
+
const pendingTasksCount = todoList.reduce((count, task) => {
|
|
326
|
+
if (task.state === ToDoTaskState.APPROVED || task.state === ToDoTaskState.IN_PROGRESS) {
|
|
327
|
+
return count;
|
|
328
|
+
}
|
|
329
|
+
return count + 1;
|
|
330
|
+
}, 0);
|
|
331
|
+
return /*#__PURE__*/React.createElement(AuthConsumer, null, ({
|
|
332
|
+
auth,
|
|
333
|
+
avatar
|
|
334
|
+
}) => /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Main, null, /*#__PURE__*/React.createElement(AvatarBox, null, /*#__PURE__*/React.createElement(UserAvatarComponent, {
|
|
335
|
+
auth: auth,
|
|
336
|
+
avatar: avatar
|
|
337
|
+
})), /*#__PURE__*/React.createElement(InfoBox, null, /*#__PURE__*/React.createElement(InfoInner, null, /*#__PURE__*/React.createElement(Badges, null, /*#__PURE__*/React.createElement(Badge, null, /*#__PURE__*/React.createElement(ProfileBadge, {
|
|
338
|
+
title: "KYC Status",
|
|
339
|
+
icon: /*#__PURE__*/React.createElement(VerifiedBadge, null),
|
|
340
|
+
color: "red"
|
|
341
|
+
})), /*#__PURE__*/React.createElement(Badge, {
|
|
342
|
+
borderBottom: true
|
|
343
|
+
}, /*#__PURE__*/React.createElement(ProfileBadge, {
|
|
344
|
+
title: "Early Adopter",
|
|
345
|
+
withIcon: true
|
|
346
|
+
}))), /*#__PURE__*/React.createElement(Stats, null, /*#__PURE__*/React.createElement(Stat, null, /*#__PURE__*/React.createElement(ProfileStat, {
|
|
347
|
+
label: "Ether balance",
|
|
348
|
+
unit: "ETH",
|
|
349
|
+
value: ether.toString(),
|
|
350
|
+
eqUnit: "\u20AC",
|
|
351
|
+
eqValue: euro.toString()
|
|
352
|
+
})))), /*#__PURE__*/React.createElement(Togglers, null, /*#__PURE__*/React.createElement(Toggler, null, /*#__PURE__*/React.createElement(NotificationConsumer, null, ({
|
|
353
|
+
notifications
|
|
354
|
+
}) => /*#__PURE__*/React.createElement(ExpandButton, {
|
|
355
|
+
title: "Notifications",
|
|
356
|
+
counter: notifications.length,
|
|
357
|
+
isOpened: extendedPanel === PANEL.NOTIFICATIONS,
|
|
358
|
+
onClick: () => {
|
|
359
|
+
this.togglePanel(PANEL.NOTIFICATIONS);
|
|
360
|
+
}
|
|
361
|
+
})), /*#__PURE__*/React.createElement(DisplayOnBreakpoint, {
|
|
362
|
+
down: true,
|
|
363
|
+
breakpoint: "Medium"
|
|
364
|
+
}, /*#__PURE__*/React.createElement(Collapse, {
|
|
365
|
+
isOpened: extendedPanel === PANEL.NOTIFICATIONS
|
|
366
|
+
}, notificationTab(true)))), /*#__PURE__*/React.createElement(Toggler, null, /*#__PURE__*/React.createElement(ExpandButton, {
|
|
367
|
+
title: "Checklist",
|
|
368
|
+
counter: pendingTasksCount,
|
|
369
|
+
isOpened: extendedPanel === PANEL.TODOS,
|
|
370
|
+
onClick: () => {
|
|
371
|
+
this.togglePanel(PANEL.TODOS);
|
|
372
|
+
}
|
|
373
|
+
}), /*#__PURE__*/React.createElement(DisplayOnBreakpoint, {
|
|
374
|
+
down: true,
|
|
375
|
+
breakpoint: "Medium"
|
|
376
|
+
}, /*#__PURE__*/React.createElement(Collapse, {
|
|
377
|
+
isOpened: extendedPanel === PANEL.TODOS
|
|
378
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(ToDoList, {
|
|
379
|
+
successText: "Almost done!",
|
|
380
|
+
tasks: this.state.todoList
|
|
381
|
+
})))))))), /*#__PURE__*/React.createElement(DisplayOnBreakpoint, {
|
|
382
|
+
up: true,
|
|
383
|
+
breakpoint: "Medium"
|
|
384
|
+
}, /*#__PURE__*/React.createElement(TabsContainer, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
385
|
+
noPadding: true,
|
|
386
|
+
borderBottom: true
|
|
387
|
+
}, /*#__PURE__*/React.createElement(Collapse, {
|
|
388
|
+
isOpened: extendedPanel !== null
|
|
389
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
390
|
+
activeTab: extendedPanel
|
|
391
|
+
}, /*#__PURE__*/React.createElement(Tab, {
|
|
392
|
+
tabId: PANEL.NOTIFICATIONS
|
|
393
|
+
}, notificationTab()), /*#__PURE__*/React.createElement(Tab, {
|
|
394
|
+
tabId: PANEL.TODOS
|
|
395
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(ToDoList, {
|
|
396
|
+
successText: "Almost done!",
|
|
397
|
+
tasks: this.state.todoList
|
|
398
|
+
}))))))))));
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
export default ProfileHeader;
|