@stokr/components-library 0.6.7 → 0.6.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/.vscode/settings.json +3 -0
- package/CHANGELOG.md +7 -0
- package/Dockerfile +20 -0
- package/build/asset-manifest.json +45 -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/css/main.e30a9d15.css +15 -0
- package/build/static/css/main.e30a9d15.css.map +1 -0
- package/build/static/js/main.3e5959c7.js +3 -0
- package/build/static/js/main.3e5959c7.js.LICENSE.txt +164 -0
- package/build/static/js/main.3e5959c7.js.map +1 -0
- package/build/static/media/Ionicons.4e528d6445ca1974c313.woff +0 -0
- package/build/static/media/Ionicons.643c37f102b41f7f90c3.woff2 +0 -0
- package/build/static/media/Ionicons.98b7d3182f652f021bc3.ttf +0 -0
- package/build/static/media/OpenSans-Bold.9bea22b57dc165ed4382.ttf +0 -0
- package/build/static/media/OpenSans-Bold.a750292d6a0b5a760679.woff +0 -0
- package/build/static/media/OpenSans-Bold.cbfc24090ef8bacab132.woff2 +0 -0
- package/build/static/media/OpenSans-ExtraBold.21e493d43617de76dbc7.woff2 +0 -0
- package/build/static/media/OpenSans-ExtraBold.81f3ef07b7952e249da1.woff +0 -0
- package/build/static/media/OpenSans-ExtraBold.bcb6531cf820152b7538.ttf +0 -0
- package/build/static/media/OpenSans-Light.179ef2df02cb0b68c9fd.woff2 +0 -0
- package/build/static/media/OpenSans-Light.55053cc0a8e6482eca64.ttf +0 -0
- package/build/static/media/OpenSans-Light.c6a4bc1bd034d6303053.woff +0 -0
- package/build/static/media/OpenSans-Regular.3caa0d4f9b7d58668066.woff2 +0 -0
- package/build/static/media/OpenSans-Regular.9ec738fbb66068dc1ca7.woff +0 -0
- package/build/static/media/OpenSans-Regular.d97d7385fe8771611848.ttf +0 -0
- package/build/static/media/OpenSans-SemiBold.311956ded96d3fd2813d.woff2 +0 -0
- package/build/static/media/OpenSans-SemiBold.39f5961b2d3eb4aa5bf5.woff +0 -0
- package/build/static/media/OpenSans-SemiBold.d2b1865643b98c0e8b54.ttf +0 -0
- package/build/static/media/address-refreshing.5fbb0cc56c384480118a.gif +0 -0
- package/build/static/media/arrow-down-black.fe92da3ac6ed16b45bf57713df82cea2.svg +21 -0
- package/build/static/media/avatar-placeholder.488a33b3f080a43e0d43.png +0 -0
- package/build/static/media/icomoon.2640959b1f9381cde047.eot +0 -0
- package/build/static/media/icomoon.35bce49b15feeae93572c36a08feecd9.svg +47 -0
- package/build/static/media/icomoon.4c3c428d0ce82f840710.woff +0 -0
- package/build/static/media/icomoon.a1d7666a48f976227722.ttf +0 -0
- package/build/static/media/lemonway.33e88c3a49e7ac73e3a9.png +0 -0
- package/build/static/media/sicos-logo.7fa3ac9d583b52c3987da529da67cb15.svg +1 -0
- package/build/static/media/slick.2630a3e3eab21c607e21.svg +14 -0
- package/build/static/media/slick.295183786cd8a1389865.woff +0 -0
- package/build/static/media/slick.a4e97f5a2a64f0ab1323.eot +0 -0
- package/build/static/media/slick.c94f7671dcc99dce43e2.ttf +0 -0
- package/build/static/media/whales.7a1e9453670d08b8b76a.png +0 -0
- package/buildpushndeploy.sh +9 -0
- package/devops/Dockerfile +20 -0
- package/devops/Jenkinsfile +56 -0
- package/devops/ansible/docker-stack-deploy.yml +32 -0
- package/devops/ansible/hosts.ini +7 -0
- package/devops/docker-compose.yml +25 -0
- package/dist/api/StokrWeb3.js +184 -0
- package/dist/api/fetchData.js +76 -0
- package/dist/api/fetchDataPublic.js +65 -0
- package/dist/components/AccountBalance/AccountBalance.js +53 -0
- package/dist/components/AccountBalance/AccountBalance.stories.js +88 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +40 -0
- package/dist/components/AdminDashboard/Table/Table.js +170 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +79 -0
- package/dist/components/AgreementItem/AgreementItem.js +51 -0
- package/dist/components/AgreementItem/AgreementItem.stories.js +109 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +35 -0
- package/dist/components/AnalyticGraphs/Analytic.js +781 -0
- package/dist/components/AnalyticGraphs/Analytic.styles.js +37 -0
- package/dist/components/BackButton/BackButton.js +32 -0
- package/dist/components/BackButton/BackButton.stories.js +35 -0
- package/dist/components/BackButton/BackButton.styles.js +76 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.stories.js +78 -0
- package/dist/components/Background/Background.styles.js +76 -0
- package/dist/components/BarChart/BarChart.js +304 -0
- package/dist/components/BarChart/BarChart.stories.js +47 -0
- package/dist/components/BarChart/BarChart.styles.js +33 -0
- package/dist/components/BarChartLegend/BarChartLegend.js +106 -0
- package/dist/components/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/components/BasicTable/BasicTable.js +32 -0
- package/dist/components/BasicTable/BasicTable.stories.js +63 -0
- package/dist/components/BasicTable/BasicTable.styles.js +52 -0
- package/dist/components/Button/Button.stories.js +79 -0
- package/dist/components/Button/Button.styles.js +83 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +18 -0
- package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +45 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +34 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +34 -0
- package/dist/components/ChartBox/ChartBox.js +44 -0
- package/dist/components/ChartBox/ChartBox.stories.js +20 -0
- package/dist/components/ChartBox/ChartBox.styles.js +33 -0
- package/dist/components/ChartBox/ChartBoxDistribution.js +30 -0
- package/dist/components/ChartBox/ChartBoxDistribution.stories.js +21 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.stories.js +87 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +64 -0
- package/dist/components/Checkbox/Checkbox.js +116 -0
- package/dist/components/Checkbox/Checkbox.stories.js +92 -0
- package/dist/components/Checkbox/Checkbox.styles.js +45 -0
- package/dist/components/Checklist/UserChecklist.js +284 -0
- package/dist/components/Checklist/UserChecklist.stories.js +143 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +100 -0
- package/dist/components/ComponentScroll/ComponentScroll.stories.js +102 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +66 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +68 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +37 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +145 -0
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +173 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +186 -0
- package/dist/components/CryptoAddress/RadioWrap.js +49 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +54 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +74 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +67 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +40 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +59 -0
- package/dist/components/DonutChart/DonutChart.js +182 -0
- package/dist/components/DonutChart/DonutChart.stories.js +40 -0
- package/dist/components/DonutChart/DonutChart.styles.js +50 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +22 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +15 -0
- package/dist/components/FAQ/FAQ.js +75 -0
- package/dist/components/FAQ/FAQ.stories.js +74 -0
- package/dist/components/FAQ/FAQ.styles.js +48 -0
- package/dist/components/Footer/Footer.js +66 -0
- package/dist/components/Footer/Footer.stories.js +54 -0
- package/dist/components/Footer/Footer.styles.js +74 -0
- package/dist/components/Footer/FooterLayout.js +125 -0
- package/dist/components/Footer/FooterLayout.stories.js +31 -0
- package/dist/components/Footer/FooterMenu.js +117 -0
- package/dist/components/Footer/FooterMenu.stories.js +121 -0
- package/dist/components/Footer/FooterMenu.styles.js +80 -0
- package/dist/components/Footer/index.js +27 -0
- package/dist/components/Footer/lemonway.png +0 -0
- package/dist/components/Footer/sicos-logo.svg +1 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +127 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +42 -0
- package/dist/components/Form/Form.js +68 -0
- package/dist/components/Form/Form.stories.js +35 -0
- package/dist/components/Form/Form.styles.js +59 -0
- package/dist/components/FullscreenCard/FullscreenCard.styles.js +32 -0
- package/dist/components/Grid/Grid.styles.js +68 -0
- package/dist/components/Header/Header.js +457 -0
- package/dist/components/Header/Header.stories.js +190 -0
- package/dist/components/Header/Header.styles.js +182 -0
- package/dist/components/Icon/Icon.style.js +71 -0
- package/dist/components/InfoIcon/InfoIcon.js +50 -0
- package/dist/components/InfoIcon/InfoIcon.stories.js +52 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +31 -0
- package/dist/components/InfoPanel/InfoPanel.js +146 -0
- package/dist/components/Input/DatePickerInput.js +85 -0
- package/dist/components/Input/DatePickerInput.stories.js +91 -0
- package/dist/components/Input/DatePickerInput.styles.js +29 -0
- package/dist/components/Input/Input.js +108 -0
- package/dist/components/Input/Input.stories.js +148 -0
- package/dist/components/Input/Input.styles.js +53 -0
- package/dist/components/Input/InputPassword.js +151 -0
- package/dist/components/Input/InputPassword.stories.js +85 -0
- package/dist/components/Input/InputPassword.styles.js +80 -0
- package/dist/components/Input/RangeInput.js +60 -0
- package/dist/components/Input/RangeInput.stories.js +59 -0
- package/dist/components/Input/RangeInput.styles.js +53 -0
- package/dist/components/Input/Select.js +148 -0
- package/dist/components/Input/Select.stories.js +142 -0
- package/dist/components/Input/Select.styles.js +65 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +367 -0
- package/dist/components/InvestCalculator/InvestCalculator.stories.js +137 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +66 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +40 -0
- package/dist/components/InvestmentStat/InvestmentStat.stories.js +56 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +43 -0
- package/dist/components/KYCFlow/BasicInfo.js +489 -0
- package/dist/components/KYCFlow/Confirmation.js +51 -0
- package/dist/components/KYCFlow/DocumentFileUpload.js +276 -0
- package/dist/components/KYCFlow/DocumentScan.js +74 -0
- package/dist/components/KYCFlow/DocumentScanUpload.js +258 -0
- package/dist/components/KYCFlow/DocumentSelect.js +148 -0
- package/dist/components/KYCFlow/DocumentSuccess.js +64 -0
- package/dist/components/KYCFlow/DocumentUpload.js +54 -0
- package/dist/components/KYCFlow/DocumentVerificationType.js +161 -0
- package/dist/components/KYCFlow/FaceScan.js +55 -0
- package/dist/components/KYCFlow/FaceScanRecognition.js +60 -0
- package/dist/components/KYCFlow/FaceScanSuccess.js +59 -0
- package/dist/components/KYCFlow/Terms.js +142 -0
- package/dist/components/KYCFlow/_styles.js +160 -0
- package/dist/components/KYCFlow/index.js +97 -0
- package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +41 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +51 -0
- package/dist/components/LatestUpdate/LatestUpdate.stories.js +62 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +71 -0
- package/dist/components/Layout/Layout-func-no-work.js +78 -0
- package/dist/components/Layout/Layout.js +103 -0
- package/dist/components/Layout/Layout.stories.js +67 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +47 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +70 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +43 -0
- package/dist/components/LearnMorePage/LearnMore.js +255 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +40 -0
- package/dist/components/LearnMorePage/LearnMore.stories.js +51 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +87 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +75 -0
- package/dist/components/LearnMorePage/LearnMoreItem.stories.js +65 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +87 -0
- package/dist/components/LearnMoreSection/LearnMore.js +199 -0
- package/dist/components/LearnMoreSection/LearnMore.stories.js +33 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +73 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +52 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +62 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +50 -0
- package/dist/components/LoginModal/LoginModal.js +163 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +50 -0
- package/dist/components/MainMenu/MainMenu.js +262 -0
- package/dist/components/MainMenu/MainMenu.styles.js +124 -0
- package/dist/components/MatomoConnect/Matomo.js +485 -0
- package/dist/components/MatomoConnect/Matomo_fuckup.js +383 -0
- package/dist/components/MenuNav/MenuNav.styles.js +42 -0
- package/dist/components/Modal/Modal.js +135 -0
- package/dist/components/Modal/Modal.stories.js +82 -0
- package/dist/components/Modal/Modal.styles.js +140 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +48 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +72 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +41 -0
- package/dist/components/Newsletter/Newsletter.js +139 -0
- package/dist/components/Newsletter/Newsletter.stories.js +19 -0
- package/dist/components/Newsletter/Newsletter.styles.js +83 -0
- package/dist/components/NotificationContext/NotificationContext.js +173 -0
- package/dist/components/NotificationContext/NotificationContext.stories.js +33 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +22 -0
- package/dist/components/Number/Number.js +35 -0
- package/dist/components/Number/Number.stories.js +41 -0
- package/dist/components/Number/Number.styles.js +20 -0
- package/dist/components/PageTransition/PageTransition.js +57 -0
- package/dist/components/Process/Process.stories.js +47 -0
- package/dist/components/Process/Process.styles.js +33 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +53 -0
- package/dist/components/ProfileBadge/ProfileBadge.stories.js +48 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +32 -0
- package/dist/components/ProfileBox/ProfileBox.js +39 -0
- package/dist/components/ProfileBox/ProfileBox.stories.js +38 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +49 -0
- package/dist/components/ProfileHeader/ProfileHeader-CLb4.js +477 -0
- package/dist/components/ProfileHeader/ProfileHeader.js +330 -0
- package/dist/components/ProfileHeader/ProfileHeader.styles.js +87 -0
- package/dist/components/ProfileStat/ProfileStat.js +42 -0
- package/dist/components/ProfileStat/ProfileStat.stories.js +71 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +42 -0
- package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +69 -0
- package/dist/components/ROI/ROI.js +312 -0
- package/dist/components/ROI/ROI.styles.js +63 -0
- package/dist/components/ROI/ROIChart.js +469 -0
- package/dist/components/ROI/ROIChart.styles.js +33 -0
- package/dist/components/ROI/ROIModal.js +91 -0
- package/dist/components/ROI/ROIScenarioBox.js +55 -0
- package/dist/components/ROI/ROIScenarioBox.styles.js +52 -0
- package/dist/components/Radio/Radio.js +68 -0
- package/dist/components/Radio/Radio.stories.js +76 -0
- package/dist/components/Radio/Radio.styles.js +31 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.stories.js +42 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +39 -0
- package/dist/components/RegisterAlgorand/AlgoAddressName.js +138 -0
- package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +444 -0
- package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +47 -0
- package/dist/components/RegisterAlgorand/AlgoSuccess.js +38 -0
- package/dist/components/RegisterAlgorand/Algorand.stories.js +78 -0
- package/dist/components/RegisterAlgorand/ChooseWallet.js +97 -0
- package/dist/components/RegisterAlgorand/SelectProject.js +90 -0
- package/dist/components/RegisterAlgorand/_styles.js +28 -0
- package/dist/components/RegisterAlgorand/flow.js +409 -0
- package/dist/components/RegisterAlgorand/flowWithMemo.js +410 -0
- package/dist/components/RegisterAlgorand/index.js +48 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +40 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +33 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +16 -0
- package/dist/components/RegisterEthereum/EthAddressLedger.js +226 -0
- package/dist/components/RegisterEthereum/EthAddressMetamask.js +205 -0
- package/dist/components/RegisterEthereum/EthAddressName.js +135 -0
- package/dist/components/RegisterEthereum/EthConnectLedger.js +194 -0
- package/dist/components/RegisterEthereum/EthConnectMetamask.js +35 -0
- package/dist/components/RegisterEthereum/EthFinish.js +41 -0
- package/dist/components/RegisterEthereum/EthIntro.js +95 -0
- package/dist/components/RegisterEthereum/_styles.js +28 -0
- package/dist/components/RegisterEthereum/index.js +68 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.js +106 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +66 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +48 -0
- package/dist/components/RegisterLiquidSteps/complete.js +37 -0
- package/dist/components/RegisterLiquidSteps/flow.js +197 -0
- package/dist/components/RegisterLiquidSteps/index.js +52 -0
- package/dist/components/RegisterLiquidSteps/register-liquid.js +240 -0
- package/dist/components/RegisterModal/RegisterModal.js +180 -0
- package/dist/components/RegisterModal/RegisterModal.stories.js +46 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +31 -0
- package/dist/components/RequestDataBox/RequestDataBox.stories.js +40 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +31 -0
- package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +185 -0
- package/dist/components/RiskQuestionnaire/_styles.js +15 -0
- package/dist/components/SEO/SEO.js +71 -0
- package/dist/components/SEO/SEO.stories.js +64 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +15 -0
- package/dist/components/SideLine/SideLine.js +15 -0
- package/dist/components/SideLine/SideLine.stories.js +31 -0
- package/dist/components/SideLine/SideLine.styles.js +26 -0
- package/dist/components/SigningSubflow/SignSubAddressMetamask.js +137 -0
- package/dist/components/SigningSubflow/SignSubConnectLedger.js +150 -0
- package/dist/components/SigningSubflow/SignSubConnectMetamask.js +137 -0
- package/dist/components/SigningSubflow/SignSubIntro.js +54 -0
- package/dist/components/SigningSubflow/SignSubSendLedger.js +150 -0
- package/dist/components/SigningSubflow/SignSubSendMetamask.js +62 -0
- package/dist/components/SigningSubflow/SignSubTransactionLedger.js +161 -0
- package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +166 -0
- package/dist/components/SigningSubflow/_styles.js +45 -0
- package/dist/components/SigningSubflow/index.js +74 -0
- package/dist/components/Slider/Slider.js +50 -0
- package/dist/components/Slider/Slider.stories.js +72 -0
- package/dist/components/Slider/Slider.styles.js +23 -0
- package/dist/components/SpanButton/SpanButton.styles.js +15 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +20 -0
- package/dist/components/StepController/StepController.js +111 -0
- package/dist/components/StepController/StepController.stories.js +63 -0
- package/dist/components/StepController/StepController.styles.js +26 -0
- package/dist/components/StepController/StepControllerContext.js +104 -0
- package/dist/components/StepController/StepControllerProgress.js +40 -0
- package/dist/components/StepController/StepControllerProgress.stories.js +52 -0
- package/dist/components/StepsProgress/StepsProgress.js +128 -0
- package/dist/components/StepsProgress/StepsProgress.stories.js +50 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +36 -0
- package/dist/components/StokrLoader/StokrLoader.js +32 -0
- package/dist/components/StokrLoader/media.js +27 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +26 -0
- package/dist/components/SvgIcons/CameraSvg.js +36 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +31 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +35 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +61 -0
- package/dist/components/SvgIcons/DocumentSvg.js +38 -0
- package/dist/components/SvgIcons/Early.js +24 -0
- package/dist/components/SvgIcons/EthSvg.js +40 -0
- package/dist/components/SvgIcons/EurSvg.js +26 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +31 -0
- package/dist/components/SvgIcons/FourSvg.js +21 -0
- package/dist/components/SvgIcons/Glassess.js +29 -0
- package/dist/components/SvgIcons/LogoSvg.js +24 -0
- package/dist/components/SvgIcons/OneSvg.js +23 -0
- package/dist/components/SvgIcons/PassportSvg.js +56 -0
- package/dist/components/SvgIcons/RefreshSvg.js +27 -0
- package/dist/components/SvgIcons/SocialFacebook.js +25 -0
- package/dist/components/SvgIcons/SocialInstagram.js +26 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +25 -0
- package/dist/components/SvgIcons/SocialMedium.js +25 -0
- package/dist/components/SvgIcons/SocialReddit.js +25 -0
- package/dist/components/SvgIcons/SocialTelegram.js +25 -0
- package/dist/components/SvgIcons/SocialTwitter.js +25 -0
- package/dist/components/SvgIcons/SocialYoutube.js +25 -0
- package/dist/components/SvgIcons/ThreeSvg.js +20 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +82 -0
- package/dist/components/SvgIcons/TwoSvg.js +23 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +29 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +25 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +27 -0
- package/dist/components/SvgIcons/UploadSvg.js +34 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +23 -0
- package/dist/components/SvgIcons/index.js +223 -0
- package/dist/components/Switch/Switch.js +70 -0
- package/dist/components/Switch/Switch.stories.js +86 -0
- package/dist/components/Switch/Switch.styles.js +47 -0
- package/dist/components/Tabs/Tabs.js +70 -0
- package/dist/components/Tabs/Tabs.stories.js +29 -0
- package/dist/components/Tabs/Tabs.styles.js +18 -0
- package/dist/components/TabsNav/TabNav.js +31 -0
- package/dist/components/TabsNav/TabNav.stories.js +44 -0
- package/dist/components/TabsNav/TabsNav.js +43 -0
- package/dist/components/TabsNav/TabsNav.stories.js +26 -0
- package/dist/components/TabsNav/TabsNav.styles.js +43 -0
- package/dist/components/TeamOverview/TeamOverview.js +125 -0
- package/dist/components/TeamOverview/TeamOverview.stories.js +80 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +81 -0
- package/dist/components/Text/Headline.js +29 -0
- package/dist/components/Text/Headline.stories.js +51 -0
- package/dist/components/Text/StyledText.js +19 -0
- package/dist/components/Text/Text.stories.js +71 -0
- package/dist/components/Text/Text.styles.js +40 -0
- package/dist/components/TextLink/TextLink.styles.js +30 -0
- package/dist/components/ToDoList/ToDoList.js +184 -0
- package/dist/components/ToDoList/ToDoList.stories.js +137 -0
- package/dist/components/ToDoList/ToDoList.styles.js +83 -0
- package/dist/components/ToDoList/ToDoListTask.js +118 -0
- package/dist/components/ToDoList/ToDoListTask.stories.js +72 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +74 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +46 -0
- package/dist/components/TransactionDetails/TransactionDetails.stories.js +59 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +58 -0
- package/dist/components/TransactionInfo/TransactionInfo.stories.js +64 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +54 -0
- package/dist/components/TwoFactorModal/TwoFactorModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +56 -0
- package/dist/components/breakdown/index.js +27 -0
- package/dist/components/context/Auth.js +207 -0
- package/dist/components/context/AuthContext.js +335 -0
- package/dist/components/icons/Arrow.js +70 -0
- package/dist/components/icons/Arrow.stories.js +49 -0
- package/dist/components/icons/ArrowSimple.js +59 -0
- package/dist/components/icons/ArrowSimple.stories.js +55 -0
- package/dist/components/icons/Check.js +43 -0
- package/dist/components/icons/Check.stories.js +25 -0
- package/dist/components/icons/Facebook.js +26 -0
- package/dist/components/icons/Facebook.stories.js +24 -0
- package/dist/components/icons/Info.js +55 -0
- package/dist/components/icons/Info.stories.js +19 -0
- package/dist/components/icons/Instagram.js +26 -0
- package/dist/components/icons/Instagram.stories.js +24 -0
- package/dist/components/icons/LinkIcon.js +34 -0
- package/dist/components/icons/LinkIcon.stories.js +24 -0
- package/dist/components/icons/LinkedIn.js +43 -0
- package/dist/components/icons/LinkedIn.stories.js +19 -0
- package/dist/components/icons/Medium.js +42 -0
- package/dist/components/icons/Medium.stories.js +19 -0
- package/dist/components/icons/Reddit.js +32 -0
- package/dist/components/icons/Reddit.stories.js +24 -0
- package/dist/components/icons/Share.js +62 -0
- package/dist/components/icons/Share.stories.js +19 -0
- package/dist/components/icons/Telegram.js +42 -0
- package/dist/components/icons/Telegram.stories.js +19 -0
- package/dist/components/icons/Twitter.js +26 -0
- package/dist/components/icons/Twitter.stories.js +24 -0
- package/dist/components/icons/X.js +26 -0
- package/dist/components/icons/X.stories.js +19 -0
- package/dist/components/icons/Youtube.js +26 -0
- package/dist/components/icons/Youtube.stories.js +24 -0
- package/dist/components/icons/index.js +170 -0
- package/dist/components/renderToBody/index.js +27 -0
- package/dist/components/renderToBody/renderToBody.js +68 -0
- package/dist/components/taxId/TaxId.stories.js +54 -0
- package/dist/components/taxId/complete.js +32 -0
- package/dist/components/taxId/flow.js +65 -0
- package/dist/components/taxId/index.js +27 -0
- package/dist/components/taxId/register-taxid.js +195 -0
- package/dist/components/video/Video.js +174 -0
- package/dist/components/video/Video.stories.js +56 -0
- package/dist/components/video/index.js +27 -0
- package/dist/constants/globalVariables.js +10 -0
- package/dist/constants/style.js +52 -0
- package/dist/index.js +1 -0
- package/dist/model/axios.js +18 -0
- package/dist/model/axiosPublic.js +18 -0
- package/dist/static/fonts/Ionicons/Ionicons.ttf +0 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff +0 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff2 +0 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css +13 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2 +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2 +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.ttf +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff2 +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2 +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff +0 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2 +0 -0
- package/dist/static/fonts/icomoon/icomoon.eot +0 -0
- package/dist/static/fonts/icomoon/icomoon.svg +47 -0
- package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
- package/dist/static/fonts/icomoon/icomoon.woff +0 -0
- package/dist/static/fonts/icomoon/selection.json +1 -0
- package/dist/static/fonts/icomoon/style.css +137 -0
- package/dist/static/images/1.svg +4 -0
- package/dist/static/images/2.svg +4 -0
- package/dist/static/images/3.svg +3 -0
- package/dist/static/images/4.svg +3 -0
- package/dist/static/images/Glassess.svg +5 -0
- package/dist/static/images/VerifiedBadge.svg +1 -0
- package/dist/static/images/address-refreshing.gif +0 -0
- package/dist/static/images/admin-badge.svg +3 -0
- package/dist/static/images/amazon-logo.png +0 -0
- package/dist/static/images/arrow-down-black.svg +21 -0
- package/dist/static/images/avatar-cog.png +0 -0
- package/dist/static/images/avatar-placeholder.png +0 -0
- package/dist/static/images/avatar.png +0 -0
- package/dist/static/images/background.png +0 -0
- package/dist/static/images/camera.svg +1 -0
- package/dist/static/images/caps-lock.svg +6 -0
- package/dist/static/images/covers/blockchain.png +0 -0
- package/dist/static/images/covers/country.jpg +0 -0
- package/dist/static/images/covers/ethereum.jpg +0 -0
- package/dist/static/images/covers/index.png +0 -0
- package/dist/static/images/covers/liquid.png +0 -0
- package/dist/static/images/covers/money.png +0 -0
- package/dist/static/images/covers/overview.jpg +0 -0
- package/dist/static/images/covers/risk-questionnaire.jpg +0 -0
- package/dist/static/images/covers/rocket.png +0 -0
- package/dist/static/images/covers/verify-identity.jpg +0 -0
- package/dist/static/images/covers/virtual-iban.jpg +0 -0
- package/dist/static/images/document-back.svg +1 -0
- package/dist/static/images/document-small.svg +1 -0
- package/dist/static/images/document.svg +1 -0
- package/dist/static/images/early-adopter.png +0 -0
- package/dist/static/images/early-adopter.svg +1 -0
- package/dist/static/images/eth.svg +10 -0
- package/dist/static/images/eur.svg +3 -0
- package/dist/static/images/face-scan-icon.svg +1 -0
- package/dist/static/images/favicon.png +0 -0
- package/dist/static/images/favicon.svg +57 -0
- package/dist/static/images/google-logo.png +0 -0
- package/dist/static/images/graduation.png +0 -0
- package/dist/static/images/hdd.png +0 -0
- package/dist/static/images/lemonway.png +0 -0
- package/dist/static/images/logo.svg +1 -0
- package/dist/static/images/member-item-picture.png +0 -0
- package/dist/static/images/one.jpg +0 -0
- package/dist/static/images/passport.svg +1 -0
- package/dist/static/images/process-waiting.gif +0 -0
- package/dist/static/images/profile-picture-placeholder.png +0 -0
- package/dist/static/images/profile-picture-placeholder.svg +1 -0
- package/dist/static/images/profile-picture.png +0 -0
- package/dist/static/images/refresh.svg +9 -0
- package/dist/static/images/shark.jpg +0 -0
- package/dist/static/images/sicos.png +0 -0
- package/dist/static/images/slider/1.jpg +0 -0
- package/dist/static/images/slider/2.jpg +0 -0
- package/dist/static/images/slider/3.jpg +0 -0
- package/dist/static/images/social/facebook.svg +3 -0
- package/dist/static/images/social/linkedin.svg +3 -0
- package/dist/static/images/social/medium.svg +3 -0
- package/dist/static/images/social/reddit.svg +3 -0
- package/dist/static/images/social/telegram.svg +3 -0
- package/dist/static/images/social/twitter.svg +3 -0
- package/dist/static/images/social/youtube.svg +3 -0
- package/dist/static/images/three.jpg +0 -0
- package/dist/static/images/two-sided-document.svg +26 -0
- package/dist/static/images/two.jpg +0 -0
- package/dist/static/images/upload.svg +1 -0
- package/dist/static/images/user-profile.png +0 -0
- package/dist/static/images/whales.png +0 -0
- package/dist/static/videos/Capybara-with-mandarin orange-on-head.mp4 +0 -0
- package/dist/styles/colors.js +55 -0
- package/dist/styles/fonts.js +34 -0
- package/dist/styles/global.js +19 -0
- package/dist/styles/grid.js +16 -0
- package/dist/styles/reactTippy.js +12 -0
- package/dist/styles/rwd.js +52 -0
- package/dist/styles/semanticUi.js +12 -0
- package/dist/styles/spacing.js +12 -0
- package/dist/styles/theme.js +43 -0
- package/dist/utils/allowed-countries-list.js +1375 -0
- package/dist/utils/breakpoint.js +19 -0
- package/dist/utils/countries-list.js +1008 -0
- package/dist/utils/customHooks.js +54 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +20 -0
- package/dist/utils/fix-decimals.js +11 -0
- package/dist/utils/get-cookie-domain.js +16 -0
- package/dist/utils/get-short-address.js +10 -0
- package/dist/utils/lock-body.js +20 -0
- package/dist/utils/redirect-url.js +10 -0
- package/dist/utils/set-redirect-cookie.js +20 -0
- package/docker-compose.yml +25 -0
- package/package.json +77 -84
- package/storybook-static/favicon.ico +0 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.Header = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _reactRouterDom = require("react-router-dom");
|
|
11
|
+
var _Button = _interopRequireDefault(require("../Button/Button.styles"));
|
|
12
|
+
var _SvgIcons = require("../SvgIcons");
|
|
13
|
+
var _MenuNav = _interopRequireDefault(require("../MenuNav/MenuNav.styles"));
|
|
14
|
+
var _MainMenu = _interopRequireDefault(require("../MainMenu/MainMenu"));
|
|
15
|
+
var _StepsProgress = _interopRequireWildcard(require("../StepsProgress/StepsProgress"));
|
|
16
|
+
var _NotificationCounter = _interopRequireDefault(require("../NotificationCounter/NotificationCounter.styles"));
|
|
17
|
+
var _avatarPlaceholder = _interopRequireDefault(require("../../static/images/avatar-placeholder.png"));
|
|
18
|
+
var _Header = require("./Header.styles");
|
|
19
|
+
var _DynamicMainMenu = _interopRequireDefault(require("../MainMenu/DynamicMainMenu"));
|
|
20
|
+
var _FooterMenu = require("../Footer/FooterMenu.styles");
|
|
21
|
+
var _reactCollapse = require("react-collapse");
|
|
22
|
+
var _customHooks = require("../../utils/customHooks");
|
|
23
|
+
var _breakdown = _interopRequireDefault(require("../breakdown"));
|
|
24
|
+
var _FooterMenu2 = require("../Footer/FooterMenu");
|
|
25
|
+
var _Grid = require("../Grid/Grid.styles");
|
|
26
|
+
var _FooterLayout = require("../Footer/FooterLayout");
|
|
27
|
+
var _globalVariables = require("../../constants/globalVariables");
|
|
28
|
+
var _excluded = ["activeMenu", "activateMenu", "user", "userPhoto", "logoutUser", "onLoginClick", "onSignUpClick", "useRelativePathForMenu", "useRelativePathForUserMenu", "progress", "withSidebar", "isSidebarExpanded", "sidebarHandler", "signupFlow", "noFixedPosition"];
|
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
36
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
39
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
40
|
+
var productMenuItems = [{
|
|
41
|
+
name: 'SME Fundraising',
|
|
42
|
+
onClick: function onClick() {
|
|
43
|
+
return window.location.href = "".concat(_globalVariables.platformURL, "/products/sme-fundraising");
|
|
44
|
+
},
|
|
45
|
+
link: '/products/sme-fundraising'
|
|
46
|
+
}, {
|
|
47
|
+
name: 'Asset Tokenisation',
|
|
48
|
+
onClick: function onClick() {
|
|
49
|
+
return window.location.href = "".concat(_globalVariables.platformURL, "/products/asset-tokenisation");
|
|
50
|
+
},
|
|
51
|
+
link: '/products/asset-tokenisation'
|
|
52
|
+
}, {
|
|
53
|
+
name: 'Fund Tokenisation',
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
return window.location.href = "".concat(_globalVariables.platformURL, "/products/fund-tokenisation");
|
|
56
|
+
},
|
|
57
|
+
link: '/products/fund-tokenisation'
|
|
58
|
+
}];
|
|
59
|
+
var mediaMenuItems = [{
|
|
60
|
+
name: 'Press Releases',
|
|
61
|
+
onClick: function onClick() {
|
|
62
|
+
return window.location.href = "".concat(_globalVariables.platformURL, "/press-releases");
|
|
63
|
+
},
|
|
64
|
+
link: '/products/press-releases'
|
|
65
|
+
}, {
|
|
66
|
+
name: 'Stoke Post',
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return window.location.href = "".concat(_globalVariables.platformURL, "/stoke-post");
|
|
69
|
+
},
|
|
70
|
+
link: '/products/stoke-post'
|
|
71
|
+
}];
|
|
72
|
+
var investorMenuItems = [{
|
|
73
|
+
title: 'Dashboard',
|
|
74
|
+
link: '/checklist'
|
|
75
|
+
}];
|
|
76
|
+
var UserAvatarComponent = function UserAvatarComponent(_ref) {
|
|
77
|
+
var avatar = _ref.avatar;
|
|
78
|
+
var _useState = (0, _react.useState)(_avatarPlaceholder.default),
|
|
79
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
80
|
+
photo = _useState2[0],
|
|
81
|
+
setphoto = _useState2[1];
|
|
82
|
+
var prevProps = (0, _customHooks.usePrevious)({
|
|
83
|
+
avatar: avatar
|
|
84
|
+
});
|
|
85
|
+
(0, _react.useEffect)(function () {
|
|
86
|
+
checkUserPhoto(avatar);
|
|
87
|
+
}, []);
|
|
88
|
+
(0, _react.useEffect)(function () {
|
|
89
|
+
if (avatar != (prevProps === null || prevProps === void 0 ? void 0 : prevProps.avatar)) {
|
|
90
|
+
checkUserPhoto(avatar);
|
|
91
|
+
}
|
|
92
|
+
return function () {
|
|
93
|
+
if (prevProps != null) {
|
|
94
|
+
prevProps.avatar = avatar;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}, [avatar]);
|
|
98
|
+
var checkUserPhoto = function checkUserPhoto(avatar) {
|
|
99
|
+
try {
|
|
100
|
+
var http = new XMLHttpRequest();
|
|
101
|
+
http.open('HEAD', avatar, true);
|
|
102
|
+
http.send();
|
|
103
|
+
if (http.status !== 404) {
|
|
104
|
+
setphoto(avatar);
|
|
105
|
+
}
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.log('error: ', error);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_Header.UserAvatar, {
|
|
111
|
+
src: photo
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
var RenderSubMenu = function RenderSubMenu(_ref2) {
|
|
115
|
+
var title = _ref2.title,
|
|
116
|
+
isActive = _ref2.isActive,
|
|
117
|
+
_ref2$subMenuItems = _ref2.subMenuItems,
|
|
118
|
+
subMenuItems = _ref2$subMenuItems === void 0 ? [] : _ref2$subMenuItems,
|
|
119
|
+
_ref2$onClick = _ref2.onClick,
|
|
120
|
+
onClick = _ref2$onClick === void 0 ? function () {} : _ref2$onClick,
|
|
121
|
+
_ref2$platformURL = _ref2.platformURL,
|
|
122
|
+
platformURL = _ref2$platformURL === void 0 ? '' : _ref2$platformURL;
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, {
|
|
124
|
+
onClick: onClick
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.StyledSubMenu, null, /*#__PURE__*/_react.default.createElement("a", null, title), /*#__PURE__*/_react.default.createElement(_FooterMenu.ArrowDown, {
|
|
126
|
+
displayAlways: true,
|
|
127
|
+
isOpened: isActive,
|
|
128
|
+
style: {
|
|
129
|
+
right: '-2em',
|
|
130
|
+
position: 'absolute'
|
|
131
|
+
}
|
|
132
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactCollapse.Collapse, {
|
|
133
|
+
isOpened: isActive
|
|
134
|
+
}, subMenuItems.map(function (item) {
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, {
|
|
136
|
+
key: item.name,
|
|
137
|
+
red: true
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
139
|
+
href: platformURL + item.link
|
|
140
|
+
}, item.name));
|
|
141
|
+
})));
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
//social links to render in mobile menu
|
|
145
|
+
var socialLinks = (_FooterLayout.footerGroups === null || _FooterLayout.footerGroups === void 0 ? void 0 : _FooterLayout.footerGroups.filter(function (group) {
|
|
146
|
+
return group.social;
|
|
147
|
+
})[0].items) || [];
|
|
148
|
+
var Header = function Header(_ref3) {
|
|
149
|
+
var _ref3$activeMenu = _ref3.activeMenu,
|
|
150
|
+
activeMenu = _ref3$activeMenu === void 0 ? null : _ref3$activeMenu,
|
|
151
|
+
_ref3$activateMenu = _ref3.activateMenu,
|
|
152
|
+
activateMenu = _ref3$activateMenu === void 0 ? function () {} : _ref3$activateMenu,
|
|
153
|
+
_ref3$user = _ref3.user,
|
|
154
|
+
user = _ref3$user === void 0 ? {} : _ref3$user,
|
|
155
|
+
_ref3$userPhoto = _ref3.userPhoto,
|
|
156
|
+
userPhoto = _ref3$userPhoto === void 0 ? '' : _ref3$userPhoto,
|
|
157
|
+
_ref3$logoutUser = _ref3.logoutUser,
|
|
158
|
+
logoutUser = _ref3$logoutUser === void 0 ? function () {} : _ref3$logoutUser,
|
|
159
|
+
_ref3$onLoginClick = _ref3.onLoginClick,
|
|
160
|
+
onLoginClick = _ref3$onLoginClick === void 0 ? function () {} : _ref3$onLoginClick,
|
|
161
|
+
_ref3$onSignUpClick = _ref3.onSignUpClick,
|
|
162
|
+
onSignUpClick = _ref3$onSignUpClick === void 0 ? function () {} : _ref3$onSignUpClick,
|
|
163
|
+
_ref3$useRelativePath = _ref3.useRelativePathForMenu,
|
|
164
|
+
useRelativePathForMenu = _ref3$useRelativePath === void 0 ? false : _ref3$useRelativePath,
|
|
165
|
+
_ref3$useRelativePath2 = _ref3.useRelativePathForUserMenu,
|
|
166
|
+
useRelativePathForUserMenu = _ref3$useRelativePath2 === void 0 ? false : _ref3$useRelativePath2,
|
|
167
|
+
_ref3$progress = _ref3.progress,
|
|
168
|
+
progress = _ref3$progress === void 0 ? null : _ref3$progress,
|
|
169
|
+
_ref3$withSidebar = _ref3.withSidebar,
|
|
170
|
+
withSidebar = _ref3$withSidebar === void 0 ? false : _ref3$withSidebar,
|
|
171
|
+
_ref3$isSidebarExpand = _ref3.isSidebarExpanded,
|
|
172
|
+
isSidebarExpanded = _ref3$isSidebarExpand === void 0 ? false : _ref3$isSidebarExpand,
|
|
173
|
+
_ref3$sidebarHandler = _ref3.sidebarHandler,
|
|
174
|
+
sidebarHandler = _ref3$sidebarHandler === void 0 ? function () {} : _ref3$sidebarHandler,
|
|
175
|
+
_ref3$signupFlow = _ref3.signupFlow,
|
|
176
|
+
signupFlow = _ref3$signupFlow === void 0 ? false : _ref3$signupFlow,
|
|
177
|
+
_ref3$noFixedPosition = _ref3.noFixedPosition,
|
|
178
|
+
noFixedPosition = _ref3$noFixedPosition === void 0 ? false : _ref3$noFixedPosition,
|
|
179
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
180
|
+
var _useState3 = (0, _react.useState)(null),
|
|
181
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
182
|
+
currentActiveMenu = _useState4[0],
|
|
183
|
+
setcurrentActiveMenu = _useState4[1];
|
|
184
|
+
var _useState5 = (0, _react.useState)(null),
|
|
185
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
186
|
+
currentActiveSubMenu = _useState6[0],
|
|
187
|
+
setcurrentActiveSubMenu = _useState6[1];
|
|
188
|
+
var prevAmount = (0, _customHooks.usePrevious)({
|
|
189
|
+
activeMenu: activeMenu
|
|
190
|
+
});
|
|
191
|
+
(0, _react.useEffect)(function () {
|
|
192
|
+
//this is used when clicked outside the header
|
|
193
|
+
if ((prevAmount === null || prevAmount === void 0 ? void 0 : prevAmount.activeMenu) !== activeMenu) {
|
|
194
|
+
if (activeMenu !== null) {
|
|
195
|
+
setcurrentActiveMenu(null);
|
|
196
|
+
activateMenu();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return function () {
|
|
200
|
+
if (prevAmount != null) {
|
|
201
|
+
prevAmount.activeMenu = activeMenu;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}, [activeMenu, activateMenu]);
|
|
205
|
+
var toggleMenu = function toggleMenu(type) {
|
|
206
|
+
var mobile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
207
|
+
if (activeMenu === false) {
|
|
208
|
+
setcurrentActiveMenu(null);
|
|
209
|
+
}
|
|
210
|
+
if (window.innerWidth <= 767) {
|
|
211
|
+
if (currentActiveMenu) {
|
|
212
|
+
document.body.style.overflowY = 'unset';
|
|
213
|
+
} else {
|
|
214
|
+
document.body.style.overflowY = 'hidden';
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (mobile && type !== 'main') {
|
|
218
|
+
setcurrentActiveSubMenu(currentActiveSubMenu === type ? null : type);
|
|
219
|
+
} else {
|
|
220
|
+
setcurrentActiveMenu(currentActiveMenu === type ? null : type);
|
|
221
|
+
}
|
|
222
|
+
activateMenu();
|
|
223
|
+
};
|
|
224
|
+
var userType = user && user.user_type;
|
|
225
|
+
var isAdmin = userType === 'company_pa' || userType === 'company_sa' || userType === 'sa';
|
|
226
|
+
|
|
227
|
+
//currently we have sidebar only in venture dashboard
|
|
228
|
+
var isVentureDashboard = withSidebar;
|
|
229
|
+
var newPlatformUrl = useRelativePathForMenu ? '' : _globalVariables.platformURL;
|
|
230
|
+
var newPlatformUrlForUserMenu = useRelativePathForUserMenu ? '' : "https://dashboard.".concat(_globalVariables.platformDomain);
|
|
231
|
+
return /*#__PURE__*/_react.default.createElement(_Header.StyledHeader, {
|
|
232
|
+
noFixedPosition: noFixedPosition
|
|
233
|
+
}, /*#__PURE__*/_react.default.createElement(_Grid.Wrapper, {
|
|
234
|
+
flex: withSidebar
|
|
235
|
+
}, withSidebar && /*#__PURE__*/_react.default.createElement(_Header.SidebarToggle, {
|
|
236
|
+
isSidebarExpanded: isSidebarExpanded,
|
|
237
|
+
onClick: sidebarHandler
|
|
238
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.HamburgerIcon, null)), /*#__PURE__*/_react.default.createElement(_Header.HeaderInner, {
|
|
239
|
+
withSidebar: withSidebar
|
|
240
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.MainNavWrap, {
|
|
241
|
+
hasProgress: progress
|
|
242
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.Logo, {
|
|
243
|
+
isHighlight: currentActiveMenu === 'main'
|
|
244
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
245
|
+
href: _globalVariables.platformURL
|
|
246
|
+
}, /*#__PURE__*/_react.default.createElement(_SvgIcons.LogoSvg, null))), !progress && /*#__PURE__*/_react.default.createElement(_Header.HeaderMainNav, null, /*#__PURE__*/_react.default.createElement(_MenuNav.default, null, /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
247
|
+
href: newPlatformUrl + '/featured-assets'
|
|
248
|
+
}, "Invest")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
249
|
+
onClick: function onClick() {
|
|
250
|
+
return toggleMenu('products');
|
|
251
|
+
}
|
|
252
|
+
}, "Products")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
253
|
+
onClick: function onClick() {
|
|
254
|
+
return toggleMenu('media');
|
|
255
|
+
}
|
|
256
|
+
}, "Media")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
257
|
+
href: newPlatformUrl + '/team'
|
|
258
|
+
}, "Team")))))), progress && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, signupFlow ? /*#__PURE__*/_react.default.createElement(_StepsProgress.StepsProgressSignup, {
|
|
259
|
+
user: user
|
|
260
|
+
}) : /*#__PURE__*/_react.default.createElement(_Header.ProgressWrap, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.StepsProgressHeader, {
|
|
261
|
+
items: progress.items,
|
|
262
|
+
doneIndex: progress.doneIndex,
|
|
263
|
+
activeIndex: progress.activeIndex
|
|
264
|
+
}))), /*#__PURE__*/_react.default.createElement(_Header.QuickNavWrap, {
|
|
265
|
+
hasProgress: progress
|
|
266
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuToggler, {
|
|
267
|
+
isActive: currentActiveMenu === 'main',
|
|
268
|
+
onClick: function onClick() {
|
|
269
|
+
return toggleMenu('main');
|
|
270
|
+
},
|
|
271
|
+
withSidebar: withSidebar
|
|
272
|
+
}, /*#__PURE__*/_react.default.createElement("span", null), /*#__PURE__*/_react.default.createElement("span", null), /*#__PURE__*/_react.default.createElement("span", null)), checkTodoStatus(user) > 0 && !signupFlow && /*#__PURE__*/_react.default.createElement(_NotificationCounter.default, {
|
|
273
|
+
avatar: true,
|
|
274
|
+
MobileMenuToggler: true,
|
|
275
|
+
isActive: currentActiveMenu === 'main'
|
|
276
|
+
}, checkTodoStatus(user)), /*#__PURE__*/_react.default.createElement(_Header.HeaderQuickNav, {
|
|
277
|
+
isUserLogged: user._id
|
|
278
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, user._id ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, signupFlow ? /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
279
|
+
onClick: logoutUser
|
|
280
|
+
}, "Log Out") : /*#__PURE__*/_react.default.createElement(_Header.UserAccount, null, /*#__PURE__*/_react.default.createElement(_Header.UserButton, {
|
|
281
|
+
onClick: function onClick() {
|
|
282
|
+
return toggleMenu('main');
|
|
283
|
+
}
|
|
284
|
+
}, /*#__PURE__*/_react.default.createElement(UserAvatarComponent, {
|
|
285
|
+
avatar: userPhoto
|
|
286
|
+
})), checkTodoStatus(user) > 0 && /*#__PURE__*/_react.default.createElement(_NotificationCounter.default, {
|
|
287
|
+
avatar: true
|
|
288
|
+
}, checkTodoStatus(user)))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_breakdown.default, null, /*#__PURE__*/_react.default.createElement(_Header.LoginButton, {
|
|
289
|
+
onClick: onLoginClick
|
|
290
|
+
}, "Log in")), /*#__PURE__*/_react.default.createElement(_Header.SignupButton, {
|
|
291
|
+
onClick: onSignUpClick
|
|
292
|
+
}, "Sign Up"))))), /*#__PURE__*/_react.default.createElement(_Header.MobileMenu, {
|
|
293
|
+
isActive: currentActiveMenu === 'main',
|
|
294
|
+
withSidebar: withSidebar
|
|
295
|
+
}, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuPart, {
|
|
296
|
+
withPadding: true
|
|
297
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuNav.default, {
|
|
298
|
+
mobile: true
|
|
299
|
+
}, /*#__PURE__*/_react.default.createElement("ul", null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
300
|
+
href: newPlatformUrl + '/featured-assets'
|
|
301
|
+
}, "Invest")), /*#__PURE__*/_react.default.createElement(RenderSubMenu, {
|
|
302
|
+
title: "products",
|
|
303
|
+
isActive: currentActiveSubMenu === 'products',
|
|
304
|
+
subMenuItems: productMenuItems,
|
|
305
|
+
platformURL: newPlatformUrl,
|
|
306
|
+
onClick: function onClick() {
|
|
307
|
+
toggleMenu('products', true);
|
|
308
|
+
}
|
|
309
|
+
}), /*#__PURE__*/_react.default.createElement(RenderSubMenu, {
|
|
310
|
+
title: "media",
|
|
311
|
+
isActive: currentActiveSubMenu === 'media',
|
|
312
|
+
subMenuItems: mediaMenuItems,
|
|
313
|
+
platformURL: newPlatformUrl,
|
|
314
|
+
onClick: function onClick() {
|
|
315
|
+
toggleMenu('media', true);
|
|
316
|
+
}
|
|
317
|
+
}), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
318
|
+
href: newPlatformUrl + '/team'
|
|
319
|
+
}, "Team")))))), user._id ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, !signupFlow && /*#__PURE__*/_react.default.createElement(_Header.MobileMenuPart, {
|
|
320
|
+
withPadding: true,
|
|
321
|
+
flexColumnt: true,
|
|
322
|
+
borderTop: true
|
|
323
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuNav.default, {
|
|
324
|
+
mobile: true
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement("ul", null, isAdmin ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isVentureDashboard ? /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
326
|
+
href: '/settings'
|
|
327
|
+
}, "Settings")) : /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
328
|
+
to: 'https://admin.' + _globalVariables.platformDomain,
|
|
329
|
+
onClick: function onClick() {
|
|
330
|
+
return toggleMenu('main');
|
|
331
|
+
}
|
|
332
|
+
}, "Dashboard"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
333
|
+
to: checkTodoStatus(user) > 0 ? "".concat(newPlatformUrlForUserMenu, "/checklist") : "".concat(newPlatformUrlForUserMenu, "/"),
|
|
334
|
+
onClick: function onClick() {
|
|
335
|
+
return toggleMenu('main');
|
|
336
|
+
}
|
|
337
|
+
}, "Dashboard"), checkTodoStatus(user) > 0 && /*#__PURE__*/_react.default.createElement(_NotificationCounter.default, {
|
|
338
|
+
avatar: true,
|
|
339
|
+
mobileMenu: true
|
|
340
|
+
}, checkTodoStatus(user))), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
341
|
+
to: "".concat(newPlatformUrlForUserMenu, "/settings/profile-and-privacy"),
|
|
342
|
+
onClick: function onClick() {
|
|
343
|
+
return toggleMenu('main');
|
|
344
|
+
}
|
|
345
|
+
}, "Profile and Privacy")), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
346
|
+
to: "".concat(newPlatformUrlForUserMenu, "/settings/ethereum-address"),
|
|
347
|
+
onClick: function onClick() {
|
|
348
|
+
return toggleMenu('main');
|
|
349
|
+
}
|
|
350
|
+
}, "Ethereum Addresses")), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
351
|
+
to: "".concat(newPlatformUrlForUserMenu, "/settings/liquid-address"),
|
|
352
|
+
onClick: function onClick() {
|
|
353
|
+
return toggleMenu('main');
|
|
354
|
+
}
|
|
355
|
+
}, "Liquid Securities Account")), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuItem, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
356
|
+
to: "".concat(newPlatformUrlForUserMenu, "/settings/algorand-address"),
|
|
357
|
+
onClick: function onClick() {
|
|
358
|
+
return toggleMenu('main');
|
|
359
|
+
}
|
|
360
|
+
}, "Algorand Addresses")))))), /*#__PURE__*/_react.default.createElement(_Header.MobileMenuPart, {
|
|
361
|
+
withPadding: true,
|
|
362
|
+
flexColumnt: true,
|
|
363
|
+
noPaddingTop: !signupFlow,
|
|
364
|
+
borderTop: signupFlow
|
|
365
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
366
|
+
minWidth: "160px",
|
|
367
|
+
secondary: true,
|
|
368
|
+
onClick: function onClick() {
|
|
369
|
+
return logoutUser();
|
|
370
|
+
}
|
|
371
|
+
}, "log out"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_breakdown.default, {
|
|
372
|
+
alignCenter: true
|
|
373
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
374
|
+
onClick: onLoginClick,
|
|
375
|
+
secondary: true,
|
|
376
|
+
isLoginMobile: true
|
|
377
|
+
}, "Log in")), /*#__PURE__*/_react.default.createElement("div", {
|
|
378
|
+
style: {
|
|
379
|
+
display: 'flex',
|
|
380
|
+
justifyContent: 'center',
|
|
381
|
+
paddingBottom: 30
|
|
382
|
+
}
|
|
383
|
+
}, /*#__PURE__*/_react.default.createElement(_Header.SignupButton, {
|
|
384
|
+
onClick: onSignUpClick,
|
|
385
|
+
isMobile: true
|
|
386
|
+
}, "Sign Up")), socialLinks.length > 0 && /*#__PURE__*/_react.default.createElement(_Header.CTAContainer, null, /*#__PURE__*/_react.default.createElement("span", null, "FOLLOW US"), /*#__PURE__*/_react.default.createElement("div", null, socialLinks.map(function (item) {
|
|
387
|
+
return /*#__PURE__*/_react.default.createElement(_FooterMenu.SocialLink, {
|
|
388
|
+
key: item.name,
|
|
389
|
+
href: item.url,
|
|
390
|
+
icon: item.name,
|
|
391
|
+
target: "_blank",
|
|
392
|
+
rel: "noopener noreferrer"
|
|
393
|
+
}, _FooterMenu2.socialSvg[item.name]);
|
|
394
|
+
}))))), /*#__PURE__*/_react.default.createElement(_DynamicMainMenu.default, {
|
|
395
|
+
isMenuActive: currentActiveMenu === 'products',
|
|
396
|
+
options: productMenuItems
|
|
397
|
+
}), /*#__PURE__*/_react.default.createElement(_DynamicMainMenu.default, {
|
|
398
|
+
isMenuActive: currentActiveMenu === 'media',
|
|
399
|
+
options: mediaMenuItems
|
|
400
|
+
}), /*#__PURE__*/_react.default.createElement(_MainMenu.default, {
|
|
401
|
+
isMenuActive: currentActiveMenu === 'main',
|
|
402
|
+
logoutUser: logoutUser,
|
|
403
|
+
user: user,
|
|
404
|
+
isAdmin: isAdmin,
|
|
405
|
+
notifications: checkTodoStatus(user),
|
|
406
|
+
isVentureDashboard: isVentureDashboard,
|
|
407
|
+
platformUrlForUserMenu: newPlatformUrlForUserMenu
|
|
408
|
+
}))));
|
|
409
|
+
};
|
|
410
|
+
exports.Header = Header;
|
|
411
|
+
var checkTodoStatus = function checkTodoStatus(user) {
|
|
412
|
+
var isFromAllowedCountry = user.country && user.countryObj.isAllowed;
|
|
413
|
+
var count = 0;
|
|
414
|
+
|
|
415
|
+
// Country
|
|
416
|
+
if (isFromAllowedCountry && (user.user_type === 'investor' || user.user_type === 'investor-entity')) {
|
|
417
|
+
//wallet
|
|
418
|
+
!user.investor_algo_addresses && !user.liquid_network && count++;
|
|
419
|
+
// Risk Questionnaire
|
|
420
|
+
!user.is_risk_questionnaire_finished && count++
|
|
421
|
+
// KYC
|
|
422
|
+
;
|
|
423
|
+
(!user.kyc_status || user.kyc_status.toUpperCase() === 'DRAFT' || user.kyc_status.toUpperCase() === 'REAPPLY') && count++;
|
|
424
|
+
}
|
|
425
|
+
return count;
|
|
426
|
+
};
|
|
427
|
+
Header.propTypes = {
|
|
428
|
+
progress: _propTypes.default.shape({
|
|
429
|
+
items: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
430
|
+
doneIndex: _propTypes.default.number,
|
|
431
|
+
activeIndex: _propTypes.default.number
|
|
432
|
+
}),
|
|
433
|
+
signupFlow: _propTypes.default.bool,
|
|
434
|
+
loginHandler: _propTypes.default.func,
|
|
435
|
+
signupHandler: _propTypes.default.func,
|
|
436
|
+
activeMenu: _propTypes.default.any,
|
|
437
|
+
activateMenu: _propTypes.default.func,
|
|
438
|
+
user: _propTypes.default.object,
|
|
439
|
+
userPhoto: _propTypes.default.string,
|
|
440
|
+
logoutUser: _propTypes.default.func,
|
|
441
|
+
onLoginClick: _propTypes.default.func,
|
|
442
|
+
onSignUpClick: _propTypes.default.func,
|
|
443
|
+
useRelativePathForMenu: _propTypes.default.bool,
|
|
444
|
+
useRelativePathForUserMenu: _propTypes.default.bool,
|
|
445
|
+
withSidebar: _propTypes.default.bool,
|
|
446
|
+
isSidebarExpanded: _propTypes.default.bool,
|
|
447
|
+
sidebarHandler: _propTypes.default.func,
|
|
448
|
+
noFixedPosition: _propTypes.default.bool
|
|
449
|
+
};
|
|
450
|
+
Header.defaultProps = {
|
|
451
|
+
progress: null,
|
|
452
|
+
signupFlow: false,
|
|
453
|
+
loginHandler: function loginHandler() {},
|
|
454
|
+
signupHandler: function signupHandler() {}
|
|
455
|
+
};
|
|
456
|
+
var _default = Header;
|
|
457
|
+
exports.default = _default;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.HeaderWitouthUser = exports.HeaderWithUser = exports.HeaderWithSidebar = exports.HeaderWithProgressSignup = exports.HeaderWithProgress = exports.HeaderWithAdminUser = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Header = _interopRequireDefault(require("./Header"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
+
// import Avatar from '../../static/images/avatar.png'
|
|
17
|
+
var _default = {
|
|
18
|
+
title: 'Components Library/Header',
|
|
19
|
+
component: _Header.default,
|
|
20
|
+
argTypes: {
|
|
21
|
+
user: {
|
|
22
|
+
name: '',
|
|
23
|
+
country: '',
|
|
24
|
+
kyc_status: '',
|
|
25
|
+
KYCDocuments: '',
|
|
26
|
+
entity_name: '',
|
|
27
|
+
investor_eth_addresses: [],
|
|
28
|
+
is_risk_questionnaire_finished: true
|
|
29
|
+
},
|
|
30
|
+
progress: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
defaultValue: null
|
|
33
|
+
},
|
|
34
|
+
signupFlow: {
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
defaultValue: false
|
|
37
|
+
},
|
|
38
|
+
withSidebar: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
defaultValue: false
|
|
41
|
+
},
|
|
42
|
+
isSidebarExpanded: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
defaultValue: false
|
|
45
|
+
},
|
|
46
|
+
loginHandler: {
|
|
47
|
+
type: 'function',
|
|
48
|
+
action: 'loginHandler'
|
|
49
|
+
},
|
|
50
|
+
signupHandler: {
|
|
51
|
+
type: 'function',
|
|
52
|
+
action: 'signupHandler'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.default = _default;
|
|
57
|
+
var Template = function Template(args) {
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_Header.default, args);
|
|
59
|
+
};
|
|
60
|
+
var userDev = {
|
|
61
|
+
_id: '61851acd5b9a890013297b12',
|
|
62
|
+
email: 'user-dev@email.com',
|
|
63
|
+
user_type: 'investor',
|
|
64
|
+
name: 'bilal',
|
|
65
|
+
lastname: 'dev',
|
|
66
|
+
username: 'user-dev',
|
|
67
|
+
entity_name: '',
|
|
68
|
+
active: true,
|
|
69
|
+
country: 'Germany',
|
|
70
|
+
is_risk_questionnaire_finished: true,
|
|
71
|
+
kyc_status: 'Accepted',
|
|
72
|
+
investor_algo_addresses: [{
|
|
73
|
+
name: 'another test',
|
|
74
|
+
address: 'TVNC3QHY5LXKBMX7RGJG3B25EJPW73V5WMMEMUB33V2HEPEA2H77UPOYTQ',
|
|
75
|
+
whitelistedAssets: ['20918100']
|
|
76
|
+
}, {
|
|
77
|
+
name: 'my algo test',
|
|
78
|
+
address: 'YFQD2RZIIZQSO67F6MG3DJVXLMF2QU4EKGBPVXVIF3XTLKGWUZ36WMG56A',
|
|
79
|
+
whitelistedAssets: ['20918100', '20013569', '92363258']
|
|
80
|
+
}, {
|
|
81
|
+
name: 'test algosigner',
|
|
82
|
+
address: 'Y4UGMCSV3B43Y7QAM2VUVPETDDO5JVHDRB3ZC5MBF2VTUTCP4X437A65JU',
|
|
83
|
+
whitelistedAssets: ['20918100', '20013569', '92363258']
|
|
84
|
+
}, {
|
|
85
|
+
name: 'test new address',
|
|
86
|
+
address: 'B36KBEDYKBUSEMNRITZFFE7VINEPMP5MJTNUCRM5S5AP6GNWMWW4B5PEQI',
|
|
87
|
+
whitelistedAssets: ['20918100', '92363258']
|
|
88
|
+
}, {
|
|
89
|
+
address: 'E3Q6B5Q7JHFCEWBGGXJGEMXVAL6MSJBUHCGURZRMASRTJFDD6RQTJHPF4A',
|
|
90
|
+
whitelistedAssets: ['20918100', '20013569']
|
|
91
|
+
}, {
|
|
92
|
+
name: 'test 30/05',
|
|
93
|
+
address: 'RTQWXHRWZCBT5FF474T4DTL3VRVHERY3Q6LWLMPP24IXNOYIXBDQXJ2Z6M',
|
|
94
|
+
whitelistedAssets: ['20918100']
|
|
95
|
+
}, {
|
|
96
|
+
name: 'test info 01/06',
|
|
97
|
+
address: 'U4EIZEMPRGC77P6HJSFCLWYE4NUMNILU5DBZCKV44QMJ3TQOADRETVVAZU',
|
|
98
|
+
whitelistedAssets: ['20918100', '92363258']
|
|
99
|
+
}],
|
|
100
|
+
liquid_network: {
|
|
101
|
+
GAID: 'GA2skwb5v5nKaaAKNd61knuRJC47Jr',
|
|
102
|
+
dt: '2021-11-19T16:19:33.390Z',
|
|
103
|
+
'2812e39a-ad94-4368-9db4-9d98c1c00f38': {
|
|
104
|
+
id: 6020,
|
|
105
|
+
GAID: 'GA2wpGUWe8uDz9VEdNXJ5v17UwD25f',
|
|
106
|
+
is_company: false,
|
|
107
|
+
name: '61851acd5b9a890013297b12',
|
|
108
|
+
categories: [3],
|
|
109
|
+
creator: 22,
|
|
110
|
+
whitelisted_gaids: ['GA2wpGUWe8uDz9VEdNXJ5v17UwD25f']
|
|
111
|
+
},
|
|
112
|
+
whitelisted_gaids: ['GA2wpGUWe8uDz9VEdNXJ5v17UwD25f', 'GA2skwb5v5nKaaAKNd61knuRJC47Jr', 'GA2skwb5v5nKaaAKNd61knuRJC47Jr'],
|
|
113
|
+
'35c3c8ed-59a3-4a87-9612-b48236aeab3b': {
|
|
114
|
+
id: 273,
|
|
115
|
+
GAID: 'GA2skwb5v5nKaaAKNd61knuRJC47Jr',
|
|
116
|
+
is_company: false,
|
|
117
|
+
name: '61851acd5b9a890013297b12',
|
|
118
|
+
categories: [24],
|
|
119
|
+
creator: 62,
|
|
120
|
+
whitelisted_gaids: ['GA2skwb5v5nKaaAKNd61knuRJC47Jr']
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
pass_reset: '',
|
|
124
|
+
taxId: '4355',
|
|
125
|
+
countryObj: {
|
|
126
|
+
_id: '630e0361b8d1fb0007929bc4',
|
|
127
|
+
name: 'Germany',
|
|
128
|
+
ISO2: 'DE',
|
|
129
|
+
ISO3: 'DEU',
|
|
130
|
+
isAllowed: true,
|
|
131
|
+
SEPA: true,
|
|
132
|
+
'infinite-fleet': true,
|
|
133
|
+
'la-boulangerie': true
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var HeaderWithUser = Template.bind({});
|
|
137
|
+
exports.HeaderWithUser = HeaderWithUser;
|
|
138
|
+
HeaderWithUser.args = {
|
|
139
|
+
user: userDev
|
|
140
|
+
};
|
|
141
|
+
var HeaderWithAdminUser = Template.bind({});
|
|
142
|
+
exports.HeaderWithAdminUser = HeaderWithAdminUser;
|
|
143
|
+
HeaderWithAdminUser.args = {
|
|
144
|
+
user: _objectSpread(_objectSpread({}, userDev), {}, {
|
|
145
|
+
user_type: 'company_sa'
|
|
146
|
+
})
|
|
147
|
+
};
|
|
148
|
+
var HeaderWitouthUser = Template.bind({});
|
|
149
|
+
exports.HeaderWitouthUser = HeaderWitouthUser;
|
|
150
|
+
HeaderWitouthUser.args = {
|
|
151
|
+
user: {}
|
|
152
|
+
};
|
|
153
|
+
var HeaderWithProgress = Template.bind({});
|
|
154
|
+
exports.HeaderWithProgress = HeaderWithProgress;
|
|
155
|
+
HeaderWithProgress.args = {
|
|
156
|
+
user: userDev,
|
|
157
|
+
progress: {
|
|
158
|
+
items: [{
|
|
159
|
+
id: 'select-address',
|
|
160
|
+
handleClick: function handleClick() {}
|
|
161
|
+
}, {
|
|
162
|
+
id: 'order-tokens',
|
|
163
|
+
handleClick: function handleClick() {}
|
|
164
|
+
}, {
|
|
165
|
+
id: 'confirm',
|
|
166
|
+
handleClick: function handleClick() {}
|
|
167
|
+
}],
|
|
168
|
+
doneIndex: 1,
|
|
169
|
+
activeIndex: 2
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
var HeaderWithProgressSignup = Template.bind({});
|
|
173
|
+
exports.HeaderWithProgressSignup = HeaderWithProgressSignup;
|
|
174
|
+
HeaderWithProgressSignup.args = {
|
|
175
|
+
user: _objectSpread(_objectSpread({}, userDev), {}, {
|
|
176
|
+
kyc_status: 'Draft'
|
|
177
|
+
}),
|
|
178
|
+
progress: {},
|
|
179
|
+
signupFlow: true
|
|
180
|
+
};
|
|
181
|
+
var HeaderWithSidebar = Template.bind({});
|
|
182
|
+
exports.HeaderWithSidebar = HeaderWithSidebar;
|
|
183
|
+
HeaderWithSidebar.args = {
|
|
184
|
+
user: _objectSpread(_objectSpread({}, userDev), {}, {
|
|
185
|
+
user_type: 'company_sa'
|
|
186
|
+
}),
|
|
187
|
+
// progress: {},
|
|
188
|
+
withSidebar: true,
|
|
189
|
+
isSidebarExpanded: true
|
|
190
|
+
};
|