@stokr/components-library 0.6.6 → 0.6.7
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/package.json +84 -77
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -7
- package/Dockerfile +0 -20
- package/build/asset-manifest.json +0 -45
- package/build/favicon.ico +0 -0
- package/build/index.html +0 -1
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
- package/build/static/css/main.e30a9d15.css +0 -15
- package/build/static/css/main.e30a9d15.css.map +0 -1
- package/build/static/js/main.8c250652.js +0 -3
- package/build/static/js/main.8c250652.js.LICENSE.txt +0 -158
- package/build/static/js/main.8c250652.js.map +0 -1
- 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 +0 -21
- 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 +0 -47
- 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 +0 -1
- package/build/static/media/slick.2630a3e3eab21c607e21.svg +0 -14
- 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 +0 -9
- package/devops/Dockerfile +0 -20
- package/devops/Jenkinsfile +0 -56
- package/devops/ansible/docker-stack-deploy.yml +0 -32
- package/devops/ansible/hosts.ini +0 -7
- package/devops/docker-compose.yml +0 -25
- package/dist/api/StokrWeb3.js +0 -184
- package/dist/api/fetchData.js +0 -76
- package/dist/api/fetchDataPublic.js +0 -65
- package/dist/components/AccountBalance/AccountBalance.js +0 -53
- package/dist/components/AccountBalance/AccountBalance.stories.js +0 -88
- package/dist/components/AccountBalance/AccountBalance.styles.js +0 -40
- package/dist/components/AdminDashboard/Table/Table.js +0 -170
- package/dist/components/AdminDashboard/Table/Table.styles.js +0 -79
- package/dist/components/AgreementItem/AgreementItem.js +0 -51
- package/dist/components/AgreementItem/AgreementItem.stories.js +0 -109
- package/dist/components/AgreementItem/AgreementItem.styles.js +0 -35
- package/dist/components/AnalyticGraphs/Analytic.js +0 -781
- package/dist/components/AnalyticGraphs/Analytic.styles.js +0 -37
- package/dist/components/BackButton/BackButton.js +0 -32
- package/dist/components/BackButton/BackButton.stories.js +0 -35
- package/dist/components/BackButton/BackButton.styles.js +0 -76
- package/dist/components/Background/Background.js +0 -41
- package/dist/components/Background/Background.stories.js +0 -62
- package/dist/components/Background/Background.styles.js +0 -69
- package/dist/components/BarChart/BarChart.js +0 -304
- package/dist/components/BarChart/BarChart.stories.js +0 -47
- package/dist/components/BarChart/BarChart.styles.js +0 -33
- package/dist/components/BarChartLegend/BarChartLegend.js +0 -106
- package/dist/components/BarChartLegend/BarChartLegend.styles.js +0 -26
- package/dist/components/BasicTable/BasicTable.js +0 -32
- package/dist/components/BasicTable/BasicTable.stories.js +0 -63
- package/dist/components/BasicTable/BasicTable.styles.js +0 -52
- package/dist/components/Button/Button.stories.js +0 -79
- package/dist/components/Button/Button.styles.js +0 -83
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +0 -18
- package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +0 -45
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +0 -34
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +0 -34
- package/dist/components/ChartBox/ChartBox.js +0 -44
- package/dist/components/ChartBox/ChartBox.stories.js +0 -20
- package/dist/components/ChartBox/ChartBox.styles.js +0 -33
- package/dist/components/ChartBox/ChartBoxDistribution.js +0 -30
- package/dist/components/ChartBox/ChartBoxDistribution.stories.js +0 -21
- package/dist/components/ChartLegend/ChartLegend.js +0 -62
- package/dist/components/ChartLegend/ChartLegend.stories.js +0 -87
- package/dist/components/ChartLegend/ChartLegend.styles.js +0 -64
- package/dist/components/Checkbox/Checkbox.js +0 -116
- package/dist/components/Checkbox/Checkbox.stories.js +0 -92
- package/dist/components/Checkbox/Checkbox.styles.js +0 -45
- package/dist/components/Checklist/UserChecklist.js +0 -274
- package/dist/components/Checklist/UserChecklist.stories.js +0 -126
- package/dist/components/ComponentScroll/ComponentScroll.js +0 -138
- package/dist/components/ComponentScroll/ComponentScroll.stories.js +0 -102
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +0 -66
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +0 -68
- package/dist/components/CryptoAddress/ComponentWrap.js +0 -37
- package/dist/components/CryptoAddress/CryptoAddress.js +0 -145
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +0 -173
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +0 -186
- package/dist/components/CryptoAddress/RadioWrap.js +0 -49
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +0 -54
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +0 -74
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +0 -67
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +0 -40
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +0 -59
- package/dist/components/DonutChart/DonutChart.js +0 -182
- package/dist/components/DonutChart/DonutChart.stories.js +0 -40
- package/dist/components/DonutChart/DonutChart.styles.js +0 -50
- package/dist/components/DoubleButton/DoubleButton.styles.js +0 -22
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +0 -15
- package/dist/components/FAQ/FAQ.js +0 -65
- package/dist/components/FAQ/FAQ.stories.js +0 -74
- package/dist/components/FAQ/FAQ.styles.js +0 -48
- package/dist/components/Footer/Footer.js +0 -66
- package/dist/components/Footer/Footer.stories.js +0 -54
- package/dist/components/Footer/Footer.styles.js +0 -74
- package/dist/components/Footer/FooterLayout.js +0 -129
- package/dist/components/Footer/FooterLayout.stories.js +0 -31
- package/dist/components/Footer/FooterMenu.js +0 -117
- package/dist/components/Footer/FooterMenu.stories.js +0 -121
- package/dist/components/Footer/FooterMenu.styles.js +0 -80
- package/dist/components/Footer/index.js +0 -27
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -127
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +0 -42
- package/dist/components/Form/Form.js +0 -68
- package/dist/components/Form/Form.stories.js +0 -35
- package/dist/components/Form/Form.styles.js +0 -59
- package/dist/components/FullscreenCard/FullscreenCard.styles.js +0 -32
- package/dist/components/Grid/Grid.styles.js +0 -68
- package/dist/components/Header/Header.js +0 -452
- package/dist/components/Header/Header.stories.js +0 -188
- package/dist/components/Header/Header.styles.js +0 -180
- package/dist/components/Icon/Icon.style.js +0 -71
- package/dist/components/InfoIcon/InfoIcon.js +0 -50
- package/dist/components/InfoIcon/InfoIcon.stories.js +0 -52
- package/dist/components/InfoIcon/InfoIcon.styles.js +0 -31
- package/dist/components/InfoPanel/InfoPanel.js +0 -146
- package/dist/components/Input/DatePickerInput.js +0 -85
- package/dist/components/Input/DatePickerInput.stories.js +0 -91
- package/dist/components/Input/DatePickerInput.styles.js +0 -29
- package/dist/components/Input/Input.js +0 -108
- package/dist/components/Input/Input.stories.js +0 -148
- package/dist/components/Input/Input.styles.js +0 -53
- package/dist/components/Input/InputPassword.js +0 -151
- package/dist/components/Input/InputPassword.stories.js +0 -85
- package/dist/components/Input/InputPassword.styles.js +0 -80
- package/dist/components/Input/RangeInput.js +0 -60
- package/dist/components/Input/RangeInput.stories.js +0 -59
- package/dist/components/Input/RangeInput.styles.js +0 -53
- package/dist/components/Input/Select.js +0 -148
- package/dist/components/Input/Select.stories.js +0 -142
- package/dist/components/Input/Select.styles.js +0 -65
- package/dist/components/InvestCalculator/InvestCalculator.js +0 -367
- package/dist/components/InvestCalculator/InvestCalculator.stories.js +0 -137
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +0 -66
- package/dist/components/InvestmentStat/InvestmentStat.js +0 -40
- package/dist/components/InvestmentStat/InvestmentStat.stories.js +0 -56
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +0 -43
- package/dist/components/KYCFlow/BasicInfo.js +0 -489
- package/dist/components/KYCFlow/Confirmation.js +0 -51
- package/dist/components/KYCFlow/DocumentFileUpload.js +0 -276
- package/dist/components/KYCFlow/DocumentScan.js +0 -74
- package/dist/components/KYCFlow/DocumentScanUpload.js +0 -258
- package/dist/components/KYCFlow/DocumentSelect.js +0 -148
- package/dist/components/KYCFlow/DocumentSuccess.js +0 -64
- package/dist/components/KYCFlow/DocumentUpload.js +0 -54
- package/dist/components/KYCFlow/DocumentVerificationType.js +0 -161
- package/dist/components/KYCFlow/FaceScan.js +0 -55
- package/dist/components/KYCFlow/FaceScanRecognition.js +0 -60
- package/dist/components/KYCFlow/FaceScanSuccess.js +0 -59
- package/dist/components/KYCFlow/Terms.js +0 -142
- package/dist/components/KYCFlow/_styles.js +0 -160
- package/dist/components/KYCFlow/index.js +0 -97
- package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +0 -41
- package/dist/components/LatestUpdate/LatestUpdate.js +0 -51
- package/dist/components/LatestUpdate/LatestUpdate.stories.js +0 -62
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +0 -71
- package/dist/components/Layout/Layout-func-no-work.js +0 -78
- package/dist/components/Layout/Layout.js +0 -103
- package/dist/components/Layout/Layout.stories.js +0 -67
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +0 -47
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +0 -70
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +0 -43
- package/dist/components/LearnMorePage/LearnMore.js +0 -255
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +0 -40
- package/dist/components/LearnMorePage/LearnMore.stories.js +0 -51
- package/dist/components/LearnMorePage/LearnMore.styles.js +0 -120
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +0 -87
- package/dist/components/LearnMorePage/LearnMoreItem.js +0 -75
- package/dist/components/LearnMorePage/LearnMoreItem.stories.js +0 -65
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +0 -87
- package/dist/components/LearnMoreSection/LearnMore.js +0 -199
- package/dist/components/LearnMoreSection/LearnMore.stories.js +0 -33
- package/dist/components/LearnMoreSection/LearnMore.styles.js +0 -73
- package/dist/components/LearnMoreSection/LearnMoreItem.js +0 -52
- package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +0 -62
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +0 -50
- package/dist/components/LoginModal/LoginModal.js +0 -163
- package/dist/components/MainMenu/DynamicMainMenu.js +0 -50
- package/dist/components/MainMenu/MainMenu.js +0 -262
- package/dist/components/MainMenu/MainMenu.styles.js +0 -124
- package/dist/components/MatomoConnect/Matomo.js +0 -485
- package/dist/components/MatomoConnect/Matomo_fuckup.js +0 -383
- package/dist/components/MenuNav/MenuNav.styles.js +0 -42
- package/dist/components/Modal/Modal.js +0 -123
- package/dist/components/Modal/Modal.stories.js +0 -82
- package/dist/components/Modal/Modal.styles.js +0 -140
- package/dist/components/MultiProgressBar/MultiProgressBar.js +0 -48
- package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +0 -72
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +0 -41
- package/dist/components/Newsletter/Newsletter.js +0 -139
- package/dist/components/Newsletter/Newsletter.stories.js +0 -19
- package/dist/components/Newsletter/Newsletter.styles.js +0 -83
- package/dist/components/NotificationContext/NotificationContext.js +0 -173
- package/dist/components/NotificationContext/NotificationContext.stories.js +0 -33
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +0 -22
- package/dist/components/Number/Number.js +0 -35
- package/dist/components/Number/Number.stories.js +0 -41
- package/dist/components/Number/Number.styles.js +0 -20
- package/dist/components/PageTransition/PageTransition.js +0 -57
- package/dist/components/Process/Process.stories.js +0 -47
- package/dist/components/Process/Process.styles.js +0 -33
- package/dist/components/ProfileBadge/ProfileBadge.js +0 -53
- package/dist/components/ProfileBadge/ProfileBadge.stories.js +0 -48
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +0 -32
- package/dist/components/ProfileBox/ProfileBox.js +0 -39
- package/dist/components/ProfileBox/ProfileBox.stories.js +0 -38
- package/dist/components/ProfileBox/ProfileBox.styles.js +0 -49
- package/dist/components/ProfileHeader/ProfileHeader-CLb4.js +0 -477
- package/dist/components/ProfileHeader/ProfileHeader.js +0 -330
- package/dist/components/ProfileHeader/ProfileHeader.styles.js +0 -87
- package/dist/components/ProfileStat/ProfileStat.js +0 -42
- package/dist/components/ProfileStat/ProfileStat.stories.js +0 -71
- package/dist/components/ProfileStat/ProfileStat.styles.js +0 -42
- package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +0 -69
- package/dist/components/ROI/ROI.js +0 -312
- package/dist/components/ROI/ROI.styles.js +0 -63
- package/dist/components/ROI/ROIChart.js +0 -469
- package/dist/components/ROI/ROIChart.styles.js +0 -33
- package/dist/components/ROI/ROIModal.js +0 -91
- package/dist/components/ROI/ROIScenarioBox.js +0 -55
- package/dist/components/ROI/ROIScenarioBox.styles.js +0 -52
- package/dist/components/Radio/Radio.js +0 -68
- package/dist/components/Radio/Radio.stories.js +0 -76
- package/dist/components/Radio/Radio.styles.js +0 -31
- package/dist/components/RefreshButton/RefreshButton.js +0 -21
- package/dist/components/RefreshButton/RefreshButton.stories.js +0 -41
- package/dist/components/RefreshButton/RefreshButton.styles.js +0 -39
- package/dist/components/RegisterAlgorand/AlgoAddressName.js +0 -138
- package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +0 -444
- package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +0 -47
- package/dist/components/RegisterAlgorand/AlgoSuccess.js +0 -38
- package/dist/components/RegisterAlgorand/Algorand.stories.js +0 -78
- package/dist/components/RegisterAlgorand/ChooseWallet.js +0 -97
- package/dist/components/RegisterAlgorand/SelectProject.js +0 -90
- package/dist/components/RegisterAlgorand/_styles.js +0 -28
- package/dist/components/RegisterAlgorand/flow.js +0 -409
- package/dist/components/RegisterAlgorand/flowWithMemo.js +0 -410
- package/dist/components/RegisterAlgorand/index.js +0 -48
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -40
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +0 -33
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -16
- package/dist/components/RegisterEthereum/EthAddressLedger.js +0 -215
- package/dist/components/RegisterEthereum/EthAddressMetamask.js +0 -205
- package/dist/components/RegisterEthereum/EthAddressName.js +0 -135
- package/dist/components/RegisterEthereum/EthConnectLedger.js +0 -194
- package/dist/components/RegisterEthereum/EthConnectMetamask.js +0 -35
- package/dist/components/RegisterEthereum/EthFinish.js +0 -41
- package/dist/components/RegisterEthereum/EthIntro.js +0 -95
- package/dist/components/RegisterEthereum/_styles.js +0 -28
- package/dist/components/RegisterEthereum/index.js +0 -68
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.js +0 -106
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +0 -66
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +0 -48
- package/dist/components/RegisterLiquidSteps/complete.js +0 -37
- package/dist/components/RegisterLiquidSteps/flow.js +0 -197
- package/dist/components/RegisterLiquidSteps/index.js +0 -52
- package/dist/components/RegisterLiquidSteps/register-liquid.js +0 -240
- package/dist/components/RegisterModal/RegisterModal.js +0 -180
- package/dist/components/RegisterModal/RegisterModal.stories.js +0 -46
- package/dist/components/RequestDataBox/RequestDataBox.js +0 -31
- package/dist/components/RequestDataBox/RequestDataBox.stories.js +0 -40
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +0 -31
- package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +0 -185
- package/dist/components/RiskQuestionnaire/_styles.js +0 -15
- package/dist/components/SEO/SEO.js +0 -71
- package/dist/components/SEO/SEO.stories.js +0 -64
- package/dist/components/SectionTitle/SectionTitle.styles.js +0 -15
- package/dist/components/SideLine/SideLine.js +0 -15
- package/dist/components/SideLine/SideLine.stories.js +0 -31
- package/dist/components/SideLine/SideLine.styles.js +0 -26
- package/dist/components/SigningSubflow/SignSubAddressMetamask.js +0 -137
- package/dist/components/SigningSubflow/SignSubConnectLedger.js +0 -150
- package/dist/components/SigningSubflow/SignSubConnectMetamask.js +0 -137
- package/dist/components/SigningSubflow/SignSubIntro.js +0 -54
- package/dist/components/SigningSubflow/SignSubSendLedger.js +0 -150
- package/dist/components/SigningSubflow/SignSubSendMetamask.js +0 -62
- package/dist/components/SigningSubflow/SignSubTransactionLedger.js +0 -161
- package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +0 -166
- package/dist/components/SigningSubflow/_styles.js +0 -45
- package/dist/components/SigningSubflow/index.js +0 -74
- package/dist/components/Slider/Slider.js +0 -50
- package/dist/components/Slider/Slider.stories.js +0 -72
- package/dist/components/Slider/Slider.styles.js +0 -23
- package/dist/components/SpanButton/SpanButton.styles.js +0 -15
- package/dist/components/StatusBadge/StatusBadge.styles.js +0 -20
- package/dist/components/StepController/StepController.js +0 -111
- package/dist/components/StepController/StepController.stories.js +0 -63
- package/dist/components/StepController/StepController.styles.js +0 -26
- package/dist/components/StepController/StepControllerContext.js +0 -104
- package/dist/components/StepController/StepControllerProgress.js +0 -40
- package/dist/components/StepController/StepControllerProgress.stories.js +0 -52
- package/dist/components/StepsProgress/StepsProgress.js +0 -127
- package/dist/components/StepsProgress/StepsProgress.stories.js +0 -50
- package/dist/components/StepsProgress/StepsProgress.styles.js +0 -36
- package/dist/components/StokrLoader/StokrLoader.js +0 -32
- package/dist/components/StokrLoader/media.js +0 -27
- package/dist/components/SvgIcons/AdminBadgeSvg.js +0 -26
- package/dist/components/SvgIcons/CameraSvg.js +0 -36
- package/dist/components/SvgIcons/CapsLockSvg.js +0 -31
- package/dist/components/SvgIcons/DocumentBackSvg.js +0 -35
- package/dist/components/SvgIcons/DocumentSmallSvg.js +0 -61
- package/dist/components/SvgIcons/DocumentSvg.js +0 -38
- package/dist/components/SvgIcons/Early.js +0 -24
- package/dist/components/SvgIcons/EthSvg.js +0 -40
- package/dist/components/SvgIcons/EurSvg.js +0 -26
- package/dist/components/SvgIcons/FaceScanIconSvg.js +0 -31
- package/dist/components/SvgIcons/FourSvg.js +0 -21
- package/dist/components/SvgIcons/Glassess.js +0 -29
- package/dist/components/SvgIcons/LogoSvg.js +0 -24
- package/dist/components/SvgIcons/OneSvg.js +0 -23
- package/dist/components/SvgIcons/PassportSvg.js +0 -56
- package/dist/components/SvgIcons/RefreshSvg.js +0 -27
- package/dist/components/SvgIcons/SocialFacebook.js +0 -25
- package/dist/components/SvgIcons/SocialInstagram.js +0 -26
- package/dist/components/SvgIcons/SocialLinkedIn.js +0 -25
- package/dist/components/SvgIcons/SocialMedium.js +0 -25
- package/dist/components/SvgIcons/SocialReddit.js +0 -25
- package/dist/components/SvgIcons/SocialTelegram.js +0 -25
- package/dist/components/SvgIcons/SocialTwitter.js +0 -25
- package/dist/components/SvgIcons/SocialYoutube.js +0 -25
- package/dist/components/SvgIcons/ThreeSvg.js +0 -20
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +0 -82
- package/dist/components/SvgIcons/TwoSvg.js +0 -23
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +0 -29
- package/dist/components/SvgIcons/UpdateHardSvg.js +0 -25
- package/dist/components/SvgIcons/UpdateSoftSvg.js +0 -27
- package/dist/components/SvgIcons/UploadSvg.js +0 -34
- package/dist/components/SvgIcons/VerifiedBadge.js +0 -23
- package/dist/components/SvgIcons/index.js +0 -223
- package/dist/components/Switch/Switch.js +0 -70
- package/dist/components/Switch/Switch.stories.js +0 -86
- package/dist/components/Switch/Switch.styles.js +0 -47
- package/dist/components/Tabs/Tabs.js +0 -70
- package/dist/components/Tabs/Tabs.stories.js +0 -29
- package/dist/components/Tabs/Tabs.styles.js +0 -18
- package/dist/components/TabsNav/TabNav.js +0 -31
- package/dist/components/TabsNav/TabNav.stories.js +0 -44
- package/dist/components/TabsNav/TabsNav.js +0 -43
- package/dist/components/TabsNav/TabsNav.stories.js +0 -26
- package/dist/components/TabsNav/TabsNav.styles.js +0 -43
- package/dist/components/TeamOverview/TeamOverview.js +0 -125
- package/dist/components/TeamOverview/TeamOverview.stories.js +0 -80
- package/dist/components/TeamOverview/TeamOverview.styles.js +0 -81
- package/dist/components/Text/Headline.js +0 -29
- package/dist/components/Text/Headline.stories.js +0 -51
- package/dist/components/Text/StyledText.js +0 -19
- package/dist/components/Text/Text.stories.js +0 -71
- package/dist/components/Text/Text.styles.js +0 -40
- package/dist/components/TextLink/TextLink.styles.js +0 -30
- package/dist/components/ToDoList/ToDoList.js +0 -184
- package/dist/components/ToDoList/ToDoList.stories.js +0 -137
- package/dist/components/ToDoList/ToDoList.styles.js +0 -83
- package/dist/components/ToDoList/ToDoListTask.js +0 -118
- package/dist/components/ToDoList/ToDoListTask.stories.js +0 -72
- package/dist/components/ToDoList/ToDoListTask.styles.js +0 -74
- package/dist/components/TransactionDetails/TransactionDetails.js +0 -46
- package/dist/components/TransactionDetails/TransactionDetails.stories.js +0 -59
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +0 -31
- package/dist/components/TransactionInfo/TransactionInfo.js +0 -58
- package/dist/components/TransactionInfo/TransactionInfo.stories.js +0 -64
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +0 -54
- package/dist/components/TwoFactorModal/TwoFactorModal.js +0 -122
- package/dist/components/breakdown/Breakdown.js +0 -56
- package/dist/components/breakdown/index.js +0 -27
- package/dist/components/context/Auth.js +0 -207
- package/dist/components/context/AuthContext.js +0 -335
- package/dist/components/icons/Arrow.js +0 -70
- package/dist/components/icons/Arrow.stories.js +0 -49
- package/dist/components/icons/ArrowSimple.js +0 -59
- package/dist/components/icons/ArrowSimple.stories.js +0 -55
- package/dist/components/icons/Check.js +0 -43
- package/dist/components/icons/Check.stories.js +0 -25
- package/dist/components/icons/Facebook.js +0 -26
- package/dist/components/icons/Facebook.stories.js +0 -24
- package/dist/components/icons/Info.js +0 -55
- package/dist/components/icons/Info.stories.js +0 -19
- package/dist/components/icons/Instagram.js +0 -26
- package/dist/components/icons/Instagram.stories.js +0 -24
- package/dist/components/icons/LinkIcon.js +0 -34
- package/dist/components/icons/LinkIcon.stories.js +0 -24
- package/dist/components/icons/LinkedIn.js +0 -43
- package/dist/components/icons/LinkedIn.stories.js +0 -19
- package/dist/components/icons/Medium.js +0 -42
- package/dist/components/icons/Medium.stories.js +0 -19
- package/dist/components/icons/Reddit.js +0 -32
- package/dist/components/icons/Reddit.stories.js +0 -24
- package/dist/components/icons/Share.js +0 -62
- package/dist/components/icons/Share.stories.js +0 -19
- package/dist/components/icons/Telegram.js +0 -42
- package/dist/components/icons/Telegram.stories.js +0 -19
- package/dist/components/icons/Twitter.js +0 -26
- package/dist/components/icons/Twitter.stories.js +0 -24
- package/dist/components/icons/X.js +0 -26
- package/dist/components/icons/X.stories.js +0 -19
- package/dist/components/icons/Youtube.js +0 -26
- package/dist/components/icons/Youtube.stories.js +0 -24
- package/dist/components/icons/index.js +0 -170
- package/dist/components/renderToBody/index.js +0 -27
- package/dist/components/renderToBody/renderToBody.js +0 -68
- package/dist/components/taxId/TaxId.stories.js +0 -42
- package/dist/components/taxId/complete.js +0 -32
- package/dist/components/taxId/flow.js +0 -52
- package/dist/components/taxId/index.js +0 -27
- package/dist/components/taxId/register-taxid.js +0 -186
- package/dist/components/video/Video.js +0 -174
- package/dist/components/video/Video.stories.js +0 -56
- package/dist/components/video/index.js +0 -27
- package/dist/constants/style.js +0 -52
- package/dist/index.js +0 -1
- package/dist/model/axios.js +0 -18
- package/dist/model/axiosPublic.js +0 -18
- package/dist/styles/colors.js +0 -55
- package/dist/styles/fonts.js +0 -34
- package/dist/styles/global.js +0 -19
- package/dist/styles/grid.js +0 -16
- package/dist/styles/reactTippy.js +0 -12
- package/dist/styles/rwd.js +0 -52
- package/dist/styles/semanticUi.js +0 -12
- package/dist/styles/spacing.js +0 -12
- package/dist/styles/theme.js +0 -43
- package/dist/utils/allowed-countries-list.js +0 -1375
- package/dist/utils/breakpoint.js +0 -19
- package/dist/utils/countries-list.js +0 -1008
- package/dist/utils/customHooks.js +0 -52
- package/dist/utils/delete-redirect-cookie-and-navigate.js +0 -20
- package/dist/utils/fix-decimals.js +0 -11
- package/dist/utils/get-cookie-domain.js +0 -16
- package/dist/utils/get-short-address.js +0 -10
- package/dist/utils/lock-body.js +0 -20
- package/dist/utils/redirect-url.js +0 -10
- package/dist/utils/set-redirect-cookie.js +0 -20
- package/docker-compose.yml +0 -25
- package/storybook-static/favicon.ico +0 -0
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _axios = _interopRequireDefault(require("../../model/axios"));
|
|
8
|
-
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
9
|
-
var _getCookieDomain = _interopRequireDefault(require("../../utils/get-cookie-domain"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); }
|
|
12
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
-
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); }
|
|
20
|
-
var Auth = /*#__PURE__*/function () {
|
|
21
|
-
function Auth() {
|
|
22
|
-
_classCallCheck(this, Auth);
|
|
23
|
-
}
|
|
24
|
-
_createClass(Auth, null, [{
|
|
25
|
-
key: "setAccessToken",
|
|
26
|
-
value: function setAccessToken(token) {
|
|
27
|
-
this.logout();
|
|
28
|
-
var inOneHour = 1 / 24;
|
|
29
|
-
var cookieOptions = {
|
|
30
|
-
expires: inOneHour
|
|
31
|
-
};
|
|
32
|
-
if (process.env.NODE_ENV === 'production') {
|
|
33
|
-
cookieOptions.domain = (0, _getCookieDomain.default)();
|
|
34
|
-
}
|
|
35
|
-
_jsCookie.default.set('STOKR_ACCESS_TOKEN', token, cookieOptions);
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
key: "getAccessToken",
|
|
39
|
-
value: function getAccessToken() {
|
|
40
|
-
return _jsCookie.default.getJSON('STOKR_ACCESS_TOKEN');
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
key: "logout",
|
|
44
|
-
value: function logout() {
|
|
45
|
-
var cookieDomain = {};
|
|
46
|
-
if (process.env.NODE_ENV === 'production') {
|
|
47
|
-
cookieDomain.domain = (0, _getCookieDomain.default)();
|
|
48
|
-
}
|
|
49
|
-
_jsCookie.default.remove('STOKR_ACCESS_TOKEN', cookieDomain);
|
|
50
|
-
}
|
|
51
|
-
}, {
|
|
52
|
-
key: "login",
|
|
53
|
-
value: function login(data) {
|
|
54
|
-
return new Promise(function (resolve, reject) {
|
|
55
|
-
_axios.default.post("auth/login", data).then(function (response) {
|
|
56
|
-
_axios.default.defaults.headers.common.Authorization = "Bearer ".concat(response.data.access_token);
|
|
57
|
-
resolve(response.data);
|
|
58
|
-
}).catch(function (err) {
|
|
59
|
-
reject(err);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "twoFactor",
|
|
65
|
-
value: function twoFactor(data) {
|
|
66
|
-
return new Promise(function (resolve, reject) {
|
|
67
|
-
_axios.default.post("auth/confirm2fa", data).then(function (response) {
|
|
68
|
-
resolve(response.data);
|
|
69
|
-
}).catch(function (err) {
|
|
70
|
-
reject(err);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}, {
|
|
75
|
-
key: "activateUser",
|
|
76
|
-
value: function activateUser() {
|
|
77
|
-
var isUsingQueryParam = window.location.href.includes('?token=');
|
|
78
|
-
var token;
|
|
79
|
-
if (isUsingQueryParam) {
|
|
80
|
-
token = window.location.href.split('activateUser?token=')[1].split('&')[0];
|
|
81
|
-
} else {
|
|
82
|
-
token = window.location.href.split('activateUser/')[1].split('/')[0];
|
|
83
|
-
}
|
|
84
|
-
return new Promise(function (resolve, reject) {
|
|
85
|
-
_axios.default.post("auth/activate", {
|
|
86
|
-
token: token
|
|
87
|
-
}).then(function (response) {
|
|
88
|
-
resolve(response.data);
|
|
89
|
-
}).catch(function (err) {
|
|
90
|
-
reject(err);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}, {
|
|
95
|
-
key: "getUser",
|
|
96
|
-
value: function getUser() {
|
|
97
|
-
return new Promise(function (resolve, reject) {
|
|
98
|
-
_axios.default.post("user/get").then(function (response) {
|
|
99
|
-
resolve(response.data);
|
|
100
|
-
}).catch(function (err) {
|
|
101
|
-
reject(err);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
key: "checkPrivateInvestor",
|
|
107
|
-
value: function checkPrivateInvestor(data) {
|
|
108
|
-
return new Promise(function (resolve, reject) {
|
|
109
|
-
_axios.default.post("private-investor/check", data).then(function (response) {
|
|
110
|
-
resolve(response.data);
|
|
111
|
-
}).catch(function (err) {
|
|
112
|
-
reject(err);
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
key: "updateUser",
|
|
118
|
-
value: function updateUser(data) {
|
|
119
|
-
return new Promise(function (resolve, reject) {
|
|
120
|
-
_axios.default.post("user/updateProfile", data).then(function (response) {
|
|
121
|
-
resolve(response.data);
|
|
122
|
-
}).catch(function (err) {
|
|
123
|
-
reject(err);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}, {
|
|
128
|
-
key: "sendWelcomeEmail",
|
|
129
|
-
value: function sendWelcomeEmail() {
|
|
130
|
-
return new Promise(function (resolve, reject) {
|
|
131
|
-
_axios.default.post("user/welcomeEmail").then(function () {
|
|
132
|
-
resolve();
|
|
133
|
-
}).catch(function (err) {
|
|
134
|
-
reject(err);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
|
-
key: "resendActivationEmail",
|
|
140
|
-
value: function resendActivationEmail(data) {
|
|
141
|
-
return new Promise(function (resolve, reject) {
|
|
142
|
-
_axios.default.post("auth/forgotPass", data).then(function () {
|
|
143
|
-
resolve();
|
|
144
|
-
}).catch(function (err) {
|
|
145
|
-
reject(err);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
key: "uploaProofOfAddress",
|
|
151
|
-
value: function uploaProofOfAddress(data, ip) {
|
|
152
|
-
return new Promise( /*#__PURE__*/function () {
|
|
153
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
154
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
155
|
-
while (1) switch (_context.prev = _context.next) {
|
|
156
|
-
case 0:
|
|
157
|
-
_axios.default.post("https://kycdocs.stokr-staging.de/kyc/upload?ip=".concat(ip), data, {
|
|
158
|
-
headers: {
|
|
159
|
-
'Content-Type': 'multipart/form-data'
|
|
160
|
-
}
|
|
161
|
-
}).then(function (response) {
|
|
162
|
-
resolve(response.data);
|
|
163
|
-
}).catch(function (err) {
|
|
164
|
-
reject(err);
|
|
165
|
-
});
|
|
166
|
-
case 1:
|
|
167
|
-
case "end":
|
|
168
|
-
return _context.stop();
|
|
169
|
-
}
|
|
170
|
-
}, _callee);
|
|
171
|
-
}));
|
|
172
|
-
return function (_x, _x2) {
|
|
173
|
-
return _ref.apply(this, arguments);
|
|
174
|
-
};
|
|
175
|
-
}());
|
|
176
|
-
}
|
|
177
|
-
}, {
|
|
178
|
-
key: "validateGreenWalletId",
|
|
179
|
-
value: function validateGreenWalletId(id) {
|
|
180
|
-
return new Promise( /*#__PURE__*/function () {
|
|
181
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
|
182
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
183
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
184
|
-
case 0:
|
|
185
|
-
_axios.default.post("greenwallet/validate-gaid", {
|
|
186
|
-
gaid: id
|
|
187
|
-
}).then(function (response) {
|
|
188
|
-
resolve(response.data);
|
|
189
|
-
}).catch(function (err) {
|
|
190
|
-
reject(err);
|
|
191
|
-
});
|
|
192
|
-
case 1:
|
|
193
|
-
case "end":
|
|
194
|
-
return _context2.stop();
|
|
195
|
-
}
|
|
196
|
-
}, _callee2);
|
|
197
|
-
}));
|
|
198
|
-
return function (_x3, _x4) {
|
|
199
|
-
return _ref2.apply(this, arguments);
|
|
200
|
-
};
|
|
201
|
-
}());
|
|
202
|
-
}
|
|
203
|
-
}]);
|
|
204
|
-
return Auth;
|
|
205
|
-
}();
|
|
206
|
-
var _default = Auth;
|
|
207
|
-
exports.default = _default;
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AuthProvider = exports.AuthContext = exports.AuthConsumer = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactRouterDom = require("react-router-dom");
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _axios = _interopRequireDefault(require("../../model/axios"));
|
|
11
|
-
var _Auth = _interopRequireDefault(require("./Auth"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
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); }
|
|
14
|
-
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; }
|
|
15
|
-
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); }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
19
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
20
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
21
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
23
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
27
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
28
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
-
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; }
|
|
32
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
33
|
-
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); }
|
|
34
|
-
var AuthContext = /*#__PURE__*/_react.default.createContext();
|
|
35
|
-
exports.AuthContext = AuthContext;
|
|
36
|
-
var AuthProvider = /*#__PURE__*/function (_Component) {
|
|
37
|
-
_inherits(AuthProvider, _Component);
|
|
38
|
-
var _super = _createSuper(AuthProvider);
|
|
39
|
-
function AuthProvider() {
|
|
40
|
-
var _this;
|
|
41
|
-
_classCallCheck(this, AuthProvider);
|
|
42
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
-
args[_key] = arguments[_key];
|
|
44
|
-
}
|
|
45
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
46
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
47
|
-
user: undefined,
|
|
48
|
-
isFetchingUser: true
|
|
49
|
-
});
|
|
50
|
-
_defineProperty(_assertThisInitialized(_this), "activateUser", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
51
|
-
var navigate, _yield$Auth$activateU, user, access_token;
|
|
52
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
53
|
-
while (1) switch (_context.prev = _context.next) {
|
|
54
|
-
case 0:
|
|
55
|
-
navigate = (0, _reactRouterDom.useNavigate)();
|
|
56
|
-
_context.prev = 1;
|
|
57
|
-
_context.next = 4;
|
|
58
|
-
return _Auth.default.activateUser();
|
|
59
|
-
case 4:
|
|
60
|
-
_yield$Auth$activateU = _context.sent;
|
|
61
|
-
user = _yield$Auth$activateU.user;
|
|
62
|
-
access_token = _yield$Auth$activateU.access_token;
|
|
63
|
-
_axios.default.defaults.headers.common.Authorization = "Bearer ".concat(access_token);
|
|
64
|
-
_Auth.default.setAccessToken(access_token);
|
|
65
|
-
_this.setState({
|
|
66
|
-
user: user,
|
|
67
|
-
isFetchingUser: false
|
|
68
|
-
});
|
|
69
|
-
_context.next = 17;
|
|
70
|
-
break;
|
|
71
|
-
case 12:
|
|
72
|
-
_context.prev = 12;
|
|
73
|
-
_context.t0 = _context["catch"](1);
|
|
74
|
-
console.log('Error activating user: ', _context.t0);
|
|
75
|
-
navigate('/oops', {
|
|
76
|
-
state: {
|
|
77
|
-
message: 'This activation token has expired.',
|
|
78
|
-
hasActivationTokenExpired: true
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
_this.setState({
|
|
82
|
-
isFetchingUser: false
|
|
83
|
-
});
|
|
84
|
-
case 17:
|
|
85
|
-
case "end":
|
|
86
|
-
return _context.stop();
|
|
87
|
-
}
|
|
88
|
-
}, _callee, null, [[1, 12]]);
|
|
89
|
-
})));
|
|
90
|
-
_defineProperty(_assertThisInitialized(_this), "logoutUser", function () {
|
|
91
|
-
_Auth.default.logout();
|
|
92
|
-
_this.setState({
|
|
93
|
-
user: undefined
|
|
94
|
-
});
|
|
95
|
-
window.location.href = "https://".concat(process.env.REACT_APP_WEBSITE_DOMAIN);
|
|
96
|
-
});
|
|
97
|
-
_defineProperty(_assertThisInitialized(_this), "setUser", /*#__PURE__*/function () {
|
|
98
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(accessToken) {
|
|
99
|
-
var navigate, _yield$Auth$getUser, user;
|
|
100
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
101
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
102
|
-
case 0:
|
|
103
|
-
_axios.default.defaults.headers.common.Authorization = "Bearer ".concat(accessToken);
|
|
104
|
-
navigate = (0, _reactRouterDom.useNavigate)();
|
|
105
|
-
_context2.prev = 2;
|
|
106
|
-
_context2.next = 5;
|
|
107
|
-
return _Auth.default.getUser();
|
|
108
|
-
case 5:
|
|
109
|
-
_yield$Auth$getUser = _context2.sent;
|
|
110
|
-
user = _yield$Auth$getUser.user;
|
|
111
|
-
_this.setState({
|
|
112
|
-
user: user,
|
|
113
|
-
isFetchingUser: false
|
|
114
|
-
});
|
|
115
|
-
_context2.next = 15;
|
|
116
|
-
break;
|
|
117
|
-
case 10:
|
|
118
|
-
_context2.prev = 10;
|
|
119
|
-
_context2.t0 = _context2["catch"](2);
|
|
120
|
-
navigate('/oops');
|
|
121
|
-
_this.setState({
|
|
122
|
-
isFetchingUser: false
|
|
123
|
-
});
|
|
124
|
-
console.log("Error fetching the user: ".concat(_context2.t0));
|
|
125
|
-
case 15:
|
|
126
|
-
case "end":
|
|
127
|
-
return _context2.stop();
|
|
128
|
-
}
|
|
129
|
-
}, _callee2, null, [[2, 10]]);
|
|
130
|
-
}));
|
|
131
|
-
return function (_x) {
|
|
132
|
-
return _ref2.apply(this, arguments);
|
|
133
|
-
};
|
|
134
|
-
}());
|
|
135
|
-
_defineProperty(_assertThisInitialized(_this), "updateUser", /*#__PURE__*/function () {
|
|
136
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
137
|
-
var _yield$Auth$updateUse, user;
|
|
138
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
139
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
140
|
-
case 0:
|
|
141
|
-
_context3.prev = 0;
|
|
142
|
-
_context3.next = 3;
|
|
143
|
-
return _Auth.default.updateUser(data);
|
|
144
|
-
case 3:
|
|
145
|
-
_yield$Auth$updateUse = _context3.sent;
|
|
146
|
-
user = _yield$Auth$updateUse.user;
|
|
147
|
-
_this.setState({
|
|
148
|
-
user: user
|
|
149
|
-
});
|
|
150
|
-
_context3.next = 12;
|
|
151
|
-
break;
|
|
152
|
-
case 8:
|
|
153
|
-
_context3.prev = 8;
|
|
154
|
-
_context3.t0 = _context3["catch"](0);
|
|
155
|
-
console.log("Error updating the user: ".concat(_context3.t0));
|
|
156
|
-
throw _context3.t0;
|
|
157
|
-
case 12:
|
|
158
|
-
case "end":
|
|
159
|
-
return _context3.stop();
|
|
160
|
-
}
|
|
161
|
-
}, _callee3, null, [[0, 8]]);
|
|
162
|
-
}));
|
|
163
|
-
return function (_x2) {
|
|
164
|
-
return _ref3.apply(this, arguments);
|
|
165
|
-
};
|
|
166
|
-
}());
|
|
167
|
-
_defineProperty(_assertThisInitialized(_this), "checkIfPrivateInvestor", /*#__PURE__*/function () {
|
|
168
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
|
|
169
|
-
var result;
|
|
170
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
171
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
172
|
-
case 0:
|
|
173
|
-
_context4.prev = 0;
|
|
174
|
-
_context4.next = 3;
|
|
175
|
-
return _Auth.default.checkPrivateInvestor(data);
|
|
176
|
-
case 3:
|
|
177
|
-
result = _context4.sent;
|
|
178
|
-
return _context4.abrupt("return", result);
|
|
179
|
-
case 7:
|
|
180
|
-
_context4.prev = 7;
|
|
181
|
-
_context4.t0 = _context4["catch"](0);
|
|
182
|
-
throw _context4.t0;
|
|
183
|
-
case 10:
|
|
184
|
-
case "end":
|
|
185
|
-
return _context4.stop();
|
|
186
|
-
}
|
|
187
|
-
}, _callee4, null, [[0, 7]]);
|
|
188
|
-
}));
|
|
189
|
-
return function (_x3) {
|
|
190
|
-
return _ref4.apply(this, arguments);
|
|
191
|
-
};
|
|
192
|
-
}());
|
|
193
|
-
_defineProperty(_assertThisInitialized(_this), "resendActivationEmail", /*#__PURE__*/function () {
|
|
194
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {
|
|
195
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
196
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
197
|
-
case 0:
|
|
198
|
-
_context5.prev = 0;
|
|
199
|
-
_context5.next = 3;
|
|
200
|
-
return _Auth.default.resendActivationEmail(data);
|
|
201
|
-
case 3:
|
|
202
|
-
_context5.next = 9;
|
|
203
|
-
break;
|
|
204
|
-
case 5:
|
|
205
|
-
_context5.prev = 5;
|
|
206
|
-
_context5.t0 = _context5["catch"](0);
|
|
207
|
-
console.log("Error resending activation email: ".concat(_context5.t0));
|
|
208
|
-
throw _context5.t0;
|
|
209
|
-
case 9:
|
|
210
|
-
case "end":
|
|
211
|
-
return _context5.stop();
|
|
212
|
-
}
|
|
213
|
-
}, _callee5, null, [[0, 5]]);
|
|
214
|
-
}));
|
|
215
|
-
return function (_x4) {
|
|
216
|
-
return _ref5.apply(this, arguments);
|
|
217
|
-
};
|
|
218
|
-
}());
|
|
219
|
-
_defineProperty(_assertThisInitialized(_this), "sendWelcomeEmail", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
220
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
221
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
222
|
-
case 0:
|
|
223
|
-
_context6.prev = 0;
|
|
224
|
-
_context6.next = 3;
|
|
225
|
-
return _Auth.default.sendWelcomeEmail();
|
|
226
|
-
case 3:
|
|
227
|
-
_context6.next = 8;
|
|
228
|
-
break;
|
|
229
|
-
case 5:
|
|
230
|
-
_context6.prev = 5;
|
|
231
|
-
_context6.t0 = _context6["catch"](0);
|
|
232
|
-
console.log("Error sending welcome email: ".concat(_context6.t0));
|
|
233
|
-
// No need to throw error, let the app continue even if it fails
|
|
234
|
-
case 8:
|
|
235
|
-
case "end":
|
|
236
|
-
return _context6.stop();
|
|
237
|
-
}
|
|
238
|
-
}, _callee6, null, [[0, 5]]);
|
|
239
|
-
})));
|
|
240
|
-
_defineProperty(_assertThisInitialized(_this), "uploaProofOfAddress", /*#__PURE__*/function () {
|
|
241
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(data, ip) {
|
|
242
|
-
var user;
|
|
243
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
244
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
245
|
-
case 0:
|
|
246
|
-
_context7.prev = 0;
|
|
247
|
-
_context7.next = 3;
|
|
248
|
-
return _Auth.default.uploaProofOfAddress(data, ip);
|
|
249
|
-
case 3:
|
|
250
|
-
user = _context7.sent;
|
|
251
|
-
_this.setState({
|
|
252
|
-
user: user
|
|
253
|
-
});
|
|
254
|
-
_context7.next = 11;
|
|
255
|
-
break;
|
|
256
|
-
case 7:
|
|
257
|
-
_context7.prev = 7;
|
|
258
|
-
_context7.t0 = _context7["catch"](0);
|
|
259
|
-
console.log("Error uploading proof of address: ".concat(_context7.t0));
|
|
260
|
-
throw _context7.t0;
|
|
261
|
-
case 11:
|
|
262
|
-
case "end":
|
|
263
|
-
return _context7.stop();
|
|
264
|
-
}
|
|
265
|
-
}, _callee7, null, [[0, 7]]);
|
|
266
|
-
}));
|
|
267
|
-
return function (_x5, _x6) {
|
|
268
|
-
return _ref7.apply(this, arguments);
|
|
269
|
-
};
|
|
270
|
-
}());
|
|
271
|
-
_defineProperty(_assertThisInitialized(_this), "validateGreenWalletId", /*#__PURE__*/function () {
|
|
272
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
|
|
273
|
-
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
274
|
-
while (1) switch (_context8.prev = _context8.next) {
|
|
275
|
-
case 0:
|
|
276
|
-
_context8.prev = 0;
|
|
277
|
-
return _context8.abrupt("return", _Auth.default.validateGreenWalletId(id));
|
|
278
|
-
case 4:
|
|
279
|
-
_context8.prev = 4;
|
|
280
|
-
_context8.t0 = _context8["catch"](0);
|
|
281
|
-
console.log("Error validating Green Wallet ID: ".concat(_context8.t0));
|
|
282
|
-
throw _context8.t0;
|
|
283
|
-
case 8:
|
|
284
|
-
case "end":
|
|
285
|
-
return _context8.stop();
|
|
286
|
-
}
|
|
287
|
-
}, _callee8, null, [[0, 4]]);
|
|
288
|
-
}));
|
|
289
|
-
return function (_x7) {
|
|
290
|
-
return _ref8.apply(this, arguments);
|
|
291
|
-
};
|
|
292
|
-
}());
|
|
293
|
-
return _this;
|
|
294
|
-
}
|
|
295
|
-
_createClass(AuthProvider, [{
|
|
296
|
-
key: "componentDidMount",
|
|
297
|
-
value: function componentDidMount() {
|
|
298
|
-
var isActivatingUser = window.location.href.includes('/activateUser');
|
|
299
|
-
var accessToken = _Auth.default.getAccessToken();
|
|
300
|
-
if (isActivatingUser) {
|
|
301
|
-
this.activateUser();
|
|
302
|
-
} else if (accessToken) {
|
|
303
|
-
this.setUser(accessToken);
|
|
304
|
-
} else {
|
|
305
|
-
console.log('No access token');
|
|
306
|
-
window.location.href = "https://".concat(process.env.REACT_APP_WEBSITE_DOMAIN, "/login");
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}, {
|
|
310
|
-
key: "render",
|
|
311
|
-
value: function render() {
|
|
312
|
-
var children = this.props.children;
|
|
313
|
-
return /*#__PURE__*/_react.default.createElement(AuthContext.Provider, {
|
|
314
|
-
value: _objectSpread(_objectSpread({}, this.state), {}, {
|
|
315
|
-
logoutUser: this.logoutUser,
|
|
316
|
-
setUser: this.setUser,
|
|
317
|
-
updateUser: this.updateUser,
|
|
318
|
-
checkIfPrivateInvestor: this.checkIfPrivateInvestor,
|
|
319
|
-
sendWelcomeEmail: this.sendWelcomeEmail,
|
|
320
|
-
resendActivationEmail: this.resendActivationEmail,
|
|
321
|
-
uploaProofOfAddress: this.uploaProofOfAddress,
|
|
322
|
-
validateGreenWalletId: this.validateGreenWalletId
|
|
323
|
-
})
|
|
324
|
-
}, children);
|
|
325
|
-
}
|
|
326
|
-
}]);
|
|
327
|
-
return AuthProvider;
|
|
328
|
-
}(_react.Component);
|
|
329
|
-
exports.AuthProvider = AuthProvider;
|
|
330
|
-
AuthProvider.propTypes = {
|
|
331
|
-
children: _propTypes.default.node.isRequired
|
|
332
|
-
};
|
|
333
|
-
var AuthConsumer = AuthContext.Consumer;
|
|
334
|
-
//export default AuthProvider
|
|
335
|
-
exports.AuthConsumer = AuthConsumer;
|