@stokr/components-library 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +9 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/build/static/js/main.31d6cfe0.js +0 -0
- package/dist/AccountBalance/AccountBalance.js +43 -0
- package/dist/AccountBalance/AccountBalance.stories.js +75 -0
- package/dist/AccountBalance/AccountBalance.styles.js +38 -0
- package/dist/AdminDashboard/Table/Table.js +120 -0
- package/dist/AdminDashboard/Table/Table.styles.js +111 -0
- package/dist/AgreementItem/AgreementItem.js +38 -0
- package/dist/AgreementItem/AgreementItem.stories.js +98 -0
- package/dist/AgreementItem/AgreementItem.styles.js +31 -0
- package/dist/AnalyticGraphs/Analytic.js +528 -0
- package/dist/AnalyticGraphs/Analytic.styles.js +49 -0
- package/dist/BackButton/BackButton.js +22 -0
- package/dist/BackButton/BackButton.stories.js +24 -0
- package/dist/BackButton/BackButton.styles.js +110 -0
- package/dist/Background/Background.js +34 -0
- package/dist/Background/Background.stories.js +50 -0
- package/dist/Background/Background.styles.js +113 -0
- package/dist/BarChart/BarChart.js +258 -0
- package/dist/BarChart/BarChart.stories.js +46 -0
- package/dist/BarChart/BarChart.styles.js +93 -0
- package/dist/BarChartLegend/BarChartLegend.js +74 -0
- package/dist/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/BasicTable/BasicTable.js +20 -0
- package/dist/BasicTable/BasicTable.stories.js +51 -0
- package/dist/BasicTable/BasicTable.styles.js +64 -0
- package/dist/Button/Button.stories.js +63 -0
- package/dist/Button/Button.styles.js +180 -0
- package/dist/ButtonContainer/ButtonContainer.styles.js +25 -0
- package/dist/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +35 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.js +23 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +36 -0
- package/dist/ChartBox/ChartBox.js +34 -0
- package/dist/ChartBox/ChartBox.stories.js +9 -0
- package/dist/ChartBox/ChartBox.styles.js +50 -0
- package/dist/ChartBox/ChartBoxDistribution.js +20 -0
- package/dist/ChartBox/ChartBoxDistribution.stories.js +10 -0
- package/dist/ChartLegend/ChartLegend.js +37 -0
- package/dist/ChartLegend/ChartLegend.stories.js +74 -0
- package/dist/ChartLegend/ChartLegend.styles.js +67 -0
- package/dist/Checkbox/Checkbox.js +108 -0
- package/dist/Checkbox/Checkbox.stories.js +82 -0
- package/dist/Checkbox/Checkbox.styles.js +123 -0
- package/dist/Checklist/UserChecklist.js +247 -0
- package/dist/Checklist/UserChecklist.stories.js +115 -0
- package/dist/ComponentScroll/ComponentScroll.js +99 -0
- package/dist/ComponentScroll/ComponentScroll.stories.js +92 -0
- package/dist/ComponentScroll/ComponentScroll.styles.js +104 -0
- package/dist/ComponentWrapper/ComponentWrapper.styles.js +128 -0
- package/dist/CryptoAddress/ComponentWrap.js +24 -0
- package/dist/CryptoAddress/CryptoAddress.js +124 -0
- package/dist/CryptoAddress/CryptoAddress.stories.js +163 -0
- package/dist/CryptoAddress/CryptoAddress.styles.js +399 -0
- package/dist/CryptoAddress/RadioWrap.js +36 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.js +42 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.stories.js +65 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.styles.js +114 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.js +30 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +98 -0
- package/dist/DonutChart/DonutChart.js +137 -0
- package/dist/DonutChart/DonutChart.stories.js +39 -0
- package/dist/DonutChart/DonutChart.styles.js +101 -0
- package/dist/DoubleButton/DoubleButton.styles.js +25 -0
- package/dist/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/FAQ/FAQ.js +40 -0
- package/dist/FAQ/FAQ.stories.js +63 -0
- package/dist/FAQ/FAQ.styles.js +69 -0
- package/dist/Footer/Footer.js +54 -0
- package/dist/Footer/Footer.stories.js +41 -0
- package/dist/Footer/Footer.styles.js +230 -0
- package/dist/Footer/FooterLayout.js +114 -0
- package/dist/Footer/FooterLayout.stories.js +20 -0
- package/dist/Footer/FooterMenu.js +83 -0
- package/dist/Footer/FooterMenu.stories.js +110 -0
- package/dist/Footer/FooterMenu.styles.js +274 -0
- package/dist/Footer/index.js +4 -0
- package/dist/{03f9f978feb2b015b6812ba10f689967.png → Footer/lemonway.png} +0 -0
- package/dist/Footer/sicos-logo.svg +1 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.js +89 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.stories.js +31 -0
- package/dist/Form/Form.js +38 -0
- package/dist/Form/Form.stories.js +23 -0
- package/dist/Form/Form.styles.js +66 -0
- package/dist/FullscreenCard/FullscreenCard.styles.js +36 -0
- package/dist/Grid/Grid.styles.js +109 -0
- package/dist/Header/Header.js +369 -0
- package/dist/Header/Header.stories.js +172 -0
- package/dist/Header/Header.styles.js +493 -0
- package/dist/Icon/Icon.style.js +75 -0
- package/dist/InfoIcon/InfoIcon.js +40 -0
- package/dist/InfoIcon/InfoIcon.stories.js +40 -0
- package/dist/InfoIcon/InfoIcon.styles.js +42 -0
- package/dist/InfoPanel/InfoPanel.js +115 -0
- package/dist/Input/DatePickerInput.js +64 -0
- package/dist/Input/DatePickerInput.stories.js +80 -0
- package/dist/Input/DatePickerInput.styles.js +67 -0
- package/dist/Input/Input.js +86 -0
- package/dist/Input/Input.stories.js +134 -0
- package/dist/Input/Input.styles.js +126 -0
- package/dist/Input/InputPassword.js +122 -0
- package/dist/Input/InputPassword.stories.js +72 -0
- package/dist/Input/InputPassword.styles.js +139 -0
- package/dist/Input/RangeInput.js +46 -0
- package/dist/Input/RangeInput.stories.js +48 -0
- package/dist/Input/RangeInput.styles.js +125 -0
- package/dist/Input/Select.js +130 -0
- package/dist/Input/Select.stories.js +129 -0
- package/dist/Input/Select.styles.js +143 -0
- package/dist/InvestCalculator/InvestCalculator.js +353 -0
- package/dist/InvestCalculator/InvestCalculator.stories.js +129 -0
- package/dist/InvestCalculator/InvestCalculator.styles.js +78 -0
- package/dist/InvestmentStat/InvestmentStat.js +33 -0
- package/dist/InvestmentStat/InvestmentStat.stories.js +44 -0
- package/dist/InvestmentStat/InvestmentStat.styles.js +53 -0
- package/dist/KYCFlow/BasicInfo.js +396 -0
- package/dist/KYCFlow/Confirmation.js +37 -0
- package/dist/KYCFlow/DocumentFileUpload.js +240 -0
- package/dist/KYCFlow/DocumentScan.js +66 -0
- package/dist/KYCFlow/DocumentScanUpload.js +228 -0
- package/dist/KYCFlow/DocumentSelect.js +101 -0
- package/dist/KYCFlow/DocumentSuccess.js +54 -0
- package/dist/KYCFlow/DocumentUpload.js +44 -0
- package/dist/KYCFlow/DocumentVerificationType.js +114 -0
- package/dist/KYCFlow/FaceScan.js +45 -0
- package/dist/KYCFlow/FaceScanRecognition.js +52 -0
- package/dist/KYCFlow/FaceScanSuccess.js +47 -0
- package/dist/KYCFlow/Terms.js +99 -0
- package/dist/KYCFlow/_styles.js +284 -0
- package/dist/KYCFlow/index.js +14 -0
- package/dist/KYCSelectBox/KYCSelectBox.styles.js +62 -0
- package/dist/LatestUpdate/LatestUpdate.js +35 -0
- package/dist/LatestUpdate/LatestUpdate.stories.js +51 -0
- package/dist/LatestUpdate/LatestUpdate.styles.js +77 -0
- package/dist/Layout/Layout-func-no-work.js +67 -0
- package/dist/Layout/Layout.js +68 -0
- package/dist/Layout/Layout.stories.js +55 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.js +39 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.stories.js +58 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.styles.js +205 -0
- package/dist/LearnMorePage/LearnMore.js +199 -0
- package/dist/LearnMorePage/LearnMore.shared.styles.js +49 -0
- package/dist/LearnMorePage/LearnMore.stories.js +41 -0
- package/dist/LearnMorePage/LearnMore.styles.js +250 -0
- package/dist/LearnMorePage/LearnMoreExampleObject.js +102 -0
- package/dist/LearnMorePage/LearnMoreItem.js +73 -0
- package/dist/LearnMorePage/LearnMoreItem.stories.js +54 -0
- package/dist/LearnMorePage/LearnMoreItem.styles.js +218 -0
- package/dist/LearnMoreSection/LearnMore.js +158 -0
- package/dist/LearnMoreSection/LearnMore.stories.js +23 -0
- package/dist/LearnMoreSection/LearnMore.styles.js +134 -0
- package/dist/LearnMoreSection/LearnMoreItem.js +39 -0
- package/dist/LearnMoreSection/LearnMoreItem.stories.js +52 -0
- package/dist/LearnMoreSection/LearnMoreItem.styles.js +54 -0
- package/dist/LoginModal/LoginModal.js +125 -0
- package/dist/MainMenu/DynamicMainMenu.js +41 -0
- package/dist/MainMenu/MainMenu.js +207 -0
- package/dist/MainMenu/MainMenu.styles.js +361 -0
- package/dist/MatomoConnect/Matomo.js +221 -0
- package/dist/MatomoConnect/Matomo_fuckup.js +185 -0
- package/dist/MenuNav/MenuNav.styles.js +88 -0
- package/dist/Modal/Modal.js +71 -0
- package/dist/Modal/Modal.stories.js +67 -0
- package/dist/Modal/Modal.styles.js +407 -0
- package/dist/MultiProgressBar/MultiProgressBar.js +33 -0
- package/dist/MultiProgressBar/MultiProgressBar.stories.js +61 -0
- package/dist/MultiProgressBar/MultiProgressBar.styles.js +92 -0
- package/dist/Newsletter/Newsletter.js +106 -0
- package/dist/Newsletter/Newsletter.stories.js +8 -0
- package/dist/Newsletter/Newsletter.styles.js +173 -0
- package/dist/NotificationContext/NotificationContext.js +126 -0
- package/dist/NotificationContext/NotificationContext.stories.js +32 -0
- package/dist/NotificationCounter/NotificationCounter.styles.js +23 -0
- package/dist/Number/Number.js +25 -0
- package/dist/Number/Number.stories.js +18 -0
- package/dist/Number/Number.styles.js +21 -0
- package/dist/PageTransition/PageTransition.js +42 -0
- package/dist/Process/Process.stories.js +34 -0
- package/dist/Process/Process.styles.js +87 -0
- package/dist/ProfileBadge/ProfileBadge.js +46 -0
- package/dist/ProfileBadge/ProfileBadge.stories.js +37 -0
- package/dist/ProfileBadge/ProfileBadge.styles.js +47 -0
- package/dist/ProfileBox/ProfileBox.js +29 -0
- package/dist/ProfileBox/ProfileBox.stories.js +27 -0
- package/dist/ProfileBox/ProfileBox.styles.js +60 -0
- package/dist/ProfileHeader/ProfileHeader-CLb4.js +401 -0
- package/dist/ProfileHeader/ProfileHeader.js +268 -0
- package/dist/ProfileHeader/ProfileHeader.styles.js +114 -0
- package/dist/ProfileStat/ProfileStat.js +32 -0
- package/dist/ProfileStat/ProfileStat.stories.js +58 -0
- package/dist/ProfileStat/ProfileStat.styles.js +80 -0
- package/dist/ProofOfAddress/ProofOfAddress.styles.js +76 -0
- package/dist/ROI/ROI.js +261 -0
- package/dist/ROI/ROI.styles.js +71 -0
- package/dist/ROI/ROIChart.js +348 -0
- package/dist/ROI/ROIChart.styles.js +98 -0
- package/dist/ROI/ROIModal.js +74 -0
- package/dist/ROI/ROIScenarioBox.js +46 -0
- package/dist/ROI/ROIScenarioBox.styles.js +131 -0
- package/dist/Radio/Radio.js +58 -0
- package/dist/Radio/Radio.stories.js +65 -0
- package/dist/Radio/Radio.styles.js +93 -0
- package/dist/RefreshButton/RefreshButton.js +14 -0
- package/dist/RefreshButton/RefreshButton.stories.js +29 -0
- package/dist/RefreshButton/RefreshButton.styles.js +57 -0
- package/dist/RegisterAlgorand/AlgoAddressName.js +103 -0
- package/dist/RegisterAlgorand/AlgoAdressSelect.js +274 -0
- package/dist/RegisterAlgorand/AlgoConnectWallet.js +37 -0
- package/dist/RegisterAlgorand/AlgoSuccess.js +28 -0
- package/dist/RegisterAlgorand/Algorand.stories.js +61 -0
- package/dist/RegisterAlgorand/ChooseWallet.js +77 -0
- package/dist/RegisterAlgorand/SelectProject.js +77 -0
- package/dist/RegisterAlgorand/_styles.js +30 -0
- package/dist/RegisterAlgorand/flow.js +243 -0
- package/dist/RegisterAlgorand/flowWithMemo.js +244 -0
- package/dist/RegisterAlgorand/index.js +7 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.js +30 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.stories.js +22 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.styles.js +19 -0
- package/dist/RegisterEthereum/EthAddressLedger.js +151 -0
- package/dist/RegisterEthereum/EthAddressMetamask.js +165 -0
- package/dist/RegisterEthereum/EthAddressName.js +101 -0
- package/dist/RegisterEthereum/EthConnectLedger.js +117 -0
- package/dist/RegisterEthereum/EthConnectMetamask.js +25 -0
- package/dist/RegisterEthereum/EthFinish.js +32 -0
- package/dist/RegisterEthereum/EthIntro.js +77 -0
- package/dist/RegisterEthereum/_styles.js +30 -0
- package/dist/RegisterEthereum/index.js +9 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.js +75 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +65 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +69 -0
- package/dist/RegisterLiquidSteps/assets/nav_green.svg +31 -0
- package/dist/RegisterLiquidSteps/assets/video.mp4 +0 -0
- package/dist/RegisterLiquidSteps/assets/videothumbnail.jpg +0 -0
- package/dist/RegisterLiquidSteps/complete.js +29 -0
- package/dist/RegisterLiquidSteps/flow.js +141 -0
- package/dist/RegisterLiquidSteps/index.js +29 -0
- package/dist/RegisterLiquidSteps/register-liquid.js +197 -0
- package/dist/RegisterModal/RegisterModal.js +143 -0
- package/dist/RegisterModal/RegisterModal.stories.js +35 -0
- package/dist/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/RequestDataBox/RequestDataBox.stories.js +29 -0
- package/dist/RequestDataBox/RequestDataBox.styles.js +40 -0
- package/dist/RiskQuestionnaire/RiskQuestionnaireContext.js +111 -0
- package/dist/RiskQuestionnaire/_styles.js +6 -0
- package/dist/SEO/SEO.js +63 -0
- package/dist/SEO/SEO.stories.js +53 -0
- package/dist/SectionTitle/SectionTitle.styles.js +23 -0
- package/dist/SideLine/SideLine.js +4 -0
- package/dist/SideLine/SideLine.stories.js +20 -0
- package/dist/SideLine/SideLine.styles.js +29 -0
- package/dist/SigningSubflow/SignSubAddressMetamask.js +105 -0
- package/dist/SigningSubflow/SignSubConnectLedger.js +114 -0
- package/dist/SigningSubflow/SignSubConnectMetamask.js +101 -0
- package/dist/SigningSubflow/SignSubIntro.js +45 -0
- package/dist/SigningSubflow/SignSubSendLedger.js +114 -0
- package/dist/SigningSubflow/SignSubSendMetamask.js +53 -0
- package/dist/SigningSubflow/SignSubTransactionLedger.js +125 -0
- package/dist/SigningSubflow/SignSubTransactionMetamask.js +130 -0
- package/dist/SigningSubflow/_styles.js +59 -0
- package/dist/SigningSubflow/index.js +9 -0
- package/dist/Slider/Slider.js +43 -0
- package/dist/Slider/Slider.stories.js +63 -0
- package/dist/Slider/Slider.styles.js +115 -0
- package/dist/SpanButton/SpanButton.styles.js +14 -0
- package/dist/StatusBadge/StatusBadge.styles.js +16 -0
- package/dist/StepController/StepController.js +73 -0
- package/dist/StepController/StepController.stories.js +52 -0
- package/dist/StepController/StepController.styles.js +27 -0
- package/dist/StepController/StepControllerContext.js +61 -0
- package/dist/StepController/StepControllerProgress.js +28 -0
- package/dist/StepController/StepControllerProgress.stories.js +41 -0
- package/dist/StepsProgress/StepsProgress.js +95 -0
- package/dist/StepsProgress/StepsProgress.stories.js +23 -0
- package/dist/StepsProgress/StepsProgress.styles.js +97 -0
- package/dist/StokrLoader/StokrLoader.js +60 -0
- package/dist/StokrLoader/media.js +22 -0
- package/dist/StokrLoader/stokr_loader_white_400x400.gif +0 -0
- package/dist/SvgIcons/AdminBadgeSvg.js +16 -0
- package/dist/SvgIcons/CameraSvg.js +26 -0
- package/dist/SvgIcons/CapsLockSvg.js +21 -0
- package/dist/SvgIcons/DocumentBackSvg.js +25 -0
- package/dist/SvgIcons/DocumentSmallSvg.js +51 -0
- package/dist/SvgIcons/DocumentSvg.js +28 -0
- package/dist/SvgIcons/Early.js +14 -0
- package/dist/SvgIcons/EthSvg.js +30 -0
- package/dist/SvgIcons/EurSvg.js +16 -0
- package/dist/SvgIcons/FaceScanIconSvg.js +21 -0
- package/dist/SvgIcons/FourSvg.js +11 -0
- package/dist/SvgIcons/Glassess.js +19 -0
- package/dist/SvgIcons/Icons_Badge.png +0 -0
- package/dist/SvgIcons/LogoSvg.js +14 -0
- package/dist/SvgIcons/OneSvg.js +13 -0
- package/dist/SvgIcons/PassportSvg.js +46 -0
- package/dist/SvgIcons/RefreshSvg.js +17 -0
- package/dist/SvgIcons/SocialFacebook.js +15 -0
- package/dist/SvgIcons/SocialInstagram.js +15 -0
- package/dist/SvgIcons/SocialLinkedIn.js +15 -0
- package/dist/SvgIcons/SocialMedium.js +15 -0
- package/dist/SvgIcons/SocialReddit.js +15 -0
- package/dist/SvgIcons/SocialTelegram.js +15 -0
- package/dist/SvgIcons/SocialTwitter.js +15 -0
- package/dist/SvgIcons/SocialYoutube.js +15 -0
- package/dist/SvgIcons/ThreeSvg.js +10 -0
- package/dist/SvgIcons/TwoSidedDocumentSvg.js +72 -0
- package/dist/SvgIcons/TwoSvg.js +13 -0
- package/dist/SvgIcons/UpdateDefaultSvg.js +19 -0
- package/dist/SvgIcons/UpdateHardSvg.js +15 -0
- package/dist/SvgIcons/UpdateSoftSvg.js +17 -0
- package/dist/SvgIcons/UploadSvg.js +24 -0
- package/dist/SvgIcons/VerifiedBadge.js +13 -0
- package/dist/SvgIcons/index.js +32 -0
- package/dist/Switch/Switch.js +45 -0
- package/dist/Switch/Switch.stories.js +73 -0
- package/dist/Switch/Switch.styles.js +105 -0
- package/dist/Tabs/Tabs.js +48 -0
- package/dist/Tabs/Tabs.stories.js +28 -0
- package/dist/Tabs/Tabs.styles.js +11 -0
- package/dist/TabsNav/TabNav.js +21 -0
- package/dist/TabsNav/TabNav.stories.js +32 -0
- package/dist/TabsNav/TabsNav.js +23 -0
- package/dist/TabsNav/TabsNav.stories.js +25 -0
- package/dist/TabsNav/TabsNav.styles.js +80 -0
- package/dist/TeamOverview/TeamOverview.js +69 -0
- package/dist/TeamOverview/TeamOverview.stories.js +68 -0
- package/dist/TeamOverview/TeamOverview.styles.js +152 -0
- package/dist/Text/Headline.js +34 -0
- package/dist/Text/Headline.stories.js +40 -0
- package/dist/Text/StyledText.js +30 -0
- package/dist/Text/Text.stories.js +59 -0
- package/dist/Text/Text.styles.js +166 -0
- package/dist/TextLink/TextLink.styles.js +50 -0
- package/dist/ToDoList/ToDoList.js +172 -0
- package/dist/ToDoList/ToDoList.stories.js +123 -0
- package/dist/ToDoList/ToDoList.styles.js +115 -0
- package/dist/ToDoList/ToDoListTask.js +96 -0
- package/dist/ToDoList/ToDoListTask.stories.js +60 -0
- package/dist/ToDoList/ToDoListTask.styles.js +104 -0
- package/dist/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/TransactionDetails/TransactionDetails.stories.js +47 -0
- package/dist/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/TransactionInfo/TransactionInfo.js +48 -0
- package/dist/TransactionInfo/TransactionInfo.stories.js +53 -0
- package/dist/TransactionInfo/TransactionInfo.styles.js +64 -0
- package/dist/TwoFactorModal/TwoFactorModal.js +84 -0
- package/dist/breakdown/Breakdown.js +124 -0
- package/dist/breakdown/index.js +2 -0
- package/dist/context/Auth.js +133 -0
- package/dist/context/AuthContext.js +154 -0
- package/dist/icons/Arrow.js +62 -0
- package/dist/icons/Arrow.stories.js +37 -0
- package/dist/icons/ArrowSimple.js +51 -0
- package/dist/icons/ArrowSimple.stories.js +41 -0
- package/dist/icons/Check.js +29 -0
- package/dist/icons/Check.stories.js +14 -0
- package/dist/icons/Facebook.js +15 -0
- package/dist/icons/Facebook.stories.js +15 -0
- package/dist/icons/Info.js +41 -0
- package/dist/icons/Info.stories.js +8 -0
- package/dist/icons/Instagram.js +15 -0
- package/dist/icons/Instagram.stories.js +15 -0
- package/dist/icons/LinkIcon.js +23 -0
- package/dist/icons/LinkIcon.stories.js +15 -0
- package/dist/icons/LinkedIn.js +29 -0
- package/dist/icons/LinkedIn.stories.js +8 -0
- package/dist/icons/Medium.js +28 -0
- package/dist/icons/Medium.stories.js +8 -0
- package/dist/icons/Reddit.js +18 -0
- package/dist/icons/Reddit.stories.js +15 -0
- package/dist/icons/Share.js +48 -0
- package/dist/icons/Share.stories.js +8 -0
- package/dist/icons/Telegram.js +28 -0
- package/dist/icons/Telegram.stories.js +8 -0
- package/dist/icons/Twitter.js +15 -0
- package/dist/icons/Twitter.stories.js +15 -0
- package/dist/icons/X.js +15 -0
- package/dist/icons/X.stories.js +8 -0
- package/dist/icons/Youtube.js +15 -0
- package/dist/icons/Youtube.stories.js +15 -0
- package/dist/icons/index.js +15 -0
- package/dist/index.js +177 -1
- package/dist/renderToBody/index.js +2 -0
- package/dist/renderToBody/renderToBody.js +26 -0
- package/dist/taxId/TaxId.stories.js +29 -0
- package/dist/taxId/complete.js +21 -0
- package/dist/taxId/flow.js +31 -0
- package/dist/taxId/index.js +4 -0
- package/dist/taxId/register-taxid.js +156 -0
- package/dist/video/Video.js +274 -0
- package/dist/video/Video.stories.js +45 -0
- package/dist/video/img/play-btn.svg +1 -0
- package/dist/video/index.js +2 -0
- package/package.json +128 -133
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/react-scripts +0 -0
- package/dist/07233f511246c9825a0d58e5ab2641f3.svg +0 -47
- package/dist/08418fc6c324f51f7e56.svg +0 -1
- package/dist/14aa35d4e84aebef77cf00b421fc393a.gif +0 -0
- package/dist/179ef2df02cb0b68c9fd.woff2 +0 -0
- package/dist/21e493d43617de76dbc7.woff2 +0 -0
- package/dist/2640959b1f9381cde047.eot +0 -0
- package/dist/2ba2db4ff86a2663686a100e75b50ba9.png +0 -0
- package/dist/311956ded96d3fd2813d.woff2 +0 -0
- package/dist/39f5961b2d3eb4aa5bf5.woff +0 -0
- package/dist/3caa0d4f9b7d58668066.woff2 +0 -0
- package/dist/4a510354f2f82b59fced805a8e3fe2bf.svg +0 -1
- package/dist/4c3c428d0ce82f840710.woff +0 -0
- package/dist/4e528d6445ca1974c313.woff +0 -0
- package/dist/55053cc0a8e6482eca64.ttf +0 -0
- package/dist/643c37f102b41f7f90c3.woff2 +0 -0
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/81f3ef07b7952e249da1.woff +0 -0
- package/dist/98b7d3182f652f021bc3.ttf +0 -0
- package/dist/9bea22b57dc165ed4382.ttf +0 -0
- package/dist/9ec738fbb66068dc1ca7.woff +0 -0
- package/dist/a1d7666a48f976227722.ttf +0 -0
- package/dist/a750292d6a0b5a760679.woff +0 -0
- package/dist/b85a961d44cc55c58050cbf7c53dd505.png +0 -0
- package/dist/bcb6531cf820152b7538.ttf +0 -0
- package/dist/c6a4bc1bd034d6303053.woff +0 -0
- package/dist/cbfc24090ef8bacab132.woff2 +0 -0
- package/dist/d2b1865643b98c0e8b54.ttf +0 -0
- package/dist/d97d7385fe8771611848.ttf +0 -0
- package/dist/index.js.LICENSE.txt +0 -1
package/dist/ROI/ROI.js
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import React, { PureComponent, Fragment } from 'react';
|
|
2
|
+
import { Collapse } from 'react-collapse';
|
|
3
|
+
import { Row, Column } from 'components/Grid/Grid.styles';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
6
|
+
import RangeInput from 'components/Input/RangeInput';
|
|
7
|
+
import ExpandButton from 'components/ExpandButton/ExpandButton';
|
|
8
|
+
import { TextButton } from 'components/TextLink/TextLink.styles';
|
|
9
|
+
import { Title, Label, Value, TabContainer, TooltipTitle, TooltipContent, ROIItemTitle, ROIItemContent, ROIItemContainer, ROIItemsRow } from './ROI.styles';
|
|
10
|
+
import ROIScenarioBox from './ROIScenarioBox';
|
|
11
|
+
import ROIChart from './ROIChart';
|
|
12
|
+
import ROIModal from './ROIModal';
|
|
13
|
+
const PANEL = {
|
|
14
|
+
FORECAST_SCENARIO: 'forecast_scenario',
|
|
15
|
+
PROFITPAYMENT_SCENARIO: 'profitpayment_scenario'
|
|
16
|
+
};
|
|
17
|
+
export class ROI extends PureComponent {
|
|
18
|
+
state = {
|
|
19
|
+
totalInvestment: 1000,
|
|
20
|
+
years: 1,
|
|
21
|
+
extendedPanel: null,
|
|
22
|
+
forecast: 'roiForecast01',
|
|
23
|
+
profitpayment: 'profitpayment01',
|
|
24
|
+
isModalOpen: false
|
|
25
|
+
};
|
|
26
|
+
handleTotalInvestmentChange = value => {
|
|
27
|
+
this.setState({
|
|
28
|
+
totalInvestment: value
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
handleYearsChange = value => {
|
|
32
|
+
this.setState({
|
|
33
|
+
years: value
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
handleForecastChange = e => {
|
|
37
|
+
this.setState({
|
|
38
|
+
forecast: e.target.value
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
handleProfitpaymentChange = e => {
|
|
42
|
+
this.setState({
|
|
43
|
+
profitpayment: e.target.value
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
togglePanel = panelId => {
|
|
47
|
+
const {
|
|
48
|
+
extendedPanel
|
|
49
|
+
} = this.state;
|
|
50
|
+
this.setState({
|
|
51
|
+
extendedPanel: extendedPanel !== panelId ? panelId : null
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
toggleModal = isModalOpen => {
|
|
55
|
+
this.setState({
|
|
56
|
+
isModalOpen
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
generateChartData = () => {
|
|
60
|
+
const {
|
|
61
|
+
years,
|
|
62
|
+
totalInvestment
|
|
63
|
+
} = this.state;
|
|
64
|
+
return [...Array(years).fill({})].map((_, index) => {
|
|
65
|
+
const factor = index >= 2 ? index : index - 2;
|
|
66
|
+
const profit = totalInvestment * 0.4 * factor;
|
|
67
|
+
const gain = profit * 0.5;
|
|
68
|
+
return {
|
|
69
|
+
year: `${index + 1}`,
|
|
70
|
+
profit,
|
|
71
|
+
gain,
|
|
72
|
+
tooltip: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TooltipTitle, null, `YEAR ${index + 1}`), /*#__PURE__*/React.createElement(TooltipContent, null, `TOTAL GAIN ON INVESTMENT: € ${profit}`, /*#__PURE__*/React.createElement("br", null), `CUMULATIVE PROFIT PAYOUTS: € ${gain}`))
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
render() {
|
|
77
|
+
const {
|
|
78
|
+
totalInvestment,
|
|
79
|
+
years,
|
|
80
|
+
extendedPanel,
|
|
81
|
+
forecast,
|
|
82
|
+
profitpayment,
|
|
83
|
+
isModalOpen
|
|
84
|
+
} = this.state;
|
|
85
|
+
const chartData = this.generateChartData();
|
|
86
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Column, {
|
|
87
|
+
part: 7
|
|
88
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
89
|
+
noPaddingHorizontal: true
|
|
90
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
91
|
+
noPaddingTop: true,
|
|
92
|
+
noPaddingHorizontal: true
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(Title, null, "Return on investment tool"))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
94
|
+
noPaddingHorizontal: true
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Label, null, "TOTAL INVESTMENT"), /*#__PURE__*/React.createElement(Value, null, `€ ${totalInvestment}`), /*#__PURE__*/React.createElement(RangeInput, {
|
|
96
|
+
id: "totalInvestmentRange",
|
|
97
|
+
name: "totalInvestmentRange",
|
|
98
|
+
value: totalInvestment,
|
|
99
|
+
min: 100,
|
|
100
|
+
max: 100000,
|
|
101
|
+
step: 100,
|
|
102
|
+
onChange: this.handleTotalInvestmentChange
|
|
103
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
104
|
+
noPaddingTop: true,
|
|
105
|
+
noPaddingHorizontal: true
|
|
106
|
+
}, /*#__PURE__*/React.createElement(Label, null, "Years"), /*#__PURE__*/React.createElement(Value, null, years), /*#__PURE__*/React.createElement(RangeInput, {
|
|
107
|
+
id: "yearsRange",
|
|
108
|
+
name: "yearsRange",
|
|
109
|
+
value: years,
|
|
110
|
+
min: 1,
|
|
111
|
+
max: 10,
|
|
112
|
+
onChange: this.handleYearsChange
|
|
113
|
+
})))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
114
|
+
noPadding: true,
|
|
115
|
+
borderTop: true
|
|
116
|
+
}, /*#__PURE__*/React.createElement(ExpandButton, {
|
|
117
|
+
title: "FORECAST SCENARIO",
|
|
118
|
+
textLeft: true,
|
|
119
|
+
isOpened: extendedPanel === PANEL.FORECAST_SCENARIO,
|
|
120
|
+
onClick: () => this.togglePanel(PANEL.FORECAST_SCENARIO)
|
|
121
|
+
}), /*#__PURE__*/React.createElement(Collapse, {
|
|
122
|
+
isOpened: extendedPanel === PANEL.FORECAST_SCENARIO
|
|
123
|
+
}, /*#__PURE__*/React.createElement(TabContainer, {
|
|
124
|
+
borderTop: true
|
|
125
|
+
}, /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
126
|
+
title: "Company Scenario",
|
|
127
|
+
subtitle: "Earnings forecast",
|
|
128
|
+
tooltip: "Hello",
|
|
129
|
+
radio: {
|
|
130
|
+
id: 'roiForecast01',
|
|
131
|
+
value: 'roiForecast01',
|
|
132
|
+
name: 'roiForecast',
|
|
133
|
+
checked: forecast === 'roiForecast01',
|
|
134
|
+
onChange: this.handleForecastChange
|
|
135
|
+
}
|
|
136
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
137
|
+
title: "Conservative",
|
|
138
|
+
subtitle: "ROE-based earnings forecast",
|
|
139
|
+
tooltip: "Hello",
|
|
140
|
+
radio: {
|
|
141
|
+
id: 'roiForecast02',
|
|
142
|
+
value: 'roiForecast02',
|
|
143
|
+
name: 'roiForecast',
|
|
144
|
+
checked: forecast === 'roiForecast02',
|
|
145
|
+
onChange: this.handleForecastChange
|
|
146
|
+
}
|
|
147
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
148
|
+
title: "Industry average",
|
|
149
|
+
subtitle: "ROE-based earnings forecast",
|
|
150
|
+
tooltip: "Hello",
|
|
151
|
+
radio: {
|
|
152
|
+
id: 'roiForecast03',
|
|
153
|
+
value: 'roiForecast03',
|
|
154
|
+
name: 'roiForecast',
|
|
155
|
+
checked: forecast === 'roiForecast03',
|
|
156
|
+
onChange: this.handleForecastChange
|
|
157
|
+
}
|
|
158
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
159
|
+
title: "Positive",
|
|
160
|
+
subtitle: "ROE-based earnings forecast",
|
|
161
|
+
tooltip: "Hello",
|
|
162
|
+
radio: {
|
|
163
|
+
id: 'roiForecast04',
|
|
164
|
+
value: 'roiForecast04',
|
|
165
|
+
name: 'roiForecast',
|
|
166
|
+
checked: forecast === 'roiForecast04',
|
|
167
|
+
onChange: this.handleForecastChange
|
|
168
|
+
}
|
|
169
|
+
})))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
170
|
+
noPadding: true,
|
|
171
|
+
borderTop: true
|
|
172
|
+
}, /*#__PURE__*/React.createElement(ExpandButton, {
|
|
173
|
+
title: "PROFITPAYMENT SCENARIO",
|
|
174
|
+
textLeft: true,
|
|
175
|
+
isOpened: extendedPanel === PANEL.PROFITPAYMENT_SCENARIO,
|
|
176
|
+
onClick: () => this.togglePanel(PANEL.PROFITPAYMENT_SCENARIO)
|
|
177
|
+
}), /*#__PURE__*/React.createElement(Collapse, {
|
|
178
|
+
isOpened: extendedPanel === PANEL.PROFITPAYMENT_SCENARIO
|
|
179
|
+
}, /*#__PURE__*/React.createElement(TabContainer, {
|
|
180
|
+
borderTop: true
|
|
181
|
+
}, /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
182
|
+
title: "Company Scenario",
|
|
183
|
+
tooltip: "Hello",
|
|
184
|
+
radio: {
|
|
185
|
+
id: 'profitpayment01',
|
|
186
|
+
value: 'profitpayment01',
|
|
187
|
+
name: 'profitpayment',
|
|
188
|
+
checked: profitpayment === 'profitpayment01',
|
|
189
|
+
onChange: this.handleProfitpaymentChange
|
|
190
|
+
}
|
|
191
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
192
|
+
title: "Increasing Payouts",
|
|
193
|
+
tooltip: "Hello",
|
|
194
|
+
radio: {
|
|
195
|
+
id: 'profitpayment02',
|
|
196
|
+
value: 'profitpayment02',
|
|
197
|
+
name: 'profitpayment',
|
|
198
|
+
checked: profitpayment === 'profitpayment02',
|
|
199
|
+
onChange: this.handleProfitpaymentChange
|
|
200
|
+
}
|
|
201
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
202
|
+
title: "No Payouts",
|
|
203
|
+
tooltip: "Hello",
|
|
204
|
+
radio: {
|
|
205
|
+
id: 'profitpayment03',
|
|
206
|
+
value: 'profitpayment03',
|
|
207
|
+
name: 'profitpayment',
|
|
208
|
+
checked: profitpayment === 'profitpayment03',
|
|
209
|
+
onChange: this.handleProfitpaymentChange
|
|
210
|
+
}
|
|
211
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
212
|
+
title: "100% Payouts",
|
|
213
|
+
tooltip: "Hello",
|
|
214
|
+
radio: {
|
|
215
|
+
id: 'profitpayment04',
|
|
216
|
+
value: 'profitpayment04',
|
|
217
|
+
name: 'profitpayment',
|
|
218
|
+
checked: profitpayment === 'profitpayment04',
|
|
219
|
+
onChange: this.handleProfitpaymentChange
|
|
220
|
+
}
|
|
221
|
+
}), /*#__PURE__*/React.createElement(ROIScenarioBox, {
|
|
222
|
+
title: "50/50 Payouts",
|
|
223
|
+
tooltip: "Hello",
|
|
224
|
+
radio: {
|
|
225
|
+
id: 'profitpayment05',
|
|
226
|
+
value: 'profitpayment05',
|
|
227
|
+
name: 'profitpayment',
|
|
228
|
+
checked: profitpayment === 'profitpayment05',
|
|
229
|
+
onChange: this.handleProfitpaymentChange
|
|
230
|
+
}
|
|
231
|
+
}))))), /*#__PURE__*/React.createElement(Column, {
|
|
232
|
+
part: 9,
|
|
233
|
+
withBorder: true
|
|
234
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
235
|
+
noPaddingHorizontal: true
|
|
236
|
+
}, /*#__PURE__*/React.createElement(ROIChart, {
|
|
237
|
+
id: "roichart",
|
|
238
|
+
data: chartData
|
|
239
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
240
|
+
noPaddingHorizontal: true,
|
|
241
|
+
noPaddingTop: true
|
|
242
|
+
}, /*#__PURE__*/React.createElement(Label, null, "INVESTMENT RESULTS"), /*#__PURE__*/React.createElement(ROIItemsRow, null, /*#__PURE__*/React.createElement(Column, {
|
|
243
|
+
part: 1,
|
|
244
|
+
full: 3
|
|
245
|
+
}, /*#__PURE__*/React.createElement(ROIItemContainer, null, /*#__PURE__*/React.createElement(ROIItemTitle, null, "TOTAL GAIN ON INVESTMENT (ROI)"), /*#__PURE__*/React.createElement(ROIItemContent, null, "\u20AC 641 (68%)"))), /*#__PURE__*/React.createElement(Column, {
|
|
246
|
+
part: 1,
|
|
247
|
+
full: 3
|
|
248
|
+
}, /*#__PURE__*/React.createElement(ROIItemContainer, null, /*#__PURE__*/React.createElement(ROIItemTitle, null, "GAIN ON PAYOUTS (ROI)"), /*#__PURE__*/React.createElement(ROIItemContent, null, "\u20AC 166 (18%)"))), /*#__PURE__*/React.createElement(Column, {
|
|
249
|
+
part: 1,
|
|
250
|
+
full: 3
|
|
251
|
+
}, /*#__PURE__*/React.createElement(ROIItemContainer, null, /*#__PURE__*/React.createElement(ROIItemTitle, null, "GAIN ON PRICE (ROI)"), /*#__PURE__*/React.createElement(ROIItemContent, null, "\u20AC 475 (50%)"))))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
252
|
+
noPadding: true
|
|
253
|
+
}, /*#__PURE__*/React.createElement(TextButton, {
|
|
254
|
+
onClick: () => this.toggleModal(true)
|
|
255
|
+
}, "CHECK HOW WE CALCULATE THIS"))))), /*#__PURE__*/React.createElement(ROIModal, {
|
|
256
|
+
isModalOpen: isModalOpen,
|
|
257
|
+
onModalClose: () => this.toggleModal(false)
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export default ROI;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import styled from 'styled-components/macro';
|
|
2
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
3
|
+
import backgroundImage from 'static/images/background.png';
|
|
4
|
+
import theme from 'styles/theme';
|
|
5
|
+
export const Title = styled.h3`
|
|
6
|
+
padding-left: 56px;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
&::before {
|
|
10
|
+
content: '';
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: 0;
|
|
13
|
+
top: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
width: 8px;
|
|
16
|
+
background: ${props => theme.cPrimary};
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
export const Label = styled.div`
|
|
20
|
+
font-size: 11px;
|
|
21
|
+
line-height: 24px;
|
|
22
|
+
letter-spacing: 2px;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
text-transform: uppercase;
|
|
25
|
+
`;
|
|
26
|
+
export const Value = styled.div`
|
|
27
|
+
font-size: 22px;
|
|
28
|
+
line-height: 28px;
|
|
29
|
+
letter-spacing: 0.8px;
|
|
30
|
+
font-weight: 300;
|
|
31
|
+
padding: 14px 0;
|
|
32
|
+
`;
|
|
33
|
+
export const TabContainer = styled(ComponentWrapper)`
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
background-image: url(${backgroundImage});
|
|
36
|
+
background-repeat: no-repeat;
|
|
37
|
+
background-position: 0% 100%;
|
|
38
|
+
`;
|
|
39
|
+
export const TooltipTitle = styled.div`
|
|
40
|
+
font-size: 11px;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
letter-spacing: 2px;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
`;
|
|
45
|
+
export const TooltipContent = styled.div`
|
|
46
|
+
font-size: 11px;
|
|
47
|
+
line-height: 16px;
|
|
48
|
+
letter-spacing: 0.8px;
|
|
49
|
+
font-weight: 300;
|
|
50
|
+
`;
|
|
51
|
+
export const ROIItemsRow = styled.div`
|
|
52
|
+
margin: 0 -32px;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
text-align: left;
|
|
56
|
+
`;
|
|
57
|
+
export const ROIItemContainer = styled.div`
|
|
58
|
+
padding: 32px;
|
|
59
|
+
`;
|
|
60
|
+
export const ROIItemTitle = styled.div`
|
|
61
|
+
font-size: 11px;
|
|
62
|
+
line-height: 20px;
|
|
63
|
+
letter-spacing: 1.9px;
|
|
64
|
+
margin-bottom: 16px;
|
|
65
|
+
`;
|
|
66
|
+
export const ROIItemContent = styled.div`
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
line-height: 24px;
|
|
70
|
+
letter-spacing: 0.6px;
|
|
71
|
+
`;
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import React, { PureComponent, Fragment } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import * as d3 from 'd3';
|
|
4
|
+
import { Tooltip } from 'react-tippy';
|
|
5
|
+
import BarChartLegend from 'components/BarChartLegend/BarChartLegend';
|
|
6
|
+
import { getMedia } from 'styles/rwd';
|
|
7
|
+
import { Chart, TooltipWrapper, LegendWrapper } from './ROIChart.styles';
|
|
8
|
+
const gradients = {
|
|
9
|
+
red: {
|
|
10
|
+
start: '#f24f45',
|
|
11
|
+
end: '#ee220d'
|
|
12
|
+
},
|
|
13
|
+
blue: {
|
|
14
|
+
start: '#6a97e0',
|
|
15
|
+
end: '#0050ca'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export class ROIChart extends PureComponent {
|
|
19
|
+
transitionDuration = 800;
|
|
20
|
+
transitionDatumDelay = 100;
|
|
21
|
+
state = {
|
|
22
|
+
tooltipOpen: false,
|
|
23
|
+
dataIndex: 0
|
|
24
|
+
};
|
|
25
|
+
componentDidMount() {
|
|
26
|
+
this.createChart();
|
|
27
|
+
window.addEventListener('resize', this.onResize);
|
|
28
|
+
window.addEventListener('scroll', this.onScroll);
|
|
29
|
+
this.onScroll();
|
|
30
|
+
}
|
|
31
|
+
componentDidUpdate(prevProps) {
|
|
32
|
+
const {
|
|
33
|
+
data
|
|
34
|
+
} = this.props;
|
|
35
|
+
const hasDataLengthChange = prevProps.data.length !== data.length;
|
|
36
|
+
if (hasDataLengthChange) {
|
|
37
|
+
this.updateChart();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const hasDataChange = prevProps.data.some((datum, index) => datum.profit !== data[index].profit);
|
|
41
|
+
if (hasDataChange) {
|
|
42
|
+
this.updateChart();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
componentWillUnmount() {
|
|
46
|
+
clearTimeout(this.resizeTimeout);
|
|
47
|
+
window.removeEventListener('resize', this.onResize);
|
|
48
|
+
window.removeEventListener('scroll', this.onScroll);
|
|
49
|
+
}
|
|
50
|
+
checkIsMobile = () => !window.matchMedia(getMedia('Medium')).matches;
|
|
51
|
+
onResize = () => {
|
|
52
|
+
clearTimeout(this.resizeTimeout);
|
|
53
|
+
this.resizeTimeout = setTimeout(this.onResizeTimeout, 200);
|
|
54
|
+
};
|
|
55
|
+
onResizeTimeout = () => {
|
|
56
|
+
this.updateChart(true);
|
|
57
|
+
};
|
|
58
|
+
onScroll = e => {
|
|
59
|
+
if (this.drawn) return;
|
|
60
|
+
if (this.chartEl.getBoundingClientRect().top < window.innerHeight) {
|
|
61
|
+
this.initialDrawChart();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
initialDrawChart = () => {
|
|
65
|
+
this.updateChart();
|
|
66
|
+
this.drawn = true;
|
|
67
|
+
};
|
|
68
|
+
createChart = () => {
|
|
69
|
+
if (!this.chartEl) return;
|
|
70
|
+
const {
|
|
71
|
+
id,
|
|
72
|
+
data
|
|
73
|
+
} = this.props;
|
|
74
|
+
const {
|
|
75
|
+
dataIndex
|
|
76
|
+
} = this.state;
|
|
77
|
+
const tooltip = data[dataIndex] && !!data[dataIndex].tooltip;
|
|
78
|
+
const wrapperWidth = this.chartEl.offsetWidth;
|
|
79
|
+
const wrapperHeight = 320;
|
|
80
|
+
const margin = {
|
|
81
|
+
top: 20,
|
|
82
|
+
left: 0,
|
|
83
|
+
right: 40,
|
|
84
|
+
bottom: 30
|
|
85
|
+
};
|
|
86
|
+
const width = wrapperWidth - (margin.left + margin.right);
|
|
87
|
+
const height = wrapperHeight - (margin.top + margin.bottom);
|
|
88
|
+
const thickness = 6;
|
|
89
|
+
const hThickness = thickness / 2;
|
|
90
|
+
const minBarHeight = 12;
|
|
91
|
+
this.hThickness = hThickness;
|
|
92
|
+
|
|
93
|
+
// #region x scale
|
|
94
|
+
const xScale = this.getXScale(data, width);
|
|
95
|
+
// #endregion x scale
|
|
96
|
+
|
|
97
|
+
// #region y scale
|
|
98
|
+
const yScale = this.getYScale(data, height);
|
|
99
|
+
// #endregion y scale
|
|
100
|
+
|
|
101
|
+
this.svg = d3.select(this.chartEl).append('svg').attr('width', wrapperWidth).attr('height', wrapperHeight);
|
|
102
|
+
this.chart = this.svg.append('g').attr('transform', `translate(${margin.left}, ${margin.top})`);
|
|
103
|
+
this.defs = this.svg.append('defs');
|
|
104
|
+
|
|
105
|
+
// #region gradient
|
|
106
|
+
this.redGradient = this.defs.append('linearGradient').attr('id', `${id}-barChart-redgradient`).attr('x1', '50%').attr('x2', '50%').attr('y1', '100%').attr('y2', '0%');
|
|
107
|
+
this.redGradient.append('stop').attr('class', 'start').attr('offset', '0%').attr('stop-color', gradients.red.start).attr('stop-opacity', 1);
|
|
108
|
+
this.redGradient.append('stop').attr('class', 'end').attr('offset', '100%').attr('stop-color', gradients.red.end).attr('stop-opacity', 1);
|
|
109
|
+
this.blueGradient = this.defs.append('linearGradient').attr('id', `${id}-barChart-bluegradient`).attr('x1', '50%').attr('x2', '50%').attr('y1', '100%').attr('y2', '0%');
|
|
110
|
+
this.blueGradient.append('stop').attr('class', 'start').attr('offset', '0%').attr('stop-color', gradients.blue.start).attr('stop-opacity', 1);
|
|
111
|
+
this.blueGradient.append('stop').attr('class', 'end').attr('offset', '100%').attr('stop-color', gradients.blue.end).attr('stop-opacity', 1);
|
|
112
|
+
// #endregion gradient
|
|
113
|
+
|
|
114
|
+
// #region x axis
|
|
115
|
+
this.xAxis = this.chart.append('g').attr('class', 'axisX').attr('transform', `translate(0, ${yScale(0)})`).call(d3.axisBottom(xScale).tickPadding(height - yScale(0) + minBarHeight));
|
|
116
|
+
// #endregion x axis
|
|
117
|
+
|
|
118
|
+
// #region y axis
|
|
119
|
+
this.yAxis = this.chart.append('g').attr('class', 'axisY').attr('transform', `translate(${width}, 0)`).call(d3.axisRight().scale(yScale).ticks(4));
|
|
120
|
+
// #endregion y axis
|
|
121
|
+
|
|
122
|
+
// #region grid x axis
|
|
123
|
+
this.xGrid = this.chart.append('g').attr('class', 'gridX').attr('transform', `translate(0, ${height})`).call(d3.axisBottom().scale(xScale).tickSize(-height, 0, 0).tickFormat(''));
|
|
124
|
+
// #endregion grid x axis
|
|
125
|
+
|
|
126
|
+
// #region grid y axis
|
|
127
|
+
this.yGrid = this.chart.append('g').attr('class', 'gridY').attr('transform', `translate(${width}, 0)`).call(d3.axisRight().scale(yScale).tickSize(-width, 0, 0).ticks(4).tickFormat(''));
|
|
128
|
+
// #endregion grid y axis
|
|
129
|
+
|
|
130
|
+
// #region bar measures functions
|
|
131
|
+
const gainBarY = d => d.gain < 0 ? yScale(0) : yScale(d.gain) - minBarHeight;
|
|
132
|
+
const gainBarHeight = d => Math.abs(yScale(0) - yScale(d.gain)) + minBarHeight;
|
|
133
|
+
const profitBarY = d => d.profit < 0 ? yScale(0) + gainBarHeight(d) : yScale(d.profit) - minBarHeight * 2;
|
|
134
|
+
const profitBarHeight = d => Math.abs(yScale(d.gain) - yScale(d.profit)) + minBarHeight;
|
|
135
|
+
|
|
136
|
+
// #endregion bar measures functions
|
|
137
|
+
|
|
138
|
+
// #region bars
|
|
139
|
+
const chartContext = this;
|
|
140
|
+
const barGroups = this.chart.selectAll('.stackedBar').data(data).enter().append('g').attr('class', 'stackedBar').attr('transform', `translate(${-hThickness}, 0)`)
|
|
141
|
+
// end series create
|
|
142
|
+
.each(function bindContext(d, i) {
|
|
143
|
+
d3.select(this).node().chartContext = chartContext;
|
|
144
|
+
d3.select(this).node().xScale = xScale;
|
|
145
|
+
}).on('mouseenter', tooltip ? this.onMouseEnter : () => {}).on('mouseleave', tooltip ? this.onMouseLeave : () => {});
|
|
146
|
+
|
|
147
|
+
// #region gainBar
|
|
148
|
+
barGroups.append('rect').attr('class', 'stackedBar__gain').attr('fill', `url(#${id}-barChart-bluegradient)`).attr('x', (d, i) => xScale(d.year)).attr('y', gainBarY).attr('height', gainBarHeight).attr('width', 6);
|
|
149
|
+
// #endregion gainBar
|
|
150
|
+
|
|
151
|
+
// #region profitBar
|
|
152
|
+
barGroups.append('rect').attr('class', 'stackedBar__profit').attr('fill', `url(#${id}-barChart-redgradient)`).attr('x', (d, i) => xScale(d.year)).attr('y', profitBarY).attr('height', profitBarHeight).attr('width', 6);
|
|
153
|
+
// #endregion profitBar
|
|
154
|
+
|
|
155
|
+
barGroups.append('text').attr('class', 'stackedBar__gainText').attr('fill', '#fff').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', gainBarY).text(d => `€ ${d.gain}`).attr('opacity', 0);
|
|
156
|
+
barGroups.append('text').attr('class', 'stackedBar__profitText').attr('fill', '#fff').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', profitBarY).text(d => `€ ${d.profit}`).attr('opacity', 0);
|
|
157
|
+
// #endregion bars
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
getXScale = (data, width) => d3.scaleBand().range([0, width]).domain(data.map(datum => datum.year)).padding(0.2);
|
|
161
|
+
getYScale = (data, height) => d3.scaleLinear().range([height, 0]).domain([Math.min(d3.min(data, datum => datum.gain + datum.profit), 0), Math.max(d3.max(data, datum => datum.gain + datum.profit), Math.abs(d3.min(data, datum => datum.gain + datum.profit)))]);
|
|
162
|
+
setTooltip = (opened, dataIndex) => {
|
|
163
|
+
const newState = {
|
|
164
|
+
tooltipOpen: opened
|
|
165
|
+
};
|
|
166
|
+
if (dataIndex !== undefined) newState.dataIndex = dataIndex;
|
|
167
|
+
this.setState(newState);
|
|
168
|
+
};
|
|
169
|
+
onMouseEnter = function onMouseEnter(d, i) {
|
|
170
|
+
const chartRect = this.chartContext.chartEl.getBoundingClientRect();
|
|
171
|
+
const barRect = this.getBoundingClientRect();
|
|
172
|
+
const y = barRect.y - chartRect.y;
|
|
173
|
+
const x = this.xScale(d.year) + this.xScale.bandwidth() / 2;
|
|
174
|
+
if (this.chartContext.tooltipEl) {
|
|
175
|
+
this.chartContext.tooltipEl.style.left = `${x}px`;
|
|
176
|
+
this.chartContext.tooltipEl.style.top = `${y}px`;
|
|
177
|
+
}
|
|
178
|
+
this.chartContext.setTooltip(true, i);
|
|
179
|
+
if (this.chartContext.checkIsMobile()) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const barGroup = d3.select(this);
|
|
183
|
+
const shift = Math.min(this.xScale.bandwidth(), 100);
|
|
184
|
+
barGroup.transition().duration(300).attr('transform', `translate(${-shift / 2}, 0)`);
|
|
185
|
+
const gainBar = barGroup.select('.stackedBar__gain');
|
|
186
|
+
const profitBar = barGroup.select('.stackedBar__profit');
|
|
187
|
+
const gainText = barGroup.select('.stackedBar__gainText');
|
|
188
|
+
const profitText = barGroup.select('.stackedBar__profitText');
|
|
189
|
+
const gainTextWidth = gainText.node().getBoundingClientRect().width;
|
|
190
|
+
const profitTextWidth = profitText.node().getBoundingClientRect().width;
|
|
191
|
+
gainBar.transition().duration(300).attr('width', shift);
|
|
192
|
+
profitBar.transition().duration(300).attr('width', shift);
|
|
193
|
+
gainText.attr('transform', `translate(${shift / 2 - gainTextWidth / 2}, 0)`).transition().duration(300).delay(200).attr('opacity', 1);
|
|
194
|
+
profitText.attr('transform', `translate(${shift / 2 - profitTextWidth / 2}, 0)`).transition().duration(300).delay(200).attr('opacity', 1);
|
|
195
|
+
};
|
|
196
|
+
onMouseLeave = function onMouseLeave(d, i) {
|
|
197
|
+
const width = 6;
|
|
198
|
+
this.chartContext.setTooltip(false);
|
|
199
|
+
if (this.chartContext.checkIsMobile()) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const barGroup = d3.select(this);
|
|
203
|
+
barGroup.transition().duration(300).delay(200).attr('transform', `translate(${-width / 2}, 0)`);
|
|
204
|
+
barGroup.select('.stackedBar__gain').transition().duration(300).delay(200).attr('width', width);
|
|
205
|
+
barGroup.select('.stackedBar__profit').transition().duration(300).delay(200).attr('width', width);
|
|
206
|
+
barGroup.select('.stackedBar__gainText').transition().duration(300).attr('opacity', 0);
|
|
207
|
+
barGroup.select('.stackedBar__profitText').transition().duration(300).attr('opacity', 0);
|
|
208
|
+
};
|
|
209
|
+
updateChart = resizeUpdate => {
|
|
210
|
+
if (!this.chartEl) return;
|
|
211
|
+
const {
|
|
212
|
+
data,
|
|
213
|
+
id
|
|
214
|
+
} = this.props;
|
|
215
|
+
const {
|
|
216
|
+
dataIndex
|
|
217
|
+
} = this.state;
|
|
218
|
+
const tooltip = data[dataIndex] && !!data[dataIndex].tooltip;
|
|
219
|
+
const duration = this.transitionDuration;
|
|
220
|
+
const delay = this.transitionDatumDelay;
|
|
221
|
+
const wrapperWidth = this.chartEl.offsetWidth;
|
|
222
|
+
const wrapperHeight = 320;
|
|
223
|
+
const margin = {
|
|
224
|
+
top: 20,
|
|
225
|
+
left: 0,
|
|
226
|
+
right: 40,
|
|
227
|
+
bottom: 30
|
|
228
|
+
};
|
|
229
|
+
const width = wrapperWidth - (margin.left + margin.right);
|
|
230
|
+
const height = wrapperHeight - (margin.top + margin.bottom);
|
|
231
|
+
const thickness = 6;
|
|
232
|
+
const hThickness = thickness / 2;
|
|
233
|
+
const minBarHeight = 12;
|
|
234
|
+
const textOffsetTop = 3;
|
|
235
|
+
// #region x scale
|
|
236
|
+
const xScale = this.getXScale(data, width);
|
|
237
|
+
// #endregion x scale
|
|
238
|
+
|
|
239
|
+
// #region y scale
|
|
240
|
+
const yScale = this.getYScale(data, height);
|
|
241
|
+
// #endregion y scale
|
|
242
|
+
// #region root svg
|
|
243
|
+
this.svg.transition().duration(duration).attr('width', wrapperWidth).attr('height', wrapperHeight);
|
|
244
|
+
// #endregion root svg
|
|
245
|
+
|
|
246
|
+
// #region grid x axis
|
|
247
|
+
this.xGrid.transition().duration(duration).attr('transform', `translate(0, ${height})`).call(d3.axisBottom().scale(xScale).tickSize(-height, 0, 0).tickFormat(''));
|
|
248
|
+
// #endregion grid x axis
|
|
249
|
+
|
|
250
|
+
// #region grid y axis
|
|
251
|
+
this.yGrid.transition().duration(duration).attr('transform', `translate(${width}, 0)`).call(d3.axisRight().scale(yScale).tickSize(-width, 0, 0).ticks(4).tickFormat(''));
|
|
252
|
+
// #endregion grid y axis
|
|
253
|
+
|
|
254
|
+
// #region x axis
|
|
255
|
+
this.xAxis.transition().delay(() => resizeUpdate ? 0 : delay).duration(duration).attr('transform', `translate(0, ${yScale(0)})`).call(d3.axisBottom().scale(xScale).tickPadding(height - yScale(0) + minBarHeight));
|
|
256
|
+
// #endregion x axis
|
|
257
|
+
|
|
258
|
+
// #region y axis
|
|
259
|
+
this.yAxis.transition().duration(duration).attr('transform', `translate(${width}, 0)`).call(d3.axisRight().scale(yScale).ticks(4));
|
|
260
|
+
// #endregion y axis
|
|
261
|
+
|
|
262
|
+
// #region bar measures functions
|
|
263
|
+
const gainBarY = d => d.gain < 0 ? yScale(0) : yScale(d.gain) - minBarHeight;
|
|
264
|
+
const gainBarHeight = d => Math.abs(yScale(0) - yScale(d.gain)) + minBarHeight;
|
|
265
|
+
const profitBarY = d => d.profit < 0 ? yScale(0) + gainBarHeight(d) : yScale(d.profit) - minBarHeight * 2;
|
|
266
|
+
const profitBarHeight = d => Math.abs(yScale(d.gain) - yScale(d.profit)) + minBarHeight;
|
|
267
|
+
|
|
268
|
+
// #endregion bar measures functions
|
|
269
|
+
|
|
270
|
+
const chartContext = this;
|
|
271
|
+
// #region bars
|
|
272
|
+
const barGroups = this.chart.selectAll('.stackedBar').data(data);
|
|
273
|
+
barGroups.each(function bindContext(d, i) {
|
|
274
|
+
d3.select(this).node().chartContext = chartContext;
|
|
275
|
+
d3.select(this).node().xScale = xScale;
|
|
276
|
+
});
|
|
277
|
+
const barGroupsEnter = barGroups.enter().append('g').attr('class', 'stackedBar').attr('transform', `translate(${-hThickness}, 0)`).each(function bindContext(d, i) {
|
|
278
|
+
d3.select(this).node().chartContext = chartContext;
|
|
279
|
+
d3.select(this).node().xScale = xScale;
|
|
280
|
+
}).on('mouseenter', tooltip ? this.onMouseEnter : () => {}).on('mouseleave', tooltip ? this.onMouseLeave : () => {});
|
|
281
|
+
|
|
282
|
+
// #region gainBar
|
|
283
|
+
barGroupsEnter.append('rect').attr('class', 'stackedBar__gain').attr('fill', `url(#${id}-barChart-bluegradient)`).attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', yScale(0)).attr('height', 0).attr('width', 6).transition().delay(() => delay * 4).duration(duration).attr('y', gainBarY).attr('height', gainBarHeight);
|
|
284
|
+
// #endregion gainBar
|
|
285
|
+
|
|
286
|
+
// #region profitBar
|
|
287
|
+
barGroupsEnter.append('rect').attr('class', 'stackedBar__profit').attr('fill', `url(#${id}-barChart-redgradient)`).attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', yScale(0)).attr('height', 0).attr('width', 6).transition().delay(() => delay * 4).duration(duration).attr('y', profitBarY).attr('height', profitBarHeight);
|
|
288
|
+
|
|
289
|
+
// #endregion profitBar
|
|
290
|
+
|
|
291
|
+
barGroupsEnter.append('text').attr('class', 'stackedBar__gainText').attr('fill', '#fff').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', d => gainBarY(d) + gainBarHeight(d) / 2 + textOffsetTop).text(d => `€ ${d.gain}`).attr('opacity', 0);
|
|
292
|
+
barGroupsEnter.append('text').attr('class', 'stackedBar__profitText').attr('fill', '#fff').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', d => profitBarY(d) + profitBarHeight(d) / 2 + textOffsetTop).text(d => `€ ${d.profit}`).attr('opacity', 0);
|
|
293
|
+
|
|
294
|
+
// #endregion bars
|
|
295
|
+
|
|
296
|
+
barGroups.select('.stackedBar__gain').attr('width', 6).transition().delay(() => resizeUpdate ? 0 : delay).duration(duration).attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', gainBarY).attr('height', gainBarHeight);
|
|
297
|
+
barGroups.select('.stackedBar__profit').attr('width', 6).transition().delay(() => resizeUpdate ? 0 : delay).duration(duration).attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', profitBarY).attr('height', profitBarHeight);
|
|
298
|
+
barGroups.select('.stackedBar__gainText').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', d => gainBarY(d) + gainBarHeight(d) / 2 + textOffsetTop).text(d => `€ ${d.gain}`);
|
|
299
|
+
barGroups.select('.stackedBar__profitText').attr('x', (d, i) => xScale(d.year) + xScale.bandwidth() / 2).attr('y', d => profitBarY(d) + profitBarHeight(d) / 2 + textOffsetTop).text(d => `€ ${d.profit}`);
|
|
300
|
+
barGroups.exit().remove();
|
|
301
|
+
};
|
|
302
|
+
render() {
|
|
303
|
+
const {
|
|
304
|
+
tooltipOpen,
|
|
305
|
+
dataIndex
|
|
306
|
+
} = this.state;
|
|
307
|
+
const {
|
|
308
|
+
data
|
|
309
|
+
} = this.props;
|
|
310
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Chart, {
|
|
311
|
+
ref: el => {
|
|
312
|
+
this.chartEl = el;
|
|
313
|
+
}
|
|
314
|
+
}, data[dataIndex] && data[dataIndex].tooltip && /*#__PURE__*/React.createElement(TooltipWrapper, {
|
|
315
|
+
ref: el => {
|
|
316
|
+
this.tooltipEl = el;
|
|
317
|
+
}
|
|
318
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
319
|
+
open: tooltipOpen,
|
|
320
|
+
position: "top",
|
|
321
|
+
animation: "fade",
|
|
322
|
+
html: data[dataIndex].tooltip,
|
|
323
|
+
theme: "light",
|
|
324
|
+
arrow: true,
|
|
325
|
+
duration: 200
|
|
326
|
+
}))), /*#__PURE__*/React.createElement(LegendWrapper, {
|
|
327
|
+
noPaddingHorizontal: true
|
|
328
|
+
}, /*#__PURE__*/React.createElement(BarChartLegend, {
|
|
329
|
+
id: "roi-profit",
|
|
330
|
+
label: "Cumulative profit payouts",
|
|
331
|
+
colorTheme: "blue"
|
|
332
|
+
}), /*#__PURE__*/React.createElement(BarChartLegend, {
|
|
333
|
+
id: "roi-gain",
|
|
334
|
+
label: "Gain on price",
|
|
335
|
+
colorTheme: "red"
|
|
336
|
+
})));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
ROIChart.propTypes = {
|
|
340
|
+
id: PropTypes.string.isRequired,
|
|
341
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
342
|
+
year: PropTypes.string.isRequired,
|
|
343
|
+
profit: PropTypes.number.isRequired,
|
|
344
|
+
gain: PropTypes.number.isRequired,
|
|
345
|
+
tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
346
|
+
})).isRequired
|
|
347
|
+
};
|
|
348
|
+
export default ROIChart;
|