@dynamic-labs/sdk-react-core 0.19.0-alpha.6 → 0.19.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/package.cjs +8 -6
- package/package.js +8 -6
- package/package.json +15 -13
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -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 +3 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -2
- 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 +3 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.d.ts +4 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +3 -2
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +3 -3
- package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -2
- package/src/lib/components/IconWithStatus/IconWithStatus.js +3 -3
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- package/src/lib/components/MockedQrCode/MockedQrCode.cjs +1 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.js +1 -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 +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -0
- 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.d.ts +0 -1
- 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 +9 -3
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +9 -3
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -1
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Search/Search.d.ts +0 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +2 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +2 -2
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +98 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +12 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +94 -0
- package/src/lib/components/Switch/Switch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/AuthModeSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/TemplateSelect.d.ts +0 -1
- package/src/lib/components/Toolkit/components/ThemeSwitch.d.ts +0 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +0 -1
- package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +1 -1
- 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/UserProfile.cjs +4 -1
- package/src/lib/components/UserProfile/UserProfile.js +4 -1
- 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 +16 -13
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +16 -13
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +36 -18
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +14 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +36 -18
- package/src/lib/context/DynamicContext/helpers.cjs +42 -3
- package/src/lib/context/DynamicContext/helpers.d.ts +7 -1
- package/src/lib/context/DynamicContext/helpers.js +38 -4
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +5 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +4 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +5 -2
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +1 -1
- package/src/lib/context/DynamicContext/types/index.d.ts +6 -0
- 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/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
- package/src/lib/context/ErrorContext/ErrorContext.cjs +5 -1
- package/src/lib/context/ErrorContext/ErrorContext.js +5 -1
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- 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 +8 -4
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +5 -5
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +8 -4
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +2 -16
- package/src/lib/context/WalletContext/WalletContext.js +2 -16
- package/src/lib/data/api.cjs +49 -10
- package/src/lib/data/api.d.ts +1 -0
- package/src/lib/data/api.js +50 -12
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +3 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +3 -2
- 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 +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -1
- 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/locale/en/translation.cjs +90 -0
- package/src/lib/locale/en/translation.js +77 -0
- package/src/lib/locale/index.d.ts +1 -0
- package/src/lib/locale/locale.cjs +55 -0
- package/src/lib/locale/locale.d.ts +13 -0
- package/src/lib/locale/locale.js +46 -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/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/sign-in-with-email.cjs +59 -0
- package/src/lib/shared/assets/sign-in-with-email.js +35 -0
- package/src/lib/shared/types/index.d.ts +4 -0
- package/src/lib/shared/utils/functions/wallet/createWallet.cjs +1 -1
- package/src/lib/shared/utils/functions/wallet/createWallet.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +5 -1
- package/src/lib/utils/constants/localStorage.d.ts +2 -0
- package/src/lib/utils/constants/localStorage.js +4 -2
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.cjs +11 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.d.ts +2 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.js +7 -0
- package/src/lib/utils/functions/getActiveOauthCredential/index.d.ts +1 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/getEnabledSocialSignInProvidersAsProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.cjs +19 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.d.ts +2 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.js +15 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +5 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +31 -16
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +31 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +6 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +6 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +9 -4
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -19
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +9 -4
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +4 -3
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +4 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +11 -15
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +12 -16
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +74 -0
- package/src/lib/utils/{functions/getDynamicLayoutData/getDynamicLayoutData.d.ts → hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts} +2 -2
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +70 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +10 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +10 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +10 -164
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +2 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +12 -166
- package/src/lib/utils/hooks/useSocialAuth/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +278 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +20 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +274 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +8 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +8 -6
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +13 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +13 -3
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs +0 -5
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js +0 -5
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +7 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +7 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +3 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +3 -2
- package/src/lib/utils/hooks/useWallets/useWallets.js +3 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +6 -3
- package/src/lib/views/AccountExistsView/AccountExistsView.js +6 -3
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- 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 +4 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +4 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- 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 +10 -3
- package/src/lib/views/EmailVerification/EmailVerification.js +11 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginView/LoginView.cjs +6 -6
- package/src/lib/views/LoginView/LoginView.js +6 -6
- package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.cjs +1 -0
- package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.js +1 -0
- package/src/lib/views/LoginView/sections/LoginWidget.d.ts +10 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +77 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.d.ts +3 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +73 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +65 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.d.ts +3 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +61 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +49 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.d.ts +7 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +45 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.cjs → sections/WalletSignInSection/WalletSignInSection.cjs} +9 -3
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.d.ts → sections/WalletSignInSection/WalletSignInSection.d.ts} +1 -1
- package/src/lib/views/LoginView/{components/WalletSignIn/WalletSignIn.js → sections/WalletSignInSection/WalletSignInSection.js} +9 -3
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.cjs +3 -1
- package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.js +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/index.d.ts +4 -0
- package/src/lib/views/LoginView/useLoginView.cjs +11 -8
- package/src/lib/views/LoginView/useLoginView.js +11 -8
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +2 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -1
- 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 +3 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -2
- 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 +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -1
- package/src/lib/views/QrCodeView/QRCode.cjs +4 -3
- package/src/lib/views/QrCodeView/QRCode.d.ts +2 -2
- package/src/lib/views/QrCodeView/QRCode.js +4 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +3 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +3 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +5 -6
- package/src/lib/views/SocialRedirectView/SocialRedirectView.d.ts +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +5 -6
- 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/useTransactionGas/useTransactionGas.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +1 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.js +1 -1
- 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 +3 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +3 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -1
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- 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 +3 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +3 -2
- 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/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
- 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 +7 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +7 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +19 -3
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +19 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -0
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- 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 +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -2
- 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 +10 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +10 -1
- 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 +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -1
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +2 -2
- 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/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 +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- 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 +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +2 -1
- 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 +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +7 -5
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +7 -5
- 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 +4 -3
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +4 -3
- 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/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +0 -67
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +0 -63
- package/src/lib/views/LoginView/components/LoginWidget.d.ts +0 -5
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.cjs +0 -88
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.d.ts +0 -2
- package/src/lib/views/LoginView/components/SocialSignIn/SocialSignIn.js +0 -84
- package/src/lib/views/LoginView/components/WalletSignIn/index.d.ts +0 -1
- package/src/lib/views/LoginView/components/index.d.ts +0 -3
- /package/src/lib/{views/LoginView/components → components}/SocialSignIn/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/LoginEmailForm.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/EmailSignIn → sections/EmailSignInSection}/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/ListItemButton.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/ListItemButton/index.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/WalletSimpleSignIn.d.ts +0 -0
- /package/src/lib/views/LoginView/{components/WalletSignIn → sections/WalletSignInSection}/WalletSimpleSignIn/index.d.ts +0 -0
|
@@ -43,6 +43,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
43
43
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
44
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
45
45
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
46
47
|
|
|
47
48
|
const DynamicBridgeWidgetEmptyCard = ({ chain }) => {
|
|
48
49
|
const { walletsToConnectByChain, setShowAuthFlow, setShowBridgeWidget, setBridgeChainToConnect, } = useInternalDynamicContext();
|
|
@@ -14,7 +14,7 @@ var UserProfileForm = require('../../../../components/UserProfileForm/UserProfil
|
|
|
14
14
|
const EditProfileView = () => {
|
|
15
15
|
const { setView } = ViewContext.useViewContext();
|
|
16
16
|
const { goToProfileView } = DynamicBridgeWidgetContext.useDynamicBridgeWidgetContext();
|
|
17
|
-
const {
|
|
17
|
+
const { internalSetShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
18
18
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
19
19
|
validationSchemaStripUnknown: true,
|
|
20
20
|
});
|
|
@@ -22,10 +22,10 @@ const EditProfileView = () => {
|
|
|
22
22
|
const { isEmailVerificationRequired } = yield updateUser(formValues);
|
|
23
23
|
goToProfileView();
|
|
24
24
|
if (isEmailVerificationRequired) {
|
|
25
|
-
|
|
25
|
+
internalSetShowAuthFlow(true);
|
|
26
26
|
setView('verify-email');
|
|
27
27
|
}
|
|
28
|
-
}), [goToProfileView,
|
|
28
|
+
}), [goToProfileView, internalSetShowAuthFlow, setView, updateUser]);
|
|
29
29
|
return (jsxRuntime.jsx(UserProfileForm.UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -10,7 +10,7 @@ import { UserProfileForm } from '../../../../components/UserProfileForm/UserProf
|
|
|
10
10
|
const EditProfileView = () => {
|
|
11
11
|
const { setView } = useViewContext();
|
|
12
12
|
const { goToProfileView } = useDynamicBridgeWidgetContext();
|
|
13
|
-
const {
|
|
13
|
+
const { internalSetShowAuthFlow } = useInternalDynamicContext();
|
|
14
14
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
15
15
|
validationSchemaStripUnknown: true,
|
|
16
16
|
});
|
|
@@ -18,10 +18,10 @@ const EditProfileView = () => {
|
|
|
18
18
|
const { isEmailVerificationRequired } = yield updateUser(formValues);
|
|
19
19
|
goToProfileView();
|
|
20
20
|
if (isEmailVerificationRequired) {
|
|
21
|
-
|
|
21
|
+
internalSetShowAuthFlow(true);
|
|
22
22
|
setView('verify-email');
|
|
23
23
|
}
|
|
24
|
-
}), [goToProfileView,
|
|
24
|
+
}), [goToProfileView, internalSetShowAuthFlow, setView, updateUser]);
|
|
25
25
|
return (jsx(UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -48,6 +48,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var Balance = require('../../../DynamicWidget/components/Balance/Balance.cjs');
|
|
52
53
|
var DynamicBridgeWalletCard = require('../../components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs');
|
|
53
54
|
var DynamicBridgeWalletCardBody = require('../../components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs');
|
|
@@ -63,7 +64,7 @@ const WalletsView = () => {
|
|
|
63
64
|
const WalletIcon = getChainIcon.getChainIcon(chain);
|
|
64
65
|
const walletInfo = walletConnectorCore.getChainInfo(chain);
|
|
65
66
|
// Wallets info for chains with connected wallets
|
|
66
|
-
return chainWallets.map(({ connector, address, id }) => (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(WalletIcon, {}), networkName: walletInfo === null || walletInfo === void 0 ? void 0 : walletInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, {
|
|
67
|
+
return chainWallets.map(({ connector, address, id }) => (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(WalletIcon, {}), networkName: walletInfo === null || walletInfo === void 0 ? void 0 : walletInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, { walletKey: connector.key, walletAddress: address, walletBalance: jsxRuntime.jsx(Balance.Balance, { address: address, connector: connector, network: chain }), onUnlinkClick: () => unlinkConnectedWallet(id) }) }), id)));
|
|
67
68
|
}) })), jsxRuntime.jsx(DynamicWidgetFooter.DynamicWidgetFooter, { children: jsxRuntime.jsx(LogoutButton.LogoutButton, { buttonClassName: 'dynamic-bridge-widget-wallets-view__logout-button', isTextButton: true }) })] }));
|
|
68
69
|
};
|
|
69
70
|
|
|
@@ -44,6 +44,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { Balance } from '../../../DynamicWidget/components/Balance/Balance.js';
|
|
48
49
|
import { DynamicBridgeWalletCard } from '../../components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js';
|
|
49
50
|
import { DynamicBridgeWalletCardBody } from '../../components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js';
|
|
@@ -59,7 +60,7 @@ const WalletsView = () => {
|
|
|
59
60
|
const WalletIcon = getChainIcon(chain);
|
|
60
61
|
const walletInfo = getChainInfo(chain);
|
|
61
62
|
// Wallets info for chains with connected wallets
|
|
62
|
-
return chainWallets.map(({ connector, address, id }) => (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(WalletIcon, {}), networkName: walletInfo === null || walletInfo === void 0 ? void 0 : walletInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, {
|
|
63
|
+
return chainWallets.map(({ connector, address, id }) => (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(WalletIcon, {}), networkName: walletInfo === null || walletInfo === void 0 ? void 0 : walletInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, { walletKey: connector.key, walletAddress: address, walletBalance: jsx(Balance, { address: address, connector: connector, network: chain }), onUnlinkClick: () => unlinkConnectedWallet(id) }) }), id)));
|
|
63
64
|
}) })), jsx(DynamicWidgetFooter, { children: jsx(LogoutButton, { buttonClassName: 'dynamic-bridge-widget-wallets-view__logout-button', isTextButton: true }) })] }));
|
|
64
65
|
};
|
|
65
66
|
|
|
@@ -31,7 +31,7 @@ const SecondaryWallets = ({ hideUnlinkAction = false }) => {
|
|
|
31
31
|
const wallet = getConnectedWalletById('connect-wallet-1');
|
|
32
32
|
const NetworkIcon = wallet && getChainIcon.getChainIcon(wallet === null || wallet === void 0 ? void 0 : wallet.chain);
|
|
33
33
|
const networkInfo = wallet && walletConnectorCore.getChainInfo(wallet === null || wallet === void 0 ? void 0 : wallet.chain);
|
|
34
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!wallet && (jsxRuntime.jsx(DynamicBridgeWidgetEmptyCard.DynamicBridgeWidgetEmptyCard, { chain: walletsByChain === null || walletsByChain === void 0 ? void 0 : walletsByChain[1].chain })), wallet && NetworkIcon && (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(NetworkIcon, {}), networkName: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, {
|
|
34
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!wallet && (jsxRuntime.jsx(DynamicBridgeWidgetEmptyCard.DynamicBridgeWidgetEmptyCard, { chain: walletsByChain === null || walletsByChain === void 0 ? void 0 : walletsByChain[1].chain })), wallet && NetworkIcon && (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(NetworkIcon, {}), networkName: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, { walletKey: wallet.connector.key, walletAddress: wallet.address, walletBalance:
|
|
35
35
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
36
36
|
jsxRuntime.jsx(Balance.Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }), onUnlinkClick: !hideUnlinkAction
|
|
37
37
|
? () => unlinkConnectedWallet(wallet.id)
|
|
@@ -23,7 +23,7 @@ const SecondaryWallets = ({ hideUnlinkAction = false }) => {
|
|
|
23
23
|
const wallet = getConnectedWalletById('connect-wallet-1');
|
|
24
24
|
const NetworkIcon = wallet && getChainIcon(wallet === null || wallet === void 0 ? void 0 : wallet.chain);
|
|
25
25
|
const networkInfo = wallet && getChainInfo(wallet === null || wallet === void 0 ? void 0 : wallet.chain);
|
|
26
|
-
return (jsxs(Fragment, { children: [!wallet && (jsx(DynamicBridgeWidgetEmptyCard, { chain: walletsByChain === null || walletsByChain === void 0 ? void 0 : walletsByChain[1].chain })), wallet && NetworkIcon && (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(NetworkIcon, {}), networkName: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, {
|
|
26
|
+
return (jsxs(Fragment, { children: [!wallet && (jsx(DynamicBridgeWidgetEmptyCard, { chain: walletsByChain === null || walletsByChain === void 0 ? void 0 : walletsByChain[1].chain })), wallet && NetworkIcon && (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(NetworkIcon, {}), networkName: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, { walletKey: wallet.connector.key, walletAddress: wallet.address, walletBalance:
|
|
27
27
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
28
28
|
jsx(Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }), onUnlinkClick: !hideUnlinkAction
|
|
29
29
|
? () => unlinkConnectedWallet(wallet.id)
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
7
8
|
require('@dynamic-labs/sdk-api');
|
|
8
9
|
require('../../shared/logger.cjs');
|
|
9
10
|
require('@dynamic-labs/iconic');
|
|
@@ -47,14 +48,19 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
47
48
|
var PopperContext = require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
49
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
49
50
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
50
52
|
var IsBrowser = require('../../components/IsBrowser/IsBrowser.cjs');
|
|
51
53
|
var DynamicNav = require('./components/DynamicNav/DynamicNav.cjs');
|
|
52
54
|
var DynamicUserProfile = require('./components/DynamicUserProfile/DynamicUserProfile.cjs');
|
|
53
55
|
var DynamicWidgetContext = require('./context/DynamicWidgetContext.cjs');
|
|
54
56
|
|
|
55
|
-
const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent
|
|
57
|
+
const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent, variant = 'modal', }) => {
|
|
56
58
|
const { authMode, primaryWallet, user, showAuthFlow, setShowDynamicUserProfile, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
57
59
|
const { widgetRef, inlineControlsRef } = DynamicWidgetContext.useWidgetContext();
|
|
60
|
+
const { t } = reactI18next.useTranslation();
|
|
61
|
+
if (!innerButtonComponent) {
|
|
62
|
+
innerButtonComponent = t('dyn_widget.connect');
|
|
63
|
+
}
|
|
58
64
|
const closeOnOutsideClick = React.useCallback((e) => {
|
|
59
65
|
var _a;
|
|
60
66
|
const target = e.composedPath().shift();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import '@dynamic-labs/sdk-api';
|
|
4
5
|
import '../../shared/logger.js';
|
|
5
6
|
import '@dynamic-labs/iconic';
|
|
@@ -43,14 +44,19 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
43
44
|
import { PopperProvider } from '../../components/Popper/PopperContext/PopperContext.js';
|
|
44
45
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
45
46
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
46
48
|
import { IsBrowser } from '../../components/IsBrowser/IsBrowser.js';
|
|
47
49
|
import { DynamicNav } from './components/DynamicNav/DynamicNav.js';
|
|
48
50
|
import { DynamicUserProfile } from './components/DynamicUserProfile/DynamicUserProfile.js';
|
|
49
51
|
import { useWidgetContext } from './context/DynamicWidgetContext.js';
|
|
50
52
|
|
|
51
|
-
const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent
|
|
53
|
+
const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', innerButtonComponent, variant = 'modal', }) => {
|
|
52
54
|
const { authMode, primaryWallet, user, showAuthFlow, setShowDynamicUserProfile, } = useInternalDynamicContext();
|
|
53
55
|
const { widgetRef, inlineControlsRef } = useWidgetContext();
|
|
56
|
+
const { t } = useTranslation();
|
|
57
|
+
if (!innerButtonComponent) {
|
|
58
|
+
innerButtonComponent = t('dyn_widget.connect');
|
|
59
|
+
}
|
|
54
60
|
const closeOnOutsideClick = useCallback((e) => {
|
|
55
61
|
var _a;
|
|
56
62
|
const target = e.composedPath().shift();
|
|
@@ -22,6 +22,7 @@ var classNames = require('../../../../utils/functions/classNames/classNames.cjs'
|
|
|
22
22
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
23
23
|
require('../../../../shared/consts/index.cjs');
|
|
24
24
|
require('@dynamic-labs/multi-wallet');
|
|
25
|
+
var getActiveOauthCredential = require('../../../../utils/functions/getActiveOauthCredential/getActiveOauthCredential.cjs');
|
|
25
26
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
26
27
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
27
28
|
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
@@ -52,6 +53,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
52
53
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
53
54
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
54
55
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
56
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
55
57
|
var useFetchNameService = require('../../hooks/useFetchNameService/useFetchNameService.cjs');
|
|
56
58
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
57
59
|
|
|
@@ -60,12 +62,26 @@ const AccountControl = ({ className }) => {
|
|
|
60
62
|
const { isOpen, setIsOpen } = DynamicWidgetContext.useWidgetContext();
|
|
61
63
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
62
64
|
const nameService = useFetchNameService.useFetchNameService(address);
|
|
65
|
+
const renderUserIdentifier = () => {
|
|
66
|
+
if (nameService === null || nameService === void 0 ? void 0 : nameService.name) {
|
|
67
|
+
return nameService === null || nameService === void 0 ? void 0 : nameService.name;
|
|
68
|
+
}
|
|
69
|
+
if (address) {
|
|
70
|
+
return shortenWalletAddress.shortenWalletAddress(address, 3, 3);
|
|
71
|
+
}
|
|
72
|
+
const oauthCredential = getActiveOauthCredential.getActiveOauthCredential(user);
|
|
73
|
+
if (oauthCredential === null || oauthCredential === void 0 ? void 0 : oauthCredential.publicIdentifier) {
|
|
74
|
+
return oauthCredential.publicIdentifier;
|
|
75
|
+
}
|
|
76
|
+
if (user === null || user === void 0 ? void 0 : user.email) {
|
|
77
|
+
return shortenEmail.shortenEmail(user === null || user === void 0 ? void 0 : user.email);
|
|
78
|
+
}
|
|
79
|
+
return 'My Profile';
|
|
80
|
+
};
|
|
63
81
|
return (jsxRuntime.jsxs("button", Object.assign({ "data-testid": 'AccountControl', onClick: () => setIsOpen(!isOpen), className: classNames.classNames('account-control__container', {
|
|
64
82
|
'account-control__container--active': isOpen,
|
|
65
83
|
'account-control__container--multiwallet-disabled': true,
|
|
66
|
-
}, className) }, { children: [jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: authToken, iconSize: 16 }), jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'account-control__name', as: 'p' }, { children: (
|
|
67
|
-
shortenWalletAddress.shortenWalletAddress(address, 3, 3) ||
|
|
68
|
-
shortenEmail.shortenEmail(user === null || user === void 0 ? void 0 : user.email) })), jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'account-control__icon', color: 'text-primary' }, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }))] })));
|
|
84
|
+
}, className) }, { children: [jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: authToken, iconSize: 16 }), jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'account-control__name', as: 'p' }, { children: renderUserIdentifier() })), jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'account-control__icon', color: 'text-primary' }, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }))] })));
|
|
69
85
|
};
|
|
70
86
|
|
|
71
87
|
exports.AccountControl = AccountControl;
|
|
@@ -18,6 +18,7 @@ import { classNames } from '../../../../utils/functions/classNames/classNames.js
|
|
|
18
18
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
19
19
|
import '../../../../shared/consts/index.js';
|
|
20
20
|
import '@dynamic-labs/multi-wallet';
|
|
21
|
+
import { getActiveOauthCredential } from '../../../../utils/functions/getActiveOauthCredential/getActiveOauthCredential.js';
|
|
21
22
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
22
23
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
23
24
|
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
@@ -48,6 +49,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
48
49
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
49
50
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
50
51
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
52
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
51
53
|
import { useFetchNameService } from '../../hooks/useFetchNameService/useFetchNameService.js';
|
|
52
54
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
53
55
|
|
|
@@ -56,12 +58,26 @@ const AccountControl = ({ className }) => {
|
|
|
56
58
|
const { isOpen, setIsOpen } = useWidgetContext();
|
|
57
59
|
const address = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address;
|
|
58
60
|
const nameService = useFetchNameService(address);
|
|
61
|
+
const renderUserIdentifier = () => {
|
|
62
|
+
if (nameService === null || nameService === void 0 ? void 0 : nameService.name) {
|
|
63
|
+
return nameService === null || nameService === void 0 ? void 0 : nameService.name;
|
|
64
|
+
}
|
|
65
|
+
if (address) {
|
|
66
|
+
return shortenWalletAddress(address, 3, 3);
|
|
67
|
+
}
|
|
68
|
+
const oauthCredential = getActiveOauthCredential(user);
|
|
69
|
+
if (oauthCredential === null || oauthCredential === void 0 ? void 0 : oauthCredential.publicIdentifier) {
|
|
70
|
+
return oauthCredential.publicIdentifier;
|
|
71
|
+
}
|
|
72
|
+
if (user === null || user === void 0 ? void 0 : user.email) {
|
|
73
|
+
return shortenEmail(user === null || user === void 0 ? void 0 : user.email);
|
|
74
|
+
}
|
|
75
|
+
return 'My Profile';
|
|
76
|
+
};
|
|
59
77
|
return (jsxs("button", Object.assign({ "data-testid": 'AccountControl', onClick: () => setIsOpen(!isOpen), className: classNames('account-control__container', {
|
|
60
78
|
'account-control__container--active': isOpen,
|
|
61
79
|
'account-control__container--multiwallet-disabled': true,
|
|
62
|
-
}, className) }, { children: [jsx(AuthProviderIcon, { jwt: authToken, iconSize: 16 }), jsx(Typography, Object.assign({ className: 'account-control__name', as: 'p' }, { children: (
|
|
63
|
-
shortenWalletAddress(address, 3, 3) ||
|
|
64
|
-
shortenEmail(user === null || user === void 0 ? void 0 : user.email) })), jsx(Icon, Object.assign({ className: 'account-control__icon', color: 'text-primary' }, { children: jsx(SvgThreeDots, {}) }))] })));
|
|
80
|
+
}, className) }, { children: [jsx(AuthProviderIcon, { jwt: authToken, iconSize: 16 }), jsx(Typography, Object.assign({ className: 'account-control__name', as: 'p' }, { children: renderUserIdentifier() })), jsx(Icon, Object.assign({ className: 'account-control__icon', color: 'text-primary' }, { children: jsx(SvgThreeDots, {}) }))] })));
|
|
65
81
|
};
|
|
66
82
|
|
|
67
83
|
export { AccountControl };
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -48,6 +48,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
52
53
|
var NetworkPicker = require('../../../../components/NetworkPicker/NetworkPicker.cjs');
|
|
53
54
|
var helpers = require('../../helpers/helpers.cjs');
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -44,6 +44,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
48
49
|
import { NetworkPicker } from '../../../../components/NetworkPicker/NetworkPicker.js';
|
|
49
50
|
import { getExportKeysOption } from '../../helpers/helpers.js';
|
|
@@ -48,6 +48,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var helpers = require('../../helpers/helpers.cjs');
|
|
52
53
|
|
|
53
54
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -44,6 +44,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { roundBalance } from '../../helpers/helpers.js';
|
|
48
49
|
|
|
49
50
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -48,6 +48,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
48
48
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
49
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
50
50
|
var Dropdown = require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
51
52
|
var DotsMenuDropdown = require('../DotsMenuDropdown/DotsMenuDropdown.cjs');
|
|
52
53
|
|
|
53
54
|
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
@@ -44,6 +44,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
44
44
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
45
45
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
46
46
|
import { Dropdown } from '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
47
48
|
import { DotsMenuDropdown } from '../DotsMenuDropdown/DotsMenuDropdown.js';
|
|
48
49
|
|
|
49
50
|
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
@@ -47,6 +47,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
47
47
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
48
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
49
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
50
51
|
|
|
51
52
|
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: () => {
|
|
52
53
|
option.callback();
|
|
@@ -43,6 +43,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
43
43
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
44
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
45
45
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
46
47
|
|
|
47
48
|
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: () => {
|
|
48
49
|
option.callback();
|
|
@@ -50,10 +50,10 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
50
50
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
51
51
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
52
52
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
53
|
-
var IsBrowser = require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
54
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
55
53
|
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
56
54
|
var OverlayCardTarget = require('../../../../components/OverlayCard/OverlayCardTarget.cjs');
|
|
55
|
+
var IsBrowser = require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
56
|
+
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
57
57
|
|
|
58
58
|
const DynamicUserProfile = ({ variant, }) => {
|
|
59
59
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -46,10 +46,10 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
46
46
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
47
47
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
49
|
-
import { IsBrowser } from '../../../../components/IsBrowser/IsBrowser.js';
|
|
50
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
51
49
|
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
52
50
|
import { OverlayCardTarget } from '../../../../components/OverlayCard/OverlayCardTarget.js';
|
|
51
|
+
import { IsBrowser } from '../../../../components/IsBrowser/IsBrowser.js';
|
|
52
|
+
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
53
53
|
|
|
54
54
|
const DynamicUserProfile = ({ variant, }) => {
|
|
55
55
|
const { projectSettings } = useInternalDynamicContext();
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs
CHANGED
|
@@ -39,6 +39,7 @@ require('formik');
|
|
|
39
39
|
require('yup');
|
|
40
40
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
41
41
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
42
43
|
require('../../../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
43
44
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
44
45
|
var useKYCFlag = require('../../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
@@ -35,6 +35,7 @@ import 'formik';
|
|
|
35
35
|
import 'yup';
|
|
36
36
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
37
37
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
38
39
|
import '../../../../views/CollectUserDataView/fieldsConfig.js';
|
|
39
40
|
import '../../../../context/MockContext/MockContext.js';
|
|
40
41
|
import { useKYCFlag } from '../../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
@@ -20,6 +20,7 @@ require('ethers');
|
|
|
20
20
|
require('../../../../../shared/consts/index.cjs');
|
|
21
21
|
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
22
22
|
require('@dynamic-labs/multi-wallet');
|
|
23
|
+
var getActiveOauthCredential = require('../../../../../utils/functions/getActiveOauthCredential/getActiveOauthCredential.cjs');
|
|
23
24
|
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
24
25
|
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
25
26
|
var Icon = require('../../../../../components/Icon/Icon.cjs');
|
|
@@ -51,6 +52,7 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
51
52
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
52
53
|
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
53
54
|
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
55
|
+
require('../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
54
56
|
var FundingContext = require('../../../../../context/FundingContext/FundingContext.cjs');
|
|
55
57
|
var SendBalanceContext = require('../../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
56
58
|
var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
|
|
@@ -80,12 +82,19 @@ const DynamicWidgetWalletHeader = ({ variant, }) => {
|
|
|
80
82
|
setDynamicWidgetView('send-balance');
|
|
81
83
|
}
|
|
82
84
|
};
|
|
85
|
+
const renderEmailOrSocialHeader = () => {
|
|
86
|
+
const oauthCredential = getActiveOauthCredential.getActiveOauthCredential(user);
|
|
87
|
+
if (oauthCredential === null || oauthCredential === void 0 ? void 0 : oauthCredential.publicIdentifier) {
|
|
88
|
+
return oauthCredential.publicIdentifier;
|
|
89
|
+
}
|
|
90
|
+
return shortenEmail.shortenEmail(user === null || user === void 0 ? void 0 : user.email);
|
|
91
|
+
};
|
|
83
92
|
const isActionsVisible = isSendBalanceEnabled || fundingEnabled;
|
|
84
93
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'dynamic-widget-wallet-header', "data-testid": 'dynamic-widget-wallet-header' }, { children: [primaryWallet ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: "Active wallet" })), jsxRuntime.jsx(ActiveWalletInformation.ActiveWalletInformation, {})] })) : (jsxRuntime.jsx("div", Object.assign({ className: 'dynamic-widget-wallet-header__icon-container' }, { children: jsxRuntime.jsx(iconic.UserProfileIcon, {}) }))), primaryWallet ? (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'primaryWalletStatus', className: 'dynamic-widget-wallet-header__wallet-info' }, { children: isActionsVisible && (jsxRuntime.jsxs("div", Object.assign({ className: 'dynamic-widget-wallet-header__wallet-actions' }, { children: [fundingEnabled && (jsxRuntime.jsx(Button.Button, Object.assign({ expanded: true, dataTestId: 'buy-crypto-button', buttonPadding: 'small', buttonVariant: 'primary', buttonRounded: 'small', onClick: () => setShowFunding(true), disabled: !supportsFunding, startSlot:
|
|
85
94
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
86
95
|
jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsxRuntime.jsx(add.ReactComponent, {}) })) }, { children: "Buy" }))), isSendBalanceEnabled && (jsxRuntime.jsx(Button.Button, Object.assign({ expanded: true, dataTestId: 'send-balance-button', buttonPadding: 'small', buttonVariant: 'primary', buttonRounded: 'small', onClick: handleOnClickSend, startSlot:
|
|
87
96
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
88
|
-
jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsxRuntime.jsx(send.ReactComponent, {}) })) }, { children: "Send" })))] }))) }))) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'dynamic-widget-wallet-header__email', variant: 'body_normal', weight: 'regular' }, { children:
|
|
97
|
+
jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsxRuntime.jsx(send.ReactComponent, {}) })) }, { children: "Send" })))] }))) }))) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'dynamic-widget-wallet-header__email', variant: 'body_normal', weight: 'regular' }, { children: renderEmailOrSocialHeader() })))] })));
|
|
89
98
|
};
|
|
90
99
|
React__default["default"].memo(DynamicWidgetWalletHeader);
|
|
91
100
|
|
|
@@ -4,4 +4,4 @@ type DynamicWidgetWalletHeaderProps = {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const DynamicWidgetWalletHeader: FC<DynamicWidgetWalletHeaderProps>;
|
|
6
6
|
export declare const MemoizedDynamicWidgetWalletHeader: React.NamedExoticComponent<DynamicWidgetWalletHeaderProps>;
|
|
7
|
-
export
|
|
7
|
+
export {};
|
|
@@ -16,6 +16,7 @@ import 'ethers';
|
|
|
16
16
|
import '../../../../../shared/consts/index.js';
|
|
17
17
|
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
18
18
|
import '@dynamic-labs/multi-wallet';
|
|
19
|
+
import { getActiveOauthCredential } from '../../../../../utils/functions/getActiveOauthCredential/getActiveOauthCredential.js';
|
|
19
20
|
import '../../../../../components/ShadowDOM/ShadowDOM.js';
|
|
20
21
|
import '../../../../../context/ThemeContext/ThemeContext.js';
|
|
21
22
|
import { Icon } from '../../../../../components/Icon/Icon.js';
|
|
@@ -47,6 +48,7 @@ import '../../../../../components/Popper/Popper/Popper.js';
|
|
|
47
48
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
48
49
|
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
49
50
|
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
51
|
+
import '../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
50
52
|
import { useFundingContext } from '../../../../../context/FundingContext/FundingContext.js';
|
|
51
53
|
import { useSendBalance } from '../../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
52
54
|
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
@@ -72,12 +74,19 @@ const DynamicWidgetWalletHeader = ({ variant, }) => {
|
|
|
72
74
|
setDynamicWidgetView('send-balance');
|
|
73
75
|
}
|
|
74
76
|
};
|
|
77
|
+
const renderEmailOrSocialHeader = () => {
|
|
78
|
+
const oauthCredential = getActiveOauthCredential(user);
|
|
79
|
+
if (oauthCredential === null || oauthCredential === void 0 ? void 0 : oauthCredential.publicIdentifier) {
|
|
80
|
+
return oauthCredential.publicIdentifier;
|
|
81
|
+
}
|
|
82
|
+
return shortenEmail(user === null || user === void 0 ? void 0 : user.email);
|
|
83
|
+
};
|
|
75
84
|
const isActionsVisible = isSendBalanceEnabled || fundingEnabled;
|
|
76
85
|
return (jsxs("div", Object.assign({ className: 'dynamic-widget-wallet-header', "data-testid": 'dynamic-widget-wallet-header' }, { children: [primaryWallet ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: "Active wallet" })), jsx(ActiveWalletInformation, {})] })) : (jsx("div", Object.assign({ className: 'dynamic-widget-wallet-header__icon-container' }, { children: jsx(UserProfileIcon, {}) }))), primaryWallet ? (jsx("div", Object.assign({ "data-testid": 'primaryWalletStatus', className: 'dynamic-widget-wallet-header__wallet-info' }, { children: isActionsVisible && (jsxs("div", Object.assign({ className: 'dynamic-widget-wallet-header__wallet-actions' }, { children: [fundingEnabled && (jsx(Button, Object.assign({ expanded: true, dataTestId: 'buy-crypto-button', buttonPadding: 'small', buttonVariant: 'primary', buttonRounded: 'small', onClick: () => setShowFunding(true), disabled: !supportsFunding, startSlot:
|
|
77
86
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
78
87
|
jsx(Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsx(SvgAdd, {}) })) }, { children: "Buy" }))), isSendBalanceEnabled && (jsx(Button, Object.assign({ expanded: true, dataTestId: 'send-balance-button', buttonPadding: 'small', buttonVariant: 'primary', buttonRounded: 'small', onClick: handleOnClickSend, startSlot:
|
|
79
88
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
80
|
-
jsx(Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsx(SvgSend, {}) })) }, { children: "Send" })))] }))) }))) : (jsx(Typography, Object.assign({ className: 'dynamic-widget-wallet-header__email', variant: 'body_normal', weight: 'regular' }, { children:
|
|
89
|
+
jsx(Icon, Object.assign({ size: 'small', color: 'text-secondary' }, { children: jsx(SvgSend, {}) })) }, { children: "Send" })))] }))) }))) : (jsx(Typography, Object.assign({ className: 'dynamic-widget-wallet-header__email', variant: 'body_normal', weight: 'regular' }, { children: renderEmailOrSocialHeader() })))] })));
|
|
81
90
|
};
|
|
82
91
|
React__default.memo(DynamicWidgetWalletHeader);
|
|
83
92
|
|
|
@@ -39,6 +39,7 @@ require('formik');
|
|
|
39
39
|
require('yup');
|
|
40
40
|
require('../../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
41
41
|
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
|
+
require('../../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
42
43
|
require('../../../../../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
43
44
|
require('../../../../../../context/MockContext/MockContext.cjs');
|
|
44
45
|
require('../../../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -35,6 +35,7 @@ import 'formik';
|
|
|
35
35
|
import 'yup';
|
|
36
36
|
import '../../../../../../components/InlineWidget/InlineWidget.js';
|
|
37
37
|
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
|
+
import '../../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
38
39
|
import '../../../../../../views/CollectUserDataView/fieldsConfig.js';
|
|
39
40
|
import '../../../../../../context/MockContext/MockContext.js';
|
|
40
41
|
import '../../../../../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -47,6 +47,7 @@ require('../../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
47
47
|
var PopperContext = require('../../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
48
|
require('../../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
49
|
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
require('../../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
50
51
|
|
|
51
52
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
52
53
|
usePreventPageScroll.usePreventPageScroll(Boolean(isShown));
|
|
@@ -43,6 +43,7 @@ import '../../../../../../components/Popper/Popper/Popper.js';
|
|
|
43
43
|
import { PopperProvider } from '../../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
44
|
import '../../../../../../components/InlineWidget/InlineWidget.js';
|
|
45
45
|
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
46
47
|
|
|
47
48
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
48
49
|
usePreventPageScroll(Boolean(isShown));
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
6
7
|
require('react');
|
|
7
8
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
8
9
|
require('@dynamic-labs/sdk-api');
|
|
@@ -47,16 +48,18 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
47
48
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
49
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
50
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
51
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
50
52
|
var getWalletVerifiedCredential = require('../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs');
|
|
51
53
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
52
54
|
var EmptyWallets = require('../EmptyWallets/EmptyWallets.cjs');
|
|
53
55
|
var Wallet = require('../Wallet/Wallet.cjs');
|
|
54
56
|
|
|
55
57
|
const DynamicWidgetWallets = () => {
|
|
58
|
+
const { t } = reactI18next.useTranslation();
|
|
56
59
|
const { secondaryWallets, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
57
60
|
const { availableWalletsContainerRef } = DynamicWidgetContext.useWidgetContext();
|
|
58
61
|
const isEmpty = secondaryWallets.length === 0;
|
|
59
|
-
return (jsxRuntime.jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children:
|
|
62
|
+
return (jsxRuntime.jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: t('dyn_widget.other_wallets') })), jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('available-wallets__body', {
|
|
60
63
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
61
64
|
}) }, { children: isEmpty ? (jsxRuntime.jsx(EmptyWallets.EmptyWallets, {})) : (jsxRuntime.jsx("div", Object.assign({ className: 'available-wallets__wallet-list' }, { children: secondaryWallets.map((wallet, index) => {
|
|
62
65
|
var _a;
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import 'react';
|
|
3
4
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
4
5
|
import '@dynamic-labs/sdk-api';
|
|
@@ -43,16 +44,18 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
43
44
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
45
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
45
46
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
47
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
46
48
|
import { getWalletVerifiedCredential } from '../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js';
|
|
47
49
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
48
50
|
import { EmptyWallets } from '../EmptyWallets/EmptyWallets.js';
|
|
49
51
|
import { Wallet } from '../Wallet/Wallet.js';
|
|
50
52
|
|
|
51
53
|
const DynamicWidgetWallets = () => {
|
|
54
|
+
const { t } = useTranslation();
|
|
52
55
|
const { secondaryWallets, user } = useInternalDynamicContext();
|
|
53
56
|
const { availableWalletsContainerRef } = useWidgetContext();
|
|
54
57
|
const isEmpty = secondaryWallets.length === 0;
|
|
55
|
-
return (jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children:
|
|
58
|
+
return (jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: t('dyn_widget.other_wallets') })), jsx("div", Object.assign({ className: classNames('available-wallets__body', {
|
|
56
59
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
57
60
|
}) }, { children: isEmpty ? (jsx(EmptyWallets, {})) : (jsx("div", Object.assign({ className: 'available-wallets__wallet-list' }, { children: secondaryWallets.map((wallet, index) => {
|
|
58
61
|
var _a;
|