@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
|
@@ -23,12 +23,15 @@ require('@dynamic-labs/multi-wallet');
|
|
|
23
23
|
var index = require('../../utils/functions/getEnabledOAuthProviders/index.cjs');
|
|
24
24
|
var isSocialKycEnabled = require('../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs');
|
|
25
25
|
var getUserProfileFields = require('../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
26
|
+
var ErrorContext = require('../../context/ErrorContext/ErrorContext.cjs');
|
|
27
|
+
var ErrorContainer = require('../ErrorContainer/ErrorContainer.cjs');
|
|
26
28
|
var UserProfileField = require('./parts/UserProfileField/UserProfileField.cjs');
|
|
27
29
|
var UserProfileSection = require('./parts/UserProfileSection/UserProfileSection.cjs');
|
|
28
30
|
var UserProfileSocialAccount = require('./parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs');
|
|
29
31
|
|
|
30
32
|
const UserProfile = ({ rootClassName }) => {
|
|
31
33
|
const { projectSettings, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
34
|
+
const { error } = ErrorContext.useErrorContext();
|
|
32
35
|
const allUserFields = getUserProfileFields.getUserProfileFields({
|
|
33
36
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
34
37
|
user,
|
|
@@ -39,7 +42,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
39
42
|
const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
|
|
40
43
|
if (!user)
|
|
41
44
|
return null;
|
|
42
|
-
return (jsxRuntime.jsxs("div", Object.assign({ "data-testid": 'userProfile', className: classNames.classNames('user-profile', rootClassName) }, { children: [(allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'My information' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__fields' }, { children: allUserFields.map(({ name }) => {
|
|
45
|
+
return (jsxRuntime.jsxs("div", Object.assign({ "data-testid": 'userProfile', className: classNames.classNames('user-profile', rootClassName) }, { children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'My information' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__fields' }, { children: allUserFields.map(({ name }) => {
|
|
43
46
|
const { label } = index$1.getValueByKey(fieldsConfig.fieldsConfig, name);
|
|
44
47
|
const value = mapFieldKeyToValue(name);
|
|
45
48
|
return (jsxRuntime.jsx(UserProfileField.UserProfileField, { name: name, label: label, value: value }, name));
|
|
@@ -19,12 +19,15 @@ import '@dynamic-labs/multi-wallet';
|
|
|
19
19
|
import { getEnabledOAuthProviders } from '../../utils/functions/getEnabledOAuthProviders/index.js';
|
|
20
20
|
import { isSocialKycEnabled } from '../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.js';
|
|
21
21
|
import { getUserProfileFields } from '../../utils/functions/getUserProfileFields/getUserProfileFields.js';
|
|
22
|
+
import { useErrorContext } from '../../context/ErrorContext/ErrorContext.js';
|
|
23
|
+
import { ErrorContainer } from '../ErrorContainer/ErrorContainer.js';
|
|
22
24
|
import { UserProfileField } from './parts/UserProfileField/UserProfileField.js';
|
|
23
25
|
import { UserProfileSection } from './parts/UserProfileSection/UserProfileSection.js';
|
|
24
26
|
import { UserProfileSocialAccount } from './parts/UserProfileSocialAccount/UserProfileSocialAccount.js';
|
|
25
27
|
|
|
26
28
|
const UserProfile = ({ rootClassName }) => {
|
|
27
29
|
const { projectSettings, user } = useInternalDynamicContext();
|
|
30
|
+
const { error } = useErrorContext();
|
|
28
31
|
const allUserFields = getUserProfileFields({
|
|
29
32
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
30
33
|
user,
|
|
@@ -35,7 +38,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
35
38
|
const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
|
|
36
39
|
if (!user)
|
|
37
40
|
return null;
|
|
38
|
-
return (jsxs("div", Object.assign({ "data-testid": 'userProfile', className: classNames('user-profile', rootClassName) }, { children: [(allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'My information' }, { children: jsx("div", Object.assign({ className: 'user-profile__fields' }, { children: allUserFields.map(({ name }) => {
|
|
41
|
+
return (jsxs("div", Object.assign({ "data-testid": 'userProfile', className: classNames('user-profile', rootClassName) }, { children: [error && jsx(ErrorContainer, { children: error }), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'My information' }, { children: jsx("div", Object.assign({ className: 'user-profile__fields' }, { children: allUserFields.map(({ name }) => {
|
|
39
42
|
const { label } = getValueByKey(fieldsConfig, name);
|
|
40
43
|
const value = mapFieldKeyToValue(name);
|
|
41
44
|
return (jsx(UserProfileField, { name: name, label: label, value: value }, name));
|
|
@@ -46,6 +46,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
46
46
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
47
47
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
48
48
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
49
|
+
require('../../../OverlayCard/OverlayCard.context.cjs');
|
|
49
50
|
var VerifiedEmailIcon = require('./components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
50
51
|
|
|
51
52
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -42,6 +42,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
42
42
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
43
43
|
import '../../../InlineWidget/InlineWidget.js';
|
|
44
44
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
45
|
+
import '../../../OverlayCard/OverlayCard.context.js';
|
|
45
46
|
import { VerifiedEmailIcon } from './components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
46
47
|
|
|
47
48
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -46,6 +46,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
46
46
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
47
47
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
48
48
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
49
|
+
require('../../../OverlayCard/OverlayCard.context.cjs');
|
|
49
50
|
|
|
50
51
|
const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
51
52
|
|
|
@@ -42,6 +42,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
42
42
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
43
43
|
import '../../../InlineWidget/InlineWidget.js';
|
|
44
44
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
45
|
+
import '../../../OverlayCard/OverlayCard.context.js';
|
|
45
46
|
|
|
46
47
|
const UserProfileSection = ({ title, children, }) => (jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsx(Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
47
48
|
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -18,7 +18,7 @@ require('../../../../utils/constants/colors.cjs');
|
|
|
18
18
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
19
|
require('ethers');
|
|
20
20
|
require('../../../../shared/consts/index.cjs');
|
|
21
|
-
require('../../../../context/DynamicContext/
|
|
21
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
22
22
|
require('@dynamic-labs/multi-wallet');
|
|
23
23
|
require('../../../ShadowDOM/ShadowDOM.cjs');
|
|
24
24
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -51,27 +51,30 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
51
51
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
52
52
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
53
53
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
54
|
+
require('../../../OverlayCard/OverlayCard.context.cjs');
|
|
54
55
|
var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
|
|
55
56
|
var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
|
|
56
57
|
|
|
57
58
|
const UserProfileSocialAccount = ({ provider, }) => {
|
|
58
59
|
var _a;
|
|
60
|
+
const { user, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
59
61
|
const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts.useSocialAccounts();
|
|
60
62
|
const isProviderLinked = isLinked(provider);
|
|
61
63
|
const connectedAccountInfo = getLinkedAccountInformation(provider);
|
|
62
64
|
const iconThemeVariant = useIconThemeVariant.useIconThemeVariant();
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
const isActiveCredential = !primaryWallet &&
|
|
66
|
+
connectedAccountInfo &&
|
|
67
|
+
(connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
|
|
68
|
+
const renderButton = () => (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => isProviderLinked
|
|
69
|
+
? unlinkSocialAccount(provider)
|
|
70
|
+
: linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
|
|
71
|
+
color: 'secondary',
|
|
72
|
+
variant: 'button_tertiary',
|
|
73
|
+
// weight: 'medium',
|
|
74
|
+
}, startSlot:
|
|
75
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
76
|
+
jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: isProviderLinked ? jsxRuntime.jsx(unlink.ReactComponent, {}) : jsxRuntime.jsx(add.ReactComponent, {}) })) }, { children: isProviderLinked ? null : 'Connect' })));
|
|
77
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : helpers.capitalize(provider) })) })), !isActiveCredential ? renderButton() : null] })));
|
|
75
78
|
};
|
|
76
79
|
|
|
77
80
|
exports.UserProfileSocialAccount = UserProfileSocialAccount;
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -14,7 +14,7 @@ import '../../../../utils/constants/colors.js';
|
|
|
14
14
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
15
15
|
import 'ethers';
|
|
16
16
|
import '../../../../shared/consts/index.js';
|
|
17
|
-
import '../../../../context/DynamicContext/
|
|
17
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
18
18
|
import '@dynamic-labs/multi-wallet';
|
|
19
19
|
import '../../../ShadowDOM/ShadowDOM.js';
|
|
20
20
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
@@ -47,27 +47,30 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
47
47
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
48
48
|
import '../../../InlineWidget/InlineWidget.js';
|
|
49
49
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
50
|
+
import '../../../OverlayCard/OverlayCard.context.js';
|
|
50
51
|
import { capitalize } from '../../../../widgets/DynamicWidget/helpers/helpers.js';
|
|
51
52
|
import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
|
|
52
53
|
|
|
53
54
|
const UserProfileSocialAccount = ({ provider, }) => {
|
|
54
55
|
var _a;
|
|
56
|
+
const { user, primaryWallet } = useInternalDynamicContext();
|
|
55
57
|
const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts();
|
|
56
58
|
const isProviderLinked = isLinked(provider);
|
|
57
59
|
const connectedAccountInfo = getLinkedAccountInformation(provider);
|
|
58
60
|
const iconThemeVariant = useIconThemeVariant();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
const isActiveCredential = !primaryWallet &&
|
|
62
|
+
connectedAccountInfo &&
|
|
63
|
+
(connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
|
|
64
|
+
const renderButton = () => (jsx(Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => isProviderLinked
|
|
65
|
+
? unlinkSocialAccount(provider)
|
|
66
|
+
: linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
|
|
67
|
+
color: 'secondary',
|
|
68
|
+
variant: 'button_tertiary',
|
|
69
|
+
// weight: 'medium',
|
|
70
|
+
}, startSlot:
|
|
71
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
72
|
+
jsx(Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: isProviderLinked ? jsx(SvgUnlink, {}) : jsx(SvgAdd, {}) })) }, { children: isProviderLinked ? null : 'Connect' })));
|
|
73
|
+
return (jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : capitalize(provider) })) })), !isActiveCredential ? renderButton() : null] })));
|
|
71
74
|
};
|
|
72
75
|
|
|
73
76
|
export { UserProfileSocialAccount };
|
|
@@ -5,6 +5,7 @@ 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 reactI18next = require('react-i18next');
|
|
8
9
|
var iconic = require('@dynamic-labs/iconic');
|
|
9
10
|
var utils = require('@dynamic-labs/utils');
|
|
10
11
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
@@ -58,7 +59,9 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
58
59
|
require('formik');
|
|
59
60
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
60
61
|
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
62
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
61
63
|
var ApiEndpoint = require('../../config/ApiEndpoint.cjs');
|
|
64
|
+
var locale = require('../../locale/locale.cjs');
|
|
62
65
|
var getMissingChains = require('../../utils/functions/getMissingChains/getMissingChains.cjs');
|
|
63
66
|
var isSameWalletName = require('../../utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
64
67
|
var parseTheme = require('../../utils/functions/parseTheme/parseTheme.cjs');
|
|
@@ -73,7 +76,6 @@ var usePrimaryWalletId = require('../../utils/hooks/usePrimaryWalletId/usePrimar
|
|
|
73
76
|
var useRpcProviders = require('../../utils/hooks/useRpcProviders/useRpcProviders.cjs');
|
|
74
77
|
var useWalletEventListeners = require('../../utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs');
|
|
75
78
|
var DynamicWidgetContext = require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
76
|
-
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
77
79
|
require('../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
78
80
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
79
81
|
require('qrcode');
|
|
@@ -101,9 +103,9 @@ var internalEvents = require('./internalEvents/internalEvents.cjs');
|
|
|
101
103
|
const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9';
|
|
102
104
|
const EMPTY_INITIAL_USER = undefined;
|
|
103
105
|
const DynamicContext = React.createContext(undefined);
|
|
104
|
-
const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
106
|
+
const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }) => {
|
|
105
107
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
106
|
-
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, walletsByChain, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, } = settings;
|
|
108
|
+
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, deepLinkPreference = 'native', walletsByChain, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = true, } = settings;
|
|
107
109
|
// The following event related methods are temporary and should be removed after QNTM-180 is done
|
|
108
110
|
// ============ START REMOVE AFTER QNTM-180 ============
|
|
109
111
|
const internalEventsRef = React.useRef(internalEvents.getInternalEvents());
|
|
@@ -118,6 +120,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
118
120
|
}
|
|
119
121
|
ApiEndpoint.setBaseUrl((_a = process.env.DYNAMIC_API_BASE_URL) !== null && _a !== void 0 ? _a : apiBaseUrl);
|
|
120
122
|
localStorage.LocalStorage.setSuffix(localStorageSuffix);
|
|
123
|
+
const i18nSDKInstance = locale.Locale.setup(locale$1);
|
|
121
124
|
const isAuthenticated = Boolean(getAuthToken.getAuthToken());
|
|
122
125
|
const isBridgeFlow = Boolean(walletsByChain);
|
|
123
126
|
const [bridgeChainToConnect, setBridgeChainToConnect] = React.useState(undefined);
|
|
@@ -176,6 +179,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
176
179
|
const { wallets } = useWallets.useWallets({
|
|
177
180
|
appLogoUrl,
|
|
178
181
|
appName,
|
|
182
|
+
deepLinkPreference,
|
|
179
183
|
flowNetwork,
|
|
180
184
|
networkConfigurations: serverNetworkConfigurations,
|
|
181
185
|
projectSettings,
|
|
@@ -236,7 +240,9 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
236
240
|
walletBook: walletBook$1,
|
|
237
241
|
});
|
|
238
242
|
const setShowAuthFlowWithInit = useSetShowAuthFlowWithInit.useSetShowAuthFlowWithInit({
|
|
243
|
+
isMultiWalletEnabled: multiWallet,
|
|
239
244
|
setShowAuthFlow,
|
|
245
|
+
user,
|
|
240
246
|
wallets,
|
|
241
247
|
});
|
|
242
248
|
// until user completes onboarding, jwt is only stored in onboardingOnlyJwt
|
|
@@ -354,12 +360,12 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
354
360
|
const onEmailVerificationFailure = (email) => {
|
|
355
361
|
var _a;
|
|
356
362
|
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmailVerificationFailure) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, email);
|
|
357
|
-
internalEventsRef.current.emit('emailVerificationResult', false);
|
|
363
|
+
internalEventsRef.current.emit('emailVerificationResult', false, email);
|
|
358
364
|
};
|
|
359
365
|
const onEmailVerificationSuccess = (email) => {
|
|
360
366
|
var _a;
|
|
361
367
|
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmailVerificationSuccess) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, email);
|
|
362
|
-
internalEventsRef.current.emit('emailVerificationResult', true);
|
|
368
|
+
internalEventsRef.current.emit('emailVerificationResult', true, email);
|
|
363
369
|
};
|
|
364
370
|
// ============ END REMOVE AFTER QNTM-180 ============
|
|
365
371
|
const { setCallback } = useCustomerCallbacks.useCustomerCallbacks({
|
|
@@ -429,7 +435,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
429
435
|
return walletsList.filter((wallet) => user.verifiedCredentials.some((verifiedCredential) => verifiedCredential.id === wallet.id));
|
|
430
436
|
}, [authMode, primaryWallet, user, secondaryWallets]);
|
|
431
437
|
const value = React.useMemo(() => {
|
|
432
|
-
var _a, _b;
|
|
438
|
+
var _a, _b, _c;
|
|
433
439
|
return ({
|
|
434
440
|
accessDeniedButton,
|
|
435
441
|
accessDeniedMessagePrimary,
|
|
@@ -465,7 +471,9 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
465
471
|
handleUnlinkWallet: authMode === 'connect-only'
|
|
466
472
|
? unlinkConnectedWallet
|
|
467
473
|
: handleUnlinkWallet,
|
|
474
|
+
i18nSDKInstance,
|
|
468
475
|
internalEvents: internalEventsRef,
|
|
476
|
+
internalSetShowAuthFlow: setShowAuthFlow,
|
|
469
477
|
isAuthenticated,
|
|
470
478
|
isBridgeFlow,
|
|
471
479
|
isFullyConnected,
|
|
@@ -475,6 +483,9 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
475
483
|
legacyIsVerifying,
|
|
476
484
|
linkedWallets,
|
|
477
485
|
loadingNetwork,
|
|
486
|
+
locale: {
|
|
487
|
+
changeLanguage: (_a = locale.Locale.getInstance()) === null || _a === void 0 ? void 0 : _a.changeLanguage,
|
|
488
|
+
},
|
|
478
489
|
loginWithEmail,
|
|
479
490
|
multiWallet,
|
|
480
491
|
multiWalletWidgetState,
|
|
@@ -528,11 +539,12 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
528
539
|
showAuthFlow,
|
|
529
540
|
showBridgeWidget,
|
|
530
541
|
showDynamicUserProfile,
|
|
542
|
+
showLockedWalletView,
|
|
531
543
|
showQrcodeModal,
|
|
532
544
|
showWidgetStatePopup,
|
|
533
545
|
signWithEmailWalletName,
|
|
534
546
|
siweStatement,
|
|
535
|
-
socialMediaIconUrl: ((
|
|
547
|
+
socialMediaIconUrl: ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _b === void 0 ? void 0 : _b.supportUrls) || socialMediaIconUrl,
|
|
536
548
|
socialMediaLinkText,
|
|
537
549
|
socialMediaUrl,
|
|
538
550
|
socialProvidersFilter,
|
|
@@ -541,7 +553,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
541
553
|
toolkitEnabled,
|
|
542
554
|
unlinkConnectedWallet,
|
|
543
555
|
user,
|
|
544
|
-
walletConnector: (
|
|
556
|
+
walletConnector: (_c = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _c !== void 0 ? _c : null,
|
|
545
557
|
walletUiUtils,
|
|
546
558
|
wallets,
|
|
547
559
|
walletsByChain,
|
|
@@ -580,16 +592,17 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
580
592
|
handleLogOut,
|
|
581
593
|
unlinkConnectedWallet,
|
|
582
594
|
handleUnlinkWallet,
|
|
595
|
+
i18nSDKInstance,
|
|
583
596
|
isAuthenticated,
|
|
584
597
|
isBridgeFlow,
|
|
598
|
+
isFullyConnected,
|
|
585
599
|
isProjectSettingsLoading,
|
|
586
600
|
isSingleWalletAccount,
|
|
587
|
-
isFullyConnected,
|
|
588
601
|
isVerificationInProgress,
|
|
589
|
-
primaryWallet,
|
|
590
|
-
secondaryWallets,
|
|
591
602
|
legacyIsVerifying,
|
|
603
|
+
linkedWallets,
|
|
592
604
|
loadingNetwork,
|
|
605
|
+
locale$1,
|
|
593
606
|
loginWithEmail,
|
|
594
607
|
multiWallet,
|
|
595
608
|
multiWalletWidgetState,
|
|
@@ -601,6 +614,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
601
614
|
imageUserInAccessList,
|
|
602
615
|
onboardingImageUrl,
|
|
603
616
|
policiesConsentInnerComponent,
|
|
617
|
+
primaryWallet,
|
|
604
618
|
primaryWalletId,
|
|
605
619
|
privacyPolicyUrl,
|
|
606
620
|
projectSettings,
|
|
@@ -608,12 +622,15 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
608
622
|
removeConnectedWalletsInfo,
|
|
609
623
|
rpcProviders,
|
|
610
624
|
sdkHasLoaded,
|
|
625
|
+
secondaryWallets,
|
|
611
626
|
selectedWalletConnector,
|
|
612
627
|
selectedWalletWithAction,
|
|
628
|
+
sendWagmiSettings,
|
|
613
629
|
setAuthMode,
|
|
614
630
|
setAuthorizationViewDisplayOrder,
|
|
615
631
|
setCallback,
|
|
616
632
|
setIsFullyConnected,
|
|
633
|
+
setIsVerificationInProgress,
|
|
617
634
|
setLogInWithEmail,
|
|
618
635
|
setMultiWallet,
|
|
619
636
|
setMultiWalletWidgetState,
|
|
@@ -628,6 +645,7 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
628
645
|
showAuthFlow,
|
|
629
646
|
showBridgeWidget,
|
|
630
647
|
showDynamicUserProfile,
|
|
648
|
+
showLockedWalletView,
|
|
631
649
|
showQrcodeModal,
|
|
632
650
|
showWidgetStatePopup,
|
|
633
651
|
signWithEmailWalletName,
|
|
@@ -645,7 +663,6 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
645
663
|
walletsByChain,
|
|
646
664
|
walletsFilter,
|
|
647
665
|
walletsToConnectByChain,
|
|
648
|
-
linkedWallets,
|
|
649
666
|
]);
|
|
650
667
|
React.useEffect(() => {
|
|
651
668
|
const addPrefetch = (attr) => {
|
|
@@ -689,12 +706,13 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
|
|
|
689
706
|
setShowDynamicUserProfile(true);
|
|
690
707
|
}
|
|
691
708
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile, user]);
|
|
692
|
-
return (jsxRuntime.jsx(DynamicContext.Provider, Object.assign({ value: value }, { children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, Object.assign({ walletBook: walletBook$1 }, { children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, Object.assign({ customerTheme: parseTheme.parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design }, { children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsx(ViewContext.ViewContextProvider, Object.assign({ initialView: helpers.getInitialView({
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
709
|
+
return (jsxRuntime.jsx(reactI18next.I18nextProvider, Object.assign({ i18n: i18nSDKInstance }, { children: jsxRuntime.jsx(DynamicContext.Provider, Object.assign({ value: value }, { children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, Object.assign({ walletBook: walletBook$1 }, { children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, Object.assign({ customerTheme: parseTheme.parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design }, { children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsx(ViewContext.ViewContextProvider, Object.assign({ initialView: helpers.getInitialView({
|
|
710
|
+
connectedWallets,
|
|
711
|
+
isAuthenticated,
|
|
712
|
+
isBridgeFlow,
|
|
713
|
+
isFullyConnected,
|
|
714
|
+
isMultiWalletEnabled: multiWallet,
|
|
715
|
+
}) }, { children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, Object.assign({ canSync: didConnectedStateLoad }, { children: jsxRuntime.jsx(QrCodeContext.QrCodeContextProvider, { children: jsxRuntime.jsx(EmailVerificationContext.EmailVerificationContextProvider, { children: jsxRuntime.jsx(ErrorContext.ErrorContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(FundingContext.FundingContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsxs(UserFieldEditorContext.UserFieldEditorContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(Toolkit.Toolkit, {}), jsxRuntime.jsx(FundingWidget.FundingWidget, {}), jsxRuntime.jsx(OAuthIFrameContainer.OAuthIFrameContainer, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) })) }) })) }) })) })) })) })));
|
|
698
716
|
};
|
|
699
717
|
|
|
700
718
|
exports.DynamicContext = DynamicContext;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LogLevel } from '@dynamic-labs/logger';
|
|
3
3
|
import { EvmNetwork, SocialProviderFilter } from '@dynamic-labs/types';
|
|
4
|
-
import { WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
4
|
+
import { DeepLinkVariant, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
5
|
+
import { Resources } from '../../locale';
|
|
5
6
|
import { AccessDeniedCustomButton, AuthModeType, ChainToWalletMap, DynamicEventsCallbacks, WalletOption } from '../../shared';
|
|
6
7
|
import { SocialNetworkIconType } from '../../utils/functions/getSocialNetworkIcon';
|
|
7
8
|
import { ThemeData, ThemeSetting } from '../ThemeContext';
|
|
@@ -19,6 +20,15 @@ export interface DynamicContextProps {
|
|
|
19
20
|
appName?: string;
|
|
20
21
|
cssOverrides?: string | JSX.Element;
|
|
21
22
|
debugError?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Used to control the type of deep link used when connecting
|
|
25
|
+
* a mobile wallet. Defaults to 'native'. This is useful for
|
|
26
|
+
* example if your app is running in a webview of a native
|
|
27
|
+
* mobile app, and you want to be able to link out to any
|
|
28
|
+
* wallet without having to modify your iOS build config.
|
|
29
|
+
* In this case, you can set this to 'universal'.
|
|
30
|
+
*/
|
|
31
|
+
deepLinkPreference?: DeepLinkVariant;
|
|
22
32
|
defaultNumberOfWalletsToShow?: number;
|
|
23
33
|
displaySiweStatement?: boolean;
|
|
24
34
|
enableVisitTrackingOnConnectOnly?: boolean;
|
|
@@ -36,6 +46,7 @@ export interface DynamicContextProps {
|
|
|
36
46
|
* @default WARN
|
|
37
47
|
*/
|
|
38
48
|
logLevel?: keyof typeof LogLevel;
|
|
49
|
+
showLockedWalletView?: boolean;
|
|
39
50
|
newToWeb3WalletChainMap?: ChainToWalletMap;
|
|
40
51
|
notInTheListImageUrl?: string;
|
|
41
52
|
onboardingImageUrl?: string;
|
|
@@ -57,6 +68,7 @@ export interface DynamicContextProps {
|
|
|
57
68
|
socialProvidersFilter?: SocialProviderFilter;
|
|
58
69
|
};
|
|
59
70
|
theme?: ThemeData | ThemeSetting;
|
|
71
|
+
locale?: Resources;
|
|
60
72
|
}
|
|
61
73
|
export declare const DynamicContext: import("react").Context<IDynamicContext | undefined>;
|
|
62
|
-
export declare const DynamicContextProvider: ({ children, theme, settings, }: DynamicContextProps) => JSX.Element;
|
|
74
|
+
export declare const DynamicContextProvider: ({ children, theme, settings, locale, }: DynamicContextProps) => JSX.Element;
|