@stokr/components-library 2.3.58-beta.6 → 2.3.58-beta.8
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 +3 -3
- package/dist/api/auth.js +16 -53
- package/dist/api/fetchData.js +26 -66
- package/dist/api/fetchDataPublic.js +20 -57
- package/dist/components/2FA/Connect2FA.js +10 -11
- package/dist/components/2FA/EnterCode.js +32 -30
- package/dist/components/2FA/EnterCode.stories.js +4 -8
- package/dist/components/2FA/InstallAuthApp.js +8 -9
- package/dist/components/2FA/ResetCode.js +11 -12
- package/dist/components/2FA/Sucess2FA.js +12 -16
- package/dist/components/2FA/disable-2fa-flow.js +53 -104
- package/dist/components/2FA/disable-2fa-flow.stories.js +4 -8
- package/dist/components/2FA/enable-2fa-flow.js +73 -144
- package/dist/components/2FA/enable-2fa-flow.stories.js +4 -8
- package/dist/components/2FA/index.js +9 -9
- package/dist/components/2FA/login-with-otp-flow.js +126 -206
- package/dist/components/2FA/login-with-otp-flow.stories.js +4 -8
- package/dist/components/2FA/main-flow.js +70 -144
- package/dist/components/2FA/main-flow.stories.js +4 -8
- package/dist/components/AccountBalance/AccountBalance.js +14 -13
- package/dist/components/AccountBalance/AccountBalance.stories.js +6 -12
- package/dist/components/AccountBalance/AccountBalance.styles.js +9 -17
- package/dist/components/AdminDashboard/Table/ReactTable.js +77 -84
- package/dist/components/AdminDashboard/Table/ReactTable.stories.js +87 -63
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +24 -30
- package/dist/components/AdminDashboard/Table/Table.js +88 -123
- package/dist/components/AdminDashboard/Table/Table.styles.js +28 -90
- package/dist/components/AgreementItem/AgreementItem.js +10 -11
- package/dist/components/AgreementItem/AgreementItem.stories.js +5 -10
- package/dist/components/AgreementItem/AgreementItem.styles.js +8 -12
- package/dist/components/AnalyticGraphs/Analytic.js +504 -743
- package/dist/components/AnalyticGraphs/Analytic.styles.js +14 -26
- package/dist/components/BackButton/BackButton.js +9 -10
- package/dist/components/BackButton/BackButton.stories.js +4 -8
- package/dist/components/BackButton/BackButton.styles.js +13 -51
- package/dist/components/Background/Background.js +12 -11
- package/dist/components/Background/Background.stories.js +8 -14
- package/dist/components/Background/Background.styles.js +17 -33
- package/dist/components/BarChart/BarChart.js +138 -181
- package/dist/components/BarChart/BarChart.stories.js +5 -10
- package/dist/components/BarChart/BarChart.styles.js +8 -15
- package/dist/components/BarChartLegend/BarChartLegend.js +40 -67
- package/dist/components/BarChartLegend/BarChartLegend.styles.js +5 -10
- package/dist/components/BasicTable/BasicTable.js +12 -13
- package/dist/components/BasicTable/BasicTable.stories.js +5 -10
- package/dist/components/BasicTable/BasicTable.styles.js +11 -27
- package/dist/components/BlogPost/BlogPost.js +34 -53
- package/dist/components/BlogPost/BlogPost.stories.js +33 -46
- package/dist/components/BlogPost/BlogPost.styles.js +67 -59
- package/dist/components/Button/Button-stoDetails.js +150 -129
- package/dist/components/Button/Button.stories.js +27 -44
- package/dist/components/Button/Button.styles.js +24 -62
- package/dist/components/Button/GlareButton.js +61 -89
- package/dist/components/Button/GlareButton.stories.js +19 -29
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +5 -10
- package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +4 -8
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +9 -10
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +8 -17
- package/dist/components/Card/Card.styles.js +14 -41
- package/dist/components/ChartBox/ChartBox.js +5 -8
- package/dist/components/ChartBox/ChartBox.stories.js +3 -6
- package/dist/components/ChartBox/ChartBox.styles.js +8 -14
- package/dist/components/ChartBox/ChartBoxDistribution.js +5 -8
- package/dist/components/ChartBox/ChartBoxDistribution.stories.js +3 -6
- package/dist/components/ChartLegend/ChartLegend.js +30 -46
- package/dist/components/ChartLegend/ChartLegend.stories.js +22 -28
- package/dist/components/ChartLegend/ChartLegend.styles.js +16 -41
- package/dist/components/Checkbox/Checkbox.js +32 -32
- package/dist/components/Checkbox/Checkbox.stories.js +5 -10
- package/dist/components/Checkbox/Checkbox.styles.js +10 -23
- package/dist/components/Checklist/ChecklistCard.js +33 -35
- package/dist/components/Checklist/ChecklistCard.stories.js +77 -100
- package/dist/components/Checklist/ChecklistCard.styles.js +12 -15
- package/dist/components/Chips/Chip.js +14 -13
- package/dist/components/Chips/Chip.stories.js +10 -19
- package/dist/components/Chips/Chip.styles.js +14 -14
- package/dist/components/Chips/ChipWrapper.js +23 -41
- package/dist/components/Chips/ChipsWrapper.stories.js +9 -17
- package/dist/components/ComponentScroll/ComponentScroll.js +25 -34
- package/dist/components/ComponentScroll/ComponentScroll.stories.js +16 -23
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +22 -47
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +7 -61
- package/dist/components/CryptoAddress/ComponentWrap.js +10 -11
- package/dist/components/CryptoAddress/CryptoAddress.js +51 -68
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +7 -13
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +55 -124
- package/dist/components/CryptoAddress/RadioWrap.js +9 -10
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +24 -25
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +5 -10
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +12 -42
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +10 -9
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +16 -27
- package/dist/components/DonutChart/DonutChart.js +101 -130
- package/dist/components/DonutChart/DonutChart.stories.js +4 -8
- package/dist/components/DonutChart/DonutChart.styles.js +15 -27
- package/dist/components/DoubleButton/DoubleButton.styles.js +8 -8
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +3 -5
- package/dist/components/FAQ/FAQ.js +29 -45
- package/dist/components/FAQ/FAQ.stories.js +4 -9
- package/dist/components/FAQ/FAQ.styles.js +23 -39
- package/dist/components/Footer/Footer.js +9 -10
- package/dist/components/Footer/Footer.stories.js +6 -12
- package/dist/components/Footer/Footer.styles.js +22 -46
- package/dist/components/Footer/FooterLayout.js +16 -20
- package/dist/components/Footer/FooterLayout.stories.js +4 -8
- package/dist/components/Footer/FooterMenu.js +61 -83
- package/dist/components/Footer/FooterMenu.stories.js +4 -8
- package/dist/components/Footer/FooterMenu.styles.js +16 -39
- package/dist/components/Footer/index.js +4 -4
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +92 -114
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +4 -8
- package/dist/components/Form/Form.js +15 -14
- package/dist/components/Form/Form.stories.js +4 -8
- package/dist/components/Form/Form.styles.js +16 -36
- package/dist/components/FullscreenCard/FullscreenCard.styles.js +7 -12
- package/dist/components/Grid/Grid.styles.js +17 -68
- package/dist/components/Header/Header.js +98 -163
- package/dist/components/Header/Header.stories.js +17 -28
- package/dist/components/Header/Header.styles.js +61 -124
- package/dist/components/HeroBlock/HeroVideoBlock.js +20 -25
- package/dist/components/Icon/Icon.style.js +10 -22
- package/dist/components/Icon/Icon2.js +11 -13
- package/dist/components/InfoIcon/InfoIcon.js +18 -17
- package/dist/components/InfoIcon/InfoIcon.stories.js +5 -10
- package/dist/components/InfoIcon/InfoIcon.styles.js +5 -21
- package/dist/components/InfoPanel/InfoPanel.js +26 -48
- package/dist/components/Input/DatePickerInput.js +21 -33
- package/dist/components/Input/DatePickerInput.stories.js +5 -10
- package/dist/components/Input/DatePickerInput.styles.js +5 -19
- package/dist/components/Input/Input.js +43 -51
- package/dist/components/Input/Input.stories.js +9 -16
- package/dist/components/Input/Input.styles.js +8 -43
- package/dist/components/Input/InputPassword.js +30 -50
- package/dist/components/Input/InputPassword.stories.js +6 -12
- package/dist/components/Input/InputPassword.styles.js +30 -57
- package/dist/components/Input/InputUsername.js +83 -102
- package/dist/components/Input/InputWithButton.js +20 -19
- package/dist/components/Input/InputWithButton.stories.js +5 -9
- package/dist/components/Input/InputWithButton.styles.js +7 -19
- package/dist/components/Input/OtpInput.js +27 -42
- package/dist/components/Input/OtpInput.stories.js +5 -11
- package/dist/components/Input/RangeInput.js +29 -25
- package/dist/components/Input/RangeInput.stories.js +4 -8
- package/dist/components/Input/RangeInput.styles.js +15 -42
- package/dist/components/Input/Select.js +68 -89
- package/dist/components/Input/Select.stories.js +6 -12
- package/dist/components/Input/Select.styles.js +12 -32
- package/dist/components/InvestCalculator/InvestCalculator.js +245 -243
- package/dist/components/InvestCalculator/InvestCalculator.stories.js +18 -21
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +14 -33
- package/dist/components/InvestmentStat/InvestmentStat.js +11 -10
- package/dist/components/InvestmentStat/InvestmentStat.stories.js +5 -10
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +12 -24
- package/dist/components/KYCFlow/BasicInfo.js +419 -460
- package/dist/components/KYCFlow/Confirmation.js +12 -17
- package/dist/components/KYCFlow/DocumentFileUpload.js +214 -227
- package/dist/components/KYCFlow/DocumentScan.js +16 -15
- package/dist/components/KYCFlow/DocumentScanUpload.js +203 -210
- package/dist/components/KYCFlow/DocumentSelect.js +87 -117
- package/dist/components/KYCFlow/DocumentSuccess.js +14 -15
- package/dist/components/KYCFlow/DocumentUpload.js +10 -11
- package/dist/components/KYCFlow/DocumentVerificationType.js +98 -128
- package/dist/components/KYCFlow/FaceScan.js +10 -11
- package/dist/components/KYCFlow/FaceScanRecognition.js +14 -13
- package/dist/components/KYCFlow/FaceScanSuccess.js +10 -13
- package/dist/components/KYCFlow/Terms.js +90 -113
- package/dist/components/KYCFlow/_styles.js +37 -86
- package/dist/components/KYCFlow/index.js +14 -14
- package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +7 -19
- package/dist/components/LatestUpdate/LatestUpdate.js +12 -11
- package/dist/components/LatestUpdate/LatestUpdate.stories.js +5 -10
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +15 -28
- package/dist/components/Layout/Layout-func-no-work.js +24 -24
- package/dist/components/Layout/Layout.js +47 -68
- package/dist/components/Layout/Layout.stories.js +5 -12
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +13 -12
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +5 -10
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +10 -22
- package/dist/components/LearnMorePage/LearnMore.js +134 -174
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +7 -22
- package/dist/components/LearnMorePage/LearnMore.stories.js +4 -8
- package/dist/components/LearnMorePage/LearnMore.styles.js +24 -74
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +3 -5
- package/dist/components/LearnMorePage/LearnMoreItem.js +11 -16
- package/dist/components/LearnMorePage/LearnMoreItem.stories.js +4 -8
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +18 -54
- package/dist/components/LearnMoreSection/LearnMore.js +119 -158
- package/dist/components/LearnMoreSection/LearnMore.stories.js +4 -8
- package/dist/components/LearnMoreSection/LearnMore.styles.js +15 -41
- package/dist/components/LearnMoreSection/LearnMoreItem.js +14 -15
- package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +4 -8
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +9 -23
- package/dist/components/LoginModal/LoginModal.js +35 -41
- package/dist/components/LoginModal/LoginModal.stories.js +8 -12
- package/dist/components/MainMenu/DynamicMainMenu.js +11 -14
- package/dist/components/MainMenu/MainMenu.js +157 -190
- package/dist/components/MainMenu/MainMenu.styles.js +48 -89
- package/dist/components/MatomoConnect/Matomo.js +201 -463
- package/dist/components/MenuNav/MenuNav.styles.js +5 -9
- package/dist/components/Modal/Modal.js +46 -48
- package/dist/components/Modal/Modal.stories.js +8 -16
- package/dist/components/Modal/Modal.styles.js +34 -96
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +69 -95
- package/dist/components/Modal/NewVentureModal/NewVentureModal.stories.js +22 -43
- package/dist/components/Modal/PaymentModal.js +43 -54
- package/dist/components/Modal/PaymentModal.stories.js +4 -8
- package/dist/components/MultiProgressBar/MultiProgressBar.js +19 -23
- package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +6 -12
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +9 -22
- package/dist/components/Newsletter/Newsletter.js +65 -100
- package/dist/components/Newsletter/Newsletter.stories.js +4 -8
- package/dist/components/Newsletter/Newsletter.styles.js +47 -44
- package/dist/components/NotificationContext/NotificationContext.js +93 -125
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +4 -16
- package/dist/components/Number/Number.js +13 -10
- package/dist/components/Number/Number.stories.js +23 -41
- package/dist/components/Number/Number.styles.js +4 -10
- package/dist/components/PageTransition/PageTransition.js +16 -19
- package/dist/components/Pagination/Pagination.js +22 -25
- package/dist/components/Pagination/Pagination.stories.js +29 -36
- package/dist/components/Pagination/Pagination.styles.js +8 -15
- package/dist/components/Pagination/PaginationControls.js +32 -36
- package/dist/components/Pagination/PaginationControls.stories.js +33 -62
- package/dist/components/Pagination/usePagination.js +29 -37
- package/dist/components/Process/Process.stories.js +6 -12
- package/dist/components/Process/Process.styles.js +6 -16
- package/dist/components/ProfileBadge/ProfileBadge.js +12 -11
- package/dist/components/ProfileBadge/ProfileBadge.stories.js +5 -9
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +13 -19
- package/dist/components/ProfileBox/ProfileBox.js +15 -17
- package/dist/components/ProfileBox/ProfileBox.stories.js +5 -9
- package/dist/components/ProfileBox/ProfileBox.styles.js +9 -21
- package/dist/components/ProfileHeader/ProfileHeader.js +163 -199
- package/dist/components/ProfileHeader/ProfileHeader.styles.js +24 -46
- package/dist/components/ProfileStat/ProfileStat.js +12 -11
- package/dist/components/ProfileStat/ProfileStat.stories.js +6 -12
- package/dist/components/ProfileStat/ProfileStat.styles.js +9 -23
- package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +20 -36
- package/dist/components/QRCode/QRCode.js +30 -30
- package/dist/components/QRCode/QRCode.stories.js +14 -26
- package/dist/components/ROI/ROI.js +225 -261
- package/dist/components/ROI/ROI.styles.js +13 -25
- package/dist/components/ROI/ROIChart.js +196 -303
- package/dist/components/ROI/ROIChart.styles.js +7 -11
- package/dist/components/ROI/ROIModal.js +13 -20
- package/dist/components/ROI/ROIParkingo.js +208 -244
- package/dist/components/ROI/ROIPixelmatic.js +209 -245
- package/dist/components/ROI/ROIScenarioBox.js +9 -8
- package/dist/components/ROI/ROIScenarioBox.styles.js +10 -33
- package/dist/components/Radio/Radio.js +19 -18
- package/dist/components/Radio/Radio.stories.js +4 -8
- package/dist/components/Radio/Radio.styles.js +5 -14
- package/dist/components/RefreshButton/RefreshButton.js +6 -5
- package/dist/components/RefreshButton/RefreshButton.stories.js +5 -10
- package/dist/components/RefreshButton/RefreshButton.styles.js +9 -24
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +17 -18
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +5 -9
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +3 -4
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.js +46 -70
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +10 -22
- package/dist/components/RegisterLiquidSteps/complete.js +4 -5
- package/dist/components/RegisterLiquidSteps/flow.js +53 -99
- package/dist/components/RegisterLiquidSteps/index.js +7 -22
- package/dist/components/RegisterLiquidSteps/register-liquid.js +62 -102
- package/dist/components/RegisterModal/RegisterModal.js +82 -118
- package/dist/components/RegisterModal/RegisterModal.stories.js +5 -9
- package/dist/components/RequestDataBox/RequestDataBox.js +9 -8
- package/dist/components/RequestDataBox/RequestDataBox.stories.js +4 -8
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +7 -12
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +10 -11
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +3 -4
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +29 -28
- package/dist/components/SEO/SEO.js +11 -10
- package/dist/components/SEO/SEO.stories.js +4 -8
- package/dist/components/SectionTitle/SectionTitle.styles.js +3 -5
- package/dist/components/ShareButton/ShareButton.js +132 -145
- package/dist/components/SideLine/SideLine.js +3 -6
- package/dist/components/SideLine/SideLine.stories.js +3 -6
- package/dist/components/SideLine/SideLine.styles.js +6 -12
- package/dist/components/SigningSubflow/SignSubIntro.js +9 -8
- package/dist/components/SigningSubflow/_styles.js +9 -20
- package/dist/components/SigningSubflow/index.js +5 -5
- package/dist/components/Slider/Slider.js +16 -16
- package/dist/components/Slider/Slider.stories.js +5 -10
- package/dist/components/Slider/Slider.styles.js +5 -8
- package/dist/components/SpanButton/SpanButton.styles.js +3 -6
- package/dist/components/StatusBadge/StatusBadge.styles.js +4 -10
- package/dist/components/StepController/StepController.js +49 -74
- package/dist/components/StepController/StepController.stories.js +4 -8
- package/dist/components/StepController/StepController.styles.js +6 -12
- package/dist/components/StepController/StepControllerContext.js +46 -68
- package/dist/components/StepController/StepControllerProgress.js +16 -19
- package/dist/components/StepController/StepControllerProgress.stories.js +4 -8
- package/dist/components/StepsProgress/StepsProgress.js +44 -58
- package/dist/components/StepsProgress/StepsProgress.stories.js +33 -35
- package/dist/components/StepsProgress/StepsProgress.styles.js +7 -15
- package/dist/components/StokrLoader/StokrLoader.js +20 -23
- package/dist/components/StokrLoader/media.js +5 -7
- package/dist/components/SvgIcons/AdminBadgeSvg.js +16 -19
- package/dist/components/SvgIcons/CameraSvg.js +26 -29
- package/dist/components/SvgIcons/CapsLockSvg.js +21 -24
- package/dist/components/SvgIcons/DocumentBackSvg.js +25 -28
- package/dist/components/SvgIcons/DocumentSmallSvg.js +51 -54
- package/dist/components/SvgIcons/DocumentSvg.js +28 -31
- package/dist/components/SvgIcons/Early.js +14 -17
- package/dist/components/SvgIcons/EthSvg.js +30 -33
- package/dist/components/SvgIcons/EurSvg.js +16 -19
- package/dist/components/SvgIcons/FaceScanIconSvg.js +21 -24
- package/dist/components/SvgIcons/FourSvg.js +11 -14
- package/dist/components/SvgIcons/Glassess.js +19 -22
- package/dist/components/SvgIcons/LogoSvg.js +14 -17
- package/dist/components/SvgIcons/OneSvg.js +13 -16
- package/dist/components/SvgIcons/PassportSvg.js +46 -49
- package/dist/components/SvgIcons/RefreshSvg.js +17 -20
- package/dist/components/SvgIcons/SocialFacebook.js +20 -23
- package/dist/components/SvgIcons/SocialInstagram.js +11 -14
- package/dist/components/SvgIcons/SocialLinkedIn.js +25 -28
- package/dist/components/SvgIcons/SocialMedium.js +15 -18
- package/dist/components/SvgIcons/SocialReddit.js +15 -18
- package/dist/components/SvgIcons/SocialTelegram.js +49 -52
- package/dist/components/SvgIcons/SocialTwitter.js +44 -47
- package/dist/components/SvgIcons/SocialYoutube.js +15 -18
- package/dist/components/SvgIcons/ThreeSvg.js +10 -13
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +72 -75
- package/dist/components/SvgIcons/TwoSvg.js +13 -16
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +19 -22
- package/dist/components/SvgIcons/UpdateHardSvg.js +15 -18
- package/dist/components/SvgIcons/UpdateSoftSvg.js +17 -20
- package/dist/components/SvgIcons/UploadSvg.js +24 -27
- package/dist/components/SvgIcons/VerifiedBadge.js +13 -16
- package/dist/components/SvgIcons/index.js +32 -32
- package/dist/components/Switch/Switch.js +23 -37
- package/dist/components/Switch/Switch.stories.js +8 -14
- package/dist/components/Switch/Switch.styles.js +8 -33
- package/dist/components/Tabs/Tabs.js +19 -21
- package/dist/components/Tabs/Tabs.stories.js +4 -8
- package/dist/components/Tabs/Tabs.styles.js +4 -6
- package/dist/components/TabsNav/TabNav.js +14 -13
- package/dist/components/TabsNav/TabNav.stories.js +5 -10
- package/dist/components/TabsNav/TabsNav.js +14 -14
- package/dist/components/TabsNav/TabsNav.stories.js +4 -8
- package/dist/components/TabsNav/TabsNav.styles.js +10 -25
- package/dist/components/TeamOverview/TeamOverview.js +38 -84
- package/dist/components/TeamOverview/TeamOverview.stories.js +5 -10
- package/dist/components/TeamOverview/TeamOverview.styles.js +18 -35
- package/dist/components/TermsModal/TermsModal.js +49 -79
- package/dist/components/TermsModal/TermsModal.stories.js +4 -8
- package/dist/components/TermsModal/_styles.js +35 -100
- package/dist/components/Text/Headline.js +15 -14
- package/dist/components/Text/Headline.stories.js +4 -8
- package/dist/components/Text/StyledText.js +5 -8
- package/dist/components/Text/Text.stories.js +5 -10
- package/dist/components/Text/Text.styles.js +15 -37
- package/dist/components/TextLink/TextLink.styles.js +6 -17
- package/dist/components/ToDoList/ToDoList.js +76 -85
- package/dist/components/ToDoList/ToDoList.stories.js +7 -14
- package/dist/components/ToDoList/ToDoList.styles.js +34 -43
- package/dist/components/ToDoList/ToDoListTask.js +22 -35
- package/dist/components/ToDoList/ToDoListTask.stories.js +5 -10
- package/dist/components/ToDoList/ToDoListTask.styles.js +13 -40
- package/dist/components/TransactionDetails/TransactionDetails.js +9 -19
- package/dist/components/TransactionDetails/TransactionDetails.stories.js +5 -10
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +6 -15
- package/dist/components/TransactionInfo/TransactionInfo.js +18 -17
- package/dist/components/TransactionInfo/TransactionInfo.stories.js +4 -8
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +10 -31
- package/dist/components/TwoFactorModal/TwoFactorModal.js +72 -94
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +49 -48
- package/dist/components/VerifyEmailModal/VerifyEmailModal.stories.js +6 -11
- package/dist/components/breakdown/Breakdown.js +38 -36
- package/dist/components/breakdown/index.js +3 -5
- package/dist/components/headerHo/HeaderHo.js +585 -769
- package/dist/components/headerHo/HeaderHo.stories.js +9 -13
- package/dist/components/headerHo/index.js +3 -5
- package/dist/components/icons/Arrow.js +43 -46
- package/dist/components/icons/Arrow.stories.js +7 -14
- package/dist/components/icons/ArrowSimple.js +32 -35
- package/dist/components/icons/ArrowSimple.stories.js +7 -14
- package/dist/components/icons/Check.js +28 -31
- package/dist/components/icons/Check.stories.js +3 -6
- package/dist/components/icons/Facebook.js +11 -14
- package/dist/components/icons/Facebook.stories.js +3 -6
- package/dist/components/icons/Info.js +40 -43
- package/dist/components/icons/Info.stories.js +3 -6
- package/dist/components/icons/Instagram.js +11 -14
- package/dist/components/icons/Instagram.stories.js +3 -6
- package/dist/components/icons/LinkIcon.js +19 -22
- package/dist/components/icons/LinkIcon.stories.js +3 -6
- package/dist/components/icons/LinkedIn.js +28 -31
- package/dist/components/icons/LinkedIn.stories.js +3 -6
- package/dist/components/icons/Medium.js +27 -30
- package/dist/components/icons/Medium.stories.js +3 -6
- package/dist/components/icons/Reddit.js +17 -20
- package/dist/components/icons/Reddit.stories.js +3 -6
- package/dist/components/icons/Share.js +47 -50
- package/dist/components/icons/Share.stories.js +3 -6
- package/dist/components/icons/Telegram.js +27 -30
- package/dist/components/icons/Telegram.stories.js +3 -6
- package/dist/components/icons/Twitter.js +11 -14
- package/dist/components/icons/Twitter.stories.js +3 -6
- package/dist/components/icons/X.js +11 -14
- package/dist/components/icons/X.stories.js +3 -6
- package/dist/components/icons/Youtube.js +11 -14
- package/dist/components/icons/Youtube.stories.js +3 -6
- package/dist/components/icons/index.js +15 -15
- package/dist/components/landing-page/List.js +3 -5
- package/dist/components/landing-page/PageContent.js +5 -7
- package/dist/components/landing-page/PageText.js +12 -16
- package/dist/components/landing-page/PageTitle.js +16 -47
- package/dist/components/logo/Logo.js +49 -71
- package/dist/components/logo/index.js +3 -5
- package/dist/components/renderToBody/index.js +3 -5
- package/dist/components/renderToBody/renderToBody.js +39 -60
- package/dist/components/taxId/TaxId.stories.js +11 -16
- package/dist/components/taxId/complete.js +9 -11
- package/dist/components/taxId/flow.js +22 -34
- package/dist/components/taxId/index.js +4 -4
- package/dist/components/taxId/register-taxid.js +54 -92
- package/dist/components/video/Video.js +69 -84
- package/dist/components/video/Video.stories.js +5 -9
- package/dist/components/video/index.js +3 -5
- package/dist/constants/globalVariables.js +10 -20
- package/dist/constants/style.js +23 -46
- package/dist/context/Auth.js +247 -340
- package/dist/context/AuthContext.js +545 -1023
- package/dist/context/Checkbox/CheckboxContext.js +65 -117
- package/dist/firebase-config.js +4 -6
- package/dist/hooks/useNewVentureForm.js +128 -193
- package/dist/hooks/useTimer.js +29 -51
- package/dist/index.js +134 -134
- package/dist/model/axios.js +4 -6
- package/dist/model/axiosPublic.js +4 -6
- package/dist/services/TimerService.js +70 -89
- package/dist/static/images/copy_icon.svg +4 -0
- package/dist/styles/colors.js +2 -4
- package/dist/styles/fonts.js +3 -4
- package/dist/styles/global.js +3 -4
- package/dist/styles/grid.js +4 -5
- package/dist/styles/reactTippy.js +3 -4
- package/dist/styles/rwd.js +12 -26
- package/dist/styles/semanticUi.js +3 -4
- package/dist/styles/spacing.js +2 -3
- package/dist/styles/theme.js +6 -9
- package/dist/utils/allowed-countries-list.js +2 -3
- package/dist/utils/analytics.js +32 -48
- package/dist/utils/check-sale-time-left.js +37 -39
- package/dist/utils/check-todo-status.js +3 -4
- package/dist/utils/checklistGenerator.js +46 -46
- package/dist/utils/copyToClipboard.js +65 -131
- package/dist/utils/countries-list.js +2 -3
- package/dist/utils/customHooks.js +40 -67
- package/dist/utils/delete-redirect-cookie-and-navigate.js +3 -3
- package/dist/utils/fix-decimals.js +4 -5
- package/dist/utils/formatCurrencyValue.js +41 -52
- package/dist/utils/get-cookie-domain.js +3 -4
- package/dist/utils/get-short-address.js +1 -3
- package/dist/utils/isUSInvestor.js +2 -4
- package/dist/utils/km_ify.js +3 -3
- package/dist/utils/lock-body.js +3 -5
- package/dist/utils/moment.js +10 -12
- package/dist/utils/redirect-url.js +2 -3
- package/dist/utils/saveAs.js +5 -5
- package/dist/utils/scrollUtils.js +33 -36
- package/dist/utils/set-redirect-cookie.js +6 -7
- package/dist/utils/withRouter.js +6 -6
- package/package.json +134 -141
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,108 +10,103 @@ var _reactTable = require("react-table");
|
|
|
11
10
|
var _Table = require("./Table.styles");
|
|
12
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
12
|
var _PaginationControls = _interopRequireDefault(require("../../Pagination/PaginationControls"));
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
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; }
|
|
19
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; }
|
|
20
|
-
function _defineProperty(
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
23
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
24
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
27
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
28
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
21
|
function ReactTable(props) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
const {
|
|
23
|
+
columns,
|
|
24
|
+
data,
|
|
25
|
+
subColumns,
|
|
26
|
+
blue,
|
|
27
|
+
noPagination,
|
|
28
|
+
withSubTable,
|
|
29
|
+
isSubTable,
|
|
30
|
+
customTdStyles,
|
|
31
|
+
customThStyles,
|
|
32
|
+
customRowHoverStyles,
|
|
33
|
+
customRowHoverContent,
|
|
34
|
+
customRowStyles,
|
|
35
|
+
customTableStyles,
|
|
36
|
+
//instead of passing the subData, we pass a function that will calculate the subData
|
|
37
|
+
//subData must be part of the data array (an array or whatever)
|
|
38
|
+
//calculateSubData is a function that receives the row and returns the subData
|
|
39
|
+
//it is used only when the row is expanded
|
|
40
|
+
calculateSubData
|
|
41
|
+
} = props;
|
|
42
42
|
|
|
43
43
|
// State to track which row is being hovered
|
|
44
|
-
|
|
45
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
-
hoveredRowIndex = _useState2[0],
|
|
47
|
-
setHoveredRowIndex = _useState2[1];
|
|
44
|
+
const [hoveredRowIndex, setHoveredRowIndex] = (0, _react.useState)(null);
|
|
48
45
|
|
|
49
46
|
// Use the state and functions returned from useTable to build UI
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
_react.default.useEffect(
|
|
47
|
+
const {
|
|
48
|
+
getTableProps,
|
|
49
|
+
getTableBodyProps,
|
|
50
|
+
headerGroups,
|
|
51
|
+
prepareRow,
|
|
52
|
+
visibleColumns,
|
|
53
|
+
page,
|
|
54
|
+
// page contains only the rows for the active page
|
|
55
|
+
gotoPage,
|
|
56
|
+
setPageSize,
|
|
57
|
+
state: {
|
|
58
|
+
pageIndex,
|
|
59
|
+
pageSize
|
|
60
|
+
}
|
|
61
|
+
} = (0, _reactTable.useTable)({
|
|
62
|
+
columns,
|
|
63
|
+
data,
|
|
64
|
+
initialState: {
|
|
65
|
+
pageIndex: 0,
|
|
66
|
+
pageSize: isSubTable ? 10000 : 10
|
|
67
|
+
}
|
|
68
|
+
}, _reactTable.useExpanded, _reactTable.usePagination);
|
|
69
|
+
const [inputPageSize, setInputPageSize] = (0, _react.useState)(isSubTable ? 10000 : 10);
|
|
70
|
+
_react.default.useEffect(() => {
|
|
74
71
|
setInputPageSize(pageSize);
|
|
75
72
|
}, [pageSize]);
|
|
76
73
|
|
|
77
74
|
// Function to render cell content with hover support
|
|
78
|
-
|
|
75
|
+
const renderCellContent = (cell, rowIndex, rowData) => {
|
|
79
76
|
if (customRowHoverContent && hoveredRowIndex === rowIndex) {
|
|
80
|
-
|
|
77
|
+
const hoverContent = customRowHoverContent(cell.column.id, rowIndex, rowData);
|
|
81
78
|
if (hoverContent !== undefined) {
|
|
82
79
|
return hoverContent;
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
return cell.render('Cell');
|
|
86
83
|
};
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(_Table.Styles, null, /*#__PURE__*/_react.default.createElement(_Table.TableWrap, null, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}));
|
|
100
|
-
})), /*#__PURE__*/_react.default.createElement("tbody", getTableBodyProps(), page.map(
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_Table.Styles, null, /*#__PURE__*/_react.default.createElement(_Table.TableWrap, null, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable, _extends({}, getTableProps(), {
|
|
85
|
+
customTableStyles: customTableStyles
|
|
86
|
+
}), /*#__PURE__*/_react.default.createElement("thead", null, headerGroups.map(headerGroup => /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Tr, headerGroup.getHeaderGroupProps(), headerGroup.headers.map(column => {
|
|
87
|
+
const cellStyles = customThStyles ? customThStyles(column) : {};
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Th, _extends({}, column.getHeaderProps({
|
|
89
|
+
className: column.collapse ? 'collapse' : '',
|
|
90
|
+
style: _objectSpread({}, cellStyles)
|
|
91
|
+
}), {
|
|
92
|
+
blue: blue,
|
|
93
|
+
width: column.width,
|
|
94
|
+
minWidth: column.minWidth,
|
|
95
|
+
maxWidth: column.maxWidth
|
|
96
|
+
}), column.render('Header'));
|
|
97
|
+
})))), /*#__PURE__*/_react.default.createElement("tbody", getTableBodyProps(), page.map((row, i) => {
|
|
101
98
|
prepareRow(row);
|
|
102
99
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
103
100
|
key: row.id
|
|
104
101
|
}, /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Tr, _extends({}, row.getRowProps(), {
|
|
105
102
|
customRowHoverStyles: customRowHoverStyles,
|
|
103
|
+
customRowStyles: customRowStyles,
|
|
106
104
|
rowIndex: i,
|
|
107
105
|
rowData: row.original,
|
|
108
|
-
onMouseEnter:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return setHoveredRowIndex(null);
|
|
113
|
-
}
|
|
114
|
-
}), row.cells.map(function (cell) {
|
|
115
|
-
var cellStyles = customTdStyles ? customTdStyles(i, row.original) : {};
|
|
106
|
+
onMouseEnter: () => setHoveredRowIndex(i),
|
|
107
|
+
onMouseLeave: () => setHoveredRowIndex(null)
|
|
108
|
+
}), row.cells.map(cell => {
|
|
109
|
+
const cellStyles = customTdStyles ? customTdStyles(i, row.original, cell.column) : {};
|
|
116
110
|
return /*#__PURE__*/_react.default.createElement(_Table.StyledReactTable.Td, _extends({}, cell.row.getToggleRowExpandedProps(), {
|
|
117
111
|
title: ""
|
|
118
112
|
}, cell.getCellProps({
|
|
@@ -139,9 +133,7 @@ function ReactTable(props) {
|
|
|
139
133
|
currentPage: pageIndex + 1,
|
|
140
134
|
totalCount: data.length,
|
|
141
135
|
pageSize: pageSize,
|
|
142
|
-
onPageChange:
|
|
143
|
-
return gotoPage(page - 1);
|
|
144
|
-
},
|
|
136
|
+
onPageChange: page => gotoPage(page - 1),
|
|
145
137
|
inputPageSize: inputPageSize,
|
|
146
138
|
setInputPageSize: setInputPageSize,
|
|
147
139
|
setPageSize: setPageSize
|
|
@@ -157,7 +149,9 @@ ReactTable.propTypes = {
|
|
|
157
149
|
withSubTable: _propTypes.default.bool,
|
|
158
150
|
isSubTable: _propTypes.default.bool,
|
|
159
151
|
customRowHoverStyles: _propTypes.default.func,
|
|
160
|
-
customRowHoverContent: _propTypes.default.func
|
|
152
|
+
customRowHoverContent: _propTypes.default.func,
|
|
153
|
+
customRowStyles: _propTypes.default.func,
|
|
154
|
+
customTableStyles: _propTypes.default.func
|
|
161
155
|
};
|
|
162
156
|
ReactTable.defaultProps = {
|
|
163
157
|
blue: false,
|
|
@@ -165,5 +159,4 @@ ReactTable.defaultProps = {
|
|
|
165
159
|
withSubTable: false,
|
|
166
160
|
isSubTable: false
|
|
167
161
|
};
|
|
168
|
-
var _default = ReactTable;
|
|
169
|
-
exports.default = _default;
|
|
162
|
+
var _default = exports.default = ReactTable;
|
|
@@ -3,19 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.WrapperWithSubTable = exports.WithoutPagination = exports.WithSubTable = exports.WithStatusBasedHover = exports.WithRowSpecificHover = exports.WithRowHover = exports.WithHoverStylesAndContent = exports.WithHoverContent = exports.WithFixedColumnWidths = exports.WithCustomStyling = exports.DefaultWrapper = exports.Default = exports.BlueWrapper = exports.BlueTable = void 0;
|
|
6
|
+
exports.default = exports.WrapperWithSubTable = exports.WithoutPagination = exports.WithSubTable = exports.WithStatusBasedHover = exports.WithRowSpecificHover = exports.WithRowHover = exports.WithHoverStylesAndContent = exports.WithHoverContent = exports.WithFixedColumnWidths = exports.WithCustomStyling = exports.DefaultWrapper = exports.Default = exports.CustomStyledTable = exports.BoxStyleTable = exports.BlueWrapper = exports.BlueTable = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ReactTable = require("./ReactTable");
|
|
9
9
|
var _ReactTableWrapper = require("./ReactTableWrapper");
|
|
10
10
|
var _global = _interopRequireDefault(require("../../../styles/global"));
|
|
11
|
-
function _interopRequireDefault(
|
|
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); }
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
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
13
|
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 _defineProperty(
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
18
|
-
var _default = {
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
var _default = exports.default = {
|
|
19
18
|
title: 'Components Library/React table',
|
|
20
19
|
component: _ReactTable.ReactTable,
|
|
21
20
|
parameters: {
|
|
@@ -55,8 +54,7 @@ var _default = {
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
}; // Sample columns and data for demonstration
|
|
58
|
-
|
|
59
|
-
var columns = [{
|
|
57
|
+
const columns = [{
|
|
60
58
|
Header: 'ID',
|
|
61
59
|
accessor: 'id',
|
|
62
60
|
width: '10%',
|
|
@@ -77,7 +75,7 @@ var columns = [{
|
|
|
77
75
|
width: '40%',
|
|
78
76
|
minWidth: '120px'
|
|
79
77
|
}];
|
|
80
|
-
|
|
78
|
+
const columnsWrapper = [{
|
|
81
79
|
label: 'ID',
|
|
82
80
|
key: 'id',
|
|
83
81
|
width: '10%',
|
|
@@ -98,21 +96,21 @@ var columnsWrapper = [{
|
|
|
98
96
|
width: '40%',
|
|
99
97
|
minWidth: '120px'
|
|
100
98
|
}];
|
|
101
|
-
|
|
99
|
+
const subColumns = [{
|
|
102
100
|
Header: 'Detail ID',
|
|
103
101
|
accessor: 'detailId'
|
|
104
102
|
}, {
|
|
105
103
|
Header: 'Detail Name',
|
|
106
104
|
accessor: 'detailName'
|
|
107
105
|
}];
|
|
108
|
-
|
|
106
|
+
const subColumnsWrapper = [{
|
|
109
107
|
label: 'Detail ID',
|
|
110
108
|
key: 'detailId'
|
|
111
109
|
}, {
|
|
112
110
|
label: 'Detail Name',
|
|
113
111
|
key: 'detailName'
|
|
114
112
|
}];
|
|
115
|
-
|
|
113
|
+
const data = [{
|
|
116
114
|
id: 1,
|
|
117
115
|
name: 'Alice',
|
|
118
116
|
status: 'Active',
|
|
@@ -147,7 +145,7 @@ var data = [{
|
|
|
147
145
|
}];
|
|
148
146
|
|
|
149
147
|
// Custom styling functions
|
|
150
|
-
|
|
148
|
+
const customTdStyles = (index, row, column) => {
|
|
151
149
|
if (index === 0) {
|
|
152
150
|
return {
|
|
153
151
|
backgroundColor: 'lightblue',
|
|
@@ -167,20 +165,19 @@ var customTdStyles = function customTdStyles(index, row) {
|
|
|
167
165
|
}
|
|
168
166
|
return {}; // default style
|
|
169
167
|
};
|
|
170
|
-
|
|
171
|
-
var customThStyles = function customThStyles(column) {
|
|
168
|
+
const customThStyles = column => {
|
|
172
169
|
return {
|
|
173
170
|
backgroundColor: 'lightblue'
|
|
174
171
|
};
|
|
175
172
|
};
|
|
176
173
|
|
|
177
174
|
// Custom row hover styles function
|
|
178
|
-
|
|
175
|
+
const customRowHoverStyles = (rowIndex, rowData) => {
|
|
179
176
|
return "\n background-color: #f0f8ff !important;\n transform: scale(1.01);\n transition: all 0.2s ease-in-out;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n \n td {\n background-color: #f0f8ff !important;\n border-bottom-color: #0050ca !important;\n }\n ";
|
|
180
177
|
};
|
|
181
178
|
|
|
182
179
|
// Custom row hover content function
|
|
183
|
-
|
|
180
|
+
const customRowHoverContent = (columnId, rowIndex, rowData) => {
|
|
184
181
|
switch (columnId) {
|
|
185
182
|
case 'name':
|
|
186
183
|
// Show underlined link on hover
|
|
@@ -209,9 +206,7 @@ var customRowHoverContent = function customRowHoverContent(columnId, rowIndex, r
|
|
|
209
206
|
borderRadius: '4px',
|
|
210
207
|
cursor: 'pointer'
|
|
211
208
|
},
|
|
212
|
-
onClick:
|
|
213
|
-
return alert("Edit ".concat(rowData.name));
|
|
214
|
-
}
|
|
209
|
+
onClick: () => alert("Edit ".concat(rowData.name))
|
|
215
210
|
}, "Edit"), /*#__PURE__*/_react.default.createElement("button", {
|
|
216
211
|
style: {
|
|
217
212
|
padding: '4px 8px',
|
|
@@ -222,13 +217,11 @@ var customRowHoverContent = function customRowHoverContent(columnId, rowIndex, r
|
|
|
222
217
|
borderRadius: '4px',
|
|
223
218
|
cursor: 'pointer'
|
|
224
219
|
},
|
|
225
|
-
onClick:
|
|
226
|
-
return alert("Delete ".concat(rowData.name));
|
|
227
|
-
}
|
|
220
|
+
onClick: () => alert("Delete ".concat(rowData.name))
|
|
228
221
|
}, "Delete"));
|
|
229
222
|
case 'status':
|
|
230
223
|
// Show status with icon on hover
|
|
231
|
-
|
|
224
|
+
const statusColors = {
|
|
232
225
|
Active: '#28a745',
|
|
233
226
|
Inactive: '#dc3545',
|
|
234
227
|
Pending: '#ffc107'
|
|
@@ -254,7 +247,7 @@ var customRowHoverContent = function customRowHoverContent(columnId, rowIndex, r
|
|
|
254
247
|
};
|
|
255
248
|
|
|
256
249
|
// Status-based hover styles
|
|
257
|
-
|
|
250
|
+
const statusBasedHoverStyles = (rowIndex, rowData) => {
|
|
258
251
|
switch (rowData.status) {
|
|
259
252
|
case 'Active':
|
|
260
253
|
return "\n background-color: #e8f5e8 !important;\n td {\n background-color: #e8f5e8 !important;\n border-bottom-color: #28a745 !important;\n }\n ";
|
|
@@ -268,7 +261,7 @@ var statusBasedHoverStyles = function statusBasedHoverStyles(rowIndex, rowData)
|
|
|
268
261
|
};
|
|
269
262
|
|
|
270
263
|
// Row-specific hover styles (example: different styles for first and last rows)
|
|
271
|
-
|
|
264
|
+
const rowSpecificHoverStyles = (rowIndex, rowData) => {
|
|
272
265
|
// Special styling for first row
|
|
273
266
|
if (rowIndex === 0) {
|
|
274
267
|
return "\n background-color: #e3f2fd !important;\n transform: scale(1.02);\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);\n td {\n background-color: #e3f2fd !important;\n border-bottom-color: #2196f3 !important;\n font-weight: bold;\n }\n ";
|
|
@@ -284,88 +277,71 @@ var rowSpecificHoverStyles = function rowSpecificHoverStyles(rowIndex, rowData)
|
|
|
284
277
|
};
|
|
285
278
|
|
|
286
279
|
// Function to calculate sub data
|
|
287
|
-
|
|
280
|
+
const calculateSubData = row => {
|
|
288
281
|
return row.original.subData || [];
|
|
289
282
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
};
|
|
293
|
-
var TemplateWrapper = function TemplateWrapper(args) {
|
|
294
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTableWrapper.ReactTableWrapper, args));
|
|
295
|
-
};
|
|
296
|
-
var Default = Template.bind({});
|
|
297
|
-
exports.Default = Default;
|
|
283
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTable.ReactTable, args));
|
|
284
|
+
const TemplateWrapper = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTableWrapper.ReactTableWrapper, args));
|
|
285
|
+
const Default = exports.Default = Template.bind({});
|
|
298
286
|
Default.args = {
|
|
299
287
|
columns: columns,
|
|
300
288
|
data: data,
|
|
301
289
|
noPagination: false
|
|
302
290
|
};
|
|
303
|
-
|
|
304
|
-
exports.WithoutPagination = WithoutPagination;
|
|
291
|
+
const WithoutPagination = exports.WithoutPagination = Template.bind({});
|
|
305
292
|
WithoutPagination.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
306
293
|
noPagination: true
|
|
307
294
|
});
|
|
308
|
-
|
|
309
|
-
exports.WithCustomStyling = WithCustomStyling;
|
|
295
|
+
const WithCustomStyling = exports.WithCustomStyling = Template.bind({});
|
|
310
296
|
WithCustomStyling.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
311
297
|
customTdStyles: customTdStyles,
|
|
312
298
|
customThStyles: customThStyles
|
|
313
299
|
});
|
|
314
|
-
|
|
315
|
-
exports.WithRowHover = WithRowHover;
|
|
300
|
+
const WithRowHover = exports.WithRowHover = Template.bind({});
|
|
316
301
|
WithRowHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
317
302
|
customRowHoverStyles: customRowHoverStyles
|
|
318
303
|
});
|
|
319
|
-
|
|
320
|
-
exports.WithHoverContent = WithHoverContent;
|
|
304
|
+
const WithHoverContent = exports.WithHoverContent = Template.bind({});
|
|
321
305
|
WithHoverContent.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
322
306
|
customRowHoverContent: customRowHoverContent
|
|
323
307
|
});
|
|
324
|
-
|
|
325
|
-
exports.WithHoverStylesAndContent = WithHoverStylesAndContent;
|
|
308
|
+
const WithHoverStylesAndContent = exports.WithHoverStylesAndContent = Template.bind({});
|
|
326
309
|
WithHoverStylesAndContent.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
327
310
|
customRowHoverStyles: customRowHoverStyles,
|
|
328
311
|
customRowHoverContent: customRowHoverContent
|
|
329
312
|
});
|
|
330
|
-
|
|
331
|
-
exports.WithStatusBasedHover = WithStatusBasedHover;
|
|
313
|
+
const WithStatusBasedHover = exports.WithStatusBasedHover = Template.bind({});
|
|
332
314
|
WithStatusBasedHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
333
315
|
customRowHoverStyles: statusBasedHoverStyles
|
|
334
316
|
});
|
|
335
|
-
|
|
336
|
-
exports.WithRowSpecificHover = WithRowSpecificHover;
|
|
317
|
+
const WithRowSpecificHover = exports.WithRowSpecificHover = Template.bind({});
|
|
337
318
|
WithRowSpecificHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
338
319
|
customRowHoverStyles: rowSpecificHoverStyles
|
|
339
320
|
});
|
|
340
|
-
|
|
341
|
-
exports.WithFixedColumnWidths = WithFixedColumnWidths;
|
|
321
|
+
const WithFixedColumnWidths = exports.WithFixedColumnWidths = Template.bind({});
|
|
342
322
|
WithFixedColumnWidths.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
343
323
|
customRowHoverContent: customRowHoverContent,
|
|
344
324
|
customRowHoverStyles: customRowHoverStyles
|
|
345
325
|
});
|
|
346
|
-
|
|
347
|
-
exports.WithSubTable = WithSubTable;
|
|
326
|
+
const WithSubTable = exports.WithSubTable = Template.bind({});
|
|
348
327
|
WithSubTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
349
328
|
withSubTable: true,
|
|
350
329
|
subColumns: subColumns,
|
|
351
330
|
calculateSubData: calculateSubData
|
|
352
331
|
});
|
|
353
|
-
|
|
354
|
-
exports.BlueTable = BlueTable;
|
|
332
|
+
const BlueTable = exports.BlueTable = Template.bind({});
|
|
355
333
|
BlueTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
356
334
|
blue: true
|
|
357
335
|
});
|
|
358
336
|
|
|
359
337
|
// Wrapper examples
|
|
360
|
-
|
|
361
|
-
exports.DefaultWrapper = DefaultWrapper;
|
|
338
|
+
const DefaultWrapper = exports.DefaultWrapper = TemplateWrapper.bind({});
|
|
362
339
|
DefaultWrapper.args = {
|
|
363
340
|
columns: columnsWrapper,
|
|
364
341
|
data: data,
|
|
365
342
|
noPagination: false
|
|
366
343
|
};
|
|
367
|
-
|
|
368
|
-
exports.WrapperWithSubTable = WrapperWithSubTable;
|
|
344
|
+
const WrapperWithSubTable = exports.WrapperWithSubTable = TemplateWrapper.bind({});
|
|
369
345
|
WrapperWithSubTable.args = {
|
|
370
346
|
columns: columnsWrapper,
|
|
371
347
|
data: data,
|
|
@@ -373,10 +349,58 @@ WrapperWithSubTable.args = {
|
|
|
373
349
|
subColumns: subColumnsWrapper,
|
|
374
350
|
calculateSubData: calculateSubData
|
|
375
351
|
};
|
|
376
|
-
|
|
377
|
-
exports.BlueWrapper = BlueWrapper;
|
|
352
|
+
const BlueWrapper = exports.BlueWrapper = TemplateWrapper.bind({});
|
|
378
353
|
BlueWrapper.args = {
|
|
379
354
|
columns: columnsWrapper,
|
|
380
355
|
data: data,
|
|
381
356
|
blue: true
|
|
382
|
-
};
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
// Box-style table example
|
|
360
|
+
const BoxStyleTable = exports.BoxStyleTable = Template.bind({});
|
|
361
|
+
BoxStyleTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
362
|
+
customRowStyles: (rowIndex, rowData) => {
|
|
363
|
+
// return {
|
|
364
|
+
// border: '1px solid #e1e1e1',
|
|
365
|
+
// borderRadius: '8px',
|
|
366
|
+
// marginBottom: '12px',
|
|
367
|
+
// borderRight: '1px solid red !important',
|
|
368
|
+
|
|
369
|
+
// backgroundColor: '#ffffff',
|
|
370
|
+
// }
|
|
371
|
+
return "\n border: 1px solid #e1e1e1;\n border-radius: 8px;\n margin-bottom: 12px;\n background-color: #ffffff;\n\n td{\n border:inherit;\n border-right:none;\n border-left:none;\n \n &:first-child {\n border-left:inherit;\n border-top-left-radius:4px;\n border-bottom-left-radius:4px;\n }\n &:last-child {\n border-right:inherit;\n border-top-right-radius:4px;\n border-bottom-right-radius:4px;\n }\n }\n ";
|
|
372
|
+
},
|
|
373
|
+
customRowHoverStyles: (rowIndex, rowData) => ({
|
|
374
|
+
backgroundColor: '#e1e1e1'
|
|
375
|
+
}),
|
|
376
|
+
customTableStyles: () => ({
|
|
377
|
+
borderSpacing: '0 20px'
|
|
378
|
+
})
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
// Table with custom styling
|
|
382
|
+
const CustomStyledTable = exports.CustomStyledTable = Template.bind({});
|
|
383
|
+
CustomStyledTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
|
|
384
|
+
customTableStyles: () => ({
|
|
385
|
+
border: '2px solid #4caf50',
|
|
386
|
+
borderRadius: '12px',
|
|
387
|
+
overflow: 'hidden',
|
|
388
|
+
boxShadow: '0 8px 16px rgba(76, 175, 80, 0.2)',
|
|
389
|
+
backgroundColor: '#f8fff8'
|
|
390
|
+
}),
|
|
391
|
+
customRowStyles: (rowIndex, rowData) => ({
|
|
392
|
+
backgroundColor: rowIndex % 2 === 0 ? '#ffffff' : '#f0f8f0',
|
|
393
|
+
borderBottom: '1px solid #e8f5e8'
|
|
394
|
+
}),
|
|
395
|
+
customRowHoverStyles: (rowIndex, rowData) => ({
|
|
396
|
+
backgroundColor: '#e8f5e8',
|
|
397
|
+
transform: 'scale(1.01)'
|
|
398
|
+
}),
|
|
399
|
+
customThStyles: column => ({
|
|
400
|
+
backgroundColor: '#4caf50',
|
|
401
|
+
color: '#ffffff',
|
|
402
|
+
fontWeight: 'bold',
|
|
403
|
+
textTransform: 'uppercase',
|
|
404
|
+
letterSpacing: '0.5px'
|
|
405
|
+
})
|
|
406
|
+
});
|
|
@@ -8,30 +8,29 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _ReactTable = _interopRequireDefault(require("./ReactTable"));
|
|
9
9
|
var _Table = require("./Table.styles");
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
const _excluded = ["columns", "subColumns"];
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
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; }
|
|
18
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; }
|
|
19
|
-
function _defineProperty(
|
|
20
|
-
function _toPropertyKey(
|
|
21
|
-
function _toPrimitive(
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
21
|
//This components is used only to memoize the values before we sent them to the react-table
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const ReactTableWrapper = props => {
|
|
23
|
+
const makeNewColumns = data => {
|
|
25
24
|
if (!data || !Array.isArray(data)) return [];
|
|
26
|
-
return data.map(
|
|
25
|
+
return data.map(column => {
|
|
27
26
|
if (column.key === 'dropdown' || column.accessor === 'dropdown') {
|
|
28
27
|
return {
|
|
29
|
-
Header:
|
|
30
|
-
return null;
|
|
31
|
-
},
|
|
28
|
+
Header: () => null,
|
|
32
29
|
id: column.key || column.accessor,
|
|
33
|
-
Cell:
|
|
34
|
-
|
|
30
|
+
Cell: _ref => {
|
|
31
|
+
let {
|
|
32
|
+
row
|
|
33
|
+
} = _ref;
|
|
35
34
|
return (
|
|
36
35
|
/*#__PURE__*/
|
|
37
36
|
// Use Cell to render an expander for dropdown cell.
|
|
@@ -50,19 +49,15 @@ var ReactTableWrapper = function ReactTableWrapper(props) {
|
|
|
50
49
|
}, column);
|
|
51
50
|
});
|
|
52
51
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var memoizedData = _react.default.useMemo(function () {
|
|
57
|
-
return props.data;
|
|
58
|
-
}, [props.data]);
|
|
59
|
-
var memoizedSubColumns = _react.default.useMemo(function () {
|
|
60
|
-
return props.subColumns ? makeNewColumns(props.subColumns) : undefined;
|
|
61
|
-
}, [props.subColumns]);
|
|
52
|
+
const memoizedColumns = _react.default.useMemo(() => makeNewColumns(props.columns), [props.columns]);
|
|
53
|
+
const memoizedData = _react.default.useMemo(() => props.data, [props.data]);
|
|
54
|
+
const memoizedSubColumns = _react.default.useMemo(() => props.subColumns ? makeNewColumns(props.subColumns) : undefined, [props.subColumns]);
|
|
62
55
|
|
|
63
56
|
// Create a new props object without the original columns and subColumns
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
const {
|
|
58
|
+
columns,
|
|
59
|
+
subColumns
|
|
60
|
+
} = props,
|
|
66
61
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
67
62
|
return /*#__PURE__*/_react.default.createElement(_ReactTable.default, _extends({
|
|
68
63
|
columns: memoizedColumns,
|
|
@@ -90,5 +85,4 @@ ReactTableWrapper.defaultProps = {
|
|
|
90
85
|
noPagination: false,
|
|
91
86
|
withSubTable: false
|
|
92
87
|
};
|
|
93
|
-
var _default = ReactTableWrapper;
|
|
94
|
-
exports.default = _default;
|
|
88
|
+
var _default = exports.default = ReactTableWrapper;
|