@dynamic-labs/sdk-react-core 0.18.0-RC.10 → 0.18.0-RC.11
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
- package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
- package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/index.d.ts +2 -0
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -0
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Step/Step.cjs +23 -2
- package/src/lib/components/Step/Step.d.ts +2 -3
- package/src/lib/components/Step/Step.js +24 -3
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/data/api.cjs +3 -0
- package/src/lib/data/api.js +4 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +5 -4
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +5 -4
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +3 -2
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
- package/src/lib/utils/functions/index.d.ts +1 -0
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +4 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +4 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +3 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +3 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +6 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +7 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +10 -5
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +10 -5
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +5 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +5 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -3
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +6 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +6 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +12 -20
- package/src/lib/views/NoAccess/NoAccess.js +12 -20
- package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +1 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +1 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +1 -0
- package/src/lib/views/viewToComponentMap.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +16 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +17 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -17
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -9
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.cjs +0 -57
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.js +0 -53
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.cjs +0 -58
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.js +0 -54
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/index.d.ts +0 -1
package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
8
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
@@ -24,10 +25,10 @@ require('@dynamic-labs/sdk-api');
|
|
|
24
25
|
const useCreateUserProfileByJWTCallback = () => {
|
|
25
26
|
const { setUser, handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
|
|
26
27
|
const { goToInitialView } = ViewContext.useViewContext();
|
|
27
|
-
const createUserProfileByJWT = React.useCallback((jwt) => {
|
|
28
|
+
const createUserProfileByJWT = React.useCallback((jwt) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
28
29
|
const decodedJWT = decodeJwt.decodeJwt(jwt);
|
|
29
30
|
if (!decodedJWT) {
|
|
30
|
-
handleLogOut();
|
|
31
|
+
yield handleLogOut();
|
|
31
32
|
goToInitialView();
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
@@ -35,7 +36,7 @@ const useCreateUserProfileByJWTCallback = () => {
|
|
|
35
36
|
const userProfile = createUserProfile.createUserProfile(decodedJWT);
|
|
36
37
|
setUser(userProfile);
|
|
37
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
}, []);
|
|
39
|
+
}), []);
|
|
39
40
|
return { createUserProfileByJWT };
|
|
40
41
|
};
|
|
41
42
|
|
package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
1
2
|
import { useCallback } from 'react';
|
|
2
3
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
4
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
@@ -20,10 +21,10 @@ import '@dynamic-labs/sdk-api';
|
|
|
20
21
|
const useCreateUserProfileByJWTCallback = () => {
|
|
21
22
|
const { setUser, handleLogOut } = useInternalDynamicContext();
|
|
22
23
|
const { goToInitialView } = useViewContext();
|
|
23
|
-
const createUserProfileByJWT = useCallback((jwt) => {
|
|
24
|
+
const createUserProfileByJWT = useCallback((jwt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
25
|
const decodedJWT = decodeJwt(jwt);
|
|
25
26
|
if (!decodedJWT) {
|
|
26
|
-
handleLogOut();
|
|
27
|
+
yield handleLogOut();
|
|
27
28
|
goToInitialView();
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
@@ -31,7 +32,7 @@ const useCreateUserProfileByJWTCallback = () => {
|
|
|
31
32
|
const userProfile = createUserProfile(decodedJWT);
|
|
32
33
|
setUser(userProfile);
|
|
33
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
|
-
}, []);
|
|
35
|
+
}), []);
|
|
35
36
|
return { createUserProfileByJWT };
|
|
36
37
|
};
|
|
37
38
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDynamicScopes } from './useDynamicScopes';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
|
+
|
|
8
|
+
// This hook can be used to get all of the user's scopes (nft/token gates)
|
|
9
|
+
// and check if the user has a specific scopes with some logic AND/OR (nft/token gate)
|
|
10
|
+
const useDynamicScopes = () => {
|
|
11
|
+
const { decodedAuthToken } = useInternalDynamicContext.useInternalDynamicContext();
|
|
12
|
+
const userScopes = React.useMemo(() => {
|
|
13
|
+
const { scope } = decodedAuthToken || {};
|
|
14
|
+
if (!scope)
|
|
15
|
+
return [];
|
|
16
|
+
// We need to split the scopes string into an array of scopes
|
|
17
|
+
// because the scopes string is a space separated string of scopes
|
|
18
|
+
// e.g. '"scope": "customerservice marketing tech"'
|
|
19
|
+
return scope.split(' ');
|
|
20
|
+
}, [decodedAuthToken]);
|
|
21
|
+
// If customer will set scopes to an empty string it will return false
|
|
22
|
+
const userHasScopes = (scopes, logicOperator = 'OR') => {
|
|
23
|
+
if (!scopes.length)
|
|
24
|
+
return false;
|
|
25
|
+
if (typeof scopes === 'string')
|
|
26
|
+
scopes = scopes.split(' ');
|
|
27
|
+
if (logicOperator === 'AND') {
|
|
28
|
+
// If the logic operator is AND, the user must have all of the scopes
|
|
29
|
+
// If the logic operator is OR, the user must have at least one of the scopes
|
|
30
|
+
return scopes.every((scope) => Boolean(userScopes.includes(scope)));
|
|
31
|
+
}
|
|
32
|
+
return scopes.some((scope) => Boolean(userScopes.includes(scope)));
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
userHasScopes,
|
|
36
|
+
userScopes,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.useDynamicScopes = useDynamicScopes;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
|
+
|
|
4
|
+
// This hook can be used to get all of the user's scopes (nft/token gates)
|
|
5
|
+
// and check if the user has a specific scopes with some logic AND/OR (nft/token gate)
|
|
6
|
+
const useDynamicScopes = () => {
|
|
7
|
+
const { decodedAuthToken } = useInternalDynamicContext();
|
|
8
|
+
const userScopes = useMemo(() => {
|
|
9
|
+
const { scope } = decodedAuthToken || {};
|
|
10
|
+
if (!scope)
|
|
11
|
+
return [];
|
|
12
|
+
// We need to split the scopes string into an array of scopes
|
|
13
|
+
// because the scopes string is a space separated string of scopes
|
|
14
|
+
// e.g. '"scope": "customerservice marketing tech"'
|
|
15
|
+
return scope.split(' ');
|
|
16
|
+
}, [decodedAuthToken]);
|
|
17
|
+
// If customer will set scopes to an empty string it will return false
|
|
18
|
+
const userHasScopes = (scopes, logicOperator = 'OR') => {
|
|
19
|
+
if (!scopes.length)
|
|
20
|
+
return false;
|
|
21
|
+
if (typeof scopes === 'string')
|
|
22
|
+
scopes = scopes.split(' ');
|
|
23
|
+
if (logicOperator === 'AND') {
|
|
24
|
+
// If the logic operator is AND, the user must have all of the scopes
|
|
25
|
+
// If the logic operator is OR, the user must have at least one of the scopes
|
|
26
|
+
return scopes.every((scope) => Boolean(userScopes.includes(scope)));
|
|
27
|
+
}
|
|
28
|
+
return scopes.some((scope) => Boolean(userScopes.includes(scope)));
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
userHasScopes,
|
|
32
|
+
userScopes,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { useDynamicScopes };
|
package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
8
|
var useCreateUserProfileByJWTCallback = require('../useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs');
|
|
@@ -16,11 +17,11 @@ var useCreateUserProfileByJWTCallback = require('../useCreateUserProfileByJWTCal
|
|
|
16
17
|
const useUpdateUserProfileByJWTCallback = () => {
|
|
17
18
|
const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback.useCreateUserProfileByJWTCallback();
|
|
18
19
|
const { setCallback } = useInternalDynamicContext.useInternalDynamicContext();
|
|
19
|
-
const updateUserProfileByJWT = React.useCallback((jwt) => {
|
|
20
|
-
createUserProfileByJWT(jwt);
|
|
20
|
+
const updateUserProfileByJWT = React.useCallback((jwt) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
yield createUserProfileByJWT(jwt);
|
|
21
22
|
setCallback('userProfileUpdate');
|
|
22
23
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
-
}, []);
|
|
24
|
+
}), []);
|
|
24
25
|
return { updateUserProfileByJWT };
|
|
25
26
|
};
|
|
26
27
|
|
package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
1
2
|
import { useCallback } from 'react';
|
|
2
3
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
4
|
import { useCreateUserProfileByJWTCallback } from '../useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js';
|
|
@@ -12,11 +13,11 @@ import { useCreateUserProfileByJWTCallback } from '../useCreateUserProfileByJWTC
|
|
|
12
13
|
const useUpdateUserProfileByJWTCallback = () => {
|
|
13
14
|
const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback();
|
|
14
15
|
const { setCallback } = useInternalDynamicContext();
|
|
15
|
-
const updateUserProfileByJWT = useCallback((jwt) => {
|
|
16
|
-
createUserProfileByJWT(jwt);
|
|
16
|
+
const updateUserProfileByJWT = useCallback((jwt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
yield createUserProfileByJWT(jwt);
|
|
17
18
|
setCallback('userProfileUpdate');
|
|
18
19
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
}, []);
|
|
20
|
+
}), []);
|
|
20
21
|
return { updateUserProfileByJWT };
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -41,7 +41,7 @@ const useUserUpdateRequestInternal = ({ validationSchemaStripUnknown, }) => {
|
|
|
41
41
|
const _isEmailVerificationRequired = isEmailVerificationRequired.isEmailVerificationRequired(updateUserProfileResponse);
|
|
42
42
|
if (!_isEmailVerificationRequired) {
|
|
43
43
|
// If email verification is not needed then we can update the user profile immediately.
|
|
44
|
-
updateUserProfileByJWT(updateUserProfileResponse.jwt);
|
|
44
|
+
yield updateUserProfileByJWT(updateUserProfileResponse.jwt);
|
|
45
45
|
return {
|
|
46
46
|
isEmailVerificationRequired: _isEmailVerificationRequired,
|
|
47
47
|
updateUserProfileResponse,
|
|
@@ -37,7 +37,7 @@ const useUserUpdateRequestInternal = ({ validationSchemaStripUnknown, }) => {
|
|
|
37
37
|
const _isEmailVerificationRequired = isEmailVerificationRequired(updateUserProfileResponse);
|
|
38
38
|
if (!_isEmailVerificationRequired) {
|
|
39
39
|
// If email verification is not needed then we can update the user profile immediately.
|
|
40
|
-
updateUserProfileByJWT(updateUserProfileResponse.jwt);
|
|
40
|
+
yield updateUserProfileByJWT(updateUserProfileResponse.jwt);
|
|
41
41
|
return {
|
|
42
42
|
isEmailVerificationRequired: _isEmailVerificationRequired,
|
|
43
43
|
updateUserProfileResponse,
|
|
@@ -103,9 +103,15 @@ const useVerifyWallet = ({ consumeNonce, displayTermsOfService, environmentId, p
|
|
|
103
103
|
}
|
|
104
104
|
walletConnector.endSession();
|
|
105
105
|
if (e instanceof utils.ChainalysisError) {
|
|
106
|
+
setDeniedAddress(address);
|
|
106
107
|
setView('chainalysis-blocked-wallet');
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
110
|
+
if (e instanceof utils.GateBlockedError) {
|
|
111
|
+
setDeniedAddress(address);
|
|
112
|
+
setView('gate-blocked-wallet');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
109
115
|
if (e instanceof utils.NoAccessError) {
|
|
110
116
|
setDeniedAddress(address);
|
|
111
117
|
// we need to set this value if it's magic in order to set proper icon
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { isSocialWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
import { DynamicError, WalletUsedError, ChainalysisError, NoAccessError } from '@dynamic-labs/utils';
|
|
3
|
+
import { DynamicError, WalletUsedError, ChainalysisError, GateBlockedError, NoAccessError } from '@dynamic-labs/utils';
|
|
4
4
|
import { verifyWallet, linkWallet } from '../../../data/api.js';
|
|
5
5
|
import { storeAuthToken } from '../../functions/storeAuthToken/index.js';
|
|
6
6
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -99,9 +99,15 @@ const useVerifyWallet = ({ consumeNonce, displayTermsOfService, environmentId, p
|
|
|
99
99
|
}
|
|
100
100
|
walletConnector.endSession();
|
|
101
101
|
if (e instanceof ChainalysisError) {
|
|
102
|
+
setDeniedAddress(address);
|
|
102
103
|
setView('chainalysis-blocked-wallet');
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
106
|
+
if (e instanceof GateBlockedError) {
|
|
107
|
+
setDeniedAddress(address);
|
|
108
|
+
setView('gate-blocked-wallet');
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
105
111
|
if (e instanceof NoAccessError) {
|
|
106
112
|
setDeniedAddress(address);
|
|
107
113
|
// we need to set this value if it's magic in order to set proper icon
|
|
@@ -42,6 +42,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
45
46
|
|
|
46
47
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
47
48
|
const confirmationStateRef = React.useRef('enabled');
|
|
@@ -38,6 +38,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
41
42
|
|
|
42
43
|
const useWalletUiUtils = ({ appLogoUrl, appName, getAppOrigin, }) => {
|
|
43
44
|
const confirmationStateRef = useRef('enabled');
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
6
7
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
|
+
var ConnectedWalletsListLayout = require('../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs');
|
|
8
10
|
require('@dynamic-labs/sdk-api');
|
|
9
11
|
require('../../shared/logger.cjs');
|
|
10
12
|
var getChainIcon = require('../../shared/utils/functions/chain/getChainIcon.cjs');
|
|
@@ -13,25 +15,28 @@ require('@dynamic-labs/utils');
|
|
|
13
15
|
require('../../utils/constants/colors.cjs');
|
|
14
16
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
15
17
|
require('ethers');
|
|
16
|
-
require('react');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
19
20
|
require('../../shared/consts/index.cjs');
|
|
20
|
-
var ConnectedWalletsListLayout = require('../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs');
|
|
21
21
|
var DynamicBridgeWalletCard = require('../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs');
|
|
22
22
|
var DynamicBridgeWalletCardBody = require('../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs');
|
|
23
|
-
var Balance = require('../../widgets/DynamicWidget/components/Balance/Balance.cjs');
|
|
24
23
|
var SecondaryWallets = require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
24
|
+
var Balance = require('../../widgets/DynamicWidget/components/Balance/Balance.cjs');
|
|
25
25
|
|
|
26
26
|
const BridgeSummaryView = () => {
|
|
27
|
-
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
27
|
+
const { primaryWallet, setShowAuthFlow, appName, walletsByChain = [], } = useInternalDynamicContext.useInternalDynamicContext();
|
|
28
28
|
if (!primaryWallet) {
|
|
29
29
|
throw new Error('primaryWallet should be defined');
|
|
30
30
|
}
|
|
31
31
|
const PrimaryWalletChainIcon = getChainIcon.getChainIcon(primaryWallet.chain);
|
|
32
32
|
const primaryWalletChainInfo = walletConnectorCore.getChainInfo(primaryWallet.chain);
|
|
33
33
|
const onClickClose = () => setShowAuthFlow(false);
|
|
34
|
-
|
|
34
|
+
const body = React.useMemo(() => {
|
|
35
|
+
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = walletConnectorCore.getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
36
|
+
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
37
|
+
return `Congratulations on connecting both your ${firstBlockchainName} and ${secondBlockchainName} wallets`;
|
|
38
|
+
}, [walletsByChain]);
|
|
39
|
+
return (jsxRuntime.jsxs(ConnectedWalletsListLayout.ConnectedWalletsListLayout, Object.assign({ onClickClose: onClickClose, onClickAction: onClickClose, title: `Welcome to ${appName}`, body: body }, { children: [jsxRuntime.jsx(DynamicBridgeWalletCard.DynamicBridgeWalletCard, Object.assign({ networkIcon: jsxRuntime.jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsxRuntime.jsx(DynamicBridgeWalletCardBody.DynamicBridgeWalletCardBody, { walletName: primaryWallet.connector.name, walletAddress: primaryWallet.address, walletBalance:
|
|
35
40
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
36
41
|
jsxRuntime.jsx(Balance.Balance, { address: primaryWallet.address, connector: primaryWallet.connector, network: primaryWallet.chain }) }) })), jsxRuntime.jsx(SecondaryWallets.MemoSecondaryWallets, { hideUnlinkAction: true })] })));
|
|
37
42
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { getChainInfo } from '@dynamic-labs/wallet-connector-core';
|
|
3
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
|
+
import { ConnectedWalletsListLayout } from '../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js';
|
|
4
6
|
import '@dynamic-labs/sdk-api';
|
|
5
7
|
import '../../shared/logger.js';
|
|
6
8
|
import { getChainIcon } from '../../shared/utils/functions/chain/getChainIcon.js';
|
|
@@ -9,25 +11,28 @@ import '@dynamic-labs/utils';
|
|
|
9
11
|
import '../../utils/constants/colors.js';
|
|
10
12
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
11
13
|
import 'ethers';
|
|
12
|
-
import 'react';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '../../context/ViewContext/ViewContext.js';
|
|
15
16
|
import '../../shared/consts/index.js';
|
|
16
|
-
import { ConnectedWalletsListLayout } from '../../layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js';
|
|
17
17
|
import { DynamicBridgeWalletCard } from '../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js';
|
|
18
18
|
import { DynamicBridgeWalletCardBody } from '../../widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js';
|
|
19
|
-
import { Balance } from '../../widgets/DynamicWidget/components/Balance/Balance.js';
|
|
20
19
|
import { MemoSecondaryWallets } from '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
20
|
+
import { Balance } from '../../widgets/DynamicWidget/components/Balance/Balance.js';
|
|
21
21
|
|
|
22
22
|
const BridgeSummaryView = () => {
|
|
23
|
-
const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
|
|
23
|
+
const { primaryWallet, setShowAuthFlow, appName, walletsByChain = [], } = useInternalDynamicContext();
|
|
24
24
|
if (!primaryWallet) {
|
|
25
25
|
throw new Error('primaryWallet should be defined');
|
|
26
26
|
}
|
|
27
27
|
const PrimaryWalletChainIcon = getChainIcon(primaryWallet.chain);
|
|
28
28
|
const primaryWalletChainInfo = getChainInfo(primaryWallet.chain);
|
|
29
29
|
const onClickClose = () => setShowAuthFlow(false);
|
|
30
|
-
|
|
30
|
+
const body = useMemo(() => {
|
|
31
|
+
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
32
|
+
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
33
|
+
return `Congratulations on connecting both your ${firstBlockchainName} and ${secondBlockchainName} wallets`;
|
|
34
|
+
}, [walletsByChain]);
|
|
35
|
+
return (jsxs(ConnectedWalletsListLayout, Object.assign({ onClickClose: onClickClose, onClickAction: onClickClose, title: `Welcome to ${appName}`, body: body }, { children: [jsx(DynamicBridgeWalletCard, Object.assign({ networkIcon: jsx(PrimaryWalletChainIcon, {}), networkName: primaryWalletChainInfo === null || primaryWalletChainInfo === void 0 ? void 0 : primaryWalletChainInfo.displayName }, { children: jsx(DynamicBridgeWalletCardBody, { walletName: primaryWallet.connector.name, walletAddress: primaryWallet.address, walletBalance:
|
|
31
36
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
32
37
|
jsx(Balance, { address: primaryWallet.address, connector: primaryWallet.connector, network: primaryWallet.chain }) }) })), jsx(MemoSecondaryWallets, { hideUnlinkAction: true })] })));
|
|
33
38
|
};
|
|
@@ -26,7 +26,7 @@ const BridgeWelcomeView = () => {
|
|
|
26
26
|
const body = React.useMemo(() => {
|
|
27
27
|
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = walletConnectorCore.getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
28
28
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
29
|
-
return `You’ll need to connect both
|
|
29
|
+
return `You’ll need to connect both your ${firstBlockchainName} and ${secondBlockchainName} wallets to get started`;
|
|
30
30
|
}, [walletsByChain]);
|
|
31
31
|
const chains = React.useMemo(() => walletsByChain
|
|
32
32
|
.map(({ chain }, index) => {
|
|
@@ -42,7 +42,7 @@ const BridgeWelcomeView = () => {
|
|
|
42
42
|
return undefined;
|
|
43
43
|
})
|
|
44
44
|
.filter(isChainInfoDefined), [walletsByChain]);
|
|
45
|
-
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `
|
|
45
|
+
return (jsxRuntime.jsx(BridgeWelcomeLayout.BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `Connect to ${appName}`, body: body, chains: chains, actionButtonText: 'Get started', onClickAction: () => setView('wallet-list') }));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.BridgeWelcomeView = BridgeWelcomeView;
|
|
@@ -22,7 +22,7 @@ const BridgeWelcomeView = () => {
|
|
|
22
22
|
const body = useMemo(() => {
|
|
23
23
|
const blockchainNames = walletsByChain.map(({ chain }) => { var _a; return (_a = getChainInfo(chain)) === null || _a === void 0 ? void 0 : _a.blockchainName; });
|
|
24
24
|
const [firstBlockchainName, secondBlockchainName] = blockchainNames;
|
|
25
|
-
return `You’ll need to connect both
|
|
25
|
+
return `You’ll need to connect both your ${firstBlockchainName} and ${secondBlockchainName} wallets to get started`;
|
|
26
26
|
}, [walletsByChain]);
|
|
27
27
|
const chains = useMemo(() => walletsByChain
|
|
28
28
|
.map(({ chain }, index) => {
|
|
@@ -38,7 +38,7 @@ const BridgeWelcomeView = () => {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
})
|
|
40
40
|
.filter(isChainInfoDefined), [walletsByChain]);
|
|
41
|
-
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `
|
|
41
|
+
return (jsx(BridgeWelcomeLayout, { onClickClose: () => setShowAuthFlow(false), title: `Connect to ${appName}`, body: body, chains: chains, actionButtonText: 'Get started', onClickAction: () => setView('wallet-list') }));
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export { BridgeWelcomeView };
|
|
@@ -42,6 +42,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
45
46
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
46
47
|
|
|
47
48
|
const CaptchaVerifyUser = () => {
|
|
@@ -38,6 +38,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
41
42
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
42
43
|
|
|
43
44
|
const CaptchaVerifyUser = () => {
|
|
@@ -43,6 +43,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
47
48
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
48
49
|
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
@@ -61,7 +62,7 @@ const CollectUserDataView = () => {
|
|
|
61
62
|
const _isSupportedNetwork = !network || isSupportedNetwork.isSupportedNetwork({ network, walletConnector });
|
|
62
63
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsxRuntime.jsx(UserAddress.UserAddress, { userProfile: userProfile }), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
63
64
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
64
|
-
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick:
|
|
65
|
+
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
exports.CollectUserDataView = CollectUserDataView;
|
|
@@ -39,6 +39,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
43
44
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
44
45
|
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
@@ -57,7 +58,7 @@ const CollectUserDataView = () => {
|
|
|
57
58
|
const _isSupportedNetwork = !network || isSupportedNetwork({ network, walletConnector });
|
|
58
59
|
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsx(UserAddress, { userProfile: userProfile }), jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
59
60
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
60
|
-
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick:
|
|
61
|
+
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
export { CollectUserDataView };
|
|
@@ -41,6 +41,7 @@ var useUserUpdateRequest = require('../../../utils/hooks/useUserUpdateRequest/us
|
|
|
41
41
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
42
42
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
45
|
var index = require('../UserDataFields/index.cjs');
|
|
45
46
|
var useUserDataForm = require('../../../utils/hooks/useUserDataForm/useUserDataForm.cjs');
|
|
46
47
|
|
|
@@ -37,6 +37,7 @@ import { useUserUpdateRequestInternal } from '../../../utils/hooks/useUserUpdate
|
|
|
37
37
|
import '../../../components/Popper/Popper/Popper.js';
|
|
38
38
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
40
41
|
import { UserDataFields } from '../UserDataFields/index.js';
|
|
41
42
|
import { useUserDataForm } from '../../../utils/hooks/useUserDataForm/useUserDataForm.js';
|
|
42
43
|
|
|
@@ -43,6 +43,7 @@ require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
|
43
43
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
44
44
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var fieldsConfig = require('../fieldsConfig.cjs');
|
|
47
48
|
var getDisplayErrorMessage = require('./utils/getDisplayErrorMessage/getDisplayErrorMessage.cjs');
|
|
48
49
|
|
|
@@ -39,6 +39,7 @@ import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
39
39
|
import '../../../components/Popper/Popper/Popper.js';
|
|
40
40
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { fieldsConfig } from '../fieldsConfig.js';
|
|
43
44
|
import { getDisplayErrorMessage } from './utils/getDisplayErrorMessage/getDisplayErrorMessage.js';
|
|
44
45
|
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs
CHANGED
|
@@ -41,6 +41,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
41
41
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
44
45
|
var OnboardingUserDataForm = require('../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
45
46
|
|
|
46
47
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -51,7 +52,7 @@ const CollectUserDataViewLoginWithEmail = () => {
|
|
|
51
52
|
const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
|
|
52
53
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data-login-with-email__icon-container' }, { children: jsxRuntime.jsx(iconic.UserProfileIcon, {}) })), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__form' }, { children: [jsxRuntime.jsx(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ userProfile: userProfile }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
53
54
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
54
|
-
'We need a bit of information to get started' }))] })) })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick:
|
|
55
|
+
'We need a bit of information to get started' }))] })) })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
exports.CollectUserDataViewLoginWithEmail = CollectUserDataViewLoginWithEmail;
|
package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js
CHANGED
|
@@ -37,6 +37,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
37
37
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
40
41
|
import { OnboardingUserDataForm } from '../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
41
42
|
|
|
42
43
|
const CollectUserDataViewLoginWithEmail = () => {
|
|
@@ -47,7 +48,7 @@ const CollectUserDataViewLoginWithEmail = () => {
|
|
|
47
48
|
const userProfile = createUserProfile(decodedOnboardingOnlyToken);
|
|
48
49
|
return (jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsx("div", Object.assign({ className: 'collect-user-data-login-with-email__icon-container' }, { children: jsx(UserProfileIcon, {}) })), jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__form' }, { children: [jsx(OnboardingUserDataForm, Object.assign({ userProfile: userProfile }, { children: jsxs("div", Object.assign({ className: 'collect-user-data-login-with-email__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
49
50
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
50
|
-
'We need a bit of information to get started' }))] })) })), jsx(TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick:
|
|
51
|
+
'We need a bit of information to get started' }))] })) })), jsx(TextButton, Object.assign({ className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut }, { children: "Log out" }))] }))] })));
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
export { CollectUserDataViewLoginWithEmail };
|
|
@@ -44,6 +44,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
44
44
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
45
45
|
require('formik');
|
|
46
46
|
require('yup');
|
|
47
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
47
48
|
|
|
48
49
|
const EmailConfirmationWaitingView = () => {
|
|
49
50
|
const { setView } = ViewContext.useViewContext();
|
|
@@ -40,6 +40,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
40
40
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
41
41
|
import 'formik';
|
|
42
42
|
import 'yup';
|
|
43
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
43
44
|
|
|
44
45
|
const EmailConfirmationWaitingView = () => {
|
|
45
46
|
const { setView } = useViewContext();
|
|
@@ -43,6 +43,7 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
46
47
|
var EmailVerificationContext = require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
47
48
|
var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
|
|
48
49
|
|
|
@@ -39,6 +39,7 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
42
43
|
import { useEmailVerificationContext } from '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
43
44
|
import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.js';
|
|
44
45
|
|