@dynamic-labs/sdk-react-core 2.0.0-alpha.16 → 2.0.0-alpha.18
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 +16 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/index.cjs +5 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +4 -1
- package/src/lib/Main.cjs +3 -1
- package/src/lib/Main.js +3 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +3 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +3 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +3 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.js +3 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +3 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -1
- package/src/lib/components/Captcha/Captcha.cjs +3 -1
- package/src/lib/components/Captcha/Captcha.js +3 -1
- package/src/lib/components/Divider/Divider.cjs +3 -1
- package/src/lib/components/Divider/Divider.js +3 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +3 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +3 -1
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.cjs +3 -1
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.js +3 -1
- package/src/lib/components/LogoutButton/LogoutButton.cjs +3 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +3 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +3 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +3 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.cjs +3 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.js +3 -1
- package/src/lib/components/Modal/Modal.cjs +3 -1
- package/src/lib/components/Modal/Modal.js +3 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +3 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +3 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +3 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +3 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +3 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +3 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -2
- package/src/lib/components/OverlayCard/OverlayCard.cjs +3 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +3 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +3 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +3 -1
- package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +115 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.d.ts +15 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.js +111 -0
- package/src/lib/components/PhoneNumberField/index.d.ts +1 -0
- package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/usePhoneInputLogic/usePhoneInputLogic.cjs +14 -133
- package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/usePhoneInputLogic/usePhoneInputLogic.d.ts +9 -6
- package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/usePhoneInputLogic/usePhoneInputLogic.js +16 -135
- package/src/lib/components/Portal/Portal.cjs +4 -1
- package/src/lib/components/Portal/Portal.js +4 -1
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +3 -1
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +3 -1
- package/src/lib/components/QRCode/QRCode.cjs +3 -1
- package/src/lib/components/QRCode/QRCode.js +3 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +3 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +3 -1
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +4 -2
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +4 -2
- package/src/lib/components/RenderView/RenderView.cjs +2 -0
- package/src/lib/components/RenderView/RenderView.js +2 -0
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +6 -4
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +6 -4
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.cjs +3 -1
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.js +3 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +3 -1
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +3 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +3 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +3 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +3 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.js +3 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +4 -2
- package/src/lib/components/SocialSignIn/SocialSignIn.js +4 -2
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.cjs +3 -1
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.js +3 -1
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +3 -1
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +3 -1
- package/src/lib/components/Toolkit/Toolkit.cjs +3 -1
- package/src/lib/components/Toolkit/Toolkit.js +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +3 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +3 -1
- package/src/lib/components/Tooltip/Tooltip.js +3 -1
- package/src/lib/components/TosAndPp/TosAndPp.cjs +3 -1
- package/src/lib/components/TosAndPp/TosAndPp.js +3 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +3 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +3 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +3 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +3 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +3 -1
- package/src/lib/components/UserAddress/UserAddress.js +3 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +4 -2
- package/src/lib/components/UserProfile/UserProfile.js +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +6 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +3 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +3 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +11 -9
- package/src/lib/components/UserProfileForm/UserProfileForm.d.ts +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.js +10 -8
- package/src/lib/components/index.d.ts +7 -6
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.cjs +4 -2
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.js +4 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +4 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +4 -3
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +3 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +3 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +3 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +3 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +3 -1
- package/src/lib/context/FieldsStateContext/FieldsStateContext.cjs +23 -0
- package/src/lib/context/FieldsStateContext/FieldsStateContext.d.ts +12 -0
- package/src/lib/context/FieldsStateContext/FieldsStateContext.js +17 -0
- package/src/lib/context/FieldsStateContext/index.d.ts +1 -0
- package/src/lib/context/FundingContext/FundingContext.cjs +3 -1
- package/src/lib/context/FundingContext/FundingContext.js +3 -1
- package/src/lib/context/LoadingContext/LoadingContext.cjs +3 -1
- package/src/lib/context/LoadingContext/LoadingContext.js +3 -1
- package/src/lib/context/MockContext/MockContext.cjs +3 -1
- package/src/lib/context/MockContext/MockContext.js +3 -1
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +3 -1
- package/src/lib/context/PasskeyContext/PasskeyContext.js +3 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +3 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +3 -1
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +3 -1
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +3 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +3 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +3 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +3 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +3 -1
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +3 -1
- package/src/lib/context/WalletContext/WalletContext.js +3 -1
- package/src/lib/data/api.cjs +20 -3
- package/src/lib/data/api.js +22 -6
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +3 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +3 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +3 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +3 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +3 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +3 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +3 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +3 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +3 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +3 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +3 -1
- package/src/lib/locale/en/translation.cjs +40 -22
- package/src/lib/locale/en/translation.d.ts +40 -22
- package/src/lib/locale/en/translation.js +40 -22
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.cjs +3 -1
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.js +3 -1
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.cjs +3 -1
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.js +3 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +3 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +3 -1
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.cjs +3 -1
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.js +3 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +3 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +3 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +3 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +3 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/fields.cjs +7 -0
- package/src/lib/utils/constants/fields.d.ts +1 -0
- package/src/lib/utils/constants/fields.js +3 -0
- package/src/lib/utils/constants/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.cjs +1 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.js +1 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.cjs +25 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.d.ts +9 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.js +21 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +2 -0
- package/src/lib/utils/functions/validatePhoneLength/index.d.ts +1 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.cjs +15 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.d.ts +3 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.js +11 -0
- package/src/lib/utils/hooks/authenticationHooks/index.d.ts +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/index.d.ts +1 -0
- package/src/lib/utils/hooks/authenticationHooks/{useEmailVerificationRequest/useEmailVerificationRequest.cjs → useOtpVerificationRequest/useOtpVerificationRequest.cjs} +43 -23
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.d.ts +7 -0
- package/src/lib/utils/hooks/authenticationHooks/{useEmailVerificationRequest/useEmailVerificationRequest.js → useOtpVerificationRequest/useOtpVerificationRequest.js} +45 -25
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +3 -1
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +3 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +3 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +3 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +3 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +4 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +4 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +3 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +3 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +3 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +3 -1
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +3 -1
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +3 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +3 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +3 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +3 -1
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +10 -6
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +10 -6
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -1
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -1
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +3 -1
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +3 -1
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +3 -1
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +3 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +3 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +3 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +3 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +3 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +5 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +5 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.cjs +9 -2
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.js +9 -2
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +3 -1
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -1
- package/src/lib/utils/hooks/useHandleVerificationRequired/index.d.ts +1 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +62 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.d.ts +16 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +56 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +3 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +3 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +3 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +3 -1
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +3 -1
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +3 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +3 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +3 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +3 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +3 -1
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +3 -1
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +3 -1
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +3 -1
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +3 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +3 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +3 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +5 -3
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +5 -3
- package/src/lib/utils/hooks/useSocialAuth/farcaster.cjs +7 -4
- package/src/lib/utils/hooks/useSocialAuth/farcaster.d.ts +4 -1
- package/src/lib/utils/hooks/useSocialAuth/farcaster.js +7 -4
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +12 -4
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +12 -4
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -2
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -2
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +37 -32
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.d.ts +2 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +37 -32
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +24 -10
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +24 -10
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +1 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +1 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +3 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +3 -1
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +3 -1
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +3 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +3 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +3 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +3 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +3 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +3 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +3 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +3 -1
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +3 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +3 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +3 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +3 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +3 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +3 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +3 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +3 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +3 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +11 -4
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +10 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/{index.cjs → UserDataFields.cjs} +8 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserDataFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/{index.js → UserDataFields.js} +8 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +90 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.d.ts +12 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +86 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/index.d.ts +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.d.ts +1 -11
- package/src/lib/views/CollectUserDataView/useFields.cjs +36 -4
- package/src/lib/views/CollectUserDataView/useFields.js +36 -4
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +3 -1
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +3 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +3 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +3 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordView.cjs +3 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordView.js +3 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +3 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +3 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +3 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +3 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +3 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +11 -9
- package/src/lib/views/EmailVerification/EmailVerification.js +11 -9
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +5 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +5 -3
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +3 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +3 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +3 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +3 -1
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.cjs +4 -2
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.js +4 -2
- package/src/lib/views/LoginView/LoginView.cjs +7 -5
- package/src/lib/views/LoginView/LoginView.js +7 -5
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +3 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +3 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +22 -33
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +23 -34
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +154 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.d.ts +10 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +150 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +4 -2
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +4 -2
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +3 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +3 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +3 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +3 -1
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.cjs +3 -1
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.js +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +3 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +3 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +3 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +3 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +4 -2
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +4 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +3 -1
- package/src/lib/views/NoAccess/NoAccess.js +3 -1
- package/src/lib/views/NoAccess/useNoAccessText.cjs +3 -1
- package/src/lib/views/NoAccess/useNoAccessText.js +3 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +3 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +3 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +3 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +3 -1
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +3 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +3 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +3 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +3 -1
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +3 -1
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +3 -1
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +3 -0
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +3 -0
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.cjs +2 -2
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.js +2 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +3 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.js +3 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +3 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +3 -1
- package/src/lib/views/QrCodeView/QrCodeView.cjs +4 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +4 -2
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +3 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +3 -1
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.cjs +3 -1
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.js +3 -1
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +3 -1
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +3 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +4 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +4 -2
- package/src/lib/views/SmsVerification/SmsVerification.cjs +94 -2
- package/src/lib/views/SmsVerification/SmsVerification.js +94 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +54 -18
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.d.ts +2 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +54 -18
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +3 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +3 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +3 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +3 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +4 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +4 -2
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +3 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +3 -1
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +3 -1
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +3 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +3 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +3 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +4 -2
- package/src/lib/views/WalletGroupView/WalletGroupView.js +4 -2
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +3 -1
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +3 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +3 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +3 -1
- package/src/lib/views/WalletList/WalletList.cjs +3 -1
- package/src/lib/views/WalletList/WalletList.js +3 -1
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +3 -1
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +3 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +3 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +3 -1
- package/src/lib/views/WalletList/hooks/useTabState.cjs +3 -1
- package/src/lib/views/WalletList/hooks/useTabState.js +3 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -1
- package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +3 -1
- package/src/lib/views/WalletRedirectView/WalletRedirectView.js +3 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +3 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +3 -1
- package/src/lib/views/viewToComponentMap.cjs +3 -0
- package/src/lib/views/viewToComponentMap.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.js +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +6 -4
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +6 -4
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +3 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +3 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +2 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +2 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +3 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +3 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +3 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +3 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +3 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +6 -4
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +4 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +3 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +3 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +3 -1
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.cjs +0 -9
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.d.ts +0 -2
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.js +0 -5
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/index.d.ts +0 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.d.ts +0 -8
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkIfNumberHasError/checkIfNumberHasError.cjs +0 -12
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkIfNumberHasError/checkIfNumberHasError.d.ts +0 -5
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkIfNumberHasError/checkIfNumberHasError.js +0 -8
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/checkIfNumberHasError/index.d.ts +0 -1
- /package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/getCustomCountries/getCustomCountries.cjs +0 -0
- /package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/getCustomCountries/getCustomCountries.d.ts +0 -0
- /package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/getCustomCountries/getCustomCountries.js +0 -0
- /package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/getCustomCountries/index.d.ts +0 -0
- /package/src/lib/{views/LoginView/sections/PhoneNumberSignInSection → components/PhoneNumberField}/usePhoneInputLogic/index.d.ts +0 -0
|
@@ -34,6 +34,7 @@ require('../../context/WalletContext/WalletContext.cjs');
|
|
|
34
34
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
35
35
|
require('@dynamic-labs/types');
|
|
36
36
|
require('yup');
|
|
37
|
+
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
37
38
|
require('../../context/MockContext/MockContext.cjs');
|
|
38
39
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
39
40
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -52,6 +53,7 @@ require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
52
53
|
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
53
54
|
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
54
55
|
require('../OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
56
|
+
require('../PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.cjs');
|
|
55
57
|
require('../Popper/Popper/Popper.cjs');
|
|
56
58
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
57
59
|
require('react-focus-lock');
|
|
@@ -64,7 +66,7 @@ require('i18next');
|
|
|
64
66
|
require('@hcaptcha/react-hcaptcha');
|
|
65
67
|
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
66
68
|
require('../../context/FooterAnimationContext/index.cjs');
|
|
67
|
-
require('../../
|
|
69
|
+
require('../../locale/locale.cjs');
|
|
68
70
|
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
69
71
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
70
72
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
@@ -30,6 +30,7 @@ import '../../context/WalletContext/WalletContext.js';
|
|
|
30
30
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
31
31
|
import '@dynamic-labs/types';
|
|
32
32
|
import 'yup';
|
|
33
|
+
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
33
34
|
import '../../context/MockContext/MockContext.js';
|
|
34
35
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
35
36
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -48,6 +49,7 @@ import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
|
48
49
|
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
49
50
|
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
50
51
|
import '../OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
52
|
+
import '../PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.js';
|
|
51
53
|
import '../Popper/Popper/Popper.js';
|
|
52
54
|
import '../Popper/PopperContext/PopperContext.js';
|
|
53
55
|
import 'react-focus-lock';
|
|
@@ -60,7 +62,7 @@ import 'i18next';
|
|
|
60
62
|
import '@hcaptcha/react-hcaptcha';
|
|
61
63
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
62
64
|
import '../../context/FooterAnimationContext/index.js';
|
|
63
|
-
import '../../
|
|
65
|
+
import '../../locale/locale.js';
|
|
64
66
|
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
65
67
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
66
68
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
@@ -0,0 +1,115 @@
|
|
|
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 reactInternationalPhone = require('react-international-phone');
|
|
8
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
9
|
+
require('../../events/dynamicEvents.cjs');
|
|
10
|
+
require('../../../../_virtual/_tslib.cjs');
|
|
11
|
+
require('@dynamic-labs/utils');
|
|
12
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
13
|
+
require('@dynamic-labs/sdk-api');
|
|
14
|
+
require('../../shared/logger.cjs');
|
|
15
|
+
require('@dynamic-labs/iconic');
|
|
16
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
17
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
18
|
+
var chevronDown = require('../../shared/assets/chevron-down.cjs');
|
|
19
|
+
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../utils/constants/colors.cjs');
|
|
21
|
+
require('../../utils/constants/values.cjs');
|
|
22
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
23
|
+
require('../../shared/consts/index.cjs');
|
|
24
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
25
|
+
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
26
|
+
require('@dynamic-labs/multi-wallet');
|
|
27
|
+
require('viem');
|
|
28
|
+
require('viem/chains');
|
|
29
|
+
require('../../config/ApiEndpoint.cjs');
|
|
30
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
31
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
32
|
+
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
33
|
+
require('react-dom');
|
|
34
|
+
require('../../context/WalletContext/WalletContext.cjs');
|
|
35
|
+
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
36
|
+
require('@dynamic-labs/types');
|
|
37
|
+
require('yup');
|
|
38
|
+
require('react-i18next');
|
|
39
|
+
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
40
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
41
|
+
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
42
|
+
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
43
|
+
require('@dynamic-labs/rpc-providers');
|
|
44
|
+
require('../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
45
|
+
require('i18next');
|
|
46
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
47
|
+
require('../ShadowDOM/ShadowDOM.cjs');
|
|
48
|
+
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
49
|
+
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
50
|
+
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
51
|
+
require('../OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
52
|
+
require('../../context/FooterAnimationContext/index.cjs');
|
|
53
|
+
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
54
|
+
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
55
|
+
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
56
|
+
require('react-focus-lock');
|
|
57
|
+
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
58
|
+
var Icon = require('../Icon/Icon.cjs');
|
|
59
|
+
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
60
|
+
require('../IconButton/IconButton.cjs');
|
|
61
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
62
|
+
require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
63
|
+
require('formik');
|
|
64
|
+
require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
65
|
+
require('../Alert/Alert.cjs');
|
|
66
|
+
var Input = require('../Input/Input.cjs');
|
|
67
|
+
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
68
|
+
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
69
|
+
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
70
|
+
require('../InlineWidget/InlineWidget.cjs');
|
|
71
|
+
require('../IsBrowser/IsBrowser.cjs');
|
|
72
|
+
var MenuList = require('../MenuList/MenuList/MenuList.cjs');
|
|
73
|
+
var usePhoneInputLogic = require('./usePhoneInputLogic/usePhoneInputLogic.cjs');
|
|
74
|
+
require('../Popper/Popper/Popper.cjs');
|
|
75
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
76
|
+
require('qrcode');
|
|
77
|
+
require('../../views/WalletList/WalletList.cjs');
|
|
78
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
79
|
+
require('@hcaptcha/react-hcaptcha');
|
|
80
|
+
require('../../locale/locale.cjs');
|
|
81
|
+
|
|
82
|
+
const PhoneNumberField = ({ isLoading, disabled, error, label, onUpdate, appendRight, setIsFocused, setIsHovered, initialPhone, onBlur, }) => {
|
|
83
|
+
const countryInputRef = React.useRef(null);
|
|
84
|
+
const [countryDropdownOpen, setCountryDropdownOpen] = React.useState(false);
|
|
85
|
+
const anchorRef = React.useRef(null);
|
|
86
|
+
const [invalidNumberMessage, setInvalidNumberMessage] = React.useState(undefined);
|
|
87
|
+
const { formattedPhone, currentCountry, handleCountryInput, handlePhoneInput, hasInput, inputRef, countryInput, onBlurCountry, filteredCountries, openDropdown, handleCountryKeyDown, closeDropdown, setCountry, onMenuDisplayToggle, onFocusCountry, countryFontSize, } = usePhoneInputLogic.usePhoneInputLogic({
|
|
88
|
+
countryInputRef,
|
|
89
|
+
initialPhone,
|
|
90
|
+
onUpdate,
|
|
91
|
+
setCountryDropdownOpen,
|
|
92
|
+
setInvalidNumberMessage,
|
|
93
|
+
});
|
|
94
|
+
return (jsxRuntime.jsxs("div", { className: 'phone-number-field', children: [jsxRuntime.jsxs("div", { className: 'phone-number-field__fields', onPointerEnter: () => setIsHovered === null || setIsHovered === void 0 ? void 0 : setIsHovered(true), onPointerLeave: () => setIsHovered === null || setIsHovered === void 0 ? void 0 : setIsHovered(false), onFocus: () => setIsFocused === null || setIsFocused === void 0 ? void 0 : setIsFocused(true), onBlur: (event) => {
|
|
95
|
+
setIsFocused === null || setIsFocused === void 0 ? void 0 : setIsFocused(false);
|
|
96
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
97
|
+
}, ref: anchorRef, children: [jsxRuntime.jsxs("div", { className: classNames.classNames('phone-number-field__fields__country-code', {
|
|
98
|
+
'phone-number-field__fields__country-code--disabled': isLoading || disabled,
|
|
99
|
+
}), onClick: openDropdown, "data-testid": 'country-code', children: [jsxRuntime.jsx(reactInternationalPhone.FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsxRuntime.jsx(Input.Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric' }), jsxRuntime.jsx(Icon.Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsxRuntime.jsx(chevronDown.ReactComponent, {}) })] }), jsxRuntime.jsx(Input.Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input' }), !hasInput && (jsxRuntime.jsx(Typography.Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', children: label !== null && label !== void 0 ? label : 'Phone number' })), appendRight] }), jsxRuntime.jsx(MenuList.MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
|
|
100
|
+
anchorOrigin: 'bottom-left',
|
|
101
|
+
anchorRef,
|
|
102
|
+
}, mobileTitle: 'Select country', dropdownClassName: 'phone-number-field__dropdown', children: jsxRuntime.jsx("div", { className: 'phone-number-field__dropdown__items', ref: onMenuDisplayToggle, children: filteredCountries.map((countryData) => {
|
|
103
|
+
const country = reactInternationalPhone.parseCountry(countryData);
|
|
104
|
+
const { iso2, name, dialCode } = country;
|
|
105
|
+
const isSelected = iso2 === currentCountry.iso2;
|
|
106
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('phone-number-field__dropdown__items__country', {
|
|
107
|
+
'phone-number-field__dropdown__items__country--selected': isSelected,
|
|
108
|
+
}), onClick: () => {
|
|
109
|
+
setCountry(country);
|
|
110
|
+
closeDropdown();
|
|
111
|
+
}, id: iso2, children: [jsxRuntime.jsx(reactInternationalPhone.FlagImage, { iso2: iso2, size: '24px' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'primary', children: name }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: dialCode })] }, iso2));
|
|
112
|
+
}) }) }), Boolean(invalidNumberMessage || error) && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', className: 'phone-number-field__error-message', children: error !== null && error !== void 0 ? error : invalidNumberMessage }))] }));
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
exports.PhoneNumberField = PhoneNumberField;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dispatch, FC, FocusEventHandler, SetStateAction } from 'react';
|
|
2
|
+
import { OnUpdatePhoneData } from './usePhoneInputLogic';
|
|
3
|
+
export type PhoneNumberFieldProps = {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
onUpdate?: OnUpdatePhoneData;
|
|
9
|
+
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
10
|
+
setIsHovered?: Dispatch<SetStateAction<boolean>>;
|
|
11
|
+
setIsFocused?: Dispatch<SetStateAction<boolean>>;
|
|
12
|
+
initialPhone?: string;
|
|
13
|
+
appendRight?: JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export declare const PhoneNumberField: FC<PhoneNumberFieldProps>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { FlagImage, parseCountry } from 'react-international-phone';
|
|
4
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
5
|
+
import '../../events/dynamicEvents.js';
|
|
6
|
+
import '../../../../_virtual/_tslib.js';
|
|
7
|
+
import '@dynamic-labs/utils';
|
|
8
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
9
|
+
import '@dynamic-labs/sdk-api';
|
|
10
|
+
import '../../shared/logger.js';
|
|
11
|
+
import '@dynamic-labs/iconic';
|
|
12
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
13
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
14
|
+
import { ReactComponent as SvgChevronDown } from '../../shared/assets/chevron-down.js';
|
|
15
|
+
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../utils/constants/colors.js';
|
|
17
|
+
import '../../utils/constants/values.js';
|
|
18
|
+
import '../../shared/utils/classes/storage/localStorage.js';
|
|
19
|
+
import '../../shared/consts/index.js';
|
|
20
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
21
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
22
|
+
import '@dynamic-labs/multi-wallet';
|
|
23
|
+
import 'viem';
|
|
24
|
+
import 'viem/chains';
|
|
25
|
+
import '../../config/ApiEndpoint.js';
|
|
26
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
27
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
28
|
+
import '../../context/VerificationContext/VerificationContext.js';
|
|
29
|
+
import 'react-dom';
|
|
30
|
+
import '../../context/WalletContext/WalletContext.js';
|
|
31
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
32
|
+
import '@dynamic-labs/types';
|
|
33
|
+
import 'yup';
|
|
34
|
+
import 'react-i18next';
|
|
35
|
+
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
36
|
+
import '../../context/MockContext/MockContext.js';
|
|
37
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
38
|
+
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
39
|
+
import '@dynamic-labs/rpc-providers';
|
|
40
|
+
import '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
41
|
+
import 'i18next';
|
|
42
|
+
import { Typography } from '../Typography/Typography.js';
|
|
43
|
+
import '../ShadowDOM/ShadowDOM.js';
|
|
44
|
+
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
45
|
+
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
46
|
+
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
47
|
+
import '../OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
48
|
+
import '../../context/FooterAnimationContext/index.js';
|
|
49
|
+
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
50
|
+
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
51
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
52
|
+
import 'react-focus-lock';
|
|
53
|
+
import '../../context/LoadingContext/LoadingContext.js';
|
|
54
|
+
import { Icon } from '../Icon/Icon.js';
|
|
55
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
56
|
+
import '../IconButton/IconButton.js';
|
|
57
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
58
|
+
import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
59
|
+
import 'formik';
|
|
60
|
+
import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
61
|
+
import '../Alert/Alert.js';
|
|
62
|
+
import { Input } from '../Input/Input.js';
|
|
63
|
+
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
64
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
65
|
+
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
66
|
+
import '../InlineWidget/InlineWidget.js';
|
|
67
|
+
import '../IsBrowser/IsBrowser.js';
|
|
68
|
+
import { MenuList } from '../MenuList/MenuList/MenuList.js';
|
|
69
|
+
import { usePhoneInputLogic } from './usePhoneInputLogic/usePhoneInputLogic.js';
|
|
70
|
+
import '../Popper/Popper/Popper.js';
|
|
71
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
72
|
+
import 'qrcode';
|
|
73
|
+
import '../../views/WalletList/WalletList.js';
|
|
74
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
75
|
+
import '@hcaptcha/react-hcaptcha';
|
|
76
|
+
import '../../locale/locale.js';
|
|
77
|
+
|
|
78
|
+
const PhoneNumberField = ({ isLoading, disabled, error, label, onUpdate, appendRight, setIsFocused, setIsHovered, initialPhone, onBlur, }) => {
|
|
79
|
+
const countryInputRef = useRef(null);
|
|
80
|
+
const [countryDropdownOpen, setCountryDropdownOpen] = useState(false);
|
|
81
|
+
const anchorRef = useRef(null);
|
|
82
|
+
const [invalidNumberMessage, setInvalidNumberMessage] = useState(undefined);
|
|
83
|
+
const { formattedPhone, currentCountry, handleCountryInput, handlePhoneInput, hasInput, inputRef, countryInput, onBlurCountry, filteredCountries, openDropdown, handleCountryKeyDown, closeDropdown, setCountry, onMenuDisplayToggle, onFocusCountry, countryFontSize, } = usePhoneInputLogic({
|
|
84
|
+
countryInputRef,
|
|
85
|
+
initialPhone,
|
|
86
|
+
onUpdate,
|
|
87
|
+
setCountryDropdownOpen,
|
|
88
|
+
setInvalidNumberMessage,
|
|
89
|
+
});
|
|
90
|
+
return (jsxs("div", { className: 'phone-number-field', children: [jsxs("div", { className: 'phone-number-field__fields', onPointerEnter: () => setIsHovered === null || setIsHovered === void 0 ? void 0 : setIsHovered(true), onPointerLeave: () => setIsHovered === null || setIsHovered === void 0 ? void 0 : setIsHovered(false), onFocus: () => setIsFocused === null || setIsFocused === void 0 ? void 0 : setIsFocused(true), onBlur: (event) => {
|
|
91
|
+
setIsFocused === null || setIsFocused === void 0 ? void 0 : setIsFocused(false);
|
|
92
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
93
|
+
}, ref: anchorRef, children: [jsxs("div", { className: classNames('phone-number-field__fields__country-code', {
|
|
94
|
+
'phone-number-field__fields__country-code--disabled': isLoading || disabled,
|
|
95
|
+
}), onClick: openDropdown, "data-testid": 'country-code', children: [jsx(FlagImage, { iso2: currentCountry.iso2, size: '24px', className: 'phone-number-field__fields__country-code__flag' }), jsx(Typography, { className: 'phone-number-field__fields__country-code__plus', variant: 'body_normal', weight: 'regular', style: { fontSize: countryFontSize }, color: 'primary', children: "+" }), jsx(Input, { label: '', id: 'country_code_field', value: countryInput, onChange: handleCountryInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__country-code__container', className: 'phone-number-field__fields__country-code__container__input', onBlur: onBlurCountry, ref: countryInputRef, onKeyDown: handleCountryKeyDown, onFocus: onFocusCountry, style: { fontSize: countryFontSize }, "data-testid": 'country-code-input', inputMode: 'numeric' }), jsx(Icon, { className: 'phone-number-field__fields__country-code__chevron', children: jsx(SvgChevronDown, {}) })] }), jsx(Input, { label: '', id: 'phoneNumber', value: formattedPhone, onChange: handlePhoneInput, disabled: isLoading || disabled, containerClassName: 'phone-number-field__fields__phone-number', className: 'phone-number-field__fields__phone-number__input', ref: inputRef, error: Boolean(invalidNumberMessage || error), inputMode: 'numeric', "data-testid": 'phone_number_input' }), !hasInput && (jsx(Typography, { className: 'phone-number-field__fields__placeholder', variant: 'body_normal', weight: 'regular', children: label !== null && label !== void 0 ? label : 'Phone number' })), appendRight] }), jsx(MenuList, { isOpen: countryDropdownOpen, onClickClose: closeDropdown, popperProps: {
|
|
96
|
+
anchorOrigin: 'bottom-left',
|
|
97
|
+
anchorRef,
|
|
98
|
+
}, mobileTitle: 'Select country', dropdownClassName: 'phone-number-field__dropdown', children: jsx("div", { className: 'phone-number-field__dropdown__items', ref: onMenuDisplayToggle, children: filteredCountries.map((countryData) => {
|
|
99
|
+
const country = parseCountry(countryData);
|
|
100
|
+
const { iso2, name, dialCode } = country;
|
|
101
|
+
const isSelected = iso2 === currentCountry.iso2;
|
|
102
|
+
return (jsxs("div", { className: classNames('phone-number-field__dropdown__items__country', {
|
|
103
|
+
'phone-number-field__dropdown__items__country--selected': isSelected,
|
|
104
|
+
}), onClick: () => {
|
|
105
|
+
setCountry(country);
|
|
106
|
+
closeDropdown();
|
|
107
|
+
}, id: iso2, children: [jsx(FlagImage, { iso2: iso2, size: '24px' }), jsx(Typography, { variant: 'body_small', color: 'primary', children: name }), jsx(Typography, { variant: 'body_small', color: 'secondary', children: dialCode })] }, iso2));
|
|
108
|
+
}) }) }), Boolean(invalidNumberMessage || error) && (jsx(Typography, { variant: 'body_mini', className: 'phone-number-field__error-message', children: error !== null && error !== void 0 ? error : invalidNumberMessage }))] }));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export { PhoneNumberField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PhoneNumberField';
|
|
@@ -2,80 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _tslib = require('../../../../../../../_virtual/_tslib.cjs');
|
|
6
5
|
var React = require('react');
|
|
7
|
-
var reactI18next = require('react-i18next');
|
|
8
6
|
var reactInternationalPhone = require('react-international-phone');
|
|
9
|
-
var
|
|
10
|
-
require('
|
|
11
|
-
require('
|
|
12
|
-
require('
|
|
13
|
-
require('@dynamic-labs/iconic');
|
|
14
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
15
|
-
require('react/jsx-runtime');
|
|
16
|
-
var ViewContext = require('../../../../../context/ViewContext/ViewContext.cjs');
|
|
17
|
-
require('@dynamic-labs/wallet-book');
|
|
18
|
-
var localStorage$1 = require('../../../../../utils/constants/localStorage.cjs');
|
|
19
|
-
require('../../../../../utils/constants/colors.cjs');
|
|
20
|
-
require('../../../../../utils/constants/values.cjs');
|
|
21
|
-
var localStorage = require('../../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
22
|
-
require('@dynamic-labs/utils');
|
|
23
|
-
var useThrottle = require('../../../../../shared/utils/hooks/useThrottle/useThrottle.cjs');
|
|
24
|
-
require('../../../../../shared/consts/index.cjs');
|
|
25
|
-
require('../../../../../events/dynamicEvents.cjs');
|
|
26
|
-
require('../../../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
|
-
require('@dynamic-labs/multi-wallet');
|
|
28
|
-
var modulo = require('../../../../../utils/functions/modulo/modulo.cjs');
|
|
29
|
-
require('viem');
|
|
30
|
-
require('viem/chains');
|
|
31
|
-
var api = require('../../../../../data/api.cjs');
|
|
32
|
-
require('../../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
|
-
require('../../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
34
|
-
var VerificationContext = require('../../../../../context/VerificationContext/VerificationContext.cjs');
|
|
35
|
-
require('react-dom');
|
|
36
|
-
require('../../../../../context/WalletContext/WalletContext.cjs');
|
|
37
|
-
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
38
|
-
require('@dynamic-labs/types');
|
|
39
|
-
require('yup');
|
|
40
|
-
require('../../../../../context/MockContext/MockContext.cjs');
|
|
41
|
-
require('../../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
42
|
-
require('../../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
43
|
-
require('@dynamic-labs/rpc-providers');
|
|
44
|
-
require('../../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
45
|
-
require('../../../../../components/Alert/Alert.cjs');
|
|
46
|
-
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
47
|
-
require('../../../../../components/IconButton/IconButton.cjs');
|
|
48
|
-
require('../../../../../components/InlineWidget/InlineWidget.cjs');
|
|
49
|
-
require('../../../../../components/Input/Input.cjs');
|
|
50
|
-
require('../../../../../components/IsBrowser/IsBrowser.cjs');
|
|
51
|
-
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
52
|
-
require('../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
53
|
-
require('../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
54
|
-
require('../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
55
|
-
require('../../../../../components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
56
|
-
require('../../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
57
|
-
require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
58
|
-
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
59
|
-
require('react-focus-lock');
|
|
60
|
-
require('qrcode');
|
|
61
|
-
require('formik');
|
|
62
|
-
require('../../../../WalletList/WalletList.cjs');
|
|
63
|
-
require('../../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
64
|
-
require('../../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
65
|
-
require('i18next');
|
|
66
|
-
require('@hcaptcha/react-hcaptcha');
|
|
67
|
-
require('../../../../../context/LoadingContext/LoadingContext.cjs');
|
|
68
|
-
require('../../../../../config/ApiEndpoint.cjs');
|
|
69
|
-
require('../../../../../context/FooterAnimationContext/index.cjs');
|
|
70
|
-
require('../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
71
|
-
require('../../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
72
|
-
require('../../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
73
|
-
require('../../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
74
|
-
require('../../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
75
|
-
require('../../../../TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
76
|
-
require('../../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
77
|
-
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
78
|
-
var checkIfNumberHasError = require('../checkIfNumberHasError/checkIfNumberHasError.cjs');
|
|
7
|
+
var localStorage = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
8
|
+
var useThrottle = require('../../../shared/utils/hooks/useThrottle/useThrottle.cjs');
|
|
9
|
+
var localStorage$1 = require('../../../utils/constants/localStorage.cjs');
|
|
10
|
+
var modulo = require('../../../utils/functions/modulo/modulo.cjs');
|
|
79
11
|
var getCustomCountries = require('../getCustomCountries/getCustomCountries.cjs');
|
|
80
12
|
|
|
81
13
|
const customCountries = getCustomCountries.getCustomCountries();
|
|
@@ -89,16 +21,24 @@ const getDefaultCountry = () => {
|
|
|
89
21
|
};
|
|
90
22
|
const MENU_DISPLAY_THROTTLE = 50;
|
|
91
23
|
const COUNTRY_INPUT_SCROLL_DELAY = 20;
|
|
92
|
-
const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage,
|
|
24
|
+
const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage, onUpdate, initialPhone, }) => {
|
|
93
25
|
var _a, _b, _c, _d;
|
|
94
26
|
const { inputValue: formattedPhone, phone, country: currentCountry, setCountry: setSelectedCountry, handlePhoneValueChange: handlePhoneInput, inputRef, } = reactInternationalPhone.usePhoneInput({
|
|
95
27
|
countries: customCountries,
|
|
96
28
|
defaultCountry: (_b = (_a = getDefaultCountry()) === null || _a === void 0 ? void 0 : _a.iso2) !== null && _b !== void 0 ? _b : 'us',
|
|
97
29
|
disableDialCodeAndPrefix: true,
|
|
30
|
+
value: initialPhone,
|
|
98
31
|
});
|
|
99
32
|
/** What is currently displayed on the country input */
|
|
100
33
|
const [countryInput, setCountryInput] = React.useState((_d = (_c = getDefaultCountry()) === null || _c === void 0 ? void 0 : _c.dialCode) !== null && _d !== void 0 ? _d : '1');
|
|
101
|
-
|
|
34
|
+
// Justification for effect:
|
|
35
|
+
// Since the library controls the states, we can't call this callback inside the setters.
|
|
36
|
+
// We could wrap setCountry and handlePhoneInput, but that only accounts for
|
|
37
|
+
// country and phone, not formattedPhone.
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate({ country: currentCountry, formattedPhone, phone });
|
|
40
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
|
+
}, [currentCountry.iso2, formattedPhone, onUpdate, phone]);
|
|
102
42
|
// =================================================================
|
|
103
43
|
// DROPDOWN
|
|
104
44
|
// =================================================================
|
|
@@ -201,57 +141,6 @@ const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvali
|
|
|
201
141
|
return handleEnterInput(event);
|
|
202
142
|
}, [closeDropdown, handleArrowInput, handleEnterInput]);
|
|
203
143
|
// =================================================================
|
|
204
|
-
// SUBMITTING
|
|
205
|
-
// =================================================================
|
|
206
|
-
const { engageCaptcha } = CaptchaContext.useCaptchaContext();
|
|
207
|
-
const { view, setView } = ViewContext.useViewContext();
|
|
208
|
-
const { environmentId, projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
209
|
-
const { setDisplayedDestination, setVerificationUUID, setRetryData } = VerificationContext.useVerification();
|
|
210
|
-
const submitSms = (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
211
|
-
try {
|
|
212
|
-
const phoneNumber = reactInternationalPhone.removeDialCode({
|
|
213
|
-
dialCode: currentCountry.dialCode,
|
|
214
|
-
phone,
|
|
215
|
-
});
|
|
216
|
-
const { verificationUUID } = yield api.createSmsVerification({
|
|
217
|
-
captchaToken,
|
|
218
|
-
environmentId,
|
|
219
|
-
isoCountryCode: currentCountry.iso2,
|
|
220
|
-
phoneCountryCode: currentCountry.dialCode,
|
|
221
|
-
phoneNumber,
|
|
222
|
-
});
|
|
223
|
-
setRetryData({
|
|
224
|
-
dialCode: currentCountry.dialCode,
|
|
225
|
-
iso2: currentCountry.iso2,
|
|
226
|
-
phone: phoneNumber,
|
|
227
|
-
});
|
|
228
|
-
setView('login-with-sms-verification');
|
|
229
|
-
setDisplayedDestination(formattedPhone);
|
|
230
|
-
setVerificationUUID(verificationUUID);
|
|
231
|
-
}
|
|
232
|
-
catch (error) {
|
|
233
|
-
setView(view.type);
|
|
234
|
-
if (typeof error === 'string')
|
|
235
|
-
setInvalidNumberMessage(error);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
const handleSubmit = (event) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
239
|
-
var _e;
|
|
240
|
-
event.preventDefault();
|
|
241
|
-
const error = checkIfNumberHasError.checkIfNumberHasError(phone);
|
|
242
|
-
if (error) {
|
|
243
|
-
setInvalidNumberMessage(t('dyn_login.helper.phone_number_form.invalid_number'));
|
|
244
|
-
onSubmitError === null || onSubmitError === void 0 ? void 0 : onSubmitError();
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
|
|
248
|
-
if ((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _e === void 0 ? void 0 : _e.enabled) {
|
|
249
|
-
engageCaptcha({ authMethod: 'phone', onCaptchaSuccess: submitSms });
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
submitSms();
|
|
253
|
-
});
|
|
254
|
-
// =================================================================
|
|
255
144
|
// UTILITIES
|
|
256
145
|
// =================================================================
|
|
257
146
|
// Due to the way react-international-phone works, numberInput always has a value (the dial code),
|
|
@@ -295,12 +184,6 @@ const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvali
|
|
|
295
184
|
// Changing country resets the phone number, so we must also reset any errors
|
|
296
185
|
setInvalidNumberMessage(undefined);
|
|
297
186
|
};
|
|
298
|
-
/** Whether user has provided all the digits of the phone number input */
|
|
299
|
-
const isInputComplete = React.useMemo(() => formattedPhone.length >=
|
|
300
|
-
reactInternationalPhone.getActiveFormattingMask({
|
|
301
|
-
country: currentCountry,
|
|
302
|
-
phone,
|
|
303
|
-
}).length, [currentCountry, formattedPhone.length, phone]);
|
|
304
187
|
/** Override fontsize of country code for larger inputs */
|
|
305
188
|
const countryFontSize = React.useMemo(() => {
|
|
306
189
|
if (countryInput.length > 3)
|
|
@@ -319,10 +202,8 @@ const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvali
|
|
|
319
202
|
handleCountryInput,
|
|
320
203
|
handleCountryKeyDown,
|
|
321
204
|
handlePhoneInput,
|
|
322
|
-
handleSubmit,
|
|
323
205
|
hasInput,
|
|
324
206
|
inputRef,
|
|
325
|
-
isInputComplete,
|
|
326
207
|
onBlurCountry: resetToLastValidCountry,
|
|
327
208
|
onFocusCountry: openDropdown,
|
|
328
209
|
onMenuDisplayToggle,
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { ChangeEventHandler, Dispatch,
|
|
1
|
+
import { ChangeEventHandler, Dispatch, KeyboardEventHandler, RefObject, SetStateAction } from 'react';
|
|
2
2
|
import { ParsedCountry } from 'react-international-phone';
|
|
3
|
+
export type OnUpdatePhoneData = (values: {
|
|
4
|
+
phone: string;
|
|
5
|
+
formattedPhone: string;
|
|
6
|
+
country: ParsedCountry;
|
|
7
|
+
}) => void;
|
|
3
8
|
type UsePhoneLogicProps = {
|
|
4
9
|
countryInputRef: RefObject<HTMLInputElement>;
|
|
5
10
|
setCountryDropdownOpen: Dispatch<SetStateAction<boolean>>;
|
|
6
11
|
setInvalidNumberMessage: Dispatch<SetStateAction<string | undefined>>;
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
onUpdate?: OnUpdatePhoneData;
|
|
13
|
+
initialPhone?: string;
|
|
9
14
|
};
|
|
10
15
|
/** The default country we want to use */
|
|
11
16
|
export declare const getDefaultCountry: () => ParsedCountry | undefined;
|
|
12
|
-
export declare const usePhoneInputLogic: ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage,
|
|
17
|
+
export declare const usePhoneInputLogic: ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage, onUpdate, initialPhone, }: UsePhoneLogicProps) => {
|
|
13
18
|
closeDropdown: () => void;
|
|
14
19
|
countryFontSize: string;
|
|
15
20
|
countryInput: string;
|
|
@@ -19,10 +24,8 @@ export declare const usePhoneInputLogic: ({ countryInputRef, setCountryDropdownO
|
|
|
19
24
|
handleCountryInput: ChangeEventHandler<HTMLInputElement>;
|
|
20
25
|
handleCountryKeyDown: KeyboardEventHandler<HTMLInputElement>;
|
|
21
26
|
handlePhoneInput: (e: import("react").ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => string;
|
|
22
|
-
handleSubmit: (event: FormEvent<HTMLFormElement>) => Promise<void>;
|
|
23
27
|
hasInput: boolean;
|
|
24
28
|
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
25
|
-
isInputComplete: boolean;
|
|
26
29
|
onBlurCountry: () => void;
|
|
27
30
|
onFocusCountry: () => void;
|
|
28
31
|
onMenuDisplayToggle: (menu: HTMLDivElement | null) => void;
|