@dynamic-labs/sdk-react-core 0.19.0-alpha.5 → 0.19.0-alpha.7
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 +39 -0
- package/package.cjs +7 -5
- package/package.js +7 -5
- package/package.json +14 -12
- 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/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/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- 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/SocialSignIn/SocialSignIn.cjs +86 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +11 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +82 -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/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 +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -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 +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -1
- 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 +30 -3
- package/src/lib/context/DynamicContext/helpers.d.ts +5 -1
- package/src/lib/context/DynamicContext/helpers.js +28 -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 +1 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +1 -0
- 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 +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- 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 +7 -0
- package/src/lib/data/api.js +7 -0
- 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 +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts +0 -1
- 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.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 +92 -0
- package/src/lib/locale/en/translation.js +79 -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/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +3 -1
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +3 -2
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -1
- 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 +13 -8
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -19
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +13 -8
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +22 -28
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +23 -29
- 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/useSocialAccounts/useSocialAccounts.cjs +1 -6
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -6
- 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 +15 -10
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +15 -10
- 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 +2 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +2 -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/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +64 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.d.ts +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +60 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +35 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.d.ts +2 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +31 -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} +7 -2
- 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} +7 -2
- 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 +17 -4
- package/src/lib/views/LoginView/useLoginView.js +17 -4
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- 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/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 +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/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 +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.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 +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- 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/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 +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/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 +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- 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/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 +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 +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/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 → sections}/LoginWidget.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
|
@@ -47,6 +47,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
47
47
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
48
48
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
49
49
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
50
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
50
51
|
|
|
51
52
|
const EmailConfirmationWaitingView = () => {
|
|
52
53
|
const { setView } = useViewContext();
|
|
@@ -50,6 +50,7 @@ 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
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
53
54
|
var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
|
|
54
55
|
|
|
55
56
|
const EmailUpdate = () => {
|
|
@@ -46,6 +46,7 @@ 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 '../../components/OverlayCard/OverlayCard.context.js';
|
|
49
50
|
import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.js';
|
|
50
51
|
|
|
51
52
|
const EmailUpdate = () => {
|
|
@@ -5,15 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var iconic = require('@dynamic-labs/iconic');
|
|
9
8
|
var utils = require('@dynamic-labs/utils');
|
|
10
9
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
11
10
|
var decodeJwt = require('../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
11
|
+
require('@dynamic-labs/iconic');
|
|
12
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
14
14
|
var close = require('../../shared/assets/close.cjs');
|
|
15
15
|
var check = require('../../shared/assets/check.cjs');
|
|
16
16
|
var checkCircle = require('../../shared/assets/check-circle.cjs');
|
|
17
|
+
var signInWithEmail = require('../../shared/assets/sign-in-with-email.cjs');
|
|
17
18
|
var logger = require('../../shared/logger.cjs');
|
|
18
19
|
require('@dynamic-labs/wallet-book');
|
|
19
20
|
require('../../utils/constants/colors.cjs');
|
|
@@ -27,6 +28,7 @@ require('@dynamic-labs/sdk-api');
|
|
|
27
28
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
28
29
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
29
30
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
31
|
+
var Icon = require('../../components/Icon/Icon.cjs');
|
|
30
32
|
require('react-dom');
|
|
31
33
|
require('react-focus-lock');
|
|
32
34
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
@@ -64,6 +66,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
64
66
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
65
67
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
66
68
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
67
70
|
var EmailVerificationContext = require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
68
71
|
var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
|
|
69
72
|
|
|
@@ -259,9 +262,13 @@ const EmailVerification = () => {
|
|
|
259
262
|
setView('update-email');
|
|
260
263
|
};
|
|
261
264
|
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: close$1, type: 'button', "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
262
|
-
|
|
265
|
+
const EmailIcon = React.useMemo(() => {
|
|
266
|
+
const EmailIcon = (props) => (jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'brand-primary' }, { children: jsxRuntime.jsx(signInWithEmail.ReactComponent, Object.assign({}, props)) })));
|
|
267
|
+
return EmailIcon;
|
|
268
|
+
}, []);
|
|
269
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ style: { paddingBlock: 0 }, trailing: !isLoginView && closeButton }, { children: isValidated ? (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 50, InnerIcon: check.ReactComponent }) }))) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { className: classNames.classNames({
|
|
263
270
|
'email-verification__icon-with-spinner': Boolean(!error),
|
|
264
|
-
}), Icon:
|
|
271
|
+
}), Icon: EmailIcon, iconSize: 80, isSpinning: true })) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) }))] })), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ onClick: updateEmail, className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxRuntime.jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__log-out', onClick: handleLogOut }, { children: "Log out" }))), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] })));
|
|
265
272
|
};
|
|
266
273
|
|
|
267
274
|
exports.EmailVerification = EmailVerification;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useRef, useCallback } from 'react';
|
|
4
|
-
import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
|
|
3
|
+
import { useState, useRef, useCallback, useMemo } from 'react';
|
|
5
4
|
import { UserHasAccountWithEmailError, NoAccessError, AccountExistsError } from '@dynamic-labs/utils';
|
|
6
5
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
7
6
|
import { decodeJwt } from '../../shared/utils/functions/decodeJwt/decodeJwt.js';
|
|
7
|
+
import '@dynamic-labs/iconic';
|
|
8
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
10
10
|
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
11
11
|
import { ReactComponent as SvgCheck } from '../../shared/assets/check.js';
|
|
12
12
|
import { ReactComponent as SvgCheckCircle } from '../../shared/assets/check-circle.js';
|
|
13
|
+
import { ReactComponent as SvgSignInWithEmail } from '../../shared/assets/sign-in-with-email.js';
|
|
13
14
|
import { logger } from '../../shared/logger.js';
|
|
14
15
|
import '@dynamic-labs/wallet-book';
|
|
15
16
|
import '../../utils/constants/colors.js';
|
|
@@ -23,6 +24,7 @@ import '@dynamic-labs/sdk-api';
|
|
|
23
24
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
24
25
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
25
26
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
27
|
+
import { Icon } from '../../components/Icon/Icon.js';
|
|
26
28
|
import 'react-dom';
|
|
27
29
|
import 'react-focus-lock';
|
|
28
30
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
@@ -60,6 +62,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
60
62
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
61
63
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
62
64
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
63
66
|
import { useEmailVerificationContext } from '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
64
67
|
import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.js';
|
|
65
68
|
|
|
@@ -255,9 +258,13 @@ const EmailVerification = () => {
|
|
|
255
258
|
setView('update-email');
|
|
256
259
|
};
|
|
257
260
|
const closeButton = (jsx(IconButton, Object.assign({ onClick: close, type: 'button', "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
|
|
258
|
-
|
|
261
|
+
const EmailIcon = useMemo(() => {
|
|
262
|
+
const EmailIcon = (props) => (jsx(Icon, Object.assign({ color: 'brand-primary' }, { children: jsx(SvgSignInWithEmail, Object.assign({}, props)) })));
|
|
263
|
+
return EmailIcon;
|
|
264
|
+
}, []);
|
|
265
|
+
return (jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), jsx(ModalHeader, Object.assign({ style: { paddingBlock: 0 }, trailing: !isLoginView && closeButton }, { children: isValidated ? (jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsx(IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 50, InnerIcon: SvgCheck }) }))) : (jsx(IconWithSpinner, { className: classNames({
|
|
259
266
|
'email-verification__icon-with-spinner': Boolean(!error),
|
|
260
|
-
}), Icon:
|
|
267
|
+
}), Icon: EmailIcon, iconSize: 80, isSpinning: true })) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) }))] })), !isLoginView && (jsx(TextButton, Object.assign({ onClick: updateEmail, className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsx(SvgCheckCircle, {}), jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsx(TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsx(TextButton, Object.assign({ className: 'email-verification__log-out', onClick: handleLogOut }, { children: "Log out" }))), jsx(PoweredByDynamic, {})] })));
|
|
261
268
|
};
|
|
262
269
|
|
|
263
270
|
export { EmailVerification };
|
|
@@ -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('../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 '../CollectUserDataView/fieldsConfig.js';
|
|
39
40
|
import '../../context/MockContext/MockContext.js';
|
|
40
41
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -12,9 +12,9 @@ var useAuthLayoutChecks = require('../../utils/hooks/useAuthLayoutChecks/useAuth
|
|
|
12
12
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
13
13
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
14
14
|
var WalletList = require('../WalletList/WalletList.cjs');
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
15
|
+
var LoginEmailForm = require('./sections/EmailSignInSection/LoginEmailForm.cjs');
|
|
16
|
+
var WalletSignInSection = require('./sections/WalletSignInSection/WalletSignInSection.cjs');
|
|
17
|
+
var SocialSignInSection = require('./sections/SocialSignInSection/SocialSignInSection.cjs');
|
|
18
18
|
var useLoginView = require('./useLoginView.cjs');
|
|
19
19
|
|
|
20
20
|
const LoginView = () => {
|
|
@@ -49,14 +49,14 @@ const LoginView = () => {
|
|
|
49
49
|
case 'email':
|
|
50
50
|
return (jsxRuntime.jsx(LoginEmailForm.LoginEmailForm, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading }, `${viewSection.type}_${index}`));
|
|
51
51
|
case 'wallet':
|
|
52
|
-
return (jsxRuntime.jsx(
|
|
52
|
+
return (jsxRuntime.jsx(WalletSignInSection.WalletSignInSection, { numberOfItensToShow: viewSection.numOfItemsToDisplay || 0, onSubmit: () => {
|
|
53
53
|
setView('login-with-email-or-wallet-full-wallet-list'); // this view is just to show the back button
|
|
54
54
|
setShowWalletList(true);
|
|
55
55
|
}, isLoading: isLoading }, `${viewSection.type}_${index}`));
|
|
56
56
|
case 'social':
|
|
57
|
-
return jsxRuntime.jsx(
|
|
57
|
+
return jsxRuntime.jsx(SocialSignInSection.SocialSignInSection, {}, `${viewSection.type}_${index}`);
|
|
58
58
|
default:
|
|
59
|
-
return;
|
|
59
|
+
return null;
|
|
60
60
|
}
|
|
61
61
|
}), [logingViewSections, isLoading, setView]);
|
|
62
62
|
if (showWalletList) {
|
|
@@ -8,9 +8,9 @@ import { useAuthLayoutChecks } from '../../utils/hooks/useAuthLayoutChecks/useAu
|
|
|
8
8
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
9
9
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
10
10
|
import { WalletList } from '../WalletList/WalletList.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { LoginEmailForm } from './sections/EmailSignInSection/LoginEmailForm.js';
|
|
12
|
+
import { WalletSignInSection } from './sections/WalletSignInSection/WalletSignInSection.js';
|
|
13
|
+
import { SocialSignInSection } from './sections/SocialSignInSection/SocialSignInSection.js';
|
|
14
14
|
import { useLoginView } from './useLoginView.js';
|
|
15
15
|
|
|
16
16
|
const LoginView = () => {
|
|
@@ -45,14 +45,14 @@ const LoginView = () => {
|
|
|
45
45
|
case 'email':
|
|
46
46
|
return (jsx(LoginEmailForm, { onSubmit: () => setIsLoading(true), onSubmitError: () => setIsLoading(false), isLoading: isLoading }, `${viewSection.type}_${index}`));
|
|
47
47
|
case 'wallet':
|
|
48
|
-
return (jsx(
|
|
48
|
+
return (jsx(WalletSignInSection, { numberOfItensToShow: viewSection.numOfItemsToDisplay || 0, onSubmit: () => {
|
|
49
49
|
setView('login-with-email-or-wallet-full-wallet-list'); // this view is just to show the back button
|
|
50
50
|
setShowWalletList(true);
|
|
51
51
|
}, isLoading: isLoading }, `${viewSection.type}_${index}`));
|
|
52
52
|
case 'social':
|
|
53
|
-
return jsx(
|
|
53
|
+
return jsx(SocialSignInSection, {}, `${viewSection.type}_${index}`);
|
|
54
54
|
default:
|
|
55
|
-
return;
|
|
55
|
+
return null;
|
|
56
56
|
}
|
|
57
57
|
}), [logingViewSections, isLoading, setView]);
|
|
58
58
|
if (showWalletList) {
|
|
@@ -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 useEmailProvider = require('../../../../utils/hooks/useEmailProvider/useEmailProvider.cjs');
|
|
52
53
|
|
|
53
54
|
const EMAIL_REGEX = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
|
|
@@ -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 { useEmailProvider } from '../../../../utils/hooks/useEmailProvider/useEmailProvider.js';
|
|
48
49
|
|
|
49
50
|
const EMAIL_REGEX = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
|
package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../../../../_virtual/_tslib.cjs');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
require('react');
|
|
8
|
+
require('@dynamic-labs/sdk-api');
|
|
9
|
+
require('../../../../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('../../../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/wallet-book');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
15
|
+
require('../../../../../utils/constants/colors.cjs');
|
|
16
|
+
require('../../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
17
|
+
require('ethers');
|
|
18
|
+
require('../../../../../shared/consts/index.cjs');
|
|
19
|
+
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
20
|
+
require('@dynamic-labs/multi-wallet');
|
|
21
|
+
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
22
|
+
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
23
|
+
require('react-dom');
|
|
24
|
+
require('react-focus-lock');
|
|
25
|
+
require('../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
26
|
+
require('../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
27
|
+
require('../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
28
|
+
require('../../../../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
30
|
+
require('../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
31
|
+
require('../../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
|
+
require('../../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
|
+
require('../../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
34
|
+
require('../../../../../components/IconButton/IconButton.cjs');
|
|
35
|
+
require('../../../../../components/Alert/Alert.cjs');
|
|
36
|
+
require('formik');
|
|
37
|
+
require('yup');
|
|
38
|
+
require('../../../../CollectUserDataView/fieldsConfig.cjs');
|
|
39
|
+
require('../../../../../context/MockContext/MockContext.cjs');
|
|
40
|
+
require('../../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
41
|
+
require('../../../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
42
|
+
var useMutation = require('../../../../../utils/hooks/useMutation/useMutation.cjs');
|
|
43
|
+
require('@dynamic-labs/types');
|
|
44
|
+
require('../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
45
|
+
require('../../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
46
|
+
require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
47
|
+
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
48
|
+
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
|
+
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
var SocialSignIn = require('../../../../../components/SocialSignIn/SocialSignIn.cjs');
|
|
51
|
+
var SocialRedirectContext = require('../../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
52
|
+
|
|
53
|
+
const MagicSocialSignIn = () => {
|
|
54
|
+
const { socialProvidersFilter = (providers) => providers } = useInternalDynamicContext.useInternalDynamicContext();
|
|
55
|
+
const { socialProvider, setSocialProvider, socialWalletConnector, enabledSocialProviders, } = SocialRedirectContext.useSocialRedirectContext();
|
|
56
|
+
const socialProviders = socialProvidersFilter(enabledSocialProviders);
|
|
57
|
+
const { mutate: onClickProvider, isLoading } = useMutation.useMutation((provider) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
+
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
59
|
+
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(provider);
|
|
60
|
+
}));
|
|
61
|
+
return (jsxRuntime.jsx(SocialSignIn.SocialSignIn, { onClick: onClickProvider, providers: socialProviders, selectedProvider: socialProvider, setSelectedProvider: setSocialProvider, isLoading: isLoading, testId: 'magic-social-sign-in' }));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.MagicSocialSignIn = MagicSocialSignIn;
|
package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../../../_virtual/_tslib.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@dynamic-labs/sdk-api';
|
|
5
|
+
import '../../../../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import '../../../../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/wallet-book';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
|
+
import '../../../../../utils/constants/colors.js';
|
|
12
|
+
import '../../../../../shared/utils/classes/storage/localStorage.js';
|
|
13
|
+
import 'ethers';
|
|
14
|
+
import '../../../../../shared/consts/index.js';
|
|
15
|
+
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
16
|
+
import '@dynamic-labs/multi-wallet';
|
|
17
|
+
import '../../../../../components/ShadowDOM/ShadowDOM.js';
|
|
18
|
+
import '../../../../../context/ThemeContext/ThemeContext.js';
|
|
19
|
+
import 'react-dom';
|
|
20
|
+
import 'react-focus-lock';
|
|
21
|
+
import '../../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
22
|
+
import '../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
23
|
+
import '../../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
24
|
+
import '../../../../../config/ApiEndpoint.js';
|
|
25
|
+
import '@dynamic-labs/rpc-providers';
|
|
26
|
+
import '../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
|
+
import '../../../../../context/ErrorContext/ErrorContext.js';
|
|
28
|
+
import '../../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
|
+
import '../../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
30
|
+
import '../../../../../components/IconButton/IconButton.js';
|
|
31
|
+
import '../../../../../components/Alert/Alert.js';
|
|
32
|
+
import 'formik';
|
|
33
|
+
import 'yup';
|
|
34
|
+
import '../../../../CollectUserDataView/fieldsConfig.js';
|
|
35
|
+
import '../../../../../context/MockContext/MockContext.js';
|
|
36
|
+
import '../../../../../context/CaptchaContext/CaptchaContext.js';
|
|
37
|
+
import '../../../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
38
|
+
import { useMutation } from '../../../../../utils/hooks/useMutation/useMutation.js';
|
|
39
|
+
import '@dynamic-labs/types';
|
|
40
|
+
import '../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
41
|
+
import '../../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
42
|
+
import '../../../../../components/Popper/Popper/Popper.js';
|
|
43
|
+
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
44
|
+
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
45
|
+
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import { SocialSignIn } from '../../../../../components/SocialSignIn/SocialSignIn.js';
|
|
47
|
+
import { useSocialRedirectContext } from '../../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
48
|
+
|
|
49
|
+
const MagicSocialSignIn = () => {
|
|
50
|
+
const { socialProvidersFilter = (providers) => providers } = useInternalDynamicContext();
|
|
51
|
+
const { socialProvider, setSocialProvider, socialWalletConnector, enabledSocialProviders, } = useSocialRedirectContext();
|
|
52
|
+
const socialProviders = socialProvidersFilter(enabledSocialProviders);
|
|
53
|
+
const { mutate: onClickProvider, isLoading } = useMutation((provider) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
55
|
+
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(provider);
|
|
56
|
+
}));
|
|
57
|
+
return (jsx(SocialSignIn, { onClick: onClickProvider, providers: socialProviders, selectedProvider: socialProvider, setSelectedProvider: setSocialProvider, isLoading: isLoading, testId: 'magic-social-sign-in' }));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { MagicSocialSignIn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MagicSocialSignIn';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var sdkApi = require('@dynamic-labs/sdk-api');
|
|
7
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
8
|
+
require('../../../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('react');
|
|
13
|
+
require('@dynamic-labs/wallet-book');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
15
|
+
require('../../../../utils/constants/colors.cjs');
|
|
16
|
+
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
17
|
+
require('ethers');
|
|
18
|
+
require('../../../../shared/consts/index.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
20
|
+
var isProviderEnabled = require('../../../../utils/functions/isProviderEnabled/isProviderEnabled.cjs');
|
|
21
|
+
var MagicSocialSignIn = require('./MagicSocialSignIn/MagicSocialSignIn.cjs');
|
|
22
|
+
|
|
23
|
+
const SocialSignInSection = () => {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
26
|
+
const isMagicEnabled = isProviderEnabled.isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], sdkApi.ProviderEnum.MagicLink);
|
|
27
|
+
if (isMagicEnabled &&
|
|
28
|
+
((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _b === void 0 ? void 0 : _b.signInProvider) ===
|
|
29
|
+
sdkApi.SignInProviderEnum.MagicLink) {
|
|
30
|
+
return jsxRuntime.jsx(MagicSocialSignIn.MagicSocialSignIn, {});
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.SocialSignInSection = SocialSignInSection;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ProviderEnum, SignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
3
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
4
|
+
import '../../../../shared/logger.js';
|
|
5
|
+
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
8
|
+
import 'react';
|
|
9
|
+
import '@dynamic-labs/wallet-book';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
|
+
import '../../../../utils/constants/colors.js';
|
|
12
|
+
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
13
|
+
import 'ethers';
|
|
14
|
+
import '../../../../shared/consts/index.js';
|
|
15
|
+
import '@dynamic-labs/multi-wallet';
|
|
16
|
+
import { isProviderEnabled } from '../../../../utils/functions/isProviderEnabled/isProviderEnabled.js';
|
|
17
|
+
import { MagicSocialSignIn } from './MagicSocialSignIn/MagicSocialSignIn.js';
|
|
18
|
+
|
|
19
|
+
const SocialSignInSection = () => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const { projectSettings } = useInternalDynamicContext();
|
|
22
|
+
const isMagicEnabled = isProviderEnabled((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _a !== void 0 ? _a : [], ProviderEnum.MagicLink);
|
|
23
|
+
if (isMagicEnabled &&
|
|
24
|
+
((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.socialSignIn) === null || _b === void 0 ? void 0 : _b.signInProvider) ===
|
|
25
|
+
SignInProviderEnum.MagicLink) {
|
|
26
|
+
return jsx(MagicSocialSignIn, {});
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { SocialSignInSection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SocialSignInSection';
|
|
@@ -49,6 +49,7 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
49
49
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
50
50
|
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
51
51
|
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
52
|
+
require('../../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
52
53
|
var Badge = require('../../../../../components/Badge/Badge.cjs');
|
|
53
54
|
|
|
54
55
|
const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) => {
|
|
@@ -45,6 +45,7 @@ import '../../../../../components/Popper/Popper/Popper.js';
|
|
|
45
45
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
46
46
|
import '../../../../../components/InlineWidget/InlineWidget.js';
|
|
47
47
|
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
48
|
+
import '../../../../../components/OverlayCard/OverlayCard.context.js';
|
|
48
49
|
import { Badge } from '../../../../../components/Badge/Badge.js';
|
|
49
50
|
|
|
50
51
|
const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) => {
|
|
@@ -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
|
require('@dynamic-labs/sdk-api');
|
|
8
9
|
require('../../../../shared/logger.cjs');
|
|
@@ -46,8 +47,12 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
46
47
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
47
48
|
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
48
49
|
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
49
51
|
var WalletSimpleSignIn = require('./WalletSimpleSignIn/WalletSimpleSignIn.cjs');
|
|
50
52
|
|
|
51
|
-
const
|
|
53
|
+
const WalletSignInSection = ({ numberOfItensToShow, isLoading, onSubmit, }) => {
|
|
54
|
+
const { t } = reactI18next.useTranslation();
|
|
55
|
+
return numberOfItensToShow > 0 ? (jsxRuntime.jsx(WalletSimpleSignIn.WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsxRuntime.jsx(Button.Button, Object.assign({ disabled: isLoading, onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), buttonVariant: 'primary', buttonPadding: 'large' }, { children: t('dyn_login.wallet_list.button_only') })));
|
|
56
|
+
};
|
|
52
57
|
|
|
53
|
-
exports.
|
|
58
|
+
exports.WalletSignInSection = WalletSignInSection;
|
|
@@ -3,5 +3,5 @@ import { LoginWidgetProps } from '../LoginWidget';
|
|
|
3
3
|
interface WalletLoginProps extends LoginWidgetProps {
|
|
4
4
|
numberOfItensToShow: number;
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const WalletSignInSection: React.FC<WalletLoginProps>;
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import 'react';
|
|
3
4
|
import '@dynamic-labs/sdk-api';
|
|
4
5
|
import '../../../../shared/logger.js';
|
|
@@ -42,8 +43,12 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
42
43
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
43
44
|
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
44
45
|
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
45
47
|
import { WalletSimpleSignIn } from './WalletSimpleSignIn/WalletSimpleSignIn.js';
|
|
46
48
|
|
|
47
|
-
const
|
|
49
|
+
const WalletSignInSection = ({ numberOfItensToShow, isLoading, onSubmit, }) => {
|
|
50
|
+
const { t } = useTranslation();
|
|
51
|
+
return numberOfItensToShow > 0 ? (jsx(WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsx(Button, Object.assign({ disabled: isLoading, onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), buttonVariant: 'primary', buttonPadding: 'large' }, { children: t('dyn_login.wallet_list.button_only') })));
|
|
52
|
+
};
|
|
48
53
|
|
|
49
|
-
export {
|
|
54
|
+
export { WalletSignInSection };
|
|
@@ -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
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
8
|
var Skeleton = require('../../../../../components/Skeleton/Skeleton.cjs');
|
|
8
9
|
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
@@ -23,6 +24,7 @@ var ListItemButton = require('../ListItemButton/ListItemButton.cjs');
|
|
|
23
24
|
var walletListBuilder = require('../../../../../utils/functions/walletListBuilder/walletListBuilder.cjs');
|
|
24
25
|
|
|
25
26
|
const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllWallets, }) => {
|
|
27
|
+
const { t } = reactI18next.useTranslation();
|
|
26
28
|
const { wallets, projectSettings, walletsFilter, signWithEmailWalletName } = useInternalDynamicContext.useInternalDynamicContext();
|
|
27
29
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
28
30
|
const { numberOfWallets, walletsList } = walletListBuilder.walletListBuilder({
|
|
@@ -41,7 +43,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
|
|
|
41
43
|
return !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxRuntime.jsxs("div", Object.assign({ className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list' }, { children: [walletsList.map((wallet) => {
|
|
42
44
|
var _a;
|
|
43
45
|
return (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, wallet.key + ((_a = wallet.groupedWallets) === null || _a === void 0 ? void 0 : _a.length)));
|
|
44
|
-
}), jsxRuntime.jsx(ListItemButton.ListItemButton, { text: '
|
|
46
|
+
}), jsxRuntime.jsx(ListItemButton.ListItemButton, { text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] })));
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
exports.WalletSimpleSignIn = WalletSimpleSignIn;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { useWalletBookContext } from '@dynamic-labs/wallet-book';
|
|
3
4
|
import { Skeleton } from '../../../../../components/Skeleton/Skeleton.js';
|
|
4
5
|
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
@@ -19,6 +20,7 @@ import { ListItemButton } from '../ListItemButton/ListItemButton.js';
|
|
|
19
20
|
import { walletListBuilder } from '../../../../../utils/functions/walletListBuilder/walletListBuilder.js';
|
|
20
21
|
|
|
21
22
|
const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllWallets, }) => {
|
|
23
|
+
const { t } = useTranslation();
|
|
22
24
|
const { wallets, projectSettings, walletsFilter, signWithEmailWalletName } = useInternalDynamicContext();
|
|
23
25
|
const { walletBook } = useWalletBookContext();
|
|
24
26
|
const { numberOfWallets, walletsList } = walletListBuilder({
|
|
@@ -37,7 +39,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
|
|
|
37
39
|
return !projectSettings ? (jsx(Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxs("div", Object.assign({ className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list' }, { children: [walletsList.map((wallet) => {
|
|
38
40
|
var _a;
|
|
39
41
|
return (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, wallet.key + ((_a = wallet.groupedWallets) === null || _a === void 0 ? void 0 : _a.length)));
|
|
40
|
-
}), jsx(ListItemButton, { text: '
|
|
42
|
+
}), jsx(ListItemButton, { text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] })));
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
export { WalletSimpleSignIn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletSignInSection } from './WalletSignInSection';
|