@dynamic-labs/sdk-react-core 0.18.100-viem.0 → 0.18.100-viem.10
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 +111 -1
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +10 -10
- package/src/index.cjs +4 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +5 -0
- package/src/lib/Main.js +5 -0
- package/src/lib/components/Button/Button.cjs +10 -7
- package/src/lib/components/Button/Button.js +10 -7
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +1 -1
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/ListTile.types.d.ts +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +6 -2
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +2 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +6 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +5 -3
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +5 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -2
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -2
- package/src/lib/components/Typography/Typography.cjs +1 -0
- package/src/lib/components/Typography/Typography.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +15 -4
- package/src/lib/context/DynamicContext/DynamicContext.js +17 -6
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +13 -3
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +13 -3
- package/src/lib/context/DynamicContext/internalEvents/index.d.ts +2 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.cjs +14 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.d.ts +8 -0
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.js +6 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +6 -3
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.types.d.ts +2 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -1
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/data/api.cjs +33 -1
- package/src/lib/data/api.d.ts +3 -1
- package/src/lib/data/api.js +34 -4
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +10 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +10 -2
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.d.ts +2 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +11 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +11 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +6 -3
- package/src/lib/shared/assets/double-arrow-right.cjs +53 -0
- package/src/lib/shared/assets/double-arrow-right.js +29 -0
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs +28 -2
- package/src/lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js +28 -2
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/errors.cjs +7 -0
- package/src/lib/utils/constants/errors.d.ts +1 -0
- package/src/lib/utils/constants/errors.js +3 -0
- package/src/lib/utils/constants/index.d.ts +1 -1
- package/src/lib/utils/constants/localStorage.cjs +2 -0
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +2 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +1 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +1 -1
- package/src/lib/utils/functions/digestSHA256/digestSHA256.cjs +11 -0
- package/src/lib/utils/functions/digestSHA256/digestSHA256.d.ts +1 -0
- package/src/lib/utils/functions/digestSHA256/digestSHA256.js +7 -0
- package/src/lib/utils/functions/digestSHA256/index.d.ts +1 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.cjs +14 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.d.ts +1 -0
- package/src/lib/utils/functions/encodeBase64URL/encodeBase64URL.js +10 -0
- package/src/lib/utils/functions/encodeBase64URL/index.d.ts +1 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.cjs +33 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.d.ts +1 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.js +29 -0
- package/src/lib/utils/functions/getRedirectURIOrigin/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.cjs +14 -2
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +3 -2
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.js +14 -2
- package/src/lib/utils/functions/index.d.ts +7 -0
- package/src/lib/utils/functions/isMagicConnector/index.d.ts +1 -0
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.cjs +10 -0
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.d.ts +2 -0
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.js +6 -0
- package/src/lib/utils/functions/randomString/index.d.ts +1 -0
- package/src/lib/utils/functions/randomString/randomString.cjs +14 -0
- package/src/lib/utils/functions/randomString/randomString.d.ts +1 -0
- package/src/lib/utils/functions/randomString/randomString.js +10 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/index.d.ts +1 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.cjs +48 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.d.ts +18 -0
- package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.js +43 -0
- package/src/lib/utils/functions/stringifyURIQuery/index.d.ts +1 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.cjs +13 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.d.ts +1 -0
- package/src/lib/utils/functions/stringifyURIQuery/stringifyURIQuery.js +9 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +10 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +11 -5
- package/src/lib/utils/hooks/index.d.ts +2 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +19 -3
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +1 -2
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +20 -4
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +15 -9
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +15 -9
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +16 -18
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +17 -19
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +7 -6
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +7 -6
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +2 -7
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +2 -7
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/index.d.ts +1 -0
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +16 -0
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +2 -0
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +12 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +6 -2
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.d.ts +2 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +6 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +149 -26
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +5 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +151 -28
- package/src/lib/utils/hooks/useTransactionEstimatedGas/index.d.ts +1 -0
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.cjs +31 -0
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.d.ts +20 -0
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.js +27 -0
- package/src/lib/utils/hooks/useTransactionWithGasPrice/index.d.ts +1 -0
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs +56 -0
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.d.ts +32 -0
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.js +52 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +5 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +9 -3
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +9 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +4 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +4 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +13 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.js +13 -4
- package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +14 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +3 -2
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +3 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +4 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +4 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +111 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.d.ts +2 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +107 -0
- package/src/lib/views/MergeUserAccountsView/index.d.ts +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +4 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +4 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +14 -35
- package/src/lib/views/SendBalanceView/SendBalanceView.d.ts +2 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +15 -36
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +67 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +8 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +63 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/index.d.ts +1 -0
- package/src/lib/views/SendBalanceView/components/index.d.ts +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -2
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +31 -8
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +4 -3
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +32 -9
- package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +69 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts +11 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +65 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.cjs +14 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.d.ts +6 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.js +10 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +4 -1
- package/src/lib/views/WalletList/WalletList.js +4 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -1
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +20 -4
- package/src/lib/views/WalletLockedView/WalletLockedView.js +20 -4
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +4 -1
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.cjs +13 -0
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.d.ts +2 -0
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.js +9 -0
- package/src/lib/widgets/OAuthIFrameContainer/index.d.ts +1 -0
- package/src/lib/widgets/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/index.d.ts +0 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +0 -104
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.d.ts +0 -17
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +0 -100
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
### [0.18.100-viem.10](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.9...v0.18.100-viem.10) (2023-08-25)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* stop calling handleLogOut prematurely ([#3137](https://github.com/dynamic-labs/DynamicAuth/issues/3137)) ([3d029ba](https://github.com/dynamic-labs/DynamicAuth/commit/3d029ba3e34e3cb8a2b976dc5d3fb9ee1356d76c)), closes [#3135](https://github.com/dynamic-labs/DynamicAuth/issues/3135)
|
|
8
|
+
|
|
9
|
+
### [0.18.100-viem.9](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.8...v0.18.100-viem.9) (2023-08-25)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* register connection of second wallet in bridge ([3e12cde](https://github.com/dynamic-labs/DynamicAuth/commit/3e12cdece4abd717280aeed442999aef4653e059)), closes [#3113](https://github.com/dynamic-labs/DynamicAuth/issues/3113)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* fix github social linking icon on dark mode ([#3130](https://github.com/dynamic-labs/DynamicAuth/issues/3130)) ([8db8aa7](https://github.com/dynamic-labs/DynamicAuth/commit/8db8aa7b9892f93f6fb6aa7772f99b747fe8f86b)), closes [#3126](https://github.com/dynamic-labs/DynamicAuth/issues/3126)
|
|
20
|
+
* fix issue with detecting oauth window closed before finishing linking ([#3128](https://github.com/dynamic-labs/DynamicAuth/issues/3128)) ([b108bf9](https://github.com/dynamic-labs/DynamicAuth/commit/b108bf9d9b3ca47202ca4a1993f155639fd032a8)), closes [#3124](https://github.com/dynamic-labs/DynamicAuth/issues/3124)
|
|
21
|
+
|
|
22
|
+
### [0.18.100-viem.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.7...v0.18.100-viem.8) (2023-08-24)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* allow overriding contracts on wagmi chains ([#3105](https://github.com/dynamic-labs/DynamicAuth/issues/3105)) ([acee314](https://github.com/dynamic-labs/DynamicAuth/commit/acee3147156c30957bdb690c56cfd10af13dc57f))
|
|
28
|
+
* send wagmi settings only once when DynamicWagmiConnector loads (v18-viem) ([#3109](https://github.com/dynamic-labs/DynamicAuth/issues/3109)) ([a6e2675](https://github.com/dynamic-labs/DynamicAuth/commit/a6e2675c49eab3c40dc9365b20ac2dd9eaf8e4ae)), closes [#3103](https://github.com/dynamic-labs/DynamicAuth/issues/3103)
|
|
29
|
+
|
|
30
|
+
### [0.18.100-viem.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.6...v0.18.100-viem.7) (2023-08-23)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* fix jumping when entering OTP code on IOS ([#3036](https://github.com/dynamic-labs/DynamicAuth/issues/3036)) ([#3094](https://github.com/dynamic-labs/DynamicAuth/issues/3094)) ([093ab9a](https://github.com/dynamic-labs/DynamicAuth/commit/093ab9aae2f8bba99622e1146d1dc54c077ae3cb))
|
|
36
|
+
* log user out when magic session expires ([#3085](https://github.com/dynamic-labs/DynamicAuth/issues/3085)) ([#3088](https://github.com/dynamic-labs/DynamicAuth/issues/3088)) ([d7d125c](https://github.com/dynamic-labs/DynamicAuth/commit/d7d125c93a652f26deeedce534f1e0472ad3377c))
|
|
37
|
+
* improvements to network switching in bridge flow ([#3080](https://github.com/dynamic-labs/DynamicAuth/issues/3080)) ([4137c05](https://github.com/dynamic-labs/DynamicAuth/commit/4137c0599a760d2ec8a6b9a6a5de7cce9987033b))
|
|
38
|
+
* fix could not replace transaction error ([#3058](https://github.com/dynamic-labs/DynamicAuth/issues/3058)) ([b36184e](https://github.com/dynamic-labs/DynamicAuth/commit/b36184e17a268d49bed100e81477df9f5e4b3731)), closes [#3049](https://github.com/dynamic-labs/DynamicAuth/issues/3049)
|
|
39
|
+
* update embedded wallet notice design ([529f90f](https://github.com/dynamic-labs/DynamicAuth/commit/529f90f323f712240dfd964d908b6ea59cacbd19)), closes [#2987](https://github.com/dynamic-labs/DynamicAuth/issues/2987) [#3082](https://github.com/dynamic-labs/DynamicAuth/issues/3082)
|
|
40
|
+
|
|
41
|
+
### [0.18.100-viem.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.5...v0.18.100-viem.6) (2023-08-21)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* detect when user closes oauth window when linking social account ([#3066](https://github.com/dynamic-labs/DynamicAuth/issues/3066)) ([428e9e8](https://github.com/dynamic-labs/DynamicAuth/commit/428e9e81d5473b2de03560f118c61baf3ee9e692))
|
|
47
|
+
* sync connected wallets with wagmi client ([#3073](https://github.com/dynamic-labs/DynamicAuth/issues/3073)) ([bce960d](https://github.com/dynamic-labs/DynamicAuth/commit/bce960d341ff55d3d660a8c34121c4348ca2908b))
|
|
48
|
+
|
|
49
|
+
### [0.18.100-viem.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.4...v0.18.100-viem.5) (2023-08-19)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* ensure social sign in embedded wallets sync correctly with wagmi ([5fdf11d](https://github.com/dynamic-labs/DynamicAuth/commit/5fdf11df19759b6e32b461802c0a32686365d890))
|
|
55
|
+
|
|
56
|
+
### [0.18.100-viem.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.3...v0.18.100-viem.4) (2023-08-17)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Bug Fixes
|
|
60
|
+
|
|
61
|
+
* always enable magic connectors when enabled ([#3014](https://github.com/dynamic-labs/DynamicAuth/issues/3014)) ([#3039](https://github.com/dynamic-labs/DynamicAuth/issues/3039)) ([6d4c473](https://github.com/dynamic-labs/DynamicAuth/commit/6d4c4738b92b40c903488c435fdd1bf69dc6c96e))
|
|
62
|
+
* guard against null or undefined provider value when logging in w… ([#3028](https://github.com/dynamic-labs/DynamicAuth/issues/3028)) ([050b62c](https://github.com/dynamic-labs/DynamicAuth/commit/050b62c7c91b6430eb350f7b49fa57260a08a756)), closes [#3021](https://github.com/dynamic-labs/DynamicAuth/issues/3021)
|
|
63
|
+
* issue where walletconnectors are instantiated without walletbook ([#3020](https://github.com/dynamic-labs/DynamicAuth/issues/3020)) ([#3033](https://github.com/dynamic-labs/DynamicAuth/issues/3033)) ([92394aa](https://github.com/dynamic-labs/DynamicAuth/commit/92394aa83cad497d805ac4d4ce8eb35d2b10690c))
|
|
64
|
+
* only use the production api environment of magicLink ([#3024](https://github.com/dynamic-labs/DynamicAuth/issues/3024)) ([25eea74](https://github.com/dynamic-labs/DynamicAuth/commit/25eea7438b0c2cb0279fb70d0be3c16f73b24573))
|
|
65
|
+
* switching network in connected state should update wallets to connect list ([#3038](https://github.com/dynamic-labs/DynamicAuth/issues/3038)) ([22837cb](https://github.com/dynamic-labs/DynamicAuth/commit/22837cb0af3a2dbdd7345b5cf92c23455bdd3cc4))
|
|
66
|
+
|
|
67
|
+
### [0.18.100-viem.3](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.2...v0.18.100-viem.3) (2023-08-16)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
72
|
+
* fix twitter linking ([#2918](https://github.com/dynamic-labs/DynamicAuth/issues/2918)) ([#3003](https://github.com/dynamic-labs/DynamicAuth/issues/3003)) ([8f028dc](https://github.com/dynamic-labs/DynamicAuth/commit/8f028dc91434a44b4f2bcae82ad5f16a27c9e5b1))
|
|
73
|
+
* use ETH currency symbol for STARK chains ([#3005](https://github.com/dynamic-labs/DynamicAuth/issues/3005)) ([#3008](https://github.com/dynamic-labs/DynamicAuth/issues/3008)) ([6f0c66f](https://github.com/dynamic-labs/DynamicAuth/commit/6f0c66f63bbfdbb08d0c504d52565acd90070528))
|
|
74
|
+
|
|
75
|
+
### [0.18.100-viem.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.1...v0.18.100-viem.2) (2023-08-15)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* re-enable bloctoevm ([#2992](https://github.com/dynamic-labs/DynamicAuth/issues/2992)) ([d027f39](https://github.com/dynamic-labs/DynamicAuth/commit/d027f39c8fb5bf477ce0da0c62d86cd812f0fda5))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* **captcha:** complete sign in with magic and blocto ([#2967](https://github.com/dynamic-labs/DynamicAuth/issues/2967)) ([#2985](https://github.com/dynamic-labs/DynamicAuth/issues/2985)) ([e7585f5](https://github.com/dynamic-labs/DynamicAuth/commit/e7585f525da29e7933871831fa6fd374f09618b7))
|
|
86
|
+
* sync wagmi correctly in connect-only mode ([#2990](https://github.com/dynamic-labs/DynamicAuth/issues/2990)) ([#2993](https://github.com/dynamic-labs/DynamicAuth/issues/2993)) ([74a4e62](https://github.com/dynamic-labs/DynamicAuth/commit/74a4e6216f3f9fb30e5312789fb18f77277e15ba))
|
|
87
|
+
|
|
88
|
+
## [0.18.0-beta.32](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.31...v0.18.0-beta.32) (2023-08-09)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Features
|
|
92
|
+
|
|
93
|
+
* disable social buttons after provider is selected ([#2875](https://github.com/dynamic-labs/DynamicAuth/issues/2875)) ([#2881](https://github.com/dynamic-labs/DynamicAuth/issues/2881)) ([8a20409](https://github.com/dynamic-labs/DynamicAuth/commit/8a204095a322872caf6255db40bc10d29047e9a4))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Bug Fixes
|
|
97
|
+
|
|
98
|
+
* css variables are being ignored for ConnectButton component ([#2884](https://github.com/dynamic-labs/DynamicAuth/issues/2884)) ([979557e](https://github.com/dynamic-labs/DynamicAuth/commit/979557edf2da81c2681c57e8431a5bf0ed235433))
|
|
99
|
+
|
|
100
|
+
## [0.18.0-beta.31](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.30...v0.18.0-beta.31) (2023-08-08)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Features
|
|
104
|
+
|
|
105
|
+
* **GVTY-65:** allow merging accounts when duplicated email in KYC step ([#2868](https://github.com/dynamic-labs/DynamicAuth/issues/2868)) ([041d0a8](https://github.com/dynamic-labs/DynamicAuth/commit/041d0a809e06a7b1407a46b04722c9ebc4802304))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* **GVTY-150:** blocto pop up to sign after disconnect ([#2870](https://github.com/dynamic-labs/DynamicAuth/issues/2870)) ([14ccfa0](https://github.com/dynamic-labs/DynamicAuth/commit/14ccfa030dbe8989b9404e2e57ba3f5b50ca88ff))
|
|
111
|
+
|
|
112
|
+
## [0.18.0-beta.30](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.29...v0.18.0-beta.30) (2023-08-04)
|
|
3
113
|
|
|
4
114
|
### Bug Fixes
|
|
5
115
|
|
package/package.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "0.18.100-viem.
|
|
5
|
+
var version = "0.18.100-viem.10";
|
|
6
6
|
var dependencies = {
|
|
7
7
|
"react-focus-lock": "2.9.2",
|
|
8
|
-
"@dynamic-labs/iconic": "0.1.
|
|
9
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
8
|
+
"@dynamic-labs/iconic": "0.1.27",
|
|
9
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
10
10
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
11
11
|
"country-list": "2.3.0",
|
|
12
12
|
yup: "0.32.11",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var version = "0.18.100-viem.
|
|
1
|
+
var version = "0.18.100-viem.10";
|
|
2
2
|
var dependencies = {
|
|
3
3
|
"react-focus-lock": "2.9.2",
|
|
4
|
-
"@dynamic-labs/iconic": "0.1.
|
|
5
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
4
|
+
"@dynamic-labs/iconic": "0.1.27",
|
|
5
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"country-list": "2.3.0",
|
|
8
8
|
yup: "0.32.11",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.18.100-viem.
|
|
3
|
+
"version": "0.18.100-viem.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react-focus-lock": "2.9.2",
|
|
11
|
-
"@dynamic-labs/iconic": "0.1.
|
|
12
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
11
|
+
"@dynamic-labs/iconic": "0.1.27",
|
|
12
|
+
"@dynamic-labs/sdk-api": "0.0.270",
|
|
13
13
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
14
14
|
"country-list": "2.3.0",
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"formik": "2.2.9",
|
|
17
17
|
"qrcode": "1.5.1",
|
|
18
|
-
"@dynamic-labs/logger": "0.18.100-viem.
|
|
19
|
-
"@dynamic-labs/multi-wallet": "0.18.100-viem.
|
|
20
|
-
"@dynamic-labs/rpc-providers": "0.18.100-viem.
|
|
21
|
-
"@dynamic-labs/types": "0.18.100-viem.
|
|
22
|
-
"@dynamic-labs/utils": "0.18.100-viem.
|
|
23
|
-
"@dynamic-labs/wallet-book": "0.18.100-viem.
|
|
24
|
-
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.
|
|
18
|
+
"@dynamic-labs/logger": "0.18.100-viem.10",
|
|
19
|
+
"@dynamic-labs/multi-wallet": "0.18.100-viem.10",
|
|
20
|
+
"@dynamic-labs/rpc-providers": "0.18.100-viem.10",
|
|
21
|
+
"@dynamic-labs/types": "0.18.100-viem.10",
|
|
22
|
+
"@dynamic-labs/utils": "0.18.100-viem.10",
|
|
23
|
+
"@dynamic-labs/wallet-book": "0.18.100-viem.10",
|
|
24
|
+
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.10",
|
|
25
25
|
"eventemitter3": "5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -14,6 +14,7 @@ var DynamicNav = require('./lib/widgets/DynamicWidget/components/DynamicNav/Dyna
|
|
|
14
14
|
var DynamicUserProfile = require('./lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs');
|
|
15
15
|
var FundingWidget = require('./lib/widgets/FundingWidget/FundingWidget.cjs');
|
|
16
16
|
var DynamicBridgeWidget = require('./lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs');
|
|
17
|
+
var OAuthIFrameContainer = require('./lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.cjs');
|
|
17
18
|
require('react/jsx-runtime');
|
|
18
19
|
require('react');
|
|
19
20
|
var classNames = require('./lib/utils/functions/classNames/classNames.cjs');
|
|
@@ -77,6 +78,7 @@ var switchHorizontal = require('./lib/shared/assets/switch-horizontal.cjs');
|
|
|
77
78
|
var dotsHorizontal = require('./lib/shared/assets/dots-horizontal.cjs');
|
|
78
79
|
var send = require('./lib/shared/assets/send.cjs');
|
|
79
80
|
var questionMark = require('./lib/shared/assets/question-mark.cjs');
|
|
81
|
+
var doubleArrowRight = require('./lib/shared/assets/double-arrow-right.cjs');
|
|
80
82
|
var index$2 = require('./lib/shared/consts/index.cjs');
|
|
81
83
|
var logger = require('./lib/shared/logger.cjs');
|
|
82
84
|
require('./lib/utils/constants/colors.cjs');
|
|
@@ -146,6 +148,7 @@ exports.DynamicNav = DynamicNav.ShadowedDynamicNav;
|
|
|
146
148
|
exports.DynamicUserProfile = DynamicUserProfile.ShadowedDynamicUserProfile;
|
|
147
149
|
exports.FundingWidget = FundingWidget.FundingWidget;
|
|
148
150
|
exports.DynamicBridgeWidget = DynamicBridgeWidget.DynamicBridgeWidget;
|
|
151
|
+
exports.OAuthIFrameContainer = OAuthIFrameContainer.OAuthIFrameContainer;
|
|
149
152
|
exports.classNames = classNames.classNames;
|
|
150
153
|
exports.decodeJwt = decodeJwt.decodeJwt;
|
|
151
154
|
exports.validateType = validateType.validateType;
|
|
@@ -207,6 +210,7 @@ exports.SwitchHorizontalIcon = switchHorizontal.ReactComponent;
|
|
|
207
210
|
exports.DotsHorizontalIcon = dotsHorizontal.ReactComponent;
|
|
208
211
|
exports.SendIcon = send.ReactComponent;
|
|
209
212
|
exports.QuestionMarkIcon = questionMark.ReactComponent;
|
|
213
|
+
exports.DoubleArrowRightIcon = doubleArrowRight.ReactComponent;
|
|
210
214
|
exports.authModalZIndex = index$2.authModalZIndex;
|
|
211
215
|
exports.countryCodes = index$2.countryCodes;
|
|
212
216
|
exports.defaultWalletsForChains = index$2.defaultWalletsForChains;
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { ShadowedDynamicNav as DynamicNav } from './lib/widgets/DynamicWidget/co
|
|
|
10
10
|
export { ShadowedDynamicUserProfile as DynamicUserProfile } from './lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js';
|
|
11
11
|
export { FundingWidget } from './lib/widgets/FundingWidget/FundingWidget.js';
|
|
12
12
|
export { DynamicBridgeWidget } from './lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js';
|
|
13
|
+
export { OAuthIFrameContainer } from './lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.js';
|
|
13
14
|
import 'react/jsx-runtime';
|
|
14
15
|
import 'react';
|
|
15
16
|
export { classNames } from './lib/utils/functions/classNames/classNames.js';
|
|
@@ -73,6 +74,7 @@ export { ReactComponent as SwitchHorizontalIcon } from './lib/shared/assets/swit
|
|
|
73
74
|
export { ReactComponent as DotsHorizontalIcon } from './lib/shared/assets/dots-horizontal.js';
|
|
74
75
|
export { ReactComponent as SendIcon } from './lib/shared/assets/send.js';
|
|
75
76
|
export { ReactComponent as QuestionMarkIcon } from './lib/shared/assets/question-mark.js';
|
|
77
|
+
export { ReactComponent as DoubleArrowRightIcon } from './lib/shared/assets/double-arrow-right.js';
|
|
76
78
|
export { authModalZIndex, countryCodes, defaultWalletsForChains, tShirtSizes, teamNames, toolkitZIndex, tooltipZIndex, widgetModalZIndex } from './lib/shared/consts/index.js';
|
|
77
79
|
export { logger } from './lib/shared/logger.js';
|
|
78
80
|
import './lib/utils/constants/colors.js';
|
package/src/lib/Main.cjs
CHANGED
|
@@ -54,6 +54,9 @@ var isSelectedWalletAlreadyConnected = require('./utils/functions/isSelectedWall
|
|
|
54
54
|
var viewToComponentMap = require('./views/viewToComponentMap.cjs');
|
|
55
55
|
require('./main.global.cjs');
|
|
56
56
|
|
|
57
|
+
const viewsToDisableCloseOnOverlayClick = [
|
|
58
|
+
'email-wallet-otp-verification-view',
|
|
59
|
+
];
|
|
57
60
|
const Main = () => {
|
|
58
61
|
const { selectedWalletConnector, linkedWallets, isProjectSettingsLoading, projectSettings, setShowAuthFlow, showAuthFlow, wallets, clearStatesOnBackClick, user, unlinkConnectedWallet, authMode, connectedWallets, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
59
62
|
const { view, goToInitialView } = ViewContext.useViewContext();
|
|
@@ -61,6 +64,8 @@ const Main = () => {
|
|
|
61
64
|
const { setExistentAccountData } = AccountExistsContext.useAccountExistsContext();
|
|
62
65
|
usePreventPageScroll.usePreventPageScroll(showAuthFlow);
|
|
63
66
|
const handleClose = () => {
|
|
67
|
+
if (viewsToDisableCloseOnOverlayClick.includes(view))
|
|
68
|
+
return;
|
|
64
69
|
setShowAuthFlow(false);
|
|
65
70
|
setDeniedAddress('');
|
|
66
71
|
setDeniedOauthProvider(undefined);
|
package/src/lib/Main.js
CHANGED
|
@@ -50,6 +50,9 @@ import { isSelectedWalletAlreadyConnected } from './utils/functions/isSelectedWa
|
|
|
50
50
|
import { viewToComponentMap } from './views/viewToComponentMap.js';
|
|
51
51
|
import './main.global.js';
|
|
52
52
|
|
|
53
|
+
const viewsToDisableCloseOnOverlayClick = [
|
|
54
|
+
'email-wallet-otp-verification-view',
|
|
55
|
+
];
|
|
53
56
|
const Main = () => {
|
|
54
57
|
const { selectedWalletConnector, linkedWallets, isProjectSettingsLoading, projectSettings, setShowAuthFlow, showAuthFlow, wallets, clearStatesOnBackClick, user, unlinkConnectedWallet, authMode, connectedWallets, } = useInternalDynamicContext();
|
|
55
58
|
const { view, goToInitialView } = useViewContext();
|
|
@@ -57,6 +60,8 @@ const Main = () => {
|
|
|
57
60
|
const { setExistentAccountData } = useAccountExistsContext();
|
|
58
61
|
usePreventPageScroll(showAuthFlow);
|
|
59
62
|
const handleClose = () => {
|
|
63
|
+
if (viewsToDisableCloseOnOverlayClick.includes(view))
|
|
64
|
+
return;
|
|
60
65
|
setShowAuthFlow(false);
|
|
61
66
|
setDeniedAddress('');
|
|
62
67
|
setDeniedOauthProvider(undefined);
|
|
@@ -36,12 +36,15 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
|
|
|
36
36
|
}, buttonPadding ? buttonPaddingClassNameMap[buttonPadding] : '', buttonVariant ? buttonVariantClassNameMap[buttonVariant] : '', buttonRounded ? buttonRoundedClassNameMap[buttonRounded] : '', buttonClassName);
|
|
37
37
|
const handleClick = (e) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
38
38
|
if (onClick) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
const onClickResult = onClick(e);
|
|
40
|
+
if (onClickResult instanceof Promise) {
|
|
41
|
+
setInternalButtonLoading(true);
|
|
42
|
+
try {
|
|
43
|
+
yield onClickResult;
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
setInternalButtonLoading(false);
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
if (feedback) {
|
|
@@ -52,7 +55,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
|
|
|
52
55
|
}
|
|
53
56
|
});
|
|
54
57
|
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [startSlot && jsxRuntime.jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsxRuntime.jsx("div", { className: 'button__end-slot', children: endSlot })] }));
|
|
55
|
-
return (jsxRuntime.jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", { className: 'button__spinner-container', children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
58
|
+
return (jsxRuntime.jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
exports.Button = Button;
|
|
@@ -32,12 +32,15 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
|
|
|
32
32
|
}, buttonPadding ? buttonPaddingClassNameMap[buttonPadding] : '', buttonVariant ? buttonVariantClassNameMap[buttonVariant] : '', buttonRounded ? buttonRoundedClassNameMap[buttonRounded] : '', buttonClassName);
|
|
33
33
|
const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
34
|
if (onClick) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
const onClickResult = onClick(e);
|
|
36
|
+
if (onClickResult instanceof Promise) {
|
|
37
|
+
setInternalButtonLoading(true);
|
|
38
|
+
try {
|
|
39
|
+
yield onClickResult;
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
setInternalButtonLoading(false);
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
if (feedback) {
|
|
@@ -48,7 +51,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
|
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
53
|
const buttonContent = (jsxs(Fragment, { children: [startSlot && jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) && (jsx(Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsx("div", { className: 'button__end-slot', children: endSlot })] }));
|
|
51
|
-
return (jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsx("div", { className: 'button__spinner-container', children: jsx(Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
54
|
+
return (jsxs("button", { type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId, children: [(internalButtonLoading || loading) && (jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsx(Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
export { Button };
|
|
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var Button = require('../../Button/Button.cjs');
|
|
7
7
|
var classNames = require('../../../utils/functions/classNames/classNames.cjs');
|
|
8
8
|
|
|
9
|
-
const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsxRuntime.jsx("div", { className: buttonContainerClassName, children: jsxRuntime.jsx(Button.Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large',
|
|
9
|
+
const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsxRuntime.jsx("div", { className: buttonContainerClassName, children: jsxRuntime.jsx(Button.Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', children: children }) }));
|
|
10
10
|
|
|
11
11
|
exports.ConnectButton = ConnectButton;
|
|
@@ -2,6 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Button } from '../../Button/Button.js';
|
|
3
3
|
import { classNames } from '../../../utils/functions/classNames/classNames.js';
|
|
4
4
|
|
|
5
|
-
const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsx("div", { className: buttonContainerClassName, children: jsx(Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large',
|
|
5
|
+
const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsx("div", { className: buttonContainerClassName, children: jsx(Button, { dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', children: children }) }));
|
|
6
6
|
|
|
7
7
|
export { ConnectButton };
|
|
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
7
7
|
var Typography = require('../Typography/Typography.cjs');
|
|
8
8
|
|
|
9
|
-
const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style, children: [leading, jsxRuntime.jsx("div", { className: 'list-tile__children', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
|
|
9
|
+
const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsxRuntime.jsx("div", { className: 'list-tile__children', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
|
|
10
10
|
|
|
11
11
|
exports.ListTile = ListTile;
|
|
@@ -2,6 +2,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
3
3
|
import { Typography } from '../Typography/Typography.js';
|
|
4
4
|
|
|
5
|
-
const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style, children: [leading, jsx("div", { className: 'list-tile__children', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
|
|
5
|
+
const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxs("button", { "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled, children: [leading, jsx("div", { className: 'list-tile__children', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span', children: children }) }), trailing] }));
|
|
6
6
|
|
|
7
7
|
export { ListTile };
|
|
@@ -12,13 +12,13 @@ var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchT
|
|
|
12
12
|
require('../../../shared/logger.cjs');
|
|
13
13
|
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
14
14
|
var index = require('../../../shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
15
|
+
require('@dynamic-labs/utils');
|
|
15
16
|
var useForwardedRef = require('../../../shared/utils/hooks/useForwardedRef/useForwardedRef.cjs');
|
|
16
17
|
require('@dynamic-labs/sdk-api');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('@dynamic-labs/wallet-connector-core');
|
|
19
20
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
20
21
|
require('@dynamic-labs/wallet-book');
|
|
21
|
-
require('@dynamic-labs/utils');
|
|
22
22
|
require('../../../utils/constants/colors.cjs');
|
|
23
23
|
require('viem');
|
|
24
24
|
require('../../../shared/consts/index.cjs');
|
|
@@ -8,13 +8,13 @@ import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watc
|
|
|
8
8
|
import '../../../shared/logger.js';
|
|
9
9
|
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
10
10
|
import { useOnClickOutside } from '../../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
11
|
+
import '@dynamic-labs/utils';
|
|
11
12
|
import { useForwardedRef } from '../../../shared/utils/hooks/useForwardedRef/useForwardedRef.js';
|
|
12
13
|
import '@dynamic-labs/sdk-api';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '@dynamic-labs/wallet-connector-core';
|
|
15
16
|
import '../../../context/ViewContext/ViewContext.js';
|
|
16
17
|
import '@dynamic-labs/wallet-book';
|
|
17
|
-
import '@dynamic-labs/utils';
|
|
18
18
|
import '../../../utils/constants/colors.js';
|
|
19
19
|
import 'viem';
|
|
20
20
|
import '../../../shared/consts/index.js';
|
|
@@ -13,9 +13,13 @@ var VerticalDrawerTransition = require('../Transition/VerticalDrawerTransition/V
|
|
|
13
13
|
|
|
14
14
|
const typographyColor = {
|
|
15
15
|
error: 'error-1',
|
|
16
|
+
notice: 'brand-primary',
|
|
17
|
+
success: 'green-1',
|
|
16
18
|
};
|
|
17
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
|
|
19
|
+
const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsxRuntime.jsx("div", { className: classNames.classNames('modal-header-banner', {
|
|
18
20
|
'modal-header-banner__error': type === 'error',
|
|
19
|
-
|
|
21
|
+
'modal-header-banner__notice': type === 'notice',
|
|
22
|
+
'modal-header-banner__success': type === 'success',
|
|
23
|
+
}), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
|
|
20
24
|
|
|
21
25
|
exports.ModalHeaderBanner = ModalHeaderBanner;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
type ModalHeaderBannerType = 'error';
|
|
2
|
+
type ModalHeaderBannerType = 'error' | 'success' | 'notice';
|
|
3
3
|
export type ModalHeaderBannerProps = {
|
|
4
4
|
message?: string;
|
|
5
5
|
type?: ModalHeaderBannerType;
|
|
6
|
+
disableTruncate?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const ModalHeaderBanner: FC<ModalHeaderBannerProps>;
|
|
8
9
|
export {};
|
|
@@ -9,9 +9,13 @@ import { VerticalDrawerTransition } from '../Transition/VerticalDrawerTransition
|
|
|
9
9
|
|
|
10
10
|
const typographyColor = {
|
|
11
11
|
error: 'error-1',
|
|
12
|
+
notice: 'brand-primary',
|
|
13
|
+
success: 'green-1',
|
|
12
14
|
};
|
|
13
|
-
const ModalHeaderBanner = ({ message, type = 'error', }) => (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsx("div", { className: classNames('modal-header-banner', {
|
|
15
|
+
const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(message) && (jsx("div", { className: classNames('modal-header-banner', {
|
|
14
16
|
'modal-header-banner__error': type === 'error',
|
|
15
|
-
|
|
17
|
+
'modal-header-banner__notice': type === 'notice',
|
|
18
|
+
'modal-header-banner__success': type === 'success',
|
|
19
|
+
}), children: jsx(Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, children: message }) })) }));
|
|
16
20
|
|
|
17
21
|
export { ModalHeaderBanner };
|
|
@@ -10,6 +10,7 @@ require('@dynamic-labs/sdk-api');
|
|
|
10
10
|
require('../../shared/logger.cjs');
|
|
11
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
12
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
var close = require('../../shared/assets/close.cjs');
|
|
13
14
|
var chevronLeft = require('../../shared/assets/chevron-left.cjs');
|
|
14
15
|
var check = require('../../shared/assets/check.cjs');
|
|
15
16
|
var pencilAltIcon = require('../../shared/assets/pencil-alt-icon.cjs');
|
|
@@ -54,9 +55,10 @@ require('yup');
|
|
|
54
55
|
require('../InlineWidget/InlineWidget.cjs');
|
|
55
56
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
56
57
|
|
|
57
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
58
|
-
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
59
|
-
|
|
58
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
59
|
+
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
60
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickClose, type: 'button', "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
61
|
+
return (jsxRuntime.jsxs("div", { className: 'otp-verification-view', children: [successBannerText && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxRuntime.jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) })] }));
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
exports.OTPVerificationView = OTPVerificationView;
|
|
@@ -6,9 +6,11 @@ type OtpVerificationLayoutProps = {
|
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
isValid: boolean;
|
|
8
8
|
onClickBack?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
onClickClose?: MouseEventHandler<HTMLButtonElement>;
|
|
9
10
|
onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
|
|
10
11
|
onPinChange?: (value: string) => void;
|
|
11
12
|
onPinComplete: (value: string) => void;
|
|
13
|
+
successBannerText?: string;
|
|
12
14
|
};
|
|
13
15
|
export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
|
|
14
16
|
export {};
|
|
@@ -6,6 +6,7 @@ import '@dynamic-labs/sdk-api';
|
|
|
6
6
|
import '../../shared/logger.js';
|
|
7
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
9
10
|
import { ReactComponent as SvgChevronLeft } from '../../shared/assets/chevron-left.js';
|
|
10
11
|
import { ReactComponent as SvgCheck } from '../../shared/assets/check.js';
|
|
11
12
|
import { ReactComponent as SvgPencilAltIcon } from '../../shared/assets/pencil-alt-icon.js';
|
|
@@ -50,9 +51,10 @@ import 'yup';
|
|
|
50
51
|
import '../InlineWidget/InlineWidget.js';
|
|
51
52
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
52
53
|
|
|
53
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
54
|
-
const backButton = (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
55
|
-
|
|
54
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
|
|
55
|
+
const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
56
|
+
const closeButton = (jsx(IconButton, { onClick: onClickClose, type: 'button', "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
|
|
57
|
+
return (jsxs("div", { className: 'otp-verification-view', children: [successBannerText && (jsx(ModalHeaderBanner, { type: 'notice', message: successBannerText, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton, children: jsxs("div", { className: 'otp-verification-view__status-header', children: [isValid && (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] }) }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', children: isValid ? 'Verification code confirmed' : 'Confirm verification code' }), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Hang tight while we get things ready for you" })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", { className: 'otp-verification-view__footer', children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) })] }));
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
export { OTPVerificationView };
|
package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs
CHANGED
|
@@ -36,7 +36,9 @@ var PoweredByDynamic = require('../PoweredByDynamic/PoweredByDynamic.cjs');
|
|
|
36
36
|
const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, warningMessage, children, }) => {
|
|
37
37
|
const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
38
38
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
39
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: warningMessage && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: warningMessage }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading, children: "Cancel" })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick:
|
|
39
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: warningMessage && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: warningMessage }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading, children: "Cancel" })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
|
|
40
|
+
onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
|
|
41
|
+
}, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton, children: "Send" })] }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
exports.TransactionConfirmationPageLayout = TransactionConfirmationPageLayout;
|