@stokr/components-library 3.0.16 → 3.0.17
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/README.md +261 -262
- package/dist/analytics/index.js +180 -0
- package/dist/api/auth.js +15 -0
- package/dist/api/fetchData.js +27 -0
- package/dist/api/fetchDataPublic.js +19 -0
- package/dist/auth/index.js +32 -0
- package/dist/components/2FA/Connect2FA.js +55 -0
- package/dist/components/2FA/EnterCode.js +63 -0
- package/dist/components/2FA/InstallAuthApp.js +64 -0
- package/dist/components/2FA/ResetCode.js +33 -0
- package/dist/components/2FA/Sucess2FA.js +51 -0
- package/dist/components/2FA/disable-2fa-flow.js +91 -0
- package/dist/components/2FA/enable-2fa-flow.js +137 -0
- package/dist/components/2FA/login-with-otp-flow.js +206 -0
- package/dist/components/2FA/main-flow.js +217 -0
- package/dist/components/AccountBalance/AccountBalance.js +35 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +48 -0
- package/dist/components/AdminDashboard/Table/ReactTable.js +266 -0
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +65 -0
- package/dist/components/AdminDashboard/Table/Table.js +123 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +263 -0
- package/dist/components/AgreementItem/AgreementItem.js +39 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +32 -0
- package/dist/components/BackButton/BackButton.js +34 -0
- package/dist/components/BackButton/BackButton.styles.js +123 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.styles.js +119 -0
- package/dist/components/BasicTable/BasicTable.js +25 -0
- package/dist/components/BasicTable/BasicTable.styles.js +76 -0
- package/dist/components/BlogPost/BlogPost.js +98 -0
- package/dist/components/BlogPost/BlogPost.styles.js +230 -0
- package/dist/components/Button/Button.styles.js +207 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +51 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +18 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +41 -0
- package/dist/components/Card/Card.styles.js +97 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +133 -0
- package/dist/components/Checkbox/Checkbox.js +80 -0
- package/dist/components/Checkbox/Checkbox.styles.js +133 -0
- package/dist/components/Checklist/ChecklistCard.js +71 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +82 -0
- package/dist/components/Chips/Chip.js +23 -0
- package/dist/components/Chips/Chip.styles.js +72 -0
- package/dist/components/Chips/ChipWrapper.js +50 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +70 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +127 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +165 -0
- package/dist/components/ConfirmModal/ConfirmModal.js +187 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +44 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +16 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +151 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +443 -0
- package/dist/components/CryptoAddress/RadioWrap.js +47 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +34 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +125 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +25 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +111 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +27 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/components/FAQ/FAQ.js +73 -0
- package/dist/components/FAQ/FAQ.styles.js +128 -0
- package/dist/components/Footer/Footer.js +55 -0
- package/dist/components/Footer/Footer.styles.js +256 -0
- package/dist/components/Footer/FooterLayout.js +145 -0
- package/dist/components/Footer/FooterMenu.js +100 -0
- package/dist/components/Footer/FooterMenu.styles.js +321 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +100 -0
- package/dist/components/Form/Form.js +21 -0
- package/dist/components/Form/Form.styles.js +72 -0
- package/dist/components/Grid/Grid.styles.js +212 -0
- package/dist/components/Header/Header.js +425 -0
- package/dist/components/Header/Header.styles.js +567 -0
- package/dist/components/HeroBlock/HeroVideoBlock.js +105 -0
- package/dist/components/Icon/Icon.style.js +92 -0
- package/dist/components/Icon/Icon2.js +12 -0
- package/dist/components/InfoIcon/InfoIcon.js +62 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +64 -0
- package/dist/components/Input/DatePickerInput.js +139 -0
- package/dist/components/Input/DatePickerInput.styles.js +165 -0
- package/dist/components/Input/Input.js +108 -0
- package/dist/components/Input/Input.styles.js +154 -0
- package/dist/components/Input/InputPassword.js +122 -0
- package/dist/components/Input/InputPassword.styles.js +166 -0
- package/dist/components/Input/InputUsername.js +92 -0
- package/dist/components/Input/InputWithButton.js +53 -0
- package/dist/components/Input/InputWithButton.styles.js +57 -0
- package/dist/components/Input/MultiSelect.js +306 -0
- package/dist/components/Input/OtpInput.js +70 -0
- package/dist/components/Input/RangeInput.js +80 -0
- package/dist/components/Input/RangeInput.styles.js +129 -0
- package/dist/components/Input/SearchInput.js +68 -0
- package/dist/components/Input/SearchInput.styles.js +92 -0
- package/dist/components/Input/Select.js +151 -0
- package/dist/components/Input/Select.styles.js +148 -0
- package/dist/components/Input/TableFilterDropdown.js +247 -0
- package/dist/components/Input/Textarea.js +51 -0
- package/dist/components/Input/Textarea.styles.js +62 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +283 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +94 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +24 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +62 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +24 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +90 -0
- package/dist/components/Layout/Layout.js +69 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +32 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +208 -0
- package/dist/components/LearnMorePage/LearnMore.js +190 -0
- package/dist/components/LearnMorePage/LearnMore.propTypes.js +20 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +56 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +276 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +57 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +234 -0
- package/dist/components/LearnMoreSection/LearnMore.js +138 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +147 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +33 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +60 -0
- package/dist/components/LoginModal/LoginModal.js +142 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +38 -0
- package/dist/components/MainMenu/MainMenu.js +210 -0
- package/dist/components/MainMenu/MainMenu.styles.js +362 -0
- package/dist/components/MenuNav/MenuNav.styles.js +66 -0
- package/dist/components/Modal/Modal.js +119 -0
- package/dist/components/Modal/Modal.styles.js +450 -0
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +262 -0
- package/dist/components/Modal/PaymentModal.js +149 -0
- package/dist/components/Modal/SideModal.js +89 -0
- package/dist/components/Modal/SideModal.styles.js +55 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.js +170 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +53 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +30 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +105 -0
- package/dist/components/Newsletter/Newsletter.js +122 -0
- package/dist/components/Newsletter/Newsletter.styles.js +186 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +38 -0
- package/dist/components/Number/Number.js +50 -0
- package/dist/components/Number/Number.styles.js +23 -0
- package/dist/components/PageTransition/PageTransition.js +51 -0
- package/dist/components/Pagination/Pagination.js +58 -0
- package/dist/components/Pagination/Pagination.styles.js +59 -0
- package/dist/components/Pagination/PaginationControls.js +113 -0
- package/dist/components/Pagination/usePagination.js +40 -0
- package/dist/components/Payment/PaymentDetailsCard.js +224 -0
- package/dist/components/Payment/PaymentDisplay.js +199 -0
- package/dist/components/Payment/TimerComponent.js +92 -0
- package/dist/components/Process/Process.styles.js +84 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +35 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +53 -0
- package/dist/components/ProfileBox/ProfileBox.js +27 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +67 -0
- package/dist/components/ProfileStat/ProfileStat.js +29 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +90 -0
- package/dist/components/QRCode/QRCode.js +51 -0
- package/dist/components/Radio/Radio.js +51 -0
- package/dist/components/Radio/Radio.styles.js +100 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +64 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +65 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +20 -0
- package/dist/components/RegisterModal/RegisterModal.js +248 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +43 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +44 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +41 -0
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +134 -0
- package/dist/components/SEO/SEO.js +66 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +26 -0
- package/dist/components/SideLine/SideLine.js +7 -0
- package/dist/components/SideLine/SideLine.styles.js +33 -0
- package/dist/components/Slider/Slider.js +31 -0
- package/dist/components/Slider/Slider.styles.js +120 -0
- package/dist/components/Snackbar/Snackbar.js +111 -0
- package/dist/components/Snackbar/Snackbar.styles.js +230 -0
- package/dist/components/Snackbar/SnackbarProvider.js +66 -0
- package/dist/components/Snackbar/useSnackbar.js +12 -0
- package/dist/components/SpanButton/SpanButton.styles.js +19 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +18 -0
- package/dist/components/StatusTag/StatusTag.js +105 -0
- package/dist/components/StatusTag/StatusTag.styles.js +88 -0
- package/dist/components/StepController/StepController.js +86 -0
- package/dist/components/StepController/StepController.styles.js +33 -0
- package/dist/components/StepController/StepControllerContext.js +65 -0
- package/dist/components/StepController/StepControllerProgress.js +37 -0
- package/dist/components/StepsProgress/StepIndicator.js +40 -0
- package/dist/components/StepsProgress/StepIndicator.styles.js +69 -0
- package/dist/components/StepsProgress/StepsProgress.js +67 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +105 -0
- package/dist/components/StokrLoader/StokrLoader.js +111 -0
- package/dist/components/StokrLoader/media.js +23 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +27 -0
- package/dist/components/SvgIcons/CameraSvg.js +31 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +36 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +20 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +41 -0
- package/dist/components/SvgIcons/DocumentSvg.js +39 -0
- package/dist/components/SvgIcons/EthSvg.js +28 -0
- package/dist/components/SvgIcons/EurSvg.js +27 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +17 -0
- package/dist/components/SvgIcons/FourSvg.js +7 -0
- package/dist/components/SvgIcons/Glassess.js +26 -0
- package/dist/components/SvgIcons/LogoSvg.js +17 -0
- package/dist/components/SvgIcons/OneSvg.js +10 -0
- package/dist/components/SvgIcons/PassportSvg.js +37 -0
- package/dist/components/SvgIcons/RefreshSvg.js +28 -0
- package/dist/components/SvgIcons/SocialFacebook.js +22 -0
- package/dist/components/SvgIcons/SocialInstagram.js +13 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +31 -0
- package/dist/components/SvgIcons/SocialMedium.js +21 -0
- package/dist/components/SvgIcons/SocialReddit.js +21 -0
- package/dist/components/SvgIcons/SocialTelegram.js +60 -0
- package/dist/components/SvgIcons/SocialTwitter.js +62 -0
- package/dist/components/SvgIcons/SocialYoutube.js +22 -0
- package/dist/components/SvgIcons/ThreeSvg.js +7 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +48 -0
- package/dist/components/SvgIcons/TwoSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +12 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +11 -0
- package/dist/components/SvgIcons/UploadSvg.js +12 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +16 -0
- package/dist/components/Switch/Switch.js +63 -0
- package/dist/components/Switch/Switch.styles.js +126 -0
- package/dist/components/Tabs/Tabs.js +54 -0
- package/dist/components/Tabs/Tabs.styles.js +15 -0
- package/dist/components/TabsNav/TabNav.js +16 -0
- package/dist/components/TabsNav/TabsNav.js +30 -0
- package/dist/components/TabsNav/TabsNav.styles.js +103 -0
- package/dist/components/TeamOverview/TeamOverview.js +80 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +167 -0
- package/dist/components/TermsModal/TermsModal.js +145 -0
- package/dist/components/TermsModal/_styles.js +313 -0
- package/dist/components/Text/Text.styles.js +220 -0
- package/dist/components/TextLink/TextLink.styles.js +67 -0
- package/dist/components/Timeline/Timeline.js +44 -0
- package/dist/components/Timeline/Timeline.styles.js +147 -0
- package/dist/components/Timeline/TimelineStep.js +58 -0
- package/dist/components/ToDoList/ToDoList.js +172 -0
- package/dist/components/ToDoList/ToDoList.styles.js +122 -0
- package/dist/components/ToDoList/ToDoListTask.js +95 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +119 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +38 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +41 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +75 -0
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +126 -0
- package/dist/components/headerHo/HeaderHo.js +709 -0
- package/dist/components/icons/Arrow.js +38 -0
- package/dist/components/icons/ArrowSimple.js +34 -0
- package/dist/components/icons/Check.js +16 -0
- package/dist/components/icons/Facebook.js +10 -0
- package/dist/components/icons/Info.js +27 -0
- package/dist/components/icons/Instagram.js +10 -0
- package/dist/components/icons/LinkIcon.js +49 -0
- package/dist/components/icons/LinkedIn.js +13 -0
- package/dist/components/icons/Medium.js +13 -0
- package/dist/components/icons/Reddit.js +16 -0
- package/dist/components/icons/Share.js +31 -0
- package/dist/components/icons/Telegram.js +13 -0
- package/dist/components/icons/Twitter.js +10 -0
- package/dist/components/icons/X.js +10 -0
- package/dist/components/icons/Youtube.js +10 -0
- package/dist/components/icons/index.js +32 -0
- package/dist/components/landing-page/List.js +51 -0
- package/dist/components/landing-page/PageContent.js +65 -0
- package/dist/components/landing-page/PageText.js +171 -0
- package/dist/components/landing-page/PageTitle.js +259 -0
- package/dist/components/logo/Logo.js +57 -0
- package/dist/components/taxId/complete.js +24 -0
- package/dist/components/taxId/flow.js +53 -0
- package/dist/components/taxId/register-taxid.js +166 -0
- package/dist/config.js +44 -0
- package/dist/constants/globalVariables.js +87 -0
- package/dist/constants/style.js +48 -0
- package/dist/context/Auth.js +396 -0
- package/dist/context/AuthContext.js +781 -0
- package/dist/context/Checkbox/CheckboxContext.js +151 -0
- package/dist/firebase-config.js +73 -0
- package/dist/hooks/useNewVentureForm.js +262 -0
- package/dist/hooks/useTimer.js +89 -0
- package/dist/index.js +628 -25463
- package/dist/model/axios.js +10 -0
- package/dist/model/axiosPublic.js +9 -0
- package/dist/services/TimerService.js +80 -0
- package/dist/static/animations/checked.lottie.js +4 -0
- package/dist/static/animations/progress.lottie.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.ttf.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff2.js +4 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.eot.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.svg.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.ttf.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.woff.js +4 -0
- package/dist/static/images/add-folder-icon.svg.js +5 -0
- package/dist/static/images/address-refreshing.gif.js +4 -0
- package/dist/static/images/arrow-down-black.svg.js +4 -0
- package/dist/static/images/avatar-placeholder.png.js +4 -0
- package/dist/static/images/background3.png.js +4 -0
- package/dist/static/images/bitcoin-logo.svg.js +4 -0
- package/dist/static/images/bmn2-logo.svg.js +4 -0
- package/dist/static/images/check-icon.svg.js +5 -0
- package/dist/static/images/checkmark-circle-icon.svg.js +5 -0
- package/dist/static/images/close-circle-icon.svg.js +5 -0
- package/dist/static/images/copy_icon.svg.js +5 -0
- package/dist/static/images/cross-icon.svg.js +5 -0
- package/dist/static/images/early-adopter.png.js +4 -0
- package/dist/static/images/eth_logo.svg.js +4 -0
- package/dist/static/images/filter-icon.svg.js +5 -0
- package/dist/static/images/google_auth.png.js +4 -0
- package/dist/static/images/graduation.png.js +4 -0
- package/dist/static/images/mangopay.svg.js +4 -0
- package/dist/static/images/numbers/number_eight.svg.js +5 -0
- package/dist/static/images/numbers/number_five.svg.js +5 -0
- package/dist/static/images/numbers/number_four.svg.js +5 -0
- package/dist/static/images/numbers/number_nine.svg.js +5 -0
- package/dist/static/images/numbers/number_one.svg.js +5 -0
- package/dist/static/images/numbers/number_seven.svg.js +5 -0
- package/dist/static/images/numbers/number_six.svg.js +5 -0
- package/dist/static/images/numbers/number_three.svg.js +5 -0
- package/dist/static/images/numbers/number_two.svg.js +5 -0
- package/dist/static/images/numbers/number_zero.svg.js +5 -0
- package/dist/static/images/process-waiting.gif.js +4 -0
- package/dist/static/images/search-icon.svg.js +5 -0
- package/dist/static/images/social/Facebook_Logo.png.js +4 -0
- package/dist/static/images/social/LI-In-Bug.png.js +4 -0
- package/dist/static/images/social/Telegram-Logo.png.js +4 -0
- package/dist/static/images/social/X-logo-black.png.js +4 -0
- package/dist/static/images/social/youtube_social_circle_red.png.js +4 -0
- package/dist/static/images/transfer-icon.svg.js +5 -0
- package/dist/static/images/usdc-logo.svg.js +4 -0
- package/dist/static/images/usdq-logo.png.js +4 -0
- package/dist/static/images/warning-filled.svg.js +5 -0
- package/dist/styles/colors.js +56 -0
- package/dist/styles/fonts.js +100 -0
- package/dist/styles/global.js +74 -0
- package/dist/styles/grid.js +11 -0
- package/dist/styles/ioniconsStyles.js +31 -0
- package/dist/styles/reactTippy.js +40 -0
- package/dist/styles/rwd.js +56 -0
- package/dist/styles/semanticUi.js +84 -0
- package/dist/styles/spacing.js +8 -0
- package/dist/styles/theme.js +34 -0
- package/dist/utils/check-sale-time-left.js +85 -0
- package/dist/utils/check-todo-status.js +11 -0
- package/dist/utils/checklistGenerator.js +195 -0
- package/dist/utils/copyToClipboard.js +92 -0
- package/dist/utils/customHooks.js +126 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +12 -0
- package/dist/utils/fix-decimals.js +5 -0
- package/dist/utils/formatCurrencyValue.js +95 -0
- package/dist/utils/get-cookie-domain.js +10 -0
- package/dist/utils/get-short-address.js +4 -0
- package/dist/utils/isUSInvestor.js +6 -0
- package/dist/utils/km_ify.js +33 -0
- package/dist/utils/moment.js +26 -0
- package/dist/utils/redirect-url.js +5 -0
- package/dist/utils/saveAs.js +17 -0
- package/dist/utils/scrollUtils.js +63 -0
- package/dist/utils/set-redirect-cookie.js +16 -0
- package/dist/utils/transition.js +101 -0
- package/dist/utils/withRouter.js +24 -0
- package/package.json +146 -146
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React__default, { useId, useState, useCallback } from "react";
|
|
4
|
+
import { useTable, useExpanded, usePagination } from "react-table";
|
|
5
|
+
import stdin_default$1 from "../../Pagination/PaginationControls.js";
|
|
6
|
+
import { Styles, TableWrap, StyledReactTable } from "./Table.styles.js";
|
|
7
|
+
const INTERACTIVE_ELEMENTS = ["button", "a", "input", "select", "textarea", "label"];
|
|
8
|
+
const isInteractiveElement = (element) => {
|
|
9
|
+
let current = element;
|
|
10
|
+
while (current && current.tagName !== "TR") {
|
|
11
|
+
const tagName = current.tagName?.toLowerCase();
|
|
12
|
+
if (INTERACTIVE_ELEMENTS.includes(tagName)) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
const role = current.getAttribute?.("role");
|
|
16
|
+
if (role === "button" || role === "link") {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
if (current.dataset?.clickable === "true") {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
current = current.parentElement;
|
|
23
|
+
}
|
|
24
|
+
return false;
|
|
25
|
+
};
|
|
26
|
+
function ReactTable(props) {
|
|
27
|
+
const {
|
|
28
|
+
columns,
|
|
29
|
+
data,
|
|
30
|
+
subColumns,
|
|
31
|
+
blue = false,
|
|
32
|
+
noPagination = true,
|
|
33
|
+
withSubTable = false,
|
|
34
|
+
isSubTable = false,
|
|
35
|
+
customTdStyles,
|
|
36
|
+
customThStyles,
|
|
37
|
+
customRowHoverStyles,
|
|
38
|
+
customRowHoverContent,
|
|
39
|
+
customRowStyles,
|
|
40
|
+
customTableStyles,
|
|
41
|
+
tableWrapStyles,
|
|
42
|
+
getRowDataCy,
|
|
43
|
+
// Function to generate data-cy attribute: (rowData, rowIndex) => string
|
|
44
|
+
// Row click handler: (rowData, rowIndex, event) => void
|
|
45
|
+
// Will NOT trigger if clicking on buttons, links, inputs, etc.
|
|
46
|
+
onRowClick,
|
|
47
|
+
// Custom expanded content renderer: (row, toggleExpanded) => ReactNode
|
|
48
|
+
// If provided, this will be used instead of the sub-table
|
|
49
|
+
renderExpandedContent,
|
|
50
|
+
// Header click handler: (column, event) => void
|
|
51
|
+
// Called when a header cell is clicked (useful for sorting/filtering)
|
|
52
|
+
// Won't trigger if clicking on interactive elements inside header
|
|
53
|
+
onHeaderClick,
|
|
54
|
+
// Render custom header content: (column, defaultContent) => ReactNode
|
|
55
|
+
// Allows wrapping/replacing header content (e.g., add sort icons, dropdowns)
|
|
56
|
+
renderHeaderContent,
|
|
57
|
+
//instead of passing the subData, we pass a function that will calculate the subData
|
|
58
|
+
//subData must be part of the data array (an array or whatever)
|
|
59
|
+
//calculateSubData is a function that receives the row and returns the subData
|
|
60
|
+
//it is used only when the row is expanded
|
|
61
|
+
calculateSubData
|
|
62
|
+
} = props;
|
|
63
|
+
const tableId = useId();
|
|
64
|
+
const [hoveredRowIndex, setHoveredRowIndex] = useState(null);
|
|
65
|
+
const {
|
|
66
|
+
getTableProps,
|
|
67
|
+
getTableBodyProps,
|
|
68
|
+
headerGroups,
|
|
69
|
+
prepareRow,
|
|
70
|
+
visibleColumns,
|
|
71
|
+
page,
|
|
72
|
+
// page contains only the rows for the active page
|
|
73
|
+
gotoPage,
|
|
74
|
+
setPageSize,
|
|
75
|
+
state: { pageIndex, pageSize }
|
|
76
|
+
} = useTable(
|
|
77
|
+
{
|
|
78
|
+
columns,
|
|
79
|
+
data,
|
|
80
|
+
initialState: {
|
|
81
|
+
pageIndex: 0,
|
|
82
|
+
pageSize: isSubTable ? 1e4 : 10
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
useExpanded,
|
|
86
|
+
usePagination
|
|
87
|
+
);
|
|
88
|
+
const [inputPageSize, setInputPageSize] = useState(isSubTable ? 1e4 : 10);
|
|
89
|
+
React__default.useEffect(() => {
|
|
90
|
+
setInputPageSize(pageSize);
|
|
91
|
+
}, [pageSize]);
|
|
92
|
+
const handleRowClick = useCallback(
|
|
93
|
+
(row, rowIndex, event) => {
|
|
94
|
+
if (!onRowClick) return;
|
|
95
|
+
if (isInteractiveElement(event.target)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
onRowClick(row.original, rowIndex, event);
|
|
99
|
+
},
|
|
100
|
+
[onRowClick]
|
|
101
|
+
);
|
|
102
|
+
const renderCellContent = (cell, rowIndex, rowData) => {
|
|
103
|
+
if (customRowHoverContent && hoveredRowIndex === rowIndex) {
|
|
104
|
+
const hoverContent = customRowHoverContent(cell.column.id, rowIndex, rowData);
|
|
105
|
+
if (hoverContent !== void 0) {
|
|
106
|
+
return hoverContent;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return cell.render("Cell");
|
|
110
|
+
};
|
|
111
|
+
const shouldEnableExpand = withSubTable || renderExpandedContent;
|
|
112
|
+
const handleHeaderClick = useCallback(
|
|
113
|
+
(column, event) => {
|
|
114
|
+
if (column.onHeaderClick) {
|
|
115
|
+
if (!isInteractiveElement(event.target)) {
|
|
116
|
+
column.onHeaderClick(column, event);
|
|
117
|
+
}
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (!onHeaderClick) return;
|
|
121
|
+
if (isInteractiveElement(event.target)) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
onHeaderClick(column, event);
|
|
125
|
+
},
|
|
126
|
+
[onHeaderClick]
|
|
127
|
+
);
|
|
128
|
+
const renderHeader = (column) => {
|
|
129
|
+
const defaultContent = column.render("Header");
|
|
130
|
+
if (renderHeaderContent) {
|
|
131
|
+
return renderHeaderContent(column, defaultContent);
|
|
132
|
+
}
|
|
133
|
+
return defaultContent;
|
|
134
|
+
};
|
|
135
|
+
const isHeaderClickable = (column) => {
|
|
136
|
+
return column.onHeaderClick || onHeaderClick;
|
|
137
|
+
};
|
|
138
|
+
return /* @__PURE__ */ jsxs(Styles, { children: [
|
|
139
|
+
/* @__PURE__ */ jsx(TableWrap, { style: tableWrapStyles, children: /* @__PURE__ */ jsxs(StyledReactTable, { ...getTableProps(), customTableStyles, children: [
|
|
140
|
+
/* @__PURE__ */ jsx("thead", { children: headerGroups.map((headerGroup, index) => {
|
|
141
|
+
const { key } = headerGroup.getHeaderGroupProps();
|
|
142
|
+
return /* @__PURE__ */ jsx(StyledReactTable.Tr, { children: headerGroup.headers.map((column) => {
|
|
143
|
+
const cellStyles = customThStyles ? customThStyles(column) : {};
|
|
144
|
+
const clickable = isHeaderClickable(column);
|
|
145
|
+
const headerProps = column.getHeaderProps({
|
|
146
|
+
className: column.collapse ? "collapse" : "",
|
|
147
|
+
style: {
|
|
148
|
+
...cellStyles,
|
|
149
|
+
...clickable ? { cursor: "pointer" } : {}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
const { key: _headerKey, ref: _headerRef, ...restHeaderProps } = headerProps;
|
|
153
|
+
return /* @__PURE__ */ jsx(
|
|
154
|
+
StyledReactTable.Th,
|
|
155
|
+
{
|
|
156
|
+
...restHeaderProps,
|
|
157
|
+
blue,
|
|
158
|
+
width: column.width,
|
|
159
|
+
minWidth: column.minWidth,
|
|
160
|
+
maxWidth: column.maxWidth,
|
|
161
|
+
onClick: clickable ? (e) => handleHeaderClick(column, e) : void 0,
|
|
162
|
+
children: renderHeader(column)
|
|
163
|
+
},
|
|
164
|
+
column.id
|
|
165
|
+
);
|
|
166
|
+
}) }, `${key}-${index.toString()}`);
|
|
167
|
+
}) }),
|
|
168
|
+
/* @__PURE__ */ jsx("tbody", { ...getTableBodyProps(), children: page.map((row, i) => {
|
|
169
|
+
prepareRow(row);
|
|
170
|
+
row.getRowProps({
|
|
171
|
+
"data-cy": getRowDataCy ? getRowDataCy(row.original, i) : void 0
|
|
172
|
+
});
|
|
173
|
+
const rowKey = `${tableId}-${row.id}-${i}`;
|
|
174
|
+
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
StyledReactTable.Tr,
|
|
177
|
+
{
|
|
178
|
+
customRowHoverStyles,
|
|
179
|
+
customRowStyles,
|
|
180
|
+
rowIndex: i,
|
|
181
|
+
rowData: row.original,
|
|
182
|
+
onMouseEnter: () => setHoveredRowIndex(i),
|
|
183
|
+
onMouseLeave: () => setHoveredRowIndex(null),
|
|
184
|
+
onClick: (e) => handleRowClick(row, i, e),
|
|
185
|
+
style: onRowClick ? { cursor: "pointer" } : void 0,
|
|
186
|
+
children: row.cells.map((cell) => {
|
|
187
|
+
const cellStyles = customTdStyles ? customTdStyles(i, row.original, cell.column) : {};
|
|
188
|
+
const rawExpandProps = shouldEnableExpand ? cell.row.getToggleRowExpandedProps() : {};
|
|
189
|
+
const { key: _expandKey, ref: _expandRef, ...expandProps } = rawExpandProps;
|
|
190
|
+
const cellProps = cell.getCellProps({
|
|
191
|
+
className: cell.column.collapse ? "collapse" : "",
|
|
192
|
+
style: { ...cellStyles }
|
|
193
|
+
});
|
|
194
|
+
const { key: _cellKey, ref: _cellRef, ...restCellProps } = cellProps;
|
|
195
|
+
return /* @__PURE__ */ jsx(
|
|
196
|
+
StyledReactTable.Td,
|
|
197
|
+
{
|
|
198
|
+
...expandProps,
|
|
199
|
+
title: "",
|
|
200
|
+
...restCellProps,
|
|
201
|
+
blue,
|
|
202
|
+
width: cell.column.width,
|
|
203
|
+
minWidth: cell.column.minWidth,
|
|
204
|
+
maxWidth: cell.column.maxWidth,
|
|
205
|
+
children: renderCellContent(cell, i, row.original)
|
|
206
|
+
},
|
|
207
|
+
`${rowKey}-${cell.column.id}`
|
|
208
|
+
);
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
rowKey
|
|
212
|
+
),
|
|
213
|
+
renderExpandedContent && row.isExpanded && /* @__PURE__ */ jsx(StyledReactTable.Tr, { children: /* @__PURE__ */ jsx(StyledReactTable.Td, { colSpan: visibleColumns.length, subTable: true, children: renderExpandedContent(row, row.toggleRowExpanded) }) }, `${rowKey}-expanded`),
|
|
214
|
+
withSubTable && !renderExpandedContent && row.isExpanded && /* @__PURE__ */ jsx(StyledReactTable.Tr, { children: /* @__PURE__ */ jsx(StyledReactTable.Td, { colSpan: visibleColumns.length, subTable: true, children: /* @__PURE__ */ jsx(ReactTable, { columns: subColumns, data: calculateSubData(row), noPagination: true, isSubTable: true }) }) }, `${rowKey}-sub`)
|
|
215
|
+
] }, rowKey);
|
|
216
|
+
}) })
|
|
217
|
+
] }) }),
|
|
218
|
+
!noPagination && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
219
|
+
stdin_default$1,
|
|
220
|
+
{
|
|
221
|
+
currentPage: pageIndex + 1,
|
|
222
|
+
totalCount: data.length,
|
|
223
|
+
pageSize,
|
|
224
|
+
onPageChange: (_page) => gotoPage(_page - 1),
|
|
225
|
+
inputPageSize,
|
|
226
|
+
setInputPageSize,
|
|
227
|
+
setPageSize
|
|
228
|
+
}
|
|
229
|
+
) })
|
|
230
|
+
] });
|
|
231
|
+
}
|
|
232
|
+
ReactTable.propTypes = {
|
|
233
|
+
columns: PropTypes.array.isRequired,
|
|
234
|
+
data: PropTypes.array.isRequired,
|
|
235
|
+
subColumns: PropTypes.array,
|
|
236
|
+
calculateSubData: PropTypes.func,
|
|
237
|
+
blue: PropTypes.bool,
|
|
238
|
+
noPagination: PropTypes.bool,
|
|
239
|
+
withSubTable: PropTypes.bool,
|
|
240
|
+
isSubTable: PropTypes.bool,
|
|
241
|
+
customRowHoverStyles: PropTypes.func,
|
|
242
|
+
customRowHoverContent: PropTypes.func,
|
|
243
|
+
customRowStyles: PropTypes.func,
|
|
244
|
+
customTableStyles: PropTypes.func,
|
|
245
|
+
tableWrapStyles: PropTypes.object,
|
|
246
|
+
customTdStyles: PropTypes.func,
|
|
247
|
+
customThStyles: PropTypes.func,
|
|
248
|
+
getRowDataCy: PropTypes.func,
|
|
249
|
+
// (rowData, rowIndex) => string
|
|
250
|
+
onRowClick: PropTypes.func,
|
|
251
|
+
// (rowData, rowIndex, event) => void
|
|
252
|
+
renderExpandedContent: PropTypes.func,
|
|
253
|
+
// (row, toggleExpanded) => ReactNode
|
|
254
|
+
onHeaderClick: PropTypes.func,
|
|
255
|
+
// (column, event) => void
|
|
256
|
+
renderHeaderContent: PropTypes.func
|
|
257
|
+
// (column, defaultContent) => ReactNode
|
|
258
|
+
};
|
|
259
|
+
var stdin_default = ReactTable;
|
|
260
|
+
export {
|
|
261
|
+
ReactTable,
|
|
262
|
+
StyledReactTable,
|
|
263
|
+
Styles,
|
|
264
|
+
TableWrap,
|
|
265
|
+
stdin_default as default
|
|
266
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import stdin_default from "./ReactTable.js";
|
|
4
|
+
import { TableDropdownIcon } from "./Table.styles.js";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
const renderCell = ({ row }) => (
|
|
7
|
+
// Use Cell to render an expander for dropdown cell.
|
|
8
|
+
// We can use the getToggleRowExpandedProps prop-getter
|
|
9
|
+
// to build the expander. (moved to the whole row to make it easier to click)
|
|
10
|
+
/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(TableDropdownIcon, { isActive: row.isExpanded }) })
|
|
11
|
+
);
|
|
12
|
+
const ReactTableWrapper = (props) => {
|
|
13
|
+
const { columns, data, subColumns, blue = false, noPagination = false, withSubTable = false, ...restProps } = props;
|
|
14
|
+
const makeNewColumns = (columnData) => {
|
|
15
|
+
if (!columnData || !Array.isArray(columnData)) return [];
|
|
16
|
+
return columnData.map((column) => {
|
|
17
|
+
if (column.key === "dropdown" || column.accessor === "dropdown") {
|
|
18
|
+
return {
|
|
19
|
+
Header: () => null,
|
|
20
|
+
id: column.key || column.accessor,
|
|
21
|
+
Cell: renderCell
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
Header: column.label || column.Header,
|
|
26
|
+
accessor: column.key || column.accessor,
|
|
27
|
+
...column
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const memoizedColumns = React__default.useMemo(() => makeNewColumns(columns), [columns]);
|
|
32
|
+
const memoizedData = React__default.useMemo(() => data, [data]);
|
|
33
|
+
const memoizedSubColumns = React__default.useMemo(() => subColumns ? makeNewColumns(subColumns) : void 0, [subColumns]);
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
stdin_default,
|
|
36
|
+
{
|
|
37
|
+
columns: memoizedColumns,
|
|
38
|
+
data: memoizedData,
|
|
39
|
+
subColumns: memoizedSubColumns,
|
|
40
|
+
blue,
|
|
41
|
+
noPagination,
|
|
42
|
+
withSubTable,
|
|
43
|
+
...restProps
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
ReactTableWrapper.propTypes = {
|
|
48
|
+
columns: PropTypes.arrayOf(
|
|
49
|
+
PropTypes.shape({
|
|
50
|
+
key: PropTypes.string,
|
|
51
|
+
label: PropTypes.string
|
|
52
|
+
})
|
|
53
|
+
).isRequired,
|
|
54
|
+
data: PropTypes.array.isRequired,
|
|
55
|
+
subColumns: PropTypes.array,
|
|
56
|
+
calculateSubData: PropTypes.func,
|
|
57
|
+
blue: PropTypes.bool,
|
|
58
|
+
noPagination: PropTypes.bool,
|
|
59
|
+
withSubTable: PropTypes.bool,
|
|
60
|
+
customTdStyles: PropTypes.func,
|
|
61
|
+
customThStyles: PropTypes.func
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
ReactTableWrapper
|
|
65
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PureComponent } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import stdin_default from "../../ComponentScroll/ComponentScroll.js";
|
|
5
|
+
import { Container, HeadWrapper, StyledTable, Head, Row, Column, TableWrapper, Body } from "./Table.styles.js";
|
|
6
|
+
const OptionalScroll = ({ children, maxHeight = 500, noScroll = false, onScroll }) => {
|
|
7
|
+
if (noScroll) {
|
|
8
|
+
return children;
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
stdin_default,
|
|
12
|
+
{
|
|
13
|
+
autoHeight: maxHeight !== 0,
|
|
14
|
+
autoHeightMax: maxHeight || void 0,
|
|
15
|
+
offset: 4,
|
|
16
|
+
barPadding: 8,
|
|
17
|
+
topPadding: 48,
|
|
18
|
+
handleScroll: onScroll,
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
OptionalScroll.propTypes = {
|
|
24
|
+
children: PropTypes.node.isRequired,
|
|
25
|
+
maxHeight: PropTypes.number.isRequired,
|
|
26
|
+
noScroll: PropTypes.bool.isRequired,
|
|
27
|
+
onScroll: PropTypes.func.isRequired
|
|
28
|
+
};
|
|
29
|
+
class Table extends PureComponent {
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
this.setColumnsWidth();
|
|
32
|
+
window.addEventListener("resize", this.onResize);
|
|
33
|
+
}
|
|
34
|
+
componentWillUnmount() {
|
|
35
|
+
clearTimeout(this.resizeTimeout);
|
|
36
|
+
window.removeEventListener("resize", this.onResize);
|
|
37
|
+
}
|
|
38
|
+
onResize = () => {
|
|
39
|
+
clearTimeout(this.resizeTimeout);
|
|
40
|
+
this.resizeTimeout = setTimeout(this.setColumnsWidth, 200);
|
|
41
|
+
};
|
|
42
|
+
setColumnsWidth = () => {
|
|
43
|
+
const headColumns = this.headTableEl.children[0].children[0].children;
|
|
44
|
+
const bodyColumns = this.bodyTableEl.children[0].children[0].children;
|
|
45
|
+
Array.prototype.forEach.call(bodyColumns, (column, columnKey) => {
|
|
46
|
+
bodyColumns[columnKey].style.width = "";
|
|
47
|
+
});
|
|
48
|
+
this.headTableEl.style.width = "";
|
|
49
|
+
Array.prototype.forEach.call(bodyColumns, (column, columnKey) => {
|
|
50
|
+
headColumns[columnKey].style.width = `${column.offsetWidth}px`;
|
|
51
|
+
bodyColumns[columnKey].style.width = `${column.offsetWidth}px`;
|
|
52
|
+
});
|
|
53
|
+
this.headTableEl.style.width = `${this.bodyTableEl.offsetWidth}px`;
|
|
54
|
+
};
|
|
55
|
+
onScroll = (e) => {
|
|
56
|
+
if (!e) return;
|
|
57
|
+
this.headTableWrapperEl.scrollLeft = e.target.scrollLeft;
|
|
58
|
+
};
|
|
59
|
+
render() {
|
|
60
|
+
const { columns, data, maxHeight, noScroll } = this.props;
|
|
61
|
+
const columnsProps = {};
|
|
62
|
+
columns.map((column) => {
|
|
63
|
+
columnsProps[column.key] = {
|
|
64
|
+
width: column.width,
|
|
65
|
+
align: column.align,
|
|
66
|
+
marginLeft: column.marginLeft
|
|
67
|
+
};
|
|
68
|
+
return column;
|
|
69
|
+
});
|
|
70
|
+
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
HeadWrapper,
|
|
73
|
+
{
|
|
74
|
+
ref: (el) => {
|
|
75
|
+
this.headTableWrapperEl = el;
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
StyledTable,
|
|
79
|
+
{
|
|
80
|
+
ref: (el) => {
|
|
81
|
+
this.headTableEl = el;
|
|
82
|
+
},
|
|
83
|
+
children: /* @__PURE__ */ jsx(Head, { children: /* @__PURE__ */ jsx(Row, { children: columns.map((column) => /* @__PURE__ */ jsx(Column, { align: column.align, children: column.label }, column.key)) }) })
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsx(TableWrapper, { children: /* @__PURE__ */ jsx(OptionalScroll, { maxHeight, noScroll, onScroll: this.onScroll, children: /* @__PURE__ */ jsxs(
|
|
89
|
+
StyledTable,
|
|
90
|
+
{
|
|
91
|
+
ref: (el) => {
|
|
92
|
+
this.bodyTableEl = el;
|
|
93
|
+
},
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsx(Head, { hidden: true, children: /* @__PURE__ */ jsx(Row, { children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
96
|
+
Column,
|
|
97
|
+
{
|
|
98
|
+
colWidth: column.width,
|
|
99
|
+
minWidth: column.minWidth,
|
|
100
|
+
maxWidth: column.maxWidth,
|
|
101
|
+
align: column.align,
|
|
102
|
+
children: column.label
|
|
103
|
+
},
|
|
104
|
+
column.key
|
|
105
|
+
)) }) }),
|
|
106
|
+
/* @__PURE__ */ jsx(Body, { children: data.map((row) => /* @__PURE__ */ jsx(Row, { children: Object.keys(row).map(
|
|
107
|
+
(columnKey) => columnsProps[columnKey] && /* @__PURE__ */ jsx(Column, { align: columnsProps[columnKey].align, children: row[columnKey] }, columnKey)
|
|
108
|
+
) }, row.id)) })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) }) })
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
Table.propTypes = {
|
|
116
|
+
columns: PropTypes.arrayOf(Object).isRequired,
|
|
117
|
+
data: PropTypes.arrayOf(Object).isRequired,
|
|
118
|
+
maxHeight: PropTypes.number,
|
|
119
|
+
noScroll: PropTypes.bool
|
|
120
|
+
};
|
|
121
|
+
export {
|
|
122
|
+
Table
|
|
123
|
+
};
|