@stokr/components-library 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +89 -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 +110 -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 +36 -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 +79 -0
- package/dist/components/Background/Background.styles.js +76 -0
- package/dist/components/BarChart/BarChart.js +306 -0
- package/dist/components/BarChart/BarChart.stories.js +71 -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 +64 -0
- package/dist/components/BasicTable/BasicTable.styles.js +52 -0
- package/dist/components/Button/Button.stories.js +80 -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 +46 -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 +88 -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 +93 -0
- package/dist/components/Checkbox/Checkbox.styles.js +45 -0
- package/dist/components/Checklist/UserChecklist.js +298 -0
- package/dist/components/Checklist/UserChecklist.stories.js +352 -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 +187 -0
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +211 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +191 -0
- package/dist/components/CryptoAddress/RadioWrap.js +56 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +54 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +75 -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 +58 -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 +75 -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 +55 -0
- package/dist/components/Footer/Footer.styles.js +74 -0
- package/dist/components/Footer/FooterLayout.js +119 -0
- package/dist/components/Footer/FooterLayout.stories.js +32 -0
- package/dist/components/Footer/FooterMenu.js +117 -0
- package/dist/components/Footer/FooterMenu.stories.js +122 -0
- package/dist/components/Footer/FooterMenu.styles.js +80 -0
- package/dist/components/Footer/index.js +27 -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 +43 -0
- package/dist/components/Form/Form.js +68 -0
- package/dist/components/Form/Form.stories.js +36 -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 +461 -0
- package/dist/components/Header/Header.stories.js +223 -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 +53 -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 +92 -0
- package/dist/components/Input/DatePickerInput.styles.js +29 -0
- package/dist/components/Input/Input.js +125 -0
- package/dist/components/Input/Input.stories.js +149 -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 +86 -0
- package/dist/components/Input/InputPassword.styles.js +80 -0
- package/dist/components/Input/RangeInput.js +97 -0
- package/dist/components/Input/RangeInput.stories.js +62 -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 +143 -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 +138 -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 +57 -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 +63 -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 +71 -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 +52 -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 +66 -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 +34 -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 +63 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +50 -0
- package/dist/components/LoginModal/LoginModal.js +182 -0
- package/dist/components/LoginModal/LoginModal.stories.js +70 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +51 -0
- package/dist/components/MainMenu/MainMenu.js +261 -0
- package/dist/components/MainMenu/MainMenu.styles.js +125 -0
- package/dist/components/MatomoConnect/Matomo.js +490 -0
- package/dist/components/MatomoConnect/Matomo_fuckup.js +387 -0
- package/dist/components/MenuNav/MenuNav.styles.js +42 -0
- package/dist/components/Modal/Modal.js +139 -0
- package/dist/components/Modal/Modal.stories.js +83 -0
- package/dist/components/Modal/Modal.styles.js +142 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +48 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +73 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +41 -0
- package/dist/components/Newsletter/Newsletter.js +162 -0
- package/dist/components/Newsletter/Newsletter.stories.js +20 -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 +26 -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 +48 -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 +49 -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 +39 -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 +313 -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 +72 -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 +77 -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 +43 -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 +80 -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 +34 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +16 -0
- package/dist/components/RegisterEthereum/EthAddressLedger.js +226 -0
- package/dist/components/RegisterEthereum/EthAddressMetamask.js +204 -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 +47 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +31 -0
- package/dist/components/RequestDataBox/RequestDataBox.stories.js +41 -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 +73 -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 +64 -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 +53 -0
- package/dist/components/StepsProgress/StepsProgress.js +146 -0
- package/dist/components/StepsProgress/StepsProgress.stories.js +51 -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 +28 -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 +87 -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 +40 -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 +45 -0
- package/dist/components/TabsNav/TabsNav.js +43 -0
- package/dist/components/TabsNav/TabsNav.stories.js +41 -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 +81 -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 +52 -0
- package/dist/components/Text/StyledText.js +19 -0
- package/dist/components/Text/Text.stories.js +75 -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 +189 -0
- package/dist/components/ToDoList/ToDoList.stories.js +138 -0
- package/dist/components/ToDoList/ToDoList.styles.js +83 -0
- package/dist/components/ToDoList/ToDoListTask.js +120 -0
- package/dist/components/ToDoList/ToDoListTask.stories.js +73 -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 +60 -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 +65 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +54 -0
- package/dist/components/TwoFactorModal/TwoFactorModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +57 -0
- package/dist/components/breakdown/index.js +27 -0
- package/dist/components/context/Auth.js +207 -0
- package/dist/components/context/AuthContext.js +334 -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 +56 -0
- package/dist/components/taxId/complete.js +32 -0
- package/dist/components/taxId/flow.js +71 -0
- package/dist/components/taxId/index.js +27 -0
- package/dist/components/taxId/register-taxid.js +203 -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 +16 -0
- package/dist/constants/style.js +52 -0
- package/dist/index.js +1050 -2
- package/dist/model/axios.js +18 -0
- package/dist/model/axiosPublic.js +18 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css +13 -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/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.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/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 +18 -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/km_ify.js +38 -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/dist/utils/withRouter.js +20 -0
- package/package.json +84 -89
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -7
- package/Dockerfile +0 -20
- 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/08418fc6c324f51f7e56.svg +0 -1
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/index.js.LICENSE.txt +0 -1
- package/docker-compose.yml +0 -25
- package/storybook-static/favicon.ico +0 -0
- /package/dist/{03f9f978feb2b015b6812ba10f689967.png → components/Footer/lemonway.png} +0 -0
- /package/dist/{98b7d3182f652f021bc3.ttf → static/fonts/Ionicons/Ionicons.ttf} +0 -0
- /package/dist/{4e528d6445ca1974c313.woff → static/fonts/Ionicons/Ionicons.woff} +0 -0
- /package/dist/{643c37f102b41f7f90c3.woff2 → static/fonts/Ionicons/Ionicons.woff2} +0 -0
- /package/dist/{9bea22b57dc165ed4382.ttf → static/fonts/OpenSans/OpenSans-Bold.ttf} +0 -0
- /package/dist/{a750292d6a0b5a760679.woff → static/fonts/OpenSans/OpenSans-Bold.woff} +0 -0
- /package/dist/{cbfc24090ef8bacab132.woff2 → static/fonts/OpenSans/OpenSans-Bold.woff2} +0 -0
- /package/dist/{bcb6531cf820152b7538.ttf → static/fonts/OpenSans/OpenSans-ExtraBold.ttf} +0 -0
- /package/dist/{81f3ef07b7952e249da1.woff → static/fonts/OpenSans/OpenSans-ExtraBold.woff} +0 -0
- /package/dist/{21e493d43617de76dbc7.woff2 → static/fonts/OpenSans/OpenSans-ExtraBold.woff2} +0 -0
- /package/dist/{55053cc0a8e6482eca64.ttf → static/fonts/OpenSans/OpenSans-Light.ttf} +0 -0
- /package/dist/{c6a4bc1bd034d6303053.woff → static/fonts/OpenSans/OpenSans-Light.woff} +0 -0
- /package/dist/{179ef2df02cb0b68c9fd.woff2 → static/fonts/OpenSans/OpenSans-Light.woff2} +0 -0
- /package/dist/{d97d7385fe8771611848.ttf → static/fonts/OpenSans/OpenSans-Regular.ttf} +0 -0
- /package/dist/{9ec738fbb66068dc1ca7.woff → static/fonts/OpenSans/OpenSans-Regular.woff} +0 -0
- /package/dist/{3caa0d4f9b7d58668066.woff2 → static/fonts/OpenSans/OpenSans-Regular.woff2} +0 -0
- /package/dist/{d2b1865643b98c0e8b54.ttf → static/fonts/OpenSans/OpenSans-SemiBold.ttf} +0 -0
- /package/dist/{39f5961b2d3eb4aa5bf5.woff → static/fonts/OpenSans/OpenSans-SemiBold.woff} +0 -0
- /package/dist/{311956ded96d3fd2813d.woff2 → static/fonts/OpenSans/OpenSans-SemiBold.woff2} +0 -0
- /package/dist/{2640959b1f9381cde047.eot → static/fonts/icomoon/icomoon.eot} +0 -0
- /package/dist/{07233f511246c9825a0d58e5ab2641f3.svg → static/fonts/icomoon/icomoon.svg} +0 -0
- /package/dist/{a1d7666a48f976227722.ttf → static/fonts/icomoon/icomoon.ttf} +0 -0
- /package/dist/{4c3c428d0ce82f840710.woff → static/fonts/icomoon/icomoon.woff} +0 -0
- /package/dist/{14aa35d4e84aebef77cf00b421fc393a.gif → static/images/address-refreshing.gif} +0 -0
- /package/dist/{2ba2db4ff86a2663686a100e75b50ba9.png → static/images/avatar-placeholder.png} +0 -0
- /package/dist/{b85a961d44cc55c58050cbf7c53dd505.png → static/images/whales.png} +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.StepController = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
11
|
+
var _StepController = require("./StepController.styles");
|
|
12
|
+
var _StepControllerProgress = _interopRequireDefault(require("./StepControllerProgress"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
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; }
|
|
19
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
+
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); } }
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
+
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); }
|
|
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
|
+
var timeout = 300;
|
|
32
|
+
var getTransitionStyles = {
|
|
33
|
+
entering: {
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
opacity: 0
|
|
36
|
+
},
|
|
37
|
+
entered: {
|
|
38
|
+
transition: "opacity ".concat(timeout, "ms ease-in-out"),
|
|
39
|
+
opacity: 1
|
|
40
|
+
},
|
|
41
|
+
exiting: {
|
|
42
|
+
transition: "opacity ".concat(timeout, "ms ease-in-out"),
|
|
43
|
+
opacity: 0
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var StepController = /*#__PURE__*/function (_PureComponent) {
|
|
47
|
+
_inherits(StepController, _PureComponent);
|
|
48
|
+
var _super = _createSuper(StepController);
|
|
49
|
+
function StepController() {
|
|
50
|
+
_classCallCheck(this, StepController);
|
|
51
|
+
return _super.apply(this, arguments);
|
|
52
|
+
}
|
|
53
|
+
_createClass(StepController, [{
|
|
54
|
+
key: "componentDidMount",
|
|
55
|
+
value: function componentDidMount() {
|
|
56
|
+
var _this$props = this.props,
|
|
57
|
+
changeStep = _this$props.changeStep,
|
|
58
|
+
stepsProgressList = _this$props.stepsProgressList;
|
|
59
|
+
changeStep(stepsProgressList[0].id);
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
var _this$props2 = this.props,
|
|
65
|
+
children = _this$props2.children,
|
|
66
|
+
stepsProgressList = _this$props2.stepsProgressList,
|
|
67
|
+
currentStep = _this$props2.currentStep,
|
|
68
|
+
activeStepIndex = _this$props2.activeStepIndex,
|
|
69
|
+
doneStepsIndexes = _this$props2.doneStepsIndexes,
|
|
70
|
+
touchedStepsIndexes = _this$props2.touchedStepsIndexes;
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_StepController.StepsProgressContainer, null, /*#__PURE__*/_react.default.createElement(_StepControllerProgress.default, {
|
|
72
|
+
activeStepIndex: activeStepIndex,
|
|
73
|
+
doneStepsIndexes: doneStepsIndexes,
|
|
74
|
+
touchedStepsIndexes: touchedStepsIndexes,
|
|
75
|
+
stepsProgressList: stepsProgressList
|
|
76
|
+
})), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.TransitionGroup, {
|
|
77
|
+
component: _StepController.StepContainer
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.Transition, {
|
|
79
|
+
key: currentStep,
|
|
80
|
+
timeout: {
|
|
81
|
+
enter: timeout,
|
|
82
|
+
exit: timeout
|
|
83
|
+
}
|
|
84
|
+
}, function (status) {
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
style: _objectSpread({
|
|
87
|
+
height: '100%'
|
|
88
|
+
}, getTransitionStyles[status])
|
|
89
|
+
}, _react.default.Children.map(children, function (child) {
|
|
90
|
+
if (child.props.id === currentStep && /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
91
|
+
return child;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}));
|
|
95
|
+
})));
|
|
96
|
+
}
|
|
97
|
+
}]);
|
|
98
|
+
return StepController;
|
|
99
|
+
}(_react.PureComponent);
|
|
100
|
+
exports.StepController = StepController;
|
|
101
|
+
StepController.propTypes = {
|
|
102
|
+
children: _propTypes.default.node.isRequired,
|
|
103
|
+
stepsProgressList: _propTypes.default.instanceOf(Array).isRequired,
|
|
104
|
+
currentStep: _propTypes.default.string.isRequired,
|
|
105
|
+
activeStepIndex: _propTypes.default.number.isRequired,
|
|
106
|
+
touchedStepsIndexes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
107
|
+
doneStepsIndexes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
108
|
+
changeStep: _propTypes.default.func.isRequired
|
|
109
|
+
};
|
|
110
|
+
var _default = StepController;
|
|
111
|
+
exports.default = _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.SCTouched1Done0 = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _StepController = require("./StepController");
|
|
9
|
+
var _SvgIcons = require("../SvgIcons");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _default = {
|
|
13
|
+
title: 'Components Library/StepController/Stepcontroller',
|
|
14
|
+
component: _StepController.StepController,
|
|
15
|
+
argTypes: {
|
|
16
|
+
children: {
|
|
17
|
+
type: 'node',
|
|
18
|
+
defaultValue: [],
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
stepsProgressList: {
|
|
22
|
+
type: 'node',
|
|
23
|
+
defaultValue: [],
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
currentStep: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
defaultValue: '',
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
activeStepIndex: {
|
|
32
|
+
type: 'number',
|
|
33
|
+
defaultValue: 1,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
touchedStepsIndexes: {
|
|
37
|
+
type: 'array of numbers',
|
|
38
|
+
defaultValue: []
|
|
39
|
+
},
|
|
40
|
+
doneStepsIndexes: {
|
|
41
|
+
type: 'array of numbers',
|
|
42
|
+
defaultValue: []
|
|
43
|
+
},
|
|
44
|
+
changeStep: {
|
|
45
|
+
type: 'function',
|
|
46
|
+
action: 'changeStep'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.default = _default;
|
|
51
|
+
var Template = function Template(args) {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_StepController.StepController, args));
|
|
53
|
+
};
|
|
54
|
+
var SCTouched1Done0 = Template.bind({});
|
|
55
|
+
exports.SCTouched1Done0 = SCTouched1Done0;
|
|
56
|
+
SCTouched1Done0.args = {
|
|
57
|
+
children: [/*#__PURE__*/_react.default.createElement(_SvgIcons.OneSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.TwoSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.FourSvg, null)],
|
|
58
|
+
stepsProgressList: [/*#__PURE__*/_react.default.createElement(_SvgIcons.OneSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.TwoSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.FourSvg, null)],
|
|
59
|
+
touchedStepsIndexes: [1],
|
|
60
|
+
doneStepsIndexes: [0]
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//doublecheck:
|
|
64
|
+
// no story for StepControllerContext. varying export names
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StepsProgressContainer = exports.StepContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
9
|
+
var _theme = _interopRequireDefault(require("../../styles/theme"));
|
|
10
|
+
var _templateObject, _templateObject2;
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var StepsProgressContainer = _styledComponents.default.div.withConfig({
|
|
14
|
+
displayName: "StepControllerstyles__StepsProgressContainer",
|
|
15
|
+
componentId: "sc-143sf1l-0"
|
|
16
|
+
})(["position:relative;width:100%;height:40px;padding:4px 0;box-shadow:0 1px 0 0 ", ";", ""], function (props) {
|
|
17
|
+
return _theme.default.cLightGrey;
|
|
18
|
+
}, _rwd.default.Medium(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 56px;\n padding: 12px 0;\n "]))));
|
|
19
|
+
exports.StepsProgressContainer = StepsProgressContainer;
|
|
20
|
+
var StepContainer = _styledComponents.default.div.withConfig({
|
|
21
|
+
displayName: "StepControllerstyles__StepContainer",
|
|
22
|
+
componentId: "sc-143sf1l-1"
|
|
23
|
+
})(["width:100%;height:100%;position:relative;overflow:hidden;", ""], _rwd.default.Medium(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
24
|
+
return props.heightLimited && "\n height: 80vh;\n ";
|
|
25
|
+
}));
|
|
26
|
+
exports.StepContainer = StepContainer;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StepControllerProvider = exports.StepControllerConsumer = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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 _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); }
|
|
19
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
|
+
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); }; }
|
|
21
|
+
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); }
|
|
22
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23
|
+
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; } }
|
|
24
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
+
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; }
|
|
26
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
27
|
+
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); }
|
|
28
|
+
var StepControllerContext = /*#__PURE__*/_react.default.createContext();
|
|
29
|
+
var StepControllerProvider = /*#__PURE__*/function (_Component) {
|
|
30
|
+
_inherits(StepControllerProvider, _Component);
|
|
31
|
+
var _super = _createSuper(StepControllerProvider);
|
|
32
|
+
function StepControllerProvider() {
|
|
33
|
+
var _this;
|
|
34
|
+
_classCallCheck(this, StepControllerProvider);
|
|
35
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
|
+
args[_key] = arguments[_key];
|
|
37
|
+
}
|
|
38
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
39
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
40
|
+
currentStep: '',
|
|
41
|
+
prevStep: '',
|
|
42
|
+
prevStepIndex: null,
|
|
43
|
+
activeStepIndex: 0,
|
|
44
|
+
doneStepsIndexes: [],
|
|
45
|
+
touchedStepsIndexes: []
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(_assertThisInitialized(_this), "changeStep", function (stepName) {
|
|
48
|
+
var activeStep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
49
|
+
var doneStep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
50
|
+
var _this$state = _this.state,
|
|
51
|
+
activeStepIndex = _this$state.activeStepIndex,
|
|
52
|
+
doneStepsIndexes = _this$state.doneStepsIndexes,
|
|
53
|
+
touchedStepsIndexes = _this$state.touchedStepsIndexes;
|
|
54
|
+
var nextActiveStep = activeStep === null ? activeStepIndex : activeStep;
|
|
55
|
+
var nextDoneStepIndexes = doneStepsIndexes.slice();
|
|
56
|
+
var nextTouchedStepsIndexes = touchedStepsIndexes.slice();
|
|
57
|
+
var emptyDoneStep;
|
|
58
|
+
if (doneStep !== null && !nextDoneStepIndexes.includes(doneStep)) {
|
|
59
|
+
nextDoneStepIndexes.push(doneStep);
|
|
60
|
+
}
|
|
61
|
+
if (!nextTouchedStepsIndexes.includes(nextActiveStep)) {
|
|
62
|
+
nextTouchedStepsIndexes.push(nextActiveStep);
|
|
63
|
+
}
|
|
64
|
+
if (Array.isArray(doneStep) && doneStep.length === 0) {
|
|
65
|
+
emptyDoneStep = [];
|
|
66
|
+
}
|
|
67
|
+
_this.setState(function () {
|
|
68
|
+
return {
|
|
69
|
+
currentStep: stepName,
|
|
70
|
+
activeStepIndex: nextActiveStep,
|
|
71
|
+
doneStepsIndexes: emptyDoneStep || nextDoneStepIndexes,
|
|
72
|
+
touchedStepsIndexes: nextTouchedStepsIndexes
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "setPrevStep", function (prevStep) {
|
|
77
|
+
var prevStepIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
78
|
+
_this.setState({
|
|
79
|
+
prevStep: prevStep,
|
|
80
|
+
prevStepIndex: prevStepIndex
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
return _this;
|
|
84
|
+
}
|
|
85
|
+
_createClass(StepControllerProvider, [{
|
|
86
|
+
key: "render",
|
|
87
|
+
value: function render() {
|
|
88
|
+
var children = this.props.children;
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(StepControllerContext.Provider, {
|
|
90
|
+
value: _objectSpread(_objectSpread({}, this.state), {}, {
|
|
91
|
+
changeStep: this.changeStep,
|
|
92
|
+
setPrevStep: this.setPrevStep
|
|
93
|
+
})
|
|
94
|
+
}, children);
|
|
95
|
+
}
|
|
96
|
+
}]);
|
|
97
|
+
return StepControllerProvider;
|
|
98
|
+
}(_react.Component);
|
|
99
|
+
exports.StepControllerProvider = StepControllerProvider;
|
|
100
|
+
StepControllerProvider.propTypes = {
|
|
101
|
+
children: _propTypes.default.node.isRequired
|
|
102
|
+
};
|
|
103
|
+
var StepControllerConsumer = StepControllerContext.Consumer;
|
|
104
|
+
exports.StepControllerConsumer = StepControllerConsumer;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StepControllerProgress = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _StepsProgress = require("../StepsProgress/StepsProgress.styles");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
var StepControllerProgress = function StepControllerProgress(_ref) {
|
|
12
|
+
var touchedStepsIndexes = _ref.touchedStepsIndexes,
|
|
13
|
+
doneStepsIndexes = _ref.doneStepsIndexes,
|
|
14
|
+
activeStepIndex = _ref.activeStepIndex,
|
|
15
|
+
stepsProgressList = _ref.stepsProgressList;
|
|
16
|
+
var handleItemClick = function handleItemClick(item, key) {
|
|
17
|
+
if (touchedStepsIndexes.includes(key)) {
|
|
18
|
+
item.handleClick(item.id);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Container, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Wrap, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Items, null, stepsProgressList.map(function (item, key) {
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Item, {
|
|
23
|
+
key: item.id,
|
|
24
|
+
isDone: doneStepsIndexes.includes(key),
|
|
25
|
+
isActive: key === activeStepIndex,
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
return handleItemClick(item, key);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}))));
|
|
31
|
+
};
|
|
32
|
+
exports.StepControllerProgress = StepControllerProgress;
|
|
33
|
+
StepControllerProgress.propTypes = {
|
|
34
|
+
touchedStepsIndexes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
35
|
+
doneStepsIndexes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
36
|
+
activeStepIndex: _propTypes.default.number.isRequired,
|
|
37
|
+
stepsProgressList: _propTypes.default.instanceOf(Array).isRequired
|
|
38
|
+
};
|
|
39
|
+
var _default = StepControllerProgress;
|
|
40
|
+
exports.default = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.SCPTouched2Done2 = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _StepControllerProgress = require("./StepControllerProgress");
|
|
9
|
+
var _SvgIcons = require("../SvgIcons");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _default = {
|
|
13
|
+
title: 'Components Library/StepController/StepControllerProgress',
|
|
14
|
+
component: _StepControllerProgress.StepControllerProgress,
|
|
15
|
+
argTypes: {
|
|
16
|
+
stepsProgressList: {
|
|
17
|
+
type: 'node',
|
|
18
|
+
defaultValue: [],
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
activeStepIndex: {
|
|
22
|
+
type: 'number',
|
|
23
|
+
defaultValue: 1,
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
touchedStepsIndexes: {
|
|
27
|
+
type: 'array of numbers',
|
|
28
|
+
defaultValue: []
|
|
29
|
+
},
|
|
30
|
+
doneStepsIndexes: {
|
|
31
|
+
type: 'array of numbers',
|
|
32
|
+
defaultValue: []
|
|
33
|
+
},
|
|
34
|
+
handleItemClick: {
|
|
35
|
+
type: 'function',
|
|
36
|
+
action: 'handleItemClick'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.default = _default;
|
|
41
|
+
var Template = function Template(args) {
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_StepControllerProgress.StepControllerProgress, args));
|
|
43
|
+
};
|
|
44
|
+
var SCPTouched2Done2 = Template.bind({});
|
|
45
|
+
exports.SCPTouched2Done2 = SCPTouched2Done2;
|
|
46
|
+
SCPTouched2Done2.args = {
|
|
47
|
+
stepsProgressList: [/*#__PURE__*/_react.default.createElement(_SvgIcons.OneSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.TwoSvg, null), /*#__PURE__*/_react.default.createElement(_SvgIcons.FourSvg, null)],
|
|
48
|
+
touchedStepsIndexes: [2],
|
|
49
|
+
doneStepsIndexes: [2]
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//doublecheck:
|
|
53
|
+
// no story for StepControllerContext bc of varying export names
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.StepsProgressSignup = exports.StepsProgressHeader = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactRouterDom = require("react-router-dom");
|
|
10
|
+
var _StepsProgress = require("./StepsProgress.styles");
|
|
11
|
+
var _globalVariables = require("../../constants/globalVariables");
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
var StepsProgressSignup = function StepsProgressSignup(props) {
|
|
15
|
+
var navigate = (0, _reactRouterDom.useNavigate)();
|
|
16
|
+
var user = props.user;
|
|
17
|
+
var country = user.country,
|
|
18
|
+
kyc_status = user.kyc_status,
|
|
19
|
+
_user$KYCDocuments = user.KYCDocuments,
|
|
20
|
+
KYCDocuments = _user$KYCDocuments === void 0 ? {} : _user$KYCDocuments,
|
|
21
|
+
entity_name = user.entity_name,
|
|
22
|
+
_user$investor_eth_ad = user.investor_eth_addresses,
|
|
23
|
+
investor_eth_addresses = _user$investor_eth_ad === void 0 ? [] : _user$investor_eth_ad,
|
|
24
|
+
is_risk_questionnaire_finished = user.is_risk_questionnaire_finished,
|
|
25
|
+
taxId = user.taxId,
|
|
26
|
+
_user$wallets = user.wallets,
|
|
27
|
+
wallets = _user$wallets === void 0 ? [] : _user$wallets;
|
|
28
|
+
var isKYCRejected = !kyc_status || kyc_status === 'Reaply' || kyc_status === 'Draft';
|
|
29
|
+
var hasLiquidWallet = (wallets === null || wallets === void 0 ? void 0 : wallets.filter(function (wallet) {
|
|
30
|
+
return wallet.type === _globalVariables.walletTypes.LIQUID;
|
|
31
|
+
}).length) > 0;
|
|
32
|
+
var areAllDoneInvestor = !!country && !isKYCRejected && hasLiquidWallet && !!taxId && !!is_risk_questionnaire_finished;
|
|
33
|
+
var areAllDoneEntity = hasLiquidWallet && !!is_risk_questionnaire_finished;
|
|
34
|
+
var isActiveStep = function isActiveStep(path) {
|
|
35
|
+
return window.location.pathname.includes(path);
|
|
36
|
+
};
|
|
37
|
+
var items = entity_name ? [{
|
|
38
|
+
id: 'taxId',
|
|
39
|
+
handleClick: function handleClick() {
|
|
40
|
+
return navigate('/taxid');
|
|
41
|
+
},
|
|
42
|
+
isDone: !!taxId,
|
|
43
|
+
isActive: isActiveStep('/taxid')
|
|
44
|
+
}, {
|
|
45
|
+
id: 'ampID',
|
|
46
|
+
handleClick: function handleClick() {
|
|
47
|
+
return navigate('/register-liquid-securities');
|
|
48
|
+
},
|
|
49
|
+
isDone: hasLiquidWallet,
|
|
50
|
+
isActive: isActiveStep('/register-liquid-securities')
|
|
51
|
+
}, {
|
|
52
|
+
id: 'risk',
|
|
53
|
+
handleClick: function handleClick() {
|
|
54
|
+
return navigate('/risk-questionnaire');
|
|
55
|
+
},
|
|
56
|
+
isDone: !!is_risk_questionnaire_finished,
|
|
57
|
+
isActive: isActiveStep('/risk-questionnaire')
|
|
58
|
+
}, {
|
|
59
|
+
id: 'overview',
|
|
60
|
+
handleClick: function handleClick() {
|
|
61
|
+
return navigate('/overview/remaining');
|
|
62
|
+
},
|
|
63
|
+
isDone: areAllDoneEntity,
|
|
64
|
+
isActive: isActiveStep('/overview/remaining')
|
|
65
|
+
}] : [{
|
|
66
|
+
id: 'country',
|
|
67
|
+
handleClick: function handleClick() {
|
|
68
|
+
return navigate('/country-of-residence');
|
|
69
|
+
},
|
|
70
|
+
isDone: !!country,
|
|
71
|
+
isActive: isActiveStep('/country-of-residence')
|
|
72
|
+
}, {
|
|
73
|
+
id: 'verify',
|
|
74
|
+
handleClick: function handleClick() {
|
|
75
|
+
return navigate('/verify-identity');
|
|
76
|
+
},
|
|
77
|
+
isDone: !isKYCRejected,
|
|
78
|
+
isActive: isActiveStep('/verify-identity')
|
|
79
|
+
}, {
|
|
80
|
+
id: 'taxId',
|
|
81
|
+
handleClick: function handleClick() {
|
|
82
|
+
return navigate('/taxid');
|
|
83
|
+
},
|
|
84
|
+
isDone: !!taxId,
|
|
85
|
+
isActive: isActiveStep('/taxid')
|
|
86
|
+
}, {
|
|
87
|
+
id: 'ampID',
|
|
88
|
+
handleClick: function handleClick() {
|
|
89
|
+
return navigate('/register-liquid-securities');
|
|
90
|
+
},
|
|
91
|
+
isDone: hasLiquidWallet,
|
|
92
|
+
isActive: isActiveStep('/register-liquid-securities')
|
|
93
|
+
}, {
|
|
94
|
+
id: 'risk',
|
|
95
|
+
handleClick: function handleClick() {
|
|
96
|
+
return navigate('/risk-questionnaire');
|
|
97
|
+
},
|
|
98
|
+
isDone: !!is_risk_questionnaire_finished,
|
|
99
|
+
isActive: isActiveStep('/risk-questionnaire')
|
|
100
|
+
}, {
|
|
101
|
+
id: 'overview',
|
|
102
|
+
handleClick: function handleClick() {
|
|
103
|
+
return navigate('/overview/remaining');
|
|
104
|
+
},
|
|
105
|
+
isDone: areAllDoneInvestor,
|
|
106
|
+
isActive: isActiveStep('/overview/remaining')
|
|
107
|
+
}];
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Container, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Wrap, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Items, null, items.map(function (item, key) {
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Item, {
|
|
110
|
+
key: item.id,
|
|
111
|
+
isDone: item.isDone,
|
|
112
|
+
isActive: item.isActive,
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
if (item.handleClick) {
|
|
115
|
+
item.handleClick(item.id);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}))));
|
|
120
|
+
};
|
|
121
|
+
exports.StepsProgressSignup = StepsProgressSignup;
|
|
122
|
+
var StepsProgressHeader = function StepsProgressHeader(_ref) {
|
|
123
|
+
var items = _ref.items,
|
|
124
|
+
doneIndex = _ref.doneIndex,
|
|
125
|
+
activeIndex = _ref.activeIndex;
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Container, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Wrap, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.Items, null, items === null || items === void 0 ? void 0 : items.map(function (item, key) {
|
|
127
|
+
return /*#__PURE__*/_react.default.createElement(_StepsProgress.Item, {
|
|
128
|
+
key: item.id,
|
|
129
|
+
isDone: key <= doneIndex,
|
|
130
|
+
isActive: key === activeIndex,
|
|
131
|
+
onClick: function onClick() {
|
|
132
|
+
item.handleClick && item.handleClick(item.id);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}))));
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// StepsProgress.propTypes = {
|
|
139
|
+
// user: PropTypes.object,
|
|
140
|
+
// }
|
|
141
|
+
exports.StepsProgressHeader = StepsProgressHeader;
|
|
142
|
+
StepsProgressSignup.defaultProps = {
|
|
143
|
+
user: {}
|
|
144
|
+
};
|
|
145
|
+
var _default = StepsProgressSignup;
|
|
146
|
+
exports.default = _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.stepsProgress = exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _StepsProgress = require("./StepsProgress");
|
|
9
|
+
var _AuthContext = require("../context/AuthContext");
|
|
10
|
+
var _reactRouterDom = require("react-router-dom");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
//import { withKnobs, select, boolean, array } from '@storybook/addon-knobs'
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Components Library/Steps Progress',
|
|
15
|
+
component: _StepsProgress.StepsProgress
|
|
16
|
+
//decorators: [withKnobs],
|
|
17
|
+
}; //maybe change to args
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
var stepsProgress = function stepsProgress() {
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_StepsProgress.StepsProgress, {
|
|
21
|
+
user: {
|
|
22
|
+
//country: select('country', ['', 'Austria', 'Brazil']),
|
|
23
|
+
// kyc_status: select('kyc_status', [
|
|
24
|
+
// '',
|
|
25
|
+
// 'Draft',
|
|
26
|
+
// 'Pending',
|
|
27
|
+
// 'Approved',
|
|
28
|
+
// 'Accepted',
|
|
29
|
+
// 'Rejected',
|
|
30
|
+
// 'Denied',
|
|
31
|
+
// 'Escalated',
|
|
32
|
+
// 'In progress',
|
|
33
|
+
// 'Reapply',
|
|
34
|
+
// ]),
|
|
35
|
+
// KYCDocuments: {
|
|
36
|
+
// status: select('KYCDocuments', [
|
|
37
|
+
// '',
|
|
38
|
+
// 'Pending',
|
|
39
|
+
// 'Approved',
|
|
40
|
+
// 'Rejected',
|
|
41
|
+
// ]),
|
|
42
|
+
// },
|
|
43
|
+
// entity_name: select('entity_name', ['', 'Some entity name']),
|
|
44
|
+
// investor_eth_addresses: array('investor_eth_addresses', []),
|
|
45
|
+
// is_risk_questionnaire_finished: boolean(
|
|
46
|
+
// 'is_risk_questionnaire_finished',
|
|
47
|
+
// ),
|
|
48
|
+
}
|
|
49
|
+
})));
|
|
50
|
+
};
|
|
51
|
+
exports.stepsProgress = stepsProgress;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Wrap = exports.Items = exports.Item = exports.Container = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
9
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
10
|
+
var _templateObject, _templateObject2;
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
+
var Container = _styledComponents.default.div.withConfig({
|
|
14
|
+
displayName: "StepsProgressstyles__Container",
|
|
15
|
+
componentId: "sc-1gnllve-0"
|
|
16
|
+
})(["display:block;width:100%;height:100%;"]);
|
|
17
|
+
exports.Container = Container;
|
|
18
|
+
var Wrap = _styledComponents.default.div.withConfig({
|
|
19
|
+
displayName: "StepsProgressstyles__Wrap",
|
|
20
|
+
componentId: "sc-1gnllve-1"
|
|
21
|
+
})(["display:block;margin:0 auto;"]);
|
|
22
|
+
exports.Wrap = Wrap;
|
|
23
|
+
var Items = _styledComponents.default.div.withConfig({
|
|
24
|
+
displayName: "StepsProgressstyles__Items",
|
|
25
|
+
componentId: "sc-1gnllve-2"
|
|
26
|
+
})(["display:flex;height:100%;font-size:0;flex-direction:row;flex-wrap:nowrap;justify-content:center;margin:0 -6px;text-align:center;", ""], _rwd.default.Medium(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n "]))));
|
|
27
|
+
exports.Items = Items;
|
|
28
|
+
var Item = _styledComponents.default.button.withConfig({
|
|
29
|
+
displayName: "StepsProgressstyles__Item",
|
|
30
|
+
componentId: "sc-1gnllve-3"
|
|
31
|
+
})(["position:relative;display:inline-block;vertical-align:middle;padding:0;flex:1;margin:0 4px;height:32px;max-width:32px;cursor:pointer;&:before{z-index:0;content:'';display:block;width:100%;height:4px;position:absolute;top:14px;left:0;border-radius:3px;box-shadow:inset 0 1px 3px 0 rgba(0,0,0,0.05);background-color:", ";}&:after{z-index:1;content:'';display:block;width:100%;height:4px;position:absolute;top:14px;left:0;border-radius:3px;background-color:transparent;transition:background-color .2s;}&:focus{outline:none;}&:hover:after{background-color:", ";}", " ", " ", ""], _colors.default.grey, _colors.default.black, function (props) {
|
|
32
|
+
return props.isDone && "\n &:after {\n background-color: ".concat(_colors.default.progressGreen, ";\n }\n\n &:hover:after {\n background-color: ").concat(_colors.default.black, ";\n }\n ");
|
|
33
|
+
}, function (props) {
|
|
34
|
+
return props.isActive && "\n &:after {\n background-color: ".concat(_colors.default.grey2, ";\n }\n\n &:hover:after {\n background-color: ").concat(_colors.default.black, ";\n }\n ");
|
|
35
|
+
}, _rwd.default.Medium(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 32px;\n "]))));
|
|
36
|
+
exports.Item = Item;
|