@dynamic-labs/sdk-react-core 0.18.0-RC.16 → 0.18.0-RC.18
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/CHANGELOG.md +32 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +3 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Button/Button.cjs +12 -4
- package/src/lib/components/Button/Button.d.ts +3 -2
- package/src/lib/components/Button/Button.js +12 -4
- package/src/lib/components/ChainCard/ChainCard.cjs +1 -1
- package/src/lib/components/ChainCard/ChainCard.js +1 -1
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -2
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.cjs +9 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.d.ts +2 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.js +5 -0
- package/src/lib/components/LegacySafariCssOverrides/index.d.ts +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +85 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +81 -0
- package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +34 -0
- package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
- package/src/lib/components/MenuList/MenuList/MenuList.js +30 -0
- package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/utils/index.d.ts +1 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
- package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -12
- package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -12
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +10 -11
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
- package/src/lib/components/OverlayCard/OverlayCard.js +11 -11
- package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
- package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
- package/src/lib/components/Popper/Popper/Popper.js +12 -12
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +0 -1
- package/src/lib/components/Portal/Portal.cjs +3 -2
- package/src/lib/components/Portal/Portal.js +3 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +4 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.js +4 -2
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +80 -49
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +7 -134
- package/src/lib/context/DynamicContext/DynamicContext.js +81 -50
- package/src/lib/context/DynamicContext/types/index.d.ts +144 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +5 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +9 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +2 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +9 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/utils/disableAuthVerificationFlag/disableAuthVerificationFlag.cjs +27 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/utils/disableAuthVerificationFlag/disableAuthVerificationFlag.d.ts +3 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/utils/disableAuthVerificationFlag/disableAuthVerificationFlag.js +23 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/utils/disableAuthVerificationFlag/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/utils/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +5 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +4 -2
- package/src/lib/context/DynamicContext/useDynamicContext.js +5 -1
- package/src/lib/context/DynamicContext/useInternalDynamicContext.d.ts +1 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +3 -3
- package/src/lib/context/WalletContext/WalletContext.d.ts +1 -3
- package/src/lib/context/WalletContext/WalletContext.js +3 -3
- package/src/lib/data/api.cjs +14 -0
- package/src/lib/data/api.d.ts +1 -0
- package/src/lib/data/api.js +14 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/shared/types/index.d.ts +2 -1
- package/src/lib/shared/utils/hooks/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -1
- package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +1 -1
- package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +1 -1
- package/src/lib/utils/functions/getMissingChains/getMissingChains.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +9 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +9 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +7 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +7 -1
- package/src/lib/utils/hooks/index.d.ts +0 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +3 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +3 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +3 -3
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +8 -11
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +8 -11
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +97 -84
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +5 -7
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +99 -86
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +5 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +5 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +69 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +65 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -2
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +5 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +5 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +20 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +4 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +20 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +3 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +11 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +3 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +11 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +18 -8
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +3 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +18 -8
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +4 -4
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +4 -4
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +9 -2
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +9 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +9 -10
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +10 -11
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +12 -12
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +13 -13
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -0
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +12 -5
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +5 -4
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +5 -4
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +5 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +5 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +4 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +17 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +17 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -71
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -65
- package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
- package/src/lib/utils/hooks/useWalletConnectorEvents/useWalletConnectorEvents.cjs +0 -17
- package/src/lib/utils/hooks/useWalletConnectorEvents/useWalletConnectorEvents.d.ts +0 -2
- package/src/lib/utils/hooks/useWalletConnectorEvents/useWalletConnectorEvents.js +0 -13
- /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { isMobile } from '@dynamic-labs/utils';
|
|
4
3
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
5
4
|
import '@dynamic-labs/sdk-api';
|
|
6
5
|
import { logger } from '../../../../shared/logger.js';
|
|
@@ -9,6 +8,7 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
9
8
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
10
9
|
import '@dynamic-labs/wallet-book';
|
|
11
10
|
import { shortenWalletAddress } from '../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
11
|
+
import '@dynamic-labs/utils';
|
|
12
12
|
import '../../../../utils/constants/colors.js';
|
|
13
13
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
14
14
|
import 'ethers';
|
|
@@ -38,12 +38,13 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
40
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
42
|
+
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
41
43
|
import { NetworkPicker } from '../../../../components/NetworkPicker/NetworkPicker.js';
|
|
44
|
+
import { getExportKeysOption } from '../../helpers/helpers.js';
|
|
42
45
|
import { useFetchNameService } from '../../hooks/useFetchNameService/useFetchNameService.js';
|
|
43
46
|
import { Balance } from '../Balance/Balance.js';
|
|
44
47
|
import { DotsMenu } from '../DotsMenu/DotsMenu.js';
|
|
45
|
-
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
46
|
-
import { getExportKeysOption } from '../../helpers/helpers.js';
|
|
47
48
|
|
|
48
49
|
const ICON_SIZE = 28;
|
|
49
50
|
const ActiveWalletInformation = () => {
|
|
@@ -83,7 +84,7 @@ const ActiveWalletInformation = () => {
|
|
|
83
84
|
[];
|
|
84
85
|
return (jsxs("div", Object.assign({ className: 'active-wallet-information-container', "data-testid": 'active-wallet-information' }, { children: [jsxs("div", Object.assign({ className: 'active-wallet-information' }, { children: [(nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("div", Object.assign({ className: 'active-wallet-information__avatar' }, { children: jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) }))) : (jsx("div", Object.assign({ className: 'active-wallet-information__wallet-img' }, { children: jsx(AuthProviderIcon, { jwt: authToken, iconSize: ICON_SIZE, showStatus: true }) }))), jsxs("div", Object.assign({ className: 'active-wallet-information__details' }, { children: [jsxs("div", Object.assign({ className: classNames('active-wallet-information__actions-container', {
|
|
85
86
|
'active-wallet-information__actions-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
86
|
-
}) }, { children: [jsxs("div", { children: [jsx(Typography, Object.assign({ className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal' }, { children: nameService === null || nameService === void 0 ? void 0 : nameService.name })), jsx(Typography, Object.assign({ className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary' }, { children: shortenWalletAddress(address, 4, 4) }))] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
87
|
+
}) }, { children: [jsxs("div", { children: [jsx(Typography, Object.assign({ className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal' }, { children: nameService === null || nameService === void 0 ? void 0 : nameService.name })), jsx(Typography, Object.assign({ className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary' }, { children: shortenWalletAddress(address, 4, 4) }))] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] })), jsx(NetworkPicker, { connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] }))] })), jsxs("div", Object.assign({ className: 'balance-container' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_small' }, { children: "Balance" })), primaryWallet && (jsx(Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] }))] })));
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
export { ActiveWalletInformation };
|
|
@@ -42,6 +42,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
44
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
var helpers = require('../../helpers/helpers.cjs');
|
|
46
47
|
|
|
47
48
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -38,6 +38,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
40
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
import { roundBalance } from '../../helpers/helpers.js';
|
|
42
43
|
|
|
43
44
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var utils = require('@dynamic-labs/utils');
|
|
8
7
|
require('@dynamic-labs/sdk-api');
|
|
9
8
|
require('../../../../shared/logger.cjs');
|
|
10
9
|
require('@dynamic-labs/iconic');
|
|
@@ -12,6 +11,7 @@ require('@dynamic-labs/wallet-connector-core');
|
|
|
12
11
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
13
12
|
var threeDots = require('../../../../shared/assets/three-dots.cjs');
|
|
14
13
|
require('@dynamic-labs/wallet-book');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
15
15
|
require('../../../../utils/constants/colors.cjs');
|
|
16
16
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
17
17
|
require('ethers');
|
|
@@ -37,19 +37,20 @@ require('../../../../components/Alert/Alert.cjs');
|
|
|
37
37
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
38
38
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
39
39
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
40
|
-
|
|
40
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
41
41
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
44
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
|
+
var Dropdown = require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
var DotsMenuDropdown = require('../DotsMenuDropdown/DotsMenuDropdown.cjs');
|
|
46
47
|
|
|
47
|
-
const DotsMenu = ({ options,
|
|
48
|
+
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
48
49
|
const dotsMenuRef = React.useRef(null);
|
|
49
50
|
const popperContentRef = React.useRef(null);
|
|
50
51
|
const [showMenu, setShowMenu] = React.useState(false);
|
|
51
52
|
index.useOnClickOutside(popperContentRef, () => setShowMenu(false));
|
|
52
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }) })), jsxRuntime.jsx(
|
|
53
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }) })), jsxRuntime.jsx(Dropdown.Dropdown, Object.assign({ isOpen: showMenu, onClickOutside: () => setShowMenu(false), onScroll: () => setShowMenu(false), anchorRef: dotsMenuRef, ref: popperContentRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right' }, { children: jsxRuntime.jsx(DotsMenuDropdown.DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) }))] }));
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
exports.DotsMenu = DotsMenu;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnchorOrigin, TransformOrigin } from '../../../../components/Popper/Popper.types';
|
|
1
|
+
import { ReactElement } from 'react';
|
|
3
2
|
export type DotsMenuOption = {
|
|
4
3
|
Icon: ReactElement | null;
|
|
5
4
|
callback: VoidFunction;
|
|
@@ -7,12 +6,10 @@ export type DotsMenuOption = {
|
|
|
7
6
|
hide?: boolean;
|
|
8
7
|
};
|
|
9
8
|
type Props = {
|
|
10
|
-
|
|
9
|
+
options: DotsMenuOption[];
|
|
10
|
+
direction?: 'right' | 'left';
|
|
11
11
|
buttonClassName?: string;
|
|
12
12
|
buttonClassNameWithOpenMenu?: string;
|
|
13
|
-
options: DotsMenuOption[];
|
|
14
|
-
title?: ReactNode;
|
|
15
|
-
transformOrigin?: TransformOrigin;
|
|
16
13
|
};
|
|
17
|
-
export declare const DotsMenu: ({ options,
|
|
14
|
+
export declare const DotsMenu: ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction, }: Props) => JSX.Element;
|
|
18
15
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
|
-
import { isMobile } from '@dynamic-labs/utils';
|
|
4
3
|
import '@dynamic-labs/sdk-api';
|
|
5
4
|
import '../../../../shared/logger.js';
|
|
6
5
|
import '@dynamic-labs/iconic';
|
|
@@ -8,6 +7,7 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
8
7
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
9
8
|
import { ReactComponent as SvgThreeDots } from '../../../../shared/assets/three-dots.js';
|
|
10
9
|
import '@dynamic-labs/wallet-book';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
11
|
import '../../../../utils/constants/colors.js';
|
|
12
12
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
13
13
|
import 'ethers';
|
|
@@ -33,19 +33,20 @@ import '../../../../components/Alert/Alert.js';
|
|
|
33
33
|
import '../../../../context/MockContext/MockContext.js';
|
|
34
34
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
35
35
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
36
|
-
import
|
|
36
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
37
37
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
40
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
41
|
+
import { Dropdown } from '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
import { DotsMenuDropdown } from '../DotsMenuDropdown/DotsMenuDropdown.js';
|
|
42
43
|
|
|
43
|
-
const DotsMenu = ({ options,
|
|
44
|
+
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
44
45
|
const dotsMenuRef = useRef(null);
|
|
45
46
|
const popperContentRef = useRef(null);
|
|
46
47
|
const [showMenu, setShowMenu] = useState(false);
|
|
47
48
|
useOnClickOutside(popperContentRef, () => setShowMenu(false));
|
|
48
|
-
return (jsxs(Fragment, { children: [jsx(IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsx(Icon, { children: jsx(SvgThreeDots, {}) }) })), jsx(
|
|
49
|
+
return (jsxs(Fragment, { children: [jsx(IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsx(Icon, { children: jsx(SvgThreeDots, {}) }) })), jsx(Dropdown, Object.assign({ isOpen: showMenu, onClickOutside: () => setShowMenu(false), onScroll: () => setShowMenu(false), anchorRef: dotsMenuRef, ref: popperContentRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right' }, { children: jsx(DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) }))] }));
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
export { DotsMenu };
|
|
@@ -41,6 +41,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
|
|
45
46
|
const DotsMenuDropdown = ({ options, setShowMenu, }) => (jsxRuntime.jsx("div", Object.assign({ className: 'dots-menu-dropdown__container', style: { zIndex: index.tooltipZIndex } }, { children: options.map((option) => option.hide ? null : (jsxRuntime.jsxs("div", Object.assign({ className: 'dots-menu-dropdown__item', onClick: () => {
|
|
46
47
|
option.callback();
|
|
@@ -37,6 +37,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
|
|
41
42
|
const DotsMenuDropdown = ({ options, setShowMenu, }) => (jsx("div", Object.assign({ className: 'dots-menu-dropdown__container', style: { zIndex: tooltipZIndex } }, { children: options.map((option) => option.hide ? null : (jsxs("div", Object.assign({ className: 'dots-menu-dropdown__item', onClick: () => {
|
|
42
43
|
option.callback();
|
|
@@ -44,8 +44,11 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
46
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
47
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
47
48
|
var IsBrowser = require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
48
49
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
50
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
|
+
var OverlayCardTarget = require('../../../../components/OverlayCard/OverlayCardTarget.cjs');
|
|
49
52
|
|
|
50
53
|
const DynamicUserProfile = ({ variant, }) => {
|
|
51
54
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -59,7 +62,7 @@ const DynamicUserProfile = ({ variant, }) => {
|
|
|
59
62
|
if (!projectSettings)
|
|
60
63
|
return null;
|
|
61
64
|
const shouldRenderHeader = dynamicWidgetView !== 'send-balance';
|
|
62
|
-
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(DynamicWidgetVariants.DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: index.widgetModalZIndex }, { children: jsxRuntime.
|
|
65
|
+
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(DynamicWidgetVariants.DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: index.widgetModalZIndex }, { children: jsxRuntime.jsx(DynamicWidgetCard.DynamicWidgetCard, Object.assign({ ref: widgetRef }, { children: jsxRuntime.jsxs(OverlayCardTarget.OverlayCardTarget, { children: [shouldRenderHeader && jsxRuntime.jsx(DynamicWidgetHeader.MemoizedDynamicWidgetHeader, { variant: variant }), jsxRuntime.jsx(DynamicWidgetViews.DynamicWidgetViews, {}), jsxRuntime.jsx(DynamicWidgetPrompts.DynamicWidgetPrompts, {})] }) })) })) }));
|
|
63
66
|
};
|
|
64
67
|
const ShadowedDynamicUserProfile = () => (jsxRuntime.jsx(ShadowDOM.ShadowDOM, Object.assign({ zIndex: index.widgetModalZIndex }, { children: jsxRuntime.jsx(DynamicUserProfile, {}) })));
|
|
65
68
|
|
|
@@ -40,8 +40,11 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
42
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
43
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
43
44
|
import { IsBrowser } from '../../../../components/IsBrowser/IsBrowser.js';
|
|
44
45
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
46
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
47
|
+
import { OverlayCardTarget } from '../../../../components/OverlayCard/OverlayCardTarget.js';
|
|
45
48
|
|
|
46
49
|
const DynamicUserProfile = ({ variant, }) => {
|
|
47
50
|
const { projectSettings } = useInternalDynamicContext();
|
|
@@ -55,7 +58,7 @@ const DynamicUserProfile = ({ variant, }) => {
|
|
|
55
58
|
if (!projectSettings)
|
|
56
59
|
return null;
|
|
57
60
|
const shouldRenderHeader = dynamicWidgetView !== 'send-balance';
|
|
58
|
-
return (jsx(IsBrowser, { children: jsx(DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: widgetModalZIndex }, { children:
|
|
61
|
+
return (jsx(IsBrowser, { children: jsx(DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: widgetModalZIndex }, { children: jsx(DynamicWidgetCard, Object.assign({ ref: widgetRef }, { children: jsxs(OverlayCardTarget, { children: [shouldRenderHeader && jsx(MemoizedDynamicWidgetHeader, { variant: variant }), jsx(DynamicWidgetViews, {}), jsx(DynamicWidgetPrompts, {})] }) })) })) }));
|
|
59
62
|
};
|
|
60
63
|
const ShadowedDynamicUserProfile = () => (jsx(ShadowDOM, Object.assign({ zIndex: widgetModalZIndex }, { children: jsx(DynamicUserProfile, {}) })));
|
|
61
64
|
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs
CHANGED
|
@@ -37,6 +37,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
37
37
|
require('formik');
|
|
38
38
|
require('yup');
|
|
39
39
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
40
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
40
41
|
var useKYCFlag = require('../../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
41
42
|
var useMultiWalletFlag = require('../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
42
43
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
@@ -33,6 +33,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
33
33
|
import 'formik';
|
|
34
34
|
import 'yup';
|
|
35
35
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
36
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
36
37
|
import { useKYCFlag } from '../../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
37
38
|
import { useMultiWalletFlag } from '../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
38
39
|
import '../../../../context/MockContext/MockContext.js';
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
7
|
var iconic = require('@dynamic-labs/iconic');
|
|
8
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
var Typography = require('../../../../../components/Typography/Typography.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
var logger = require('../../../../../shared/logger.cjs');
|
|
@@ -45,10 +45,11 @@ require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
45
45
|
require('formik');
|
|
46
46
|
require('yup');
|
|
47
47
|
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
48
|
+
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
48
49
|
var FundingContext = require('../../../../../context/FundingContext/FundingContext.cjs');
|
|
49
|
-
var ActiveWalletInformation = require('../../ActiveWalletInformation/ActiveWalletInformation.cjs');
|
|
50
|
-
var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
|
|
51
50
|
var SendBalanceContext = require('../../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
51
|
+
var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
|
|
52
|
+
var ActiveWalletInformation = require('../../ActiveWalletInformation/ActiveWalletInformation.cjs');
|
|
52
53
|
|
|
53
54
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
54
55
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
|
-
import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
3
|
import { UserProfileIcon } from '@dynamic-labs/iconic';
|
|
4
|
+
import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { Typography } from '../../../../../components/Typography/Typography.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import { logger } from '../../../../../shared/logger.js';
|
|
@@ -41,10 +41,11 @@ import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
41
41
|
import 'formik';
|
|
42
42
|
import 'yup';
|
|
43
43
|
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
44
|
+
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
44
45
|
import { useFundingContext } from '../../../../../context/FundingContext/FundingContext.js';
|
|
45
|
-
import { ActiveWalletInformation } from '../../ActiveWalletInformation/ActiveWalletInformation.js';
|
|
46
|
-
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
47
46
|
import { useSendBalance } from '../../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
47
|
+
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
48
|
+
import { ActiveWalletInformation } from '../../ActiveWalletInformation/ActiveWalletInformation.js';
|
|
48
49
|
|
|
49
50
|
const DynamicWidgetWalletHeader = ({ variant, }) => {
|
|
50
51
|
const { primaryWallet, user } = useInternalDynamicContext();
|
|
@@ -37,6 +37,7 @@ var PopperContext = require('../../../../../../components/Popper/PopperContext/P
|
|
|
37
37
|
require('formik');
|
|
38
38
|
require('yup');
|
|
39
39
|
require('../../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
40
|
+
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
40
41
|
require('../../../../../../context/MockContext/MockContext.cjs');
|
|
41
42
|
require('../../../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
42
43
|
require('../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -33,6 +33,7 @@ import { PopperProvider } from '../../../../../../components/Popper/PopperContex
|
|
|
33
33
|
import 'formik';
|
|
34
34
|
import 'yup';
|
|
35
35
|
import '../../../../../../components/InlineWidget/InlineWidget.js';
|
|
36
|
+
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
36
37
|
import '../../../../../../context/MockContext/MockContext.js';
|
|
37
38
|
import '../../../../../../context/CaptchaContext/CaptchaContext.js';
|
|
38
39
|
import '../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -41,6 +41,7 @@ var PopperContext = require('../../../../../../components/Popper/PopperContext/P
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
|
|
45
46
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
46
47
|
usePreventPageScroll.usePreventPageScroll(Boolean(isShown));
|
|
@@ -37,6 +37,7 @@ import { PopperProvider } from '../../../../../../components/Popper/PopperContex
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
|
|
41
42
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
42
43
|
usePreventPageScroll(Boolean(isShown));
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs
CHANGED
|
@@ -41,6 +41,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
var getWalletVerifiedCredential = require('../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs');
|
|
45
46
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
46
47
|
var EmptyWallets = require('../EmptyWallets/EmptyWallets.cjs');
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js
CHANGED
|
@@ -37,6 +37,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
import { getWalletVerifiedCredential } from '../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js';
|
|
41
42
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
42
43
|
import { EmptyWallets } from '../EmptyWallets/EmptyWallets.js';
|
|
@@ -41,6 +41,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
|
|
45
46
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
46
47
|
|
|
@@ -37,6 +37,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
|
|
41
42
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxs(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
42
43
|
|
|
@@ -42,6 +42,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
44
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
|
|
46
47
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
47
48
|
const { setSelectedWalletWithAction, selectedWalletWithAction, setPrimaryWalletId, setMultiWalletWidgetState, computeConnectedStateForWallets, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -38,6 +38,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
40
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
|
|
42
43
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
43
44
|
const { setSelectedWalletWithAction, selectedWalletWithAction, setPrimaryWalletId, setMultiWalletWidgetState, computeConnectedStateForWallets, } = useInternalDynamicContext();
|
|
@@ -42,6 +42,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
44
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
|
|
46
47
|
const EmptyWallets = () => (jsxRuntime.jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsxRuntime.jsx(addWallet.ReactComponent, {}) })) })), jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
47
48
|
|
|
@@ -38,6 +38,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
40
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
|
|
42
43
|
const EmptyWallets = () => (jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsx(Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsx(SvgAddWallet, {}) })) })), jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
43
44
|
|
package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs
CHANGED
|
@@ -41,6 +41,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
var helpers = require('../../helpers/helpers.cjs');
|
|
45
46
|
|
|
46
47
|
const SingleWalletButtons = () => {
|
|
@@ -37,6 +37,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
41
42
|
|
|
42
43
|
const SingleWalletButtons = () => {
|
|
@@ -46,6 +46,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
46
46
|
require('formik');
|
|
47
47
|
require('yup');
|
|
48
48
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
49
50
|
var DotsMenu = require('../DotsMenu/DotsMenu.cjs');
|
|
50
51
|
var helpers = require('../../helpers/helpers.cjs');
|
|
51
52
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
@@ -104,7 +105,7 @@ const Wallet = ({ wallet, ens }) => {
|
|
|
104
105
|
computeConnectedStateForWallets();
|
|
105
106
|
setSelectedWalletConnector(connector);
|
|
106
107
|
});
|
|
107
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsxRuntime.jsx("div", { className: 'wallet__row__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })))] })), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
108
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsxRuntime.jsx("div", { className: 'wallet__row__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })))] })), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'wallet__menu', direction: 'left' })] })));
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
exports.Wallet = Wallet;
|
|
@@ -42,6 +42,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
42
42
|
import 'formik';
|
|
43
43
|
import 'yup';
|
|
44
44
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
45
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
45
46
|
import { DotsMenu } from '../DotsMenu/DotsMenu.js';
|
|
46
47
|
import { copyToClipboard, getExportKeysOption } from '../../helpers/helpers.js';
|
|
47
48
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
@@ -100,7 +101,7 @@ const Wallet = ({ wallet, ens }) => {
|
|
|
100
101
|
computeConnectedStateForWallets();
|
|
101
102
|
setSelectedWalletConnector(connector);
|
|
102
103
|
});
|
|
103
|
-
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsx("div", { className: 'wallet__row__seperator' }), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress(address, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress(address, 4, 4) })))] })), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
104
|
+
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsx("div", { className: 'wallet__row__seperator' }), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress(address, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress(address, 4, 4) })))] })), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'wallet__menu', direction: 'left' })] })));
|
|
104
105
|
};
|
|
105
106
|
|
|
106
107
|
export { Wallet };
|
|
@@ -41,6 +41,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
|
|
45
46
|
const WidgetPortal = ({ children, onBackdropClick, disablePadding, showCloseButton, }) => {
|
|
46
47
|
const { accountSwitchState, setMultiWalletWidgetState, setSelectedWalletWithAction, selectedWalletWithAction, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -37,6 +37,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
|
|
41
42
|
const WidgetPortal = ({ children, onBackdropClick, disablePadding, showCloseButton, }) => {
|
|
42
43
|
const { accountSwitchState, setMultiWalletWidgetState, setSelectedWalletWithAction, selectedWalletWithAction, } = useInternalDynamicContext();
|
|
@@ -36,6 +36,7 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
36
36
|
require('formik');
|
|
37
37
|
require('yup');
|
|
38
38
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
39
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
39
40
|
var useKYCFlag = require('../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
40
41
|
var useMultiWalletFlag = require('../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
41
42
|
require('../../../context/MockContext/MockContext.cjs');
|
|
@@ -32,6 +32,7 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
32
32
|
import 'formik';
|
|
33
33
|
import 'yup';
|
|
34
34
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
35
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
35
36
|
import { useKYCFlag } from '../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
36
37
|
import { useMultiWalletFlag } from '../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
37
38
|
import '../../../context/MockContext/MockContext.js';
|
|
@@ -4,6 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var sdkApi = require('@dynamic-labs/sdk-api');
|
|
6
6
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
|
+
require('../../../shared/logger.cjs');
|
|
8
|
+
require('@dynamic-labs/iconic');
|
|
9
|
+
require('react/jsx-runtime');
|
|
10
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
11
|
+
require('react');
|
|
12
|
+
require('@dynamic-labs/wallet-book');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../utils/constants/colors.cjs');
|
|
15
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
|
+
require('ethers');
|
|
17
|
+
var ceil = require('../../../shared/utils/functions/ceil/ceil.cjs');
|
|
18
|
+
require('../../../shared/consts/index.cjs');
|
|
7
19
|
|
|
8
20
|
const replaceAll = (text, char, replace) => {
|
|
9
21
|
const re = new RegExp(char, 'g');
|
|
@@ -12,6 +24,10 @@ const replaceAll = (text, char, replace) => {
|
|
|
12
24
|
const copyToClipboard = (textToCopy) => {
|
|
13
25
|
navigator.clipboard.writeText(textToCopy);
|
|
14
26
|
};
|
|
27
|
+
/** Applies Math.floor, but takes into account edge cases, like how 2.99999 should be 3 */
|
|
28
|
+
// First apply ceil with very high accuracy, to account for floating point inaccuracies
|
|
29
|
+
// const smartFloor = (value: number) => Math.floor(value);
|
|
30
|
+
const smartFloor = (value) => Math.floor(ceil.ceil(value, 13));
|
|
15
31
|
const MIN_BALANCE_VALUE = 0.0001;
|
|
16
32
|
const WITHOUT_DECIMAL_VALUE = 1000;
|
|
17
33
|
const MAX_BALANCE_VALUE = 1000000;
|
|
@@ -29,7 +45,7 @@ const roundBalance = (balanceString) => {
|
|
|
29
45
|
}
|
|
30
46
|
if (clearedBalance < MIN_BALANCE_VALUE && clearedBalance > 0)
|
|
31
47
|
return `< ${MIN_BALANCE_VALUE}`;
|
|
32
|
-
const roundedBalance =
|
|
48
|
+
const roundedBalance = smartFloor(clearedBalance * PRECISION_FLOOR_DIVIDER) /
|
|
33
49
|
PRECISION_FLOOR_DIVIDER;
|
|
34
50
|
if (roundedBalance === 0)
|
|
35
51
|
return '0.0';
|