@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
|
@@ -46,6 +46,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
46
46
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
47
47
|
import '../../../InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
49
|
+
import '../../../OverlayCard/OverlayCard.context.js';
|
|
49
50
|
|
|
50
51
|
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) => (jsxs("div", Object.assign({ className: classNames('network', className, {
|
|
51
52
|
'network--not-supported': notSupported,
|
|
@@ -51,6 +51,7 @@ require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
|
51
51
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
52
52
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
53
53
|
var capitalize = require('../../../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
54
|
+
require('../../../OverlayCard/OverlayCard.context.cjs');
|
|
54
55
|
|
|
55
56
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
56
57
|
const [chain] = useFetchChain.useFetchChain(walletConnector);
|
|
@@ -47,6 +47,7 @@ import '../../../Popper/PopperContext/PopperContext.js';
|
|
|
47
47
|
import '../../../InlineWidget/InlineWidget.js';
|
|
48
48
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
49
49
|
import { capitalize } from '../../../../shared/utils/functions/capitalize/capitalize.js';
|
|
50
|
+
import '../../../OverlayCard/OverlayCard.context.js';
|
|
50
51
|
|
|
51
52
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
52
53
|
const [chain] = useFetchChain(walletConnector);
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var
|
|
7
|
-
require('react');
|
|
6
|
+
var React = require('react');
|
|
8
7
|
var Typography = require('../Typography/Typography.cjs');
|
|
9
8
|
require('@dynamic-labs/sdk-api');
|
|
10
9
|
require('../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
12
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
13
|
var close = require('../../shared/assets/close.cjs');
|
|
14
14
|
var chevronLeft = require('../../shared/assets/chevron-left.cjs');
|
|
15
15
|
var check = require('../../shared/assets/check.cjs');
|
|
16
16
|
var pencilAltIcon = require('../../shared/assets/pencil-alt-icon.cjs');
|
|
17
|
+
var signInWithEmail = require('../../shared/assets/sign-in-with-email.cjs');
|
|
17
18
|
require('@dynamic-labs/wallet-book');
|
|
18
19
|
require('@dynamic-labs/utils');
|
|
19
20
|
require('../../utils/constants/colors.cjs');
|
|
@@ -58,11 +59,16 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
58
59
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
59
60
|
require('../InlineWidget/InlineWidget.cjs');
|
|
60
61
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
62
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
61
63
|
|
|
62
64
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
63
65
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
|
|
64
66
|
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickClose, type: 'button', "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
65
|
-
|
|
67
|
+
const EmailIcon = React.useMemo(() => {
|
|
68
|
+
const EmailIcon = (props) => (jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'brand-primary' }, { children: jsxRuntime.jsx(signInWithEmail.ReactComponent, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) })));
|
|
69
|
+
return EmailIcon;
|
|
70
|
+
}, []);
|
|
71
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [successBannerText && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: EmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 80, isSpinning: isLoading, treatAsFunctionComponent: true }))] })) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) })), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary' }, { children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) })) })))] }))] }))] })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) }))] })));
|
|
66
72
|
};
|
|
67
73
|
|
|
68
74
|
exports.OTPVerificationView = OTPVerificationView;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import 'react';
|
|
2
|
+
import { useMemo } from 'react';
|
|
4
3
|
import { Typography } from '../Typography/Typography.js';
|
|
5
4
|
import '@dynamic-labs/sdk-api';
|
|
6
5
|
import '../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
9
|
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
10
10
|
import { ReactComponent as SvgChevronLeft } from '../../shared/assets/chevron-left.js';
|
|
11
11
|
import { ReactComponent as SvgCheck } from '../../shared/assets/check.js';
|
|
12
12
|
import { ReactComponent as SvgPencilAltIcon } from '../../shared/assets/pencil-alt-icon.js';
|
|
13
|
+
import { ReactComponent as SvgSignInWithEmail } from '../../shared/assets/sign-in-with-email.js';
|
|
13
14
|
import '@dynamic-labs/wallet-book';
|
|
14
15
|
import '@dynamic-labs/utils';
|
|
15
16
|
import '../../utils/constants/colors.js';
|
|
@@ -54,11 +55,16 @@ import '../Popper/Popper/Popper.js';
|
|
|
54
55
|
import '../Popper/PopperContext/PopperContext.js';
|
|
55
56
|
import '../InlineWidget/InlineWidget.js';
|
|
56
57
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
58
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
57
59
|
|
|
58
60
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
59
61
|
const backButton = onClickBack && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
|
|
60
62
|
const closeButton = (jsx(IconButton, Object.assign({ onClick: onClickClose, type: 'button', "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
|
|
61
|
-
|
|
63
|
+
const EmailIcon = useMemo(() => {
|
|
64
|
+
const EmailIcon = (props) => (jsx(Icon, Object.assign({ color: 'brand-primary' }, { children: jsx(SvgSignInWithEmail, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) })));
|
|
65
|
+
return EmailIcon;
|
|
66
|
+
}, []);
|
|
67
|
+
return (jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [successBannerText && (jsx(ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton }, { children: jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsx(IconWithStatus, { Icon: EmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 80, isSpinning: isLoading, treatAsFunctionComponent: true }))] })) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) })), onClickEditEmail && (jsx(IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsx(Icon, Object.assign({ color: 'text-tertiary' }, { children: jsx(SvgPencilAltIcon, {}) })) })))] }))] }))] })), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) }))] })));
|
|
62
68
|
};
|
|
63
69
|
|
|
64
70
|
export { OTPVerificationView };
|
|
@@ -41,6 +41,7 @@ require('formik');
|
|
|
41
41
|
require('yup');
|
|
42
42
|
require('../InlineWidget/InlineWidget.cjs');
|
|
43
43
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
44
|
+
var OverlayCard_context = require('./OverlayCard.context.cjs');
|
|
44
45
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
45
46
|
require('../../context/MockContext/MockContext.cjs');
|
|
46
47
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -48,7 +49,6 @@ require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
|
48
49
|
require('@dynamic-labs/types');
|
|
49
50
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
50
51
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
51
|
-
var OverlayCard_context = require('./OverlayCard.context.cjs');
|
|
52
52
|
|
|
53
53
|
const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
|
|
54
54
|
const context = React.useContext(OverlayCard_context.overlayCardContext);
|
|
@@ -37,6 +37,7 @@ import 'formik';
|
|
|
37
37
|
import 'yup';
|
|
38
38
|
import '../InlineWidget/InlineWidget.js';
|
|
39
39
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
40
|
+
import { overlayCardContext } from './OverlayCard.context.js';
|
|
40
41
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
41
42
|
import '../../context/MockContext/MockContext.js';
|
|
42
43
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -44,7 +45,6 @@ import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
|
44
45
|
import '@dynamic-labs/types';
|
|
45
46
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
46
47
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
47
|
-
import { overlayCardContext } from './OverlayCard.context.js';
|
|
48
48
|
|
|
49
49
|
const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
|
|
50
50
|
const context = useContext(overlayCardContext);
|
|
@@ -40,6 +40,7 @@ require('formik');
|
|
|
40
40
|
require('yup');
|
|
41
41
|
require('../InlineWidget/InlineWidget.cjs');
|
|
42
42
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
43
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
43
44
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
44
45
|
require('../../context/MockContext/MockContext.cjs');
|
|
45
46
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -36,6 +36,7 @@ import 'formik';
|
|
|
36
36
|
import 'yup';
|
|
37
37
|
import '../InlineWidget/InlineWidget.js';
|
|
38
38
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
39
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
39
40
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
40
41
|
import '../../context/MockContext/MockContext.js';
|
|
41
42
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -34,7 +34,7 @@ var Chip = require('../Chip/Chip.cjs');
|
|
|
34
34
|
var FormFieldLabel = require('../FormFieldLabel/FormFieldLabel.cjs');
|
|
35
35
|
var TokenBalanceCard = require('./components/TokenBalanceCard/TokenBalanceCard.cjs');
|
|
36
36
|
|
|
37
|
-
const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack,
|
|
37
|
+
const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack, walletKey, onSubmit, displayPoweredByDynamicFooter = false, balance, chain, currencySymbol, initialValues, networkName, networkIcon, }) => {
|
|
38
38
|
const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
39
39
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
|
|
40
40
|
const balanceNumber = React.useMemo(() => {
|
|
@@ -45,7 +45,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
|
|
|
45
45
|
return;
|
|
46
46
|
return parseFloat(balance);
|
|
47
47
|
}, [balance]);
|
|
48
|
-
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })),
|
|
48
|
+
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletKey && (jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletKey }) }))), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: error && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsxRuntime.jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsxRuntime.jsx(Chip.Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxRuntime.jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsxRuntime.jsx(TokenBalanceCard.TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsxRuntime.jsx(SendBalanceForm.SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] }))] }));
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.SendBalancePageLayout = SendBalancePageLayout;
|
|
@@ -14,6 +14,6 @@ export type SendBalancePageLayoutProps = {
|
|
|
14
14
|
onClickClose?: MouseEventHandler<HTMLButtonElement>;
|
|
15
15
|
onSubmit: (formValues: SendBalanceFormValues) => void;
|
|
16
16
|
walletAddress: string;
|
|
17
|
-
|
|
17
|
+
walletKey: string;
|
|
18
18
|
};
|
|
19
19
|
export declare const SendBalancePageLayout: FC<SendBalancePageLayoutProps>;
|
|
@@ -30,7 +30,7 @@ import { Chip } from '../Chip/Chip.js';
|
|
|
30
30
|
import { FormFieldLabel } from '../FormFieldLabel/FormFieldLabel.js';
|
|
31
31
|
import { TokenBalanceCard } from './components/TokenBalanceCard/TokenBalanceCard.js';
|
|
32
32
|
|
|
33
|
-
const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack,
|
|
33
|
+
const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack, walletKey, onSubmit, displayPoweredByDynamicFooter = false, balance, chain, currencySymbol, initialValues, networkName, networkIcon, }) => {
|
|
34
34
|
const closeButton = onClickClose && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
|
|
35
35
|
const backButton = onClickBack && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
|
|
36
36
|
const balanceNumber = useMemo(() => {
|
|
@@ -41,7 +41,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
|
|
|
41
41
|
return;
|
|
42
42
|
return parseFloat(balance);
|
|
43
43
|
}, [balance]);
|
|
44
|
-
return (jsxs("div", { children: [jsx(ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })),
|
|
44
|
+
return (jsxs("div", { children: [jsx(ModalHeader, Object.assign({ leading: backButton, trailing: closeButton }, { children: jsxs("div", Object.assign({ className: 'send-balance-page-layout__header-content' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: "Send from" })), walletKey && (jsx(Icon, Object.assign({ size: 'small' }, { children: jsx(WalletIcon, { walletKey: walletKey }) }))), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary', as: 'p' }, { children: shortenWalletAddress(walletAddress, 3, 3) }))] })) })), jsxs("div", Object.assign({ className: 'send-balance-page-layout__body' }, { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: error && (jsx("div", Object.assign({ className: 'send-balance-page-layout__error' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), networkName && networkIcon && (jsx("div", Object.assign({ className: 'send-balance-page-layout__network-container' }, { children: jsx(Chip, Object.assign({ icon: networkIcon }, { children: networkName })) }))), jsxs("div", Object.assign({ className: 'send-balance-page-layout__balance-container' }, { children: [jsx(FormFieldLabel, Object.assign({ divider: true }, { children: "Token" })), jsx(TokenBalanceCard, { chain: chain, currencySymbol: currencySymbol, balance: balance })] })), jsx(SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] }))] }));
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export { SendBalancePageLayout };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var iconic = require('@dynamic-labs/iconic');
|
|
8
|
+
require('@dynamic-labs/utils');
|
|
9
|
+
require('@dynamic-labs/sdk-api');
|
|
10
|
+
require('../../config/ApiEndpoint.cjs');
|
|
11
|
+
require('../../shared/logger.cjs');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
var close = require('../../shared/assets/close.cjs');
|
|
15
|
+
var dotsHorizontal = require('../../shared/assets/dots-horizontal.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-book');
|
|
17
|
+
require('../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
+
require('ethers');
|
|
20
|
+
require('../../shared/consts/index.cjs');
|
|
21
|
+
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('@dynamic-labs/rpc-providers');
|
|
23
|
+
require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
24
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
25
|
+
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
26
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
27
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
28
|
+
require('react-dom');
|
|
29
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
30
|
+
require('../ShadowDOM/ShadowDOM.cjs');
|
|
31
|
+
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
32
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
33
|
+
var Icon = require('../Icon/Icon.cjs');
|
|
34
|
+
require('react-focus-lock');
|
|
35
|
+
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
36
|
+
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
37
|
+
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
38
|
+
var IconButton = require('../IconButton/IconButton.cjs');
|
|
39
|
+
var ModalHeader = require('../ModalHeader/ModalHeader.cjs');
|
|
40
|
+
require('../Alert/Alert.cjs');
|
|
41
|
+
var IconWithSpinner = require('../IconWithSpinner/IconWithSpinner.cjs');
|
|
42
|
+
var IconListTile = require('../IconListTile/IconListTile.cjs');
|
|
43
|
+
require('../Popper/Popper/Popper.cjs');
|
|
44
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
45
|
+
require('formik');
|
|
46
|
+
require('yup');
|
|
47
|
+
require('../InlineWidget/InlineWidget.cjs');
|
|
48
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
49
|
+
var capitalize = require('../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
50
|
+
var OverlayCard = require('../OverlayCard/OverlayCard.cjs');
|
|
51
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
52
|
+
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
53
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
54
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
55
|
+
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
56
|
+
var useIconThemeVariant = require('../../utils/hooks/useIconThemeVariant/useIconThemeVariant.cjs');
|
|
57
|
+
require('@dynamic-labs/types');
|
|
58
|
+
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
59
|
+
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
60
|
+
|
|
61
|
+
const MAX_INLINE_ITEMS = 5;
|
|
62
|
+
const SocialSignIn = ({ providers, onSelectProvider, isLoading, selectedProvider, testId, defaultProvider, numOfItemsToDisplay = 5, }) => {
|
|
63
|
+
const iconThemeVariant = useIconThemeVariant.useIconThemeVariant();
|
|
64
|
+
const [showCard, setShowCard] = React.useState(false);
|
|
65
|
+
const closeCard = () => !isLoading && setShowCard(false);
|
|
66
|
+
const numberOfEnabledSocialProviders = providers.length;
|
|
67
|
+
if (numberOfEnabledSocialProviders === 1) {
|
|
68
|
+
// set first and only item in providers list as default provider
|
|
69
|
+
[defaultProvider] = providers;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// put default provider at the beggini of the list
|
|
73
|
+
providers.sort((p1, p2) => (p1 === defaultProvider ? -1 : 0));
|
|
74
|
+
}
|
|
75
|
+
const defaultProviderOffset = defaultProvider ? 1 : 0;
|
|
76
|
+
// display number of items set in prop, with a max limit of MAX_INLINE_ITEMS
|
|
77
|
+
const numOfInlineItems = Math.min(numOfItemsToDisplay, MAX_INLINE_ITEMS);
|
|
78
|
+
// show card button if there are more providers than numOfInlineItems items, not counting the default provider
|
|
79
|
+
const showCardButton = numberOfEnabledSocialProviders - defaultProviderOffset > numOfInlineItems;
|
|
80
|
+
const cardButtonOffset = showCardButton ? 1 : 0;
|
|
81
|
+
// get providers to display inline
|
|
82
|
+
const socialProvidersToDisplayInline = providers.slice(defaultProviderOffset, defaultProviderOffset + numOfInlineItems - cardButtonOffset);
|
|
83
|
+
const numberOfSocialGridItems = numberOfEnabledSocialProviders + cardButtonOffset;
|
|
84
|
+
const getProviderAsString = (provider) => provider;
|
|
85
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: closeCard, type: 'button', id: 'close-button', disabled: isLoading, "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
86
|
+
const renderProviderItem = (provider, fullWidth = false, insideCard = false) => (jsxRuntime.jsxs(IconListTile.IconListTile, Object.assign({ dataTestId: insideCard ? `card-${provider}` : `inline-${provider}`, onClick: () => onSelectProvider(provider), disabled: Boolean(selectedProvider), className: classNames.classNames({
|
|
87
|
+
'social-sign-in--card--tile': insideCard,
|
|
88
|
+
'social-sign-in--tile': !insideCard,
|
|
89
|
+
'social-sign-in--tile__full-width': fullWidth,
|
|
90
|
+
}) }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon:
|
|
91
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
92
|
+
jsxRuntime.jsx(iconic.SocialIcon, { name: getProviderAsString(provider), variant: iconThemeVariant }), isSpinning: selectedProvider === provider, iconSize: 32 }), !insideCard && fullWidth && (jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'button_primary' }, { children: ["Connect with ", capitalize.capitalize(getProviderAsString(provider))] })))] }), getProviderAsString(provider)));
|
|
93
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'social-sign-in', style: {
|
|
94
|
+
'--number-of-social-grid-items': numberOfSocialGridItems,
|
|
95
|
+
}, "data-testid": testId }, { children: [defaultProvider && renderProviderItem(defaultProvider, true), socialProvidersToDisplayInline.map((provider) => renderProviderItem(provider, socialProvidersToDisplayInline.length < 2)), showCardButton && (jsxRuntime.jsx(IconListTile.IconListTile, Object.assign({ dataTestId: 'show-more-options', onClick: () => setShowCard(true), className: 'social-sign-in--tile' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-primary' }, { children: jsxRuntime.jsx(dotsHorizontal.ReactComponent, {}) })) }), 'show-more-options'))] })), jsxRuntime.jsx(OverlayCard.OverlayCard, Object.assign({ isOpen: showCard, onClickOverlay: closeCard }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'social-sign-in--card' }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: "Choose a social account" })) })), jsxRuntime.jsx("div", Object.assign({ className: 'social-sign-in--card--body' }, { children: providers.map((provider) => renderProviderItem(provider, false, true)) }))] })) }))] }));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
exports.SocialSignIn = SocialSignIn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SocialSignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
3
|
+
import { SocialSectionProps } from '../../views/LoginView/sections';
|
|
4
|
+
interface Props extends SocialSectionProps {
|
|
5
|
+
providers: SocialSignInProviderEnum[];
|
|
6
|
+
onSelectProvider: (provider: SocialSignInProviderEnum) => void;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
selectedProvider?: SocialSignInProviderEnum;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const SocialSignIn: ({ providers, onSelectProvider, isLoading, selectedProvider, testId, defaultProvider, numOfItemsToDisplay, }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { SocialIcon } from '@dynamic-labs/iconic';
|
|
4
|
+
import '@dynamic-labs/utils';
|
|
5
|
+
import '@dynamic-labs/sdk-api';
|
|
6
|
+
import '../../config/ApiEndpoint.js';
|
|
7
|
+
import '../../shared/logger.js';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
11
|
+
import { ReactComponent as SvgDotsHorizontal } from '../../shared/assets/dots-horizontal.js';
|
|
12
|
+
import '@dynamic-labs/wallet-book';
|
|
13
|
+
import '../../utils/constants/colors.js';
|
|
14
|
+
import '../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
+
import 'ethers';
|
|
16
|
+
import '../../shared/consts/index.js';
|
|
17
|
+
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '@dynamic-labs/rpc-providers';
|
|
19
|
+
import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
20
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
21
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
22
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
23
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
24
|
+
import 'react-dom';
|
|
25
|
+
import { Typography } from '../Typography/Typography.js';
|
|
26
|
+
import '../ShadowDOM/ShadowDOM.js';
|
|
27
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
28
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
29
|
+
import { Icon } from '../Icon/Icon.js';
|
|
30
|
+
import 'react-focus-lock';
|
|
31
|
+
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
32
|
+
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
33
|
+
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
34
|
+
import { IconButton } from '../IconButton/IconButton.js';
|
|
35
|
+
import { ModalHeader } from '../ModalHeader/ModalHeader.js';
|
|
36
|
+
import '../Alert/Alert.js';
|
|
37
|
+
import { IconWithSpinner } from '../IconWithSpinner/IconWithSpinner.js';
|
|
38
|
+
import { IconListTile } from '../IconListTile/IconListTile.js';
|
|
39
|
+
import '../Popper/Popper/Popper.js';
|
|
40
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
41
|
+
import 'formik';
|
|
42
|
+
import 'yup';
|
|
43
|
+
import '../InlineWidget/InlineWidget.js';
|
|
44
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
45
|
+
import { capitalize } from '../../shared/utils/functions/capitalize/capitalize.js';
|
|
46
|
+
import { OverlayCard } from '../OverlayCard/OverlayCard.js';
|
|
47
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
48
|
+
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
49
|
+
import '../../context/MockContext/MockContext.js';
|
|
50
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
51
|
+
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
52
|
+
import { useIconThemeVariant } from '../../utils/hooks/useIconThemeVariant/useIconThemeVariant.js';
|
|
53
|
+
import '@dynamic-labs/types';
|
|
54
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
55
|
+
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
56
|
+
|
|
57
|
+
const MAX_INLINE_ITEMS = 5;
|
|
58
|
+
const SocialSignIn = ({ providers, onSelectProvider, isLoading, selectedProvider, testId, defaultProvider, numOfItemsToDisplay = 5, }) => {
|
|
59
|
+
const iconThemeVariant = useIconThemeVariant();
|
|
60
|
+
const [showCard, setShowCard] = useState(false);
|
|
61
|
+
const closeCard = () => !isLoading && setShowCard(false);
|
|
62
|
+
const numberOfEnabledSocialProviders = providers.length;
|
|
63
|
+
if (numberOfEnabledSocialProviders === 1) {
|
|
64
|
+
// set first and only item in providers list as default provider
|
|
65
|
+
[defaultProvider] = providers;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// put default provider at the beggini of the list
|
|
69
|
+
providers.sort((p1, p2) => (p1 === defaultProvider ? -1 : 0));
|
|
70
|
+
}
|
|
71
|
+
const defaultProviderOffset = defaultProvider ? 1 : 0;
|
|
72
|
+
// display number of items set in prop, with a max limit of MAX_INLINE_ITEMS
|
|
73
|
+
const numOfInlineItems = Math.min(numOfItemsToDisplay, MAX_INLINE_ITEMS);
|
|
74
|
+
// show card button if there are more providers than numOfInlineItems items, not counting the default provider
|
|
75
|
+
const showCardButton = numberOfEnabledSocialProviders - defaultProviderOffset > numOfInlineItems;
|
|
76
|
+
const cardButtonOffset = showCardButton ? 1 : 0;
|
|
77
|
+
// get providers to display inline
|
|
78
|
+
const socialProvidersToDisplayInline = providers.slice(defaultProviderOffset, defaultProviderOffset + numOfInlineItems - cardButtonOffset);
|
|
79
|
+
const numberOfSocialGridItems = numberOfEnabledSocialProviders + cardButtonOffset;
|
|
80
|
+
const getProviderAsString = (provider) => provider;
|
|
81
|
+
const closeButton = (jsx(IconButton, Object.assign({ onClick: closeCard, type: 'button', id: 'close-button', disabled: isLoading, "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
|
|
82
|
+
const renderProviderItem = (provider, fullWidth = false, insideCard = false) => (jsxs(IconListTile, Object.assign({ dataTestId: insideCard ? `card-${provider}` : `inline-${provider}`, onClick: () => onSelectProvider(provider), disabled: Boolean(selectedProvider), className: classNames({
|
|
83
|
+
'social-sign-in--card--tile': insideCard,
|
|
84
|
+
'social-sign-in--tile': !insideCard,
|
|
85
|
+
'social-sign-in--tile__full-width': fullWidth,
|
|
86
|
+
}) }, { children: [jsx(IconWithSpinner, { Icon:
|
|
87
|
+
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
88
|
+
jsx(SocialIcon, { name: getProviderAsString(provider), variant: iconThemeVariant }), isSpinning: selectedProvider === provider, iconSize: 32 }), !insideCard && fullWidth && (jsxs(Typography, Object.assign({ variant: 'button_primary' }, { children: ["Connect with ", capitalize(getProviderAsString(provider))] })))] }), getProviderAsString(provider)));
|
|
89
|
+
return (jsxs(Fragment, { children: [jsxs("div", Object.assign({ className: 'social-sign-in', style: {
|
|
90
|
+
'--number-of-social-grid-items': numberOfSocialGridItems,
|
|
91
|
+
}, "data-testid": testId }, { children: [defaultProvider && renderProviderItem(defaultProvider, true), socialProvidersToDisplayInline.map((provider) => renderProviderItem(provider, socialProvidersToDisplayInline.length < 2)), showCardButton && (jsx(IconListTile, Object.assign({ dataTestId: 'show-more-options', onClick: () => setShowCard(true), className: 'social-sign-in--tile' }, { children: jsx(Icon, Object.assign({ color: 'text-primary' }, { children: jsx(SvgDotsHorizontal, {}) })) }), 'show-more-options'))] })), jsx(OverlayCard, Object.assign({ isOpen: showCard, onClickOverlay: closeCard }, { children: jsxs("div", Object.assign({ className: 'social-sign-in--card' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: "Choose a social account" })) })), jsx("div", Object.assign({ className: 'social-sign-in--card--body' }, { children: providers.map((provider) => renderProviderItem(provider, false, true)) }))] })) }))] }));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { SocialSignIn };
|
|
@@ -44,6 +44,7 @@ require('formik');
|
|
|
44
44
|
require('yup');
|
|
45
45
|
require('../InlineWidget/InlineWidget.cjs');
|
|
46
46
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
47
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
47
48
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
48
49
|
require('../../context/MockContext/MockContext.cjs');
|
|
49
50
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -40,6 +40,7 @@ import 'formik';
|
|
|
40
40
|
import 'yup';
|
|
41
41
|
import '../InlineWidget/InlineWidget.js';
|
|
42
42
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
43
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
43
44
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
44
45
|
import '../../context/MockContext/MockContext.js';
|
|
45
46
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -47,6 +47,7 @@ require('formik');
|
|
|
47
47
|
require('yup');
|
|
48
48
|
require('../InlineWidget/InlineWidget.cjs');
|
|
49
49
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
50
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
50
51
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
51
52
|
require('../../context/MockContext/MockContext.cjs');
|
|
52
53
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -43,6 +43,7 @@ import 'formik';
|
|
|
43
43
|
import 'yup';
|
|
44
44
|
import '../InlineWidget/InlineWidget.js';
|
|
45
45
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
46
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
46
47
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
47
48
|
import '../../context/MockContext/MockContext.js';
|
|
48
49
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -42,6 +42,7 @@ require('formik');
|
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../../InlineWidget/InlineWidget.cjs');
|
|
44
44
|
require('../../MenuList/Dropdown/Dropdown.cjs');
|
|
45
|
+
require('../../OverlayCard/OverlayCard.context.cjs');
|
|
45
46
|
require('../../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
46
47
|
require('../../../context/MockContext/MockContext.cjs');
|
|
47
48
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -38,6 +38,7 @@ import 'formik';
|
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../../InlineWidget/InlineWidget.js';
|
|
40
40
|
import '../../MenuList/Dropdown/Dropdown.js';
|
|
41
|
+
import '../../OverlayCard/OverlayCard.context.js';
|
|
41
42
|
import '../../../views/CollectUserDataView/fieldsConfig.js';
|
|
42
43
|
import '../../../context/MockContext/MockContext.js';
|
|
43
44
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -42,6 +42,7 @@ require('formik');
|
|
|
42
42
|
require('yup');
|
|
43
43
|
require('../InlineWidget/InlineWidget.cjs');
|
|
44
44
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
45
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
45
46
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
46
47
|
require('../../context/MockContext/MockContext.cjs');
|
|
47
48
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -38,6 +38,7 @@ import 'formik';
|
|
|
38
38
|
import 'yup';
|
|
39
39
|
import '../InlineWidget/InlineWidget.js';
|
|
40
40
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
41
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
41
42
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
42
43
|
import '../../context/MockContext/MockContext.js';
|
|
43
44
|
import '../../context/CaptchaContext/CaptchaContext.js';
|