@dynamic-labs/sdk-react-core 0.17.0-RC.12 → 0.17.0-RC.14
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 +27 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +9 -9
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +2 -0
- package/src/lib/components/Divider/Divider.cjs +2 -0
- package/src/lib/components/Divider/Divider.js +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +2 -0
- package/src/lib/components/Popper/Popper/Popper.cjs +54 -0
- package/src/lib/components/Popper/Popper/Popper.d.ts +12 -0
- package/src/lib/components/Popper/Popper/Popper.js +50 -0
- package/src/lib/components/Popper/Popper/index.d.ts +1 -0
- package/src/lib/components/Popper/Popper.types.d.ts +6 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +18 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +9 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.js +14 -0
- package/src/lib/components/Popper/PopperContent/index.d.ts +1 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.cjs +26 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.d.ts +8 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.js +20 -0
- package/src/lib/components/Popper/PopperContext/index.d.ts +1 -0
- package/src/lib/components/Popper/index.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +14 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +10 -0
- package/src/lib/components/Popper/utils/getChildPosition/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +3 -0
- package/src/lib/components/Popper/utils/isScrollable/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.cjs +16 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.js +12 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +24 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +20 -0
- package/src/lib/components/Portal/Portal.cjs +2 -0
- package/src/lib/components/Portal/Portal.js +2 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -0
- package/src/lib/components/Tooltip/Tooltip.js +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +2 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +19 -7
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +9 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +19 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -0
- package/src/lib/data/api.cjs +2 -1
- package/src/lib/data/api.d.ts +1 -1
- package/src/lib/data/api.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.js +2 -0
- package/src/lib/shared/types/index.d.ts +6 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.cjs → getUserProfileFields/getUserProfileFields.cjs} +4 -0
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.js → getUserProfileFields/getUserProfileFields.js} +4 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +4 -4
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +3 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +79 -44
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +4 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +80 -45
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -10
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -10
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +4 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -0
- package/src/lib/views/NoAccess/NoAccess.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +7 -27
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +8 -28
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +4 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +4 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +2 -0
- 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 +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +13 -14
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.d.ts +2 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +13 -14
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +2 -8
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +0 -4
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +3 -9
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +5 -5
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +5 -5
- 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/IndexView/IndexView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +5 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +4 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +2 -0
- package/src/polyfills.cjs +11 -0
- package/src/polyfills.d.ts +1 -0
- package/src/polyfills.js +9 -0
- package/src/shim/process.cjs +238 -0
- package/src/shim/process.d.ts +34 -0
- package/src/shim/process.js +234 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -68
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -64
- /package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.d.ts → getUserProfileFields/getUserProfileFields.d.ts} +0 -0
|
@@ -20,7 +20,7 @@ const useFetchChain = (connector) => {
|
|
|
20
20
|
name: chainInfo === null || chainInfo === void 0 ? void 0 : chainInfo.displayName,
|
|
21
21
|
};
|
|
22
22
|
/* istanbul ignore else */
|
|
23
|
-
if (chainId) {
|
|
23
|
+
if (chainId && connector.evmNetworks) {
|
|
24
24
|
const result = connector.evmNetworks.find((element) => element.chainId === chainId);
|
|
25
25
|
chainWithIcon.name = (_a = result === null || result === void 0 ? void 0 : result.vanityName) !== null && _a !== void 0 ? _a : chainWithIcon.name;
|
|
26
26
|
chainWithIcon.icon = result === null || result === void 0 ? void 0 : result.iconUrls[0];
|
|
@@ -16,7 +16,7 @@ const useFetchChain = (connector) => {
|
|
|
16
16
|
name: chainInfo === null || chainInfo === void 0 ? void 0 : chainInfo.displayName,
|
|
17
17
|
};
|
|
18
18
|
/* istanbul ignore else */
|
|
19
|
-
if (chainId) {
|
|
19
|
+
if (chainId && connector.evmNetworks) {
|
|
20
20
|
const result = connector.evmNetworks.find((element) => element.chainId === chainId);
|
|
21
21
|
chainWithIcon.name = (_a = result === null || result === void 0 ? void 0 : result.vanityName) !== null && _a !== void 0 ? _a : chainWithIcon.name;
|
|
22
22
|
chainWithIcon.icon = result === null || result === void 0 ? void 0 : result.iconUrls[0];
|
|
@@ -35,8 +35,10 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
35
35
|
var Button = require('../../../../components/Button/Button.cjs');
|
|
36
36
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
37
37
|
require('../../../../components/Alert/Alert.cjs');
|
|
38
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
|
|
39
|
-
const DetectedKnownSecondaryWalletModal = ({
|
|
41
|
+
const DetectedKnownSecondaryWalletModal = ({ setSelectedWalletWithAction, }) => {
|
|
40
42
|
const { setMultiWalletWidgetState, primaryWallet, secondaryWallets, setPrimaryWallet, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
41
43
|
const handleButtonClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
42
44
|
const publicAddress = yield (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.fetchPublicAddress());
|
|
@@ -48,7 +50,7 @@ const DetectedKnownSecondaryWalletModal = ({ setNewWalletId, }) => {
|
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
52
|
setMultiWalletWidgetState('idle');
|
|
51
|
-
|
|
53
|
+
setSelectedWalletWithAction({ action: 'select', wallet });
|
|
52
54
|
setPrimaryWallet(wallet.id);
|
|
53
55
|
});
|
|
54
56
|
return (jsxRuntime.jsx(WidgetPortal.WidgetPortal, Object.assign({ onBackdropClick: handleButtonClick }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'detected-known-secondary-wallet-modal__content' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal' }, { children: "Account Change Detected" })), jsxRuntime.jsx(promptAccountSwitch.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: `Your active account in ${primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name} has changed. We’re updating the primary account here to match your wallet status.` })), jsxRuntime.jsx(Button.Button, Object.assign({ onClick: handleButtonClick, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', typographyProps: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WalletWithAction } from '../../../../shared';
|
|
2
3
|
type Props = {
|
|
3
|
-
|
|
4
|
+
setSelectedWalletWithAction(walletWithAction: WalletWithAction | null): void;
|
|
4
5
|
};
|
|
5
|
-
export declare const DetectedKnownSecondaryWalletModal: ({
|
|
6
|
+
export declare const DetectedKnownSecondaryWalletModal: ({ setSelectedWalletWithAction, }: Props) => JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -31,8 +31,10 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
31
31
|
import { Button } from '../../../../components/Button/Button.js';
|
|
32
32
|
import '../../../../components/IconButton/IconButton.js';
|
|
33
33
|
import '../../../../components/Alert/Alert.js';
|
|
34
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
34
36
|
|
|
35
|
-
const DetectedKnownSecondaryWalletModal = ({
|
|
37
|
+
const DetectedKnownSecondaryWalletModal = ({ setSelectedWalletWithAction, }) => {
|
|
36
38
|
const { setMultiWalletWidgetState, primaryWallet, secondaryWallets, setPrimaryWallet, } = useInternalDynamicContext();
|
|
37
39
|
const handleButtonClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
40
|
const publicAddress = yield (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.fetchPublicAddress());
|
|
@@ -44,7 +46,7 @@ const DetectedKnownSecondaryWalletModal = ({ setNewWalletId, }) => {
|
|
|
44
46
|
return;
|
|
45
47
|
}
|
|
46
48
|
setMultiWalletWidgetState('idle');
|
|
47
|
-
|
|
49
|
+
setSelectedWalletWithAction({ action: 'select', wallet });
|
|
48
50
|
setPrimaryWallet(wallet.id);
|
|
49
51
|
});
|
|
50
52
|
return (jsx(WidgetPortal, Object.assign({ onBackdropClick: handleButtonClick }, { children: jsxs("div", Object.assign({ className: 'detected-known-secondary-wallet-modal__content' }, { children: [jsx(Typography, Object.assign({ color: 'primary', variant: 'body_normal' }, { children: "Account Change Detected" })), jsx(SvgPromptAccountSwitch, {}), jsx(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: `Your active account in ${primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name} has changed. We’re updating the primary account here to match your wallet status.` })), jsx(Button, Object.assign({ onClick: handleButtonClick, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', typographyProps: {
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs
CHANGED
|
@@ -34,6 +34,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
34
34
|
var Button = require('../../../../components/Button/Button.cjs');
|
|
35
35
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
36
36
|
require('../../../../components/Alert/Alert.cjs');
|
|
37
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
38
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
37
39
|
|
|
38
40
|
const DetectedNewWalletModal = () => {
|
|
39
41
|
const { setMultiWalletWidgetState, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js
CHANGED
|
@@ -30,6 +30,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
30
30
|
import { Button } from '../../../../components/Button/Button.js';
|
|
31
31
|
import '../../../../components/IconButton/IconButton.js';
|
|
32
32
|
import '../../../../components/Alert/Alert.js';
|
|
33
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
34
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
33
35
|
|
|
34
36
|
const DetectedNewWalletModal = () => {
|
|
35
37
|
const { setMultiWalletWidgetState, primaryWallet } = useInternalDynamicContext();
|
|
@@ -33,6 +33,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
33
33
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
34
34
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
35
35
|
require('../../../../components/Alert/Alert.cjs');
|
|
36
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
37
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
36
38
|
var getBrowserIcon = require('../../../../shared/utils/functions/getBrowserIcon/getBrowserIcon.cjs');
|
|
37
39
|
var WalletHelpLink = require('../../../../views/NoQrNotInstalledView/WalletHelpLink.cjs');
|
|
38
40
|
var parseWalletLinks = require('../../../../utils/functions/parseWalletLinks/parseWalletLinks.cjs');
|
package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js
CHANGED
|
@@ -29,6 +29,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
29
29
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
30
30
|
import '../../../../components/IconButton/IconButton.js';
|
|
31
31
|
import '../../../../components/Alert/Alert.js';
|
|
32
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
33
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
32
34
|
import { getBrowserIcon } from '../../../../shared/utils/functions/getBrowserIcon/getBrowserIcon.js';
|
|
33
35
|
import { WalletHelpLink } from '../../../../views/NoQrNotInstalledView/WalletHelpLink.js';
|
|
34
36
|
import { parseWalletLinks } from '../../../../utils/functions/parseWalletLinks/parseWalletLinks.js';
|
|
@@ -35,6 +35,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
35
35
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
36
36
|
require('../../../../components/Alert/Alert.cjs');
|
|
37
37
|
var IconWithSpinner = require('../../../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
38
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
39
41
|
|
|
40
42
|
const PendingAccountSwitchModal = () => {
|
package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js
CHANGED
|
@@ -31,6 +31,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
31
31
|
import '../../../../components/IconButton/IconButton.js';
|
|
32
32
|
import '../../../../components/Alert/Alert.js';
|
|
33
33
|
import { iconRatio, IconWithSpinner } from '../../../../components/IconWithSpinner/IconWithSpinner.js';
|
|
34
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
34
36
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
35
37
|
|
|
36
38
|
const PendingAccountSwitchModal = () => {
|
package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs
CHANGED
|
@@ -35,6 +35,8 @@ require('../../../../components/IconButton/IconButton.cjs');
|
|
|
35
35
|
require('../../../../components/Alert/Alert.cjs');
|
|
36
36
|
var IconWithSpinner = require('../../../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
37
37
|
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
38
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
39
41
|
|
|
40
42
|
const PrimaryNotConnectedModal = () => {
|
package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js
CHANGED
|
@@ -31,6 +31,8 @@ import '../../../../components/IconButton/IconButton.js';
|
|
|
31
31
|
import '../../../../components/Alert/Alert.js';
|
|
32
32
|
import { IconWithSpinner } from '../../../../components/IconWithSpinner/IconWithSpinner.js';
|
|
33
33
|
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
34
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
34
36
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
35
37
|
|
|
36
38
|
const PrimaryNotConnectedModal = () => {
|
|
@@ -40,6 +40,8 @@ var CopyButton = require('../../../../components/CopyButton/CopyButton.cjs');
|
|
|
40
40
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
41
41
|
var TextButton = require('../../../../components/TextButton/TextButton.cjs');
|
|
42
42
|
require('../../../../components/Alert/Alert.cjs');
|
|
43
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
44
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
45
|
|
|
44
46
|
const QrCodeModalView = ({ walletId }) => {
|
|
45
47
|
var _a;
|
|
@@ -36,6 +36,8 @@ import { CopyButton } from '../../../../components/CopyButton/CopyButton.js';
|
|
|
36
36
|
import '../../../../components/IconButton/IconButton.js';
|
|
37
37
|
import { TextButton } from '../../../../components/TextButton/TextButton.js';
|
|
38
38
|
import '../../../../components/Alert/Alert.js';
|
|
39
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
40
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
41
|
|
|
40
42
|
const QrCodeModalView = ({ walletId }) => {
|
|
41
43
|
var _a;
|
|
@@ -6,7 +6,6 @@ var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
8
8
|
var LoadingContext = require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
9
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
10
9
|
var WidgetPortal = require('../../components/WidgetPortal/WidgetPortal.cjs');
|
|
11
10
|
require('react');
|
|
12
11
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
@@ -36,17 +35,18 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
36
35
|
var Button = require('../../../../components/Button/Button.cjs');
|
|
37
36
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
38
37
|
require('../../../../components/Alert/Alert.cjs');
|
|
38
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
40
|
|
|
40
41
|
const UnlinkWalletPopUp = ({ walletId }) => {
|
|
41
|
-
const {
|
|
42
|
-
const { handleUnlinkWallet, eventsCallbacks, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
42
|
+
const { handleUnlinkWallet, eventsCallbacks, setSelectedWalletWithAction, user, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
43
43
|
const { loading, setLoading } = LoadingContext.useLoadingContext();
|
|
44
44
|
const onConfirmClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
45
45
|
var _a;
|
|
46
46
|
try {
|
|
47
47
|
setLoading(true);
|
|
48
48
|
yield handleUnlinkWallet(walletId);
|
|
49
|
-
|
|
49
|
+
setSelectedWalletWithAction(null);
|
|
50
50
|
const walletFromId = user === null || user === void 0 ? void 0 : user.verifiedCredentials.find((wallet) => wallet.id === walletId);
|
|
51
51
|
if (walletFromId) {
|
|
52
52
|
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onUnlinkSuccess) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, walletFromId);
|
|
@@ -60,7 +60,7 @@ const UnlinkWalletPopUp = ({ walletId }) => {
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const onCancelClick = () => {
|
|
63
|
-
|
|
63
|
+
setSelectedWalletWithAction(null);
|
|
64
64
|
};
|
|
65
65
|
return (jsxRuntime.jsx(WidgetPortal.WidgetPortal, Object.assign({ onBackdropClick: onCancelClick }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'unlink-wallet-popup__container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', className: 'unlink-wallet-popup__title', variant: 'body_normal', as: 'h6' }, { children: "Unlink your wallet?" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'unlink-wallet-popup__label', variant: 'body_small', color: 'secondary' }, { children: "Are you sure you want to unlink your wallet?" })), jsxRuntime.jsx(Button.Button, Object.assign({ buttonPadding: 'small', onClick: onConfirmClick, disabled: loading, buttonClassName: 'unlink-wallet-popup__button unlink-wallet-popup__button--shadow', color: 'primary', expanded: true, buttonRounded: 'small', typographyProps: {
|
|
66
66
|
variant: 'button_secondary',
|
|
@@ -2,7 +2,6 @@ import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
4
4
|
import { useLoadingContext } from '../../../../context/LoadingContext/LoadingContext.js';
|
|
5
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
6
5
|
import { WidgetPortal } from '../../components/WidgetPortal/WidgetPortal.js';
|
|
7
6
|
import 'react';
|
|
8
7
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
@@ -32,17 +31,18 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
32
31
|
import { Button } from '../../../../components/Button/Button.js';
|
|
33
32
|
import '../../../../components/IconButton/IconButton.js';
|
|
34
33
|
import '../../../../components/Alert/Alert.js';
|
|
34
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
35
36
|
|
|
36
37
|
const UnlinkWalletPopUp = ({ walletId }) => {
|
|
37
|
-
const {
|
|
38
|
-
const { handleUnlinkWallet, eventsCallbacks, user } = useInternalDynamicContext();
|
|
38
|
+
const { handleUnlinkWallet, eventsCallbacks, setSelectedWalletWithAction, user, } = useInternalDynamicContext();
|
|
39
39
|
const { loading, setLoading } = useLoadingContext();
|
|
40
40
|
const onConfirmClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
41
|
var _a;
|
|
42
42
|
try {
|
|
43
43
|
setLoading(true);
|
|
44
44
|
yield handleUnlinkWallet(walletId);
|
|
45
|
-
|
|
45
|
+
setSelectedWalletWithAction(null);
|
|
46
46
|
const walletFromId = user === null || user === void 0 ? void 0 : user.verifiedCredentials.find((wallet) => wallet.id === walletId);
|
|
47
47
|
if (walletFromId) {
|
|
48
48
|
(_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onUnlinkSuccess) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, walletFromId);
|
|
@@ -56,7 +56,7 @@ const UnlinkWalletPopUp = ({ walletId }) => {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
const onCancelClick = () => {
|
|
59
|
-
|
|
59
|
+
setSelectedWalletWithAction(null);
|
|
60
60
|
};
|
|
61
61
|
return (jsx(WidgetPortal, Object.assign({ onBackdropClick: onCancelClick }, { children: jsxs("div", Object.assign({ className: 'unlink-wallet-popup__container' }, { children: [jsx(Typography, Object.assign({ color: 'primary', className: 'unlink-wallet-popup__title', variant: 'body_normal', as: 'h6' }, { children: "Unlink your wallet?" })), jsx(Typography, Object.assign({ className: 'unlink-wallet-popup__label', variant: 'body_small', color: 'secondary' }, { children: "Are you sure you want to unlink your wallet?" })), jsx(Button, Object.assign({ buttonPadding: 'small', onClick: onConfirmClick, disabled: loading, buttonClassName: 'unlink-wallet-popup__button unlink-wallet-popup__button--shadow', color: 'primary', expanded: true, buttonRounded: 'small', typographyProps: {
|
|
62
62
|
variant: 'button_secondary',
|
|
@@ -38,17 +38,19 @@ var useUserUpdateRequest = require('../../../../utils/hooks/useUserUpdateRequest
|
|
|
38
38
|
var Button = require('../../../../components/Button/Button.cjs');
|
|
39
39
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
40
40
|
require('../../../../components/Alert/Alert.cjs');
|
|
41
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
42
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
43
|
var useUserDataForm = require('../../../../utils/hooks/useUserDataForm/useUserDataForm.cjs');
|
|
42
44
|
var index = require('../../../../views/CollectUserDataView/UserDataFields/index.cjs');
|
|
43
45
|
var DynamicWidgetFooter = require('../../components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
|
|
44
46
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
45
|
-
var
|
|
47
|
+
var getUserProfileFields = require('../../../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
46
48
|
|
|
47
49
|
const EditProfileView = ({ rootClassName, }) => {
|
|
48
50
|
const { setView } = ViewContext.useViewContext();
|
|
49
51
|
const { projectSettings, setShowAuthFlow, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
50
52
|
const { goToProfileView } = DynamicWidgetContext.useWidgetContext();
|
|
51
|
-
const
|
|
53
|
+
const allUserFields = getUserProfileFields.getUserProfileFields({
|
|
52
54
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
53
55
|
user,
|
|
54
56
|
});
|
|
@@ -64,14 +66,14 @@ const EditProfileView = ({ rootClassName, }) => {
|
|
|
64
66
|
}
|
|
65
67
|
}), [goToProfileView, setShowAuthFlow, setView, updateUser]);
|
|
66
68
|
const { fetch, formikInitialValues, formikValidationSchema, onFormSubmit } = useUserDataForm.useUserDataForm({
|
|
67
|
-
fields:
|
|
69
|
+
fields: allUserFields,
|
|
68
70
|
onSubmit: onEditProfileFormSubmit,
|
|
69
71
|
shouldEnforcePolicies: false,
|
|
70
72
|
userProfile: user,
|
|
71
73
|
});
|
|
72
74
|
const isKYCEnabled = useKYCFlag.useKYCFlag();
|
|
73
75
|
const isMultiWalletEnabled = useMultiWalletFlag.useMultiWalletFlag();
|
|
74
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isMultiWalletEnabled && isKYCEnabled && (jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title' }, { children: "My profile" }))), jsxRuntime.jsx(formik.Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true }, { children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxRuntime.jsxs(formik.Form, Object.assign({ className: classNames.classNames('dynamic-widget-edit-profile-view', rootClassName), "data-testid": 'editUserProfileForm' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'dynamic-widget-edit-profile-view__fields' }, { children: jsxRuntime.jsx(index.UserDataFields, { errors: errors, fields:
|
|
76
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!isMultiWalletEnabled && isKYCEnabled && (jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title' }, { children: "My profile" }))), jsxRuntime.jsx(formik.Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true }, { children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxRuntime.jsxs(formik.Form, Object.assign({ className: classNames.classNames('dynamic-widget-edit-profile-view', rootClassName), "data-testid": 'editUserProfileForm' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'dynamic-widget-edit-profile-view__fields' }, { children: jsxRuntime.jsx(index.UserDataFields, { errors: errors, fields: allUserFields, touched: touched }) })), jsxRuntime.jsxs(DynamicWidgetFooter.DynamicWidgetFooter, { children: [jsxRuntime.jsx(Button.Button, Object.assign({ disabled: fetch, buttonRounded: 'small', expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: goToProfileView }, { children: "Cancel" })), jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, buttonRounded: 'small', expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsxRuntime.jsx(check.ReactComponent, {}) }, { children: "Save" }))] })] }))) }))] }));
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
exports.EditProfileView = EditProfileView;
|
|
@@ -34,17 +34,19 @@ import { useUserUpdateRequestInternal } from '../../../../utils/hooks/useUserUpd
|
|
|
34
34
|
import { Button } from '../../../../components/Button/Button.js';
|
|
35
35
|
import '../../../../components/IconButton/IconButton.js';
|
|
36
36
|
import '../../../../components/Alert/Alert.js';
|
|
37
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
38
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
39
|
import { useUserDataForm } from '../../../../utils/hooks/useUserDataForm/useUserDataForm.js';
|
|
38
40
|
import { UserDataFields } from '../../../../views/CollectUserDataView/UserDataFields/index.js';
|
|
39
41
|
import { DynamicWidgetFooter } from '../../components/DynamicWidgetFooter/DynamicWidgetFooter.js';
|
|
40
42
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
41
|
-
import { getUserProfileFields } from '../../../../utils/functions/
|
|
43
|
+
import { getUserProfileFields } from '../../../../utils/functions/getUserProfileFields/getUserProfileFields.js';
|
|
42
44
|
|
|
43
45
|
const EditProfileView = ({ rootClassName, }) => {
|
|
44
46
|
const { setView } = useViewContext();
|
|
45
47
|
const { projectSettings, setShowAuthFlow, user } = useInternalDynamicContext();
|
|
46
48
|
const { goToProfileView } = useWidgetContext();
|
|
47
|
-
const
|
|
49
|
+
const allUserFields = getUserProfileFields({
|
|
48
50
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
49
51
|
user,
|
|
50
52
|
});
|
|
@@ -60,14 +62,14 @@ const EditProfileView = ({ rootClassName, }) => {
|
|
|
60
62
|
}
|
|
61
63
|
}), [goToProfileView, setShowAuthFlow, setView, updateUser]);
|
|
62
64
|
const { fetch, formikInitialValues, formikValidationSchema, onFormSubmit } = useUserDataForm({
|
|
63
|
-
fields:
|
|
65
|
+
fields: allUserFields,
|
|
64
66
|
onSubmit: onEditProfileFormSubmit,
|
|
65
67
|
shouldEnforcePolicies: false,
|
|
66
68
|
userProfile: user,
|
|
67
69
|
});
|
|
68
70
|
const isKYCEnabled = useKYCFlag();
|
|
69
71
|
const isMultiWalletEnabled = useMultiWalletFlag();
|
|
70
|
-
return (jsxs(Fragment, { children: [!isMultiWalletEnabled && isKYCEnabled && (jsx(Typography, Object.assign({ weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title' }, { children: "My profile" }))), jsx(Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true }, { children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxs(Form, Object.assign({ className: classNames('dynamic-widget-edit-profile-view', rootClassName), "data-testid": 'editUserProfileForm' }, { children: [jsx("div", Object.assign({ className: 'dynamic-widget-edit-profile-view__fields' }, { children: jsx(UserDataFields, { errors: errors, fields:
|
|
72
|
+
return (jsxs(Fragment, { children: [!isMultiWalletEnabled && isKYCEnabled && (jsx(Typography, Object.assign({ weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title' }, { children: "My profile" }))), jsx(Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true }, { children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxs(Form, Object.assign({ className: classNames('dynamic-widget-edit-profile-view', rootClassName), "data-testid": 'editUserProfileForm' }, { children: [jsx("div", Object.assign({ className: 'dynamic-widget-edit-profile-view__fields' }, { children: jsx(UserDataFields, { errors: errors, fields: allUserFields, touched: touched }) })), jsxs(DynamicWidgetFooter, { children: [jsx(Button, Object.assign({ disabled: fetch, buttonRounded: 'small', expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: goToProfileView }, { children: "Cancel" })), jsx(Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, buttonRounded: 'small', expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsx(SvgCheck, {}) }, { children: "Save" }))] })] }))) }))] }));
|
|
71
73
|
};
|
|
72
74
|
|
|
73
75
|
export { EditProfileView };
|
|
@@ -36,6 +36,8 @@ var Button = require('../../../../components/Button/Button.cjs');
|
|
|
36
36
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
37
37
|
require('../../../../components/Alert/Alert.cjs');
|
|
38
38
|
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
39
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
41
|
var DynamicWidgetFooter = require('../../components/DynamicWidgetFooter/DynamicWidgetFooter.cjs');
|
|
40
42
|
var DynamicWidgetWallets = require('../../components/DynamicWidgetWallets/DynamicWidgetWallets.cjs');
|
|
41
43
|
var SingleWalletButtons = require('../../components/SingleWalletButtons/SingleWalletButtons.cjs');
|
|
@@ -32,6 +32,8 @@ import { Button } from '../../../../components/Button/Button.js';
|
|
|
32
32
|
import '../../../../components/IconButton/IconButton.js';
|
|
33
33
|
import '../../../../components/Alert/Alert.js';
|
|
34
34
|
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
35
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
36
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
35
37
|
import { DynamicWidgetFooter } from '../../components/DynamicWidgetFooter/DynamicWidgetFooter.js';
|
|
36
38
|
import { DynamicWidgetWallets } from '../../components/DynamicWidgetWallets/DynamicWidgetWallets.js';
|
|
37
39
|
import { SingleWalletButtons } from '../../components/SingleWalletButtons/SingleWalletButtons.js';
|
|
@@ -29,7 +29,7 @@ require('../../../../components/Transition/OpacityTransition/OpacityTransition.c
|
|
|
29
29
|
require('../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
|
-
var
|
|
32
|
+
var getUserProfileFields = require('../../../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
33
33
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
34
34
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
35
35
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -37,12 +37,15 @@ var Button = require('../../../../components/Button/Button.cjs');
|
|
|
37
37
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
38
38
|
require('../../../../components/Alert/Alert.cjs');
|
|
39
39
|
var LogoutButton = require('../../../../components/LogoutButton/LogoutButton.cjs');
|
|
40
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
41
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
42
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
41
43
|
|
|
42
44
|
const ProfileView = () => {
|
|
43
45
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
44
46
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
45
|
-
|
|
47
|
+
// Allow to navigate to edit profile view when there are fields what can be edited
|
|
48
|
+
const editableUserFields = getUserProfileFields.getEditableUserProfileFields(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc);
|
|
46
49
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(UserProfile.UserProfile, { rootClassName: 'profile-view' }), jsxRuntime.jsx(DynamicWidgetFooter.DynamicWidgetFooter, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'profile-view__footer' }, { children: [editableUserFields.length > 0 && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
|
|
47
50
|
color: 'secondary',
|
|
48
51
|
variant: 'button_tertiary',
|
|
@@ -25,7 +25,7 @@ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js
|
|
|
25
25
|
import '../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
28
|
-
import { getEditableUserProfileFields } from '../../../../utils/functions/
|
|
28
|
+
import { getEditableUserProfileFields } from '../../../../utils/functions/getUserProfileFields/getUserProfileFields.js';
|
|
29
29
|
import '../../../../context/MockContext/MockContext.js';
|
|
30
30
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
31
31
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -33,11 +33,14 @@ import { Button } from '../../../../components/Button/Button.js';
|
|
|
33
33
|
import '../../../../components/IconButton/IconButton.js';
|
|
34
34
|
import '../../../../components/Alert/Alert.js';
|
|
35
35
|
import { LogoutButton } from '../../../../components/LogoutButton/LogoutButton.js';
|
|
36
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
37
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
38
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
37
39
|
|
|
38
40
|
const ProfileView = () => {
|
|
39
41
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
40
42
|
const { projectSettings } = useInternalDynamicContext();
|
|
43
|
+
// Allow to navigate to edit profile view when there are fields what can be edited
|
|
41
44
|
const editableUserFields = getEditableUserProfileFields(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc);
|
|
42
45
|
return (jsxs(Fragment, { children: [jsx(UserProfile, { rootClassName: 'profile-view' }), jsx(DynamicWidgetFooter, { children: jsxs("div", Object.assign({ className: 'profile-view__footer' }, { children: [editableUserFields.length > 0 && (jsx(Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
|
|
43
46
|
color: 'secondary',
|
|
@@ -31,6 +31,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
31
31
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
32
32
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
33
33
|
require('../../../../components/Alert/Alert.cjs');
|
|
34
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
35
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
34
36
|
var FundingContext = require('../../../../context/FundingContext/FundingContext.cjs');
|
|
35
37
|
|
|
36
38
|
const Modal = ({ onrampUrl }) => {
|
|
@@ -27,6 +27,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
27
27
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
28
28
|
import '../../../../components/IconButton/IconButton.js';
|
|
29
29
|
import '../../../../components/Alert/Alert.js';
|
|
30
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
31
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
30
32
|
import { useFundingContext } from '../../../../context/FundingContext/FundingContext.js';
|
|
31
33
|
|
|
32
34
|
const Modal = ({ onrampUrl }) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/polyfills.js
ADDED