@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
|
@@ -19,6 +19,7 @@ require('ethers');
|
|
|
19
19
|
require('../../shared/consts/index.cjs');
|
|
20
20
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
var getSocialSignInProviderForProviderEnum = require('../../utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.cjs');
|
|
22
23
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -52,16 +53,18 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
52
53
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
53
54
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
54
55
|
var capitalize = require('../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
56
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
55
57
|
var SocialRedirectContext = require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
56
|
-
var LoginEmailForm = require('../LoginView/
|
|
58
|
+
var LoginEmailForm = require('../LoginView/sections/EmailSignInSection/LoginEmailForm.cjs');
|
|
57
59
|
|
|
58
60
|
const AccountExistsView = () => {
|
|
59
61
|
const { existentAccountData } = AccountExistsContext.useAccountExistsContext();
|
|
60
62
|
const { email, embeddedSocialSigninProvider } = existentAccountData || {};
|
|
63
|
+
const existingSocialSignInProvider = getSocialSignInProviderForProviderEnum.getSocialSignInProviderForProviderEnum(embeddedSocialSigninProvider);
|
|
61
64
|
const { socialProvider, setSocialProvider, socialWalletConnector } = SocialRedirectContext.useSocialRedirectContext();
|
|
62
65
|
const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
|
|
63
66
|
const { mutate: handleNewLoging } = useMutation.useMutation(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
-
setSocialProvider(
|
|
67
|
+
setSocialProvider(existingSocialSignInProvider);
|
|
65
68
|
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
66
69
|
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(embeddedSocialSigninProvider);
|
|
67
70
|
}));
|
|
@@ -71,7 +74,7 @@ const AccountExistsView = () => {
|
|
|
71
74
|
: '. Please log in with your email.';
|
|
72
75
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["It looks like an account already exists using ", jsxRuntime.jsx("strong", { children: email }), '', messageTrail] }));
|
|
73
76
|
};
|
|
74
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'account-exists__container' }, { children: [jsxRuntime.jsx(iconic.UserProfileIcon, { className: 'account-exists__image' }), jsxRuntime.jsxs("div", Object.assign({ className: 'account-exists__main' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'account-exists__content' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'account-exists__content--secondary' }, { children: renderFullMessage() })) })), embeddedSocialSigninProvider ? (jsxRuntime.jsxs(IconListTile.IconListTile, Object.assign({ dataTestId: `inline-${embeddedSocialSigninProvider}`, onClick: () => handleNewLoging(), className: 'social-sign-in--tile' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(embeddedSocialSigninProvider), isSpinning: socialProvider ===
|
|
77
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'account-exists__container' }, { children: [jsxRuntime.jsx(iconic.UserProfileIcon, { className: 'account-exists__image' }), jsxRuntime.jsxs("div", Object.assign({ className: 'account-exists__main' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'account-exists__content' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'account-exists__content--secondary' }, { children: renderFullMessage() })) })), embeddedSocialSigninProvider ? (jsxRuntime.jsxs(IconListTile.IconListTile, Object.assign({ dataTestId: `inline-${embeddedSocialSigninProvider}`, onClick: () => handleNewLoging(), className: 'social-sign-in--tile' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(embeddedSocialSigninProvider), isSpinning: socialProvider === existingSocialSignInProvider, iconSize: 32 }), jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'button_primary' }, { children: ["Connect with", ' ', capitalize.capitalize(embeddedSocialSigninProvider === null || embeddedSocialSigninProvider === void 0 ? void 0 : embeddedSocialSigninProvider.toString())] }))] }), embeddedSocialSigninProvider)) : (jsxRuntime.jsx(LoginEmailForm.LoginEmailForm, { isLoading: false, currentEmail: email }))] }))] })));
|
|
75
78
|
};
|
|
76
79
|
|
|
77
80
|
exports.AccountExistsView = AccountExistsView;
|
|
@@ -15,6 +15,7 @@ import 'ethers';
|
|
|
15
15
|
import '../../shared/consts/index.js';
|
|
16
16
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import { getSocialSignInProviderForProviderEnum } from '../../utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.js';
|
|
18
19
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -48,16 +49,18 @@ import '../../components/Popper/PopperContext/PopperContext.js';
|
|
|
48
49
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
49
50
|
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
50
51
|
import { capitalize } from '../../shared/utils/functions/capitalize/capitalize.js';
|
|
52
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
51
53
|
import { useSocialRedirectContext } from '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
52
|
-
import { LoginEmailForm } from '../LoginView/
|
|
54
|
+
import { LoginEmailForm } from '../LoginView/sections/EmailSignInSection/LoginEmailForm.js';
|
|
53
55
|
|
|
54
56
|
const AccountExistsView = () => {
|
|
55
57
|
const { existentAccountData } = useAccountExistsContext();
|
|
56
58
|
const { email, embeddedSocialSigninProvider } = existentAccountData || {};
|
|
59
|
+
const existingSocialSignInProvider = getSocialSignInProviderForProviderEnum(embeddedSocialSigninProvider);
|
|
57
60
|
const { socialProvider, setSocialProvider, socialWalletConnector } = useSocialRedirectContext();
|
|
58
61
|
const findSocialIcon = useFindSocialIcon();
|
|
59
62
|
const { mutate: handleNewLoging } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
setSocialProvider(
|
|
63
|
+
setSocialProvider(existingSocialSignInProvider);
|
|
61
64
|
yield (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.endSession());
|
|
62
65
|
return socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.connect(embeddedSocialSigninProvider);
|
|
63
66
|
}));
|
|
@@ -67,7 +70,7 @@ const AccountExistsView = () => {
|
|
|
67
70
|
: '. Please log in with your email.';
|
|
68
71
|
return (jsxs(Fragment, { children: ["It looks like an account already exists using ", jsx("strong", { children: email }), '', messageTrail] }));
|
|
69
72
|
};
|
|
70
|
-
return (jsxs("div", Object.assign({ className: 'account-exists__container' }, { children: [jsx(UserProfileIcon, { className: 'account-exists__image' }), jsxs("div", Object.assign({ className: 'account-exists__main' }, { children: [jsx("div", Object.assign({ className: 'account-exists__content' }, { children: jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'account-exists__content--secondary' }, { children: renderFullMessage() })) })), embeddedSocialSigninProvider ? (jsxs(IconListTile, Object.assign({ dataTestId: `inline-${embeddedSocialSigninProvider}`, onClick: () => handleNewLoging(), className: 'social-sign-in--tile' }, { children: [jsx(IconWithSpinner, { Icon: findSocialIcon(embeddedSocialSigninProvider), isSpinning: socialProvider ===
|
|
73
|
+
return (jsxs("div", Object.assign({ className: 'account-exists__container' }, { children: [jsx(UserProfileIcon, { className: 'account-exists__image' }), jsxs("div", Object.assign({ className: 'account-exists__main' }, { children: [jsx("div", Object.assign({ className: 'account-exists__content' }, { children: jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'account-exists__content--secondary' }, { children: renderFullMessage() })) })), embeddedSocialSigninProvider ? (jsxs(IconListTile, Object.assign({ dataTestId: `inline-${embeddedSocialSigninProvider}`, onClick: () => handleNewLoging(), className: 'social-sign-in--tile' }, { children: [jsx(IconWithSpinner, { Icon: findSocialIcon(embeddedSocialSigninProvider), isSpinning: socialProvider === existingSocialSignInProvider, iconSize: 32 }), jsxs(Typography, Object.assign({ variant: 'button_primary' }, { children: ["Connect with", ' ', capitalize(embeddedSocialSigninProvider === null || embeddedSocialSigninProvider === void 0 ? void 0 : embeddedSocialSigninProvider.toString())] }))] }), embeddedSocialSigninProvider)) : (jsx(LoginEmailForm, { isLoading: false, currentEmail: email }))] }))] })));
|
|
71
74
|
};
|
|
72
75
|
|
|
73
76
|
export { AccountExistsView };
|
|
@@ -34,7 +34,7 @@ const BridgeSummaryView = () => {
|
|
|
34
34
|
const createPrimaryWalletCard = (wallet) => {
|
|
35
35
|
const PrimaryWalletChainIcon = getChainIcon.getChainIcon(wallet.chain);
|
|
36
36
|
const primaryWalletChainInfo = walletConnectorCore.getChainInfo(wallet.chain);
|
|
37
|
-
return (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, {
|
|
37
|
+
return (jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, { walletKey: wallet.connector.key, walletAddress: wallet.address, walletBalance:
|
|
38
38
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
39
39
|
jsxRuntime.jsx(Balance.Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }) }) })));
|
|
40
40
|
};
|
|
@@ -30,7 +30,7 @@ const BridgeSummaryView = () => {
|
|
|
30
30
|
const createPrimaryWalletCard = (wallet) => {
|
|
31
31
|
const PrimaryWalletChainIcon = getChainIcon(wallet.chain);
|
|
32
32
|
const primaryWalletChainInfo = getChainInfo(wallet.chain);
|
|
33
|
-
return (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, {
|
|
33
|
+
return (jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, { walletKey: wallet.connector.key, walletAddress: wallet.address, walletBalance:
|
|
34
34
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
35
35
|
jsx(Balance, { address: wallet.address, connector: wallet.connector, network: wallet.chain }) }) })));
|
|
36
36
|
};
|
|
@@ -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 Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
52
53
|
|
|
53
54
|
const CaptchaVerifyUser = () => {
|
|
@@ -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 { Captcha } from '../../components/Captcha/Captcha.js';
|
|
48
49
|
|
|
49
50
|
const CaptchaVerifyUser = () => {
|
|
@@ -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 NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
54
55
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
55
56
|
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
@@ -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 { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
50
51
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
51
52
|
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
@@ -50,9 +50,10 @@ require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
50
50
|
require('yup');
|
|
51
51
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
52
52
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
53
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
53
54
|
|
|
54
55
|
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
55
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt,
|
|
56
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, internalSetShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
56
57
|
const { setView, view } = ViewContext.useViewContext();
|
|
57
58
|
const decodedJwt = decodeJwt.decodeJwt(onboardingOnlyJwt);
|
|
58
59
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
@@ -71,9 +72,9 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
|
71
72
|
setView(view);
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
internalSetShowAuthFlow(false);
|
|
75
76
|
setCallback('authSuccess');
|
|
76
|
-
}), [setCallback,
|
|
77
|
+
}), [setCallback, internalSetShowAuthFlow, setView, updateUser]);
|
|
77
78
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm.useUserDataForm({
|
|
78
79
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
79
80
|
onSubmit,
|
|
@@ -46,9 +46,10 @@ import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
46
46
|
import 'yup';
|
|
47
47
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
49
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
49
50
|
|
|
50
51
|
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
51
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt,
|
|
52
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, internalSetShowAuthFlow, setCallback, } = useInternalDynamicContext();
|
|
52
53
|
const { setView, view } = useViewContext();
|
|
53
54
|
const decodedJwt = decodeJwt(onboardingOnlyJwt);
|
|
54
55
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
@@ -67,9 +68,9 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
|
67
68
|
setView(view);
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
internalSetShowAuthFlow(false);
|
|
71
72
|
setCallback('authSuccess');
|
|
72
|
-
}), [setCallback,
|
|
73
|
+
}), [setCallback, internalSetShowAuthFlow, setView, updateUser]);
|
|
73
74
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm({
|
|
74
75
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
75
76
|
onSubmit,
|
|
@@ -52,6 +52,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
52
52
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
53
53
|
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
54
54
|
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
55
|
+
require('../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
55
56
|
|
|
56
57
|
const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => (jsxRuntime.jsx("div", Object.assign({ className: 'user-data-fields__fields-column' }, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
57
58
|
const { label, type } = index.getValueByKey(fieldsConfig.fieldsConfig, name);
|
|
@@ -48,6 +48,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
48
48
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
49
49
|
import '../../../components/InlineWidget/InlineWidget.js';
|
|
50
50
|
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
51
|
+
import '../../../components/OverlayCard/OverlayCard.context.js';
|
|
51
52
|
|
|
52
53
|
const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => (jsx("div", Object.assign({ className: 'user-data-fields__fields-column' }, { children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
53
54
|
const { label, type } = getValueByKey(fieldsConfig, name);
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.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 OnboardingUserDataForm = require('../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
52
53
|
|
|
53
54
|
const CollectUserDataViewLoginWithEmail = () => {
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.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 { OnboardingUserDataForm } from '../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
48
49
|
|
|
49
50
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -51,6 +51,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
51
51
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
52
52
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
53
53
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
54
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
54
55
|
|
|
55
56
|
const EmailConfirmationWaitingView = () => {
|
|
56
57
|
const { setView } = ViewContext.useViewContext();
|
|
@@ -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, { sectionData: viewSection }, `${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, { sectionData: viewSection }, `${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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SocialSignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
2
|
+
export interface LoginWidgetProps {
|
|
3
|
+
onSubmit?: () => void;
|
|
4
|
+
onSubmitError?: () => void;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SocialSectionProps {
|
|
8
|
+
defaultProvider?: SocialSignInProviderEnum;
|
|
9
|
+
numOfItemsToDisplay?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
require('@dynamic-labs/sdk-api');
|
|
8
|
+
require('../../../../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
var ViewContext = require('../../../../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('@dynamic-labs/wallet-book');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../../../utils/constants/colors.cjs');
|
|
15
|
+
require('../../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
|
+
require('ethers');
|
|
17
|
+
require('../../../../../shared/consts/index.cjs');
|
|
18
|
+
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
20
|
+
var getProviderEnumForSocialSignInProvider = require('../../../../../utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.cjs');
|
|
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
|
+
require('@dynamic-labs/types');
|
|
43
|
+
var useSocialAuth = require('../../../../../utils/hooks/useSocialAuth/useSocialAuth.cjs');
|
|
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 DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, }) => {
|
|
54
|
+
const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
55
|
+
const { setSocialProvider, socialProvider, enabledSocialProviders } = SocialRedirectContext.useSocialRedirectContext();
|
|
56
|
+
const { setView, goToInitialView } = ViewContext.useViewContext();
|
|
57
|
+
const { isProcessing, connectSocialAccount } = useSocialAuth.useSocialAuth({
|
|
58
|
+
authMode: 'signin',
|
|
59
|
+
onError: () => {
|
|
60
|
+
goToInitialView();
|
|
61
|
+
},
|
|
62
|
+
onSettled: () => {
|
|
63
|
+
setSocialProvider(undefined);
|
|
64
|
+
},
|
|
65
|
+
sessionTimeout: 10000,
|
|
66
|
+
});
|
|
67
|
+
const onSelectProvider = (provider) => {
|
|
68
|
+
const providerEnum = getProviderEnumForSocialSignInProvider.getProviderEnumForSocialSignInProvider(provider);
|
|
69
|
+
setSocialProvider(provider);
|
|
70
|
+
setView('social-redirect-view');
|
|
71
|
+
setShowAuthFlow(true);
|
|
72
|
+
connectSocialAccount(providerEnum);
|
|
73
|
+
};
|
|
74
|
+
return (jsxRuntime.jsx(SocialSignIn.SocialSignIn, { onSelectProvider: onSelectProvider, providers: enabledSocialProviders, selectedProvider: socialProvider, isLoading: isProcessing, testId: 'dynamic-social-sign-in', defaultProvider: defaultProvider, numOfItemsToDisplay: numOfItemsToDisplay }));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.DynamicSocialSignIn = DynamicSocialSignIn;
|