@dynamic-labs/sdk-react-core 0.19.0-alpha.18 → 0.19.0-alpha.19

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +8 -8
  5. package/src/index.cjs +6 -0
  6. package/src/index.js +3 -0
  7. package/src/lib/components/Button/Button.cjs +2 -7
  8. package/src/lib/components/Button/Button.d.ts +0 -2
  9. package/src/lib/components/Button/Button.js +2 -7
  10. package/src/lib/components/CopyButton/CopyButton.cjs +1 -3
  11. package/src/lib/components/CopyButton/CopyButton.js +1 -3
  12. package/src/lib/components/DynamicFooter/DynamicFooter.cjs +10 -0
  13. package/src/lib/components/DynamicFooter/DynamicFooter.d.ts +2 -0
  14. package/src/lib/components/DynamicFooter/DynamicFooter.js +6 -0
  15. package/src/lib/components/DynamicFooter/index.d.ts +1 -0
  16. package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
  17. package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
  18. package/src/lib/components/ModalHeader/ModalHeader.cjs +3 -3
  19. package/src/lib/components/ModalHeader/ModalHeader.js +3 -3
  20. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -0
  21. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -5
  22. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
  23. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -5
  24. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -1
  25. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -1
  26. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.cjs +1 -1
  27. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.js +1 -1
  28. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +1 -2
  29. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +1 -2
  30. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
  31. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
  32. package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
  33. package/src/lib/components/Tooltip/Tooltip.js +1 -1
  34. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
  35. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
  36. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  37. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  38. package/src/lib/components/Typography/Typography.cjs +0 -1
  39. package/src/lib/components/Typography/Typography.js +0 -1
  40. package/src/lib/components/Typography/Typography.types.d.ts +1 -1
  41. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
  42. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
  43. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
  44. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
  45. package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
  46. package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
  47. package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -7
  48. package/src/lib/context/DynamicContext/DynamicContext.js +7 -7
  49. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -1
  50. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -1
  51. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +7 -20
  52. package/src/lib/layout/DynamicAuthLayout/Header/header.js +7 -20
  53. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +6 -4
  54. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +6 -4
  55. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -2
  56. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -2
  57. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
  58. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
  59. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
  60. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
  61. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
  62. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
  63. package/src/lib/locale/en/translation.cjs +13 -1
  64. package/src/lib/locale/en/translation.js +13 -1
  65. package/src/lib/main.global.cjs +1 -1
  66. package/src/lib/main.global.js +1 -1
  67. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -2
  68. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -2
  69. package/src/lib/shared/assets/arrow-left.cjs +53 -0
  70. package/src/lib/shared/assets/arrow-left.js +29 -0
  71. package/src/lib/shared/assets/arrow-right-circle.cjs +53 -0
  72. package/src/lib/shared/assets/arrow-right-circle.js +29 -0
  73. package/src/lib/shared/assets/check-connection.cjs +53 -0
  74. package/src/lib/shared/assets/check-connection.js +29 -0
  75. package/src/lib/shared/assets/index.d.ts +3 -0
  76. package/src/lib/styles/index.shadow.cjs +1 -1
  77. package/src/lib/styles/index.shadow.js +1 -1
  78. package/src/lib/utils/constants/index.d.ts +1 -1
  79. package/src/lib/utils/constants/typography.d.ts +0 -1
  80. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -5
  81. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +2 -0
  82. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -5
  83. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +24 -0
  84. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +24 -0
  85. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
  86. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
  87. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +12 -5
  88. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +12 -5
  89. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
  90. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
  91. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -1
  92. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -1
  93. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
  94. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
  95. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +6 -7
  96. package/src/lib/views/EmailUpdate/EmailUpdate.js +7 -8
  97. package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -18
  98. package/src/lib/views/EmailVerification/EmailVerification.js +13 -19
  99. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
  100. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
  101. package/src/lib/views/LoginView/LoginView.cjs +3 -5
  102. package/src/lib/views/LoginView/LoginView.js +4 -6
  103. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +2 -2
  104. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +2 -2
  105. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  106. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  107. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -1
  108. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -1
  109. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  110. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  111. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
  112. package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
  113. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +5 -6
  114. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +5 -6
  115. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +5 -2
  116. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
  117. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +5 -2
  118. package/src/lib/views/QrCodeView/QrCodeView.cjs +22 -23
  119. package/src/lib/views/QrCodeView/QrCodeView.js +23 -24
  120. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
  121. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
  122. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
  123. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
  124. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
  125. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
  126. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  127. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  128. package/src/lib/views/WalletList/WalletList.cjs +7 -3
  129. package/src/lib/views/WalletList/WalletList.js +8 -4
  130. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  131. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  132. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
  133. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
  134. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  135. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  136. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
  137. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
  138. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -1
  139. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -1
  140. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -2
  141. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -2
  142. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -2
  143. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -2
  144. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -1
  145. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -1
  146. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
  147. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
  148. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
  149. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
  150. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
  151. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
  152. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -2
  153. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -2
  154. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -2
  155. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -2
@@ -52,6 +52,9 @@ const useDynamicLayoutData = ({ view, authMode, }) => {
52
52
  'login-with-email-or-wallet-full-wallet-list': {
53
53
  heading: t('dyn_login.title.all_wallet_list'),
54
54
  },
55
+ 'login-with-email-verification': {
56
+ heading: 'Confirm verification code',
57
+ },
55
58
  'login-with-wallet-only': {
56
59
  heading: t('dyn_login.title.wallet_only'),
57
60
  },
@@ -60,13 +63,34 @@ const useDynamicLayoutData = ({ view, authMode, }) => {
60
63
  ? t('dyn_wallet_list.title.connect')
61
64
  : t('dyn_wallet_list.title.link'),
62
65
  },
66
+ 'network-not-supported': {
67
+ heading: 'Update Network',
68
+ },
69
+ 'pending-connect': {
70
+ heading: t('dyn_login.connect_wallet.title'),
71
+ },
72
+ 'pending-signature': {
73
+ heading: t('dyn_login.sign_wallet.title'),
74
+ },
75
+ 'qr-code': {
76
+ heading: t('dyn_login.qr_code.title'),
77
+ },
78
+ 'verify-email': {
79
+ heading: 'Confirm verification code',
80
+ },
63
81
  'wallet-connect-mobile-wallets-list': {
64
82
  heading: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(iconic.WalletConnectIcon, { style: { height: '1.5rem', width: '1.5rem' } }), ' ', t('dyn_wallet_conect.mobile.wallet_list.title')] })),
65
83
  },
84
+ 'wallet-group': {
85
+ heading: t('dyn_login.wallet_group.title'),
86
+ },
66
87
  'wallet-list': {
67
88
  heading: t('dyn_wallet_list.title.select'),
68
89
  },
69
90
  'wallet-sign': { heading: t('dyn_wallet_transfer.sign.title') },
91
+ 'wallet-used': {
92
+ heading: 'Transfer this wallet?',
93
+ },
70
94
  };
71
95
  const helpHeaderData = helpHeaderMap[view];
72
96
  const headerData = headerMap[view];
@@ -48,6 +48,9 @@ const useDynamicLayoutData = ({ view, authMode, }) => {
48
48
  'login-with-email-or-wallet-full-wallet-list': {
49
49
  heading: t('dyn_login.title.all_wallet_list'),
50
50
  },
51
+ 'login-with-email-verification': {
52
+ heading: 'Confirm verification code',
53
+ },
51
54
  'login-with-wallet-only': {
52
55
  heading: t('dyn_login.title.wallet_only'),
53
56
  },
@@ -56,13 +59,34 @@ const useDynamicLayoutData = ({ view, authMode, }) => {
56
59
  ? t('dyn_wallet_list.title.connect')
57
60
  : t('dyn_wallet_list.title.link'),
58
61
  },
62
+ 'network-not-supported': {
63
+ heading: 'Update Network',
64
+ },
65
+ 'pending-connect': {
66
+ heading: t('dyn_login.connect_wallet.title'),
67
+ },
68
+ 'pending-signature': {
69
+ heading: t('dyn_login.sign_wallet.title'),
70
+ },
71
+ 'qr-code': {
72
+ heading: t('dyn_login.qr_code.title'),
73
+ },
74
+ 'verify-email': {
75
+ heading: 'Confirm verification code',
76
+ },
59
77
  'wallet-connect-mobile-wallets-list': {
60
78
  heading: (jsxs(Fragment, { children: [jsx(WalletConnectIcon, { style: { height: '1.5rem', width: '1.5rem' } }), ' ', t('dyn_wallet_conect.mobile.wallet_list.title')] })),
61
79
  },
80
+ 'wallet-group': {
81
+ heading: t('dyn_login.wallet_group.title'),
82
+ },
62
83
  'wallet-list': {
63
84
  heading: t('dyn_wallet_list.title.select'),
64
85
  },
65
86
  'wallet-sign': { heading: t('dyn_wallet_transfer.sign.title') },
87
+ 'wallet-used': {
88
+ heading: 'Transfer this wallet?',
89
+ },
66
90
  };
67
91
  const helpHeaderData = helpHeaderMap[view];
68
92
  const headerData = headerMap[view];
@@ -36,6 +36,7 @@ require('../../context/FooterAnimationContext/index.cjs');
36
36
  require('../../context/MockContext/MockContext.cjs');
37
37
  require('../../context/QrCodeContext/QrCodeContext.cjs');
38
38
  require('react-i18next');
39
+ var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
39
40
  require('../../context/AccountExistsContext/AccountExistsContext.cjs');
40
41
  require('../../context/ErrorContext/ErrorContext.cjs');
41
42
  require('../../context/WalletGroupContext/WalletGroupContext.cjs');
@@ -54,7 +55,6 @@ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
54
55
  require('formik');
55
56
  require('yup');
56
57
  require('../../components/IconButton/IconButton.cjs');
57
- var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
58
58
  require('../../components/Alert/Alert.cjs');
59
59
  require('../../components/Popper/Popper/Popper.cjs');
60
60
  require('../../components/Popper/PopperContext/PopperContext.cjs');
@@ -32,6 +32,7 @@ import '../../context/FooterAnimationContext/index.js';
32
32
  import '../../context/MockContext/MockContext.js';
33
33
  import '../../context/QrCodeContext/QrCodeContext.js';
34
34
  import 'react-i18next';
35
+ import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
35
36
  import '../../context/AccountExistsContext/AccountExistsContext.js';
36
37
  import '../../context/ErrorContext/ErrorContext.js';
37
38
  import '../../context/WalletGroupContext/WalletGroupContext.js';
@@ -50,7 +51,6 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
50
51
  import 'formik';
51
52
  import 'yup';
52
53
  import '../../components/IconButton/IconButton.js';
53
- import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
54
54
  import '../../components/Alert/Alert.js';
55
55
  import '../../components/Popper/Popper/Popper.js';
56
56
  import '../../components/Popper/PopperContext/PopperContext.js';
@@ -10,7 +10,9 @@ require('../../shared/logger.cjs');
10
10
  require('@dynamic-labs/iconic');
11
11
  require('@dynamic-labs/wallet-connector-core');
12
12
  require('../../context/ViewContext/ViewContext.cjs');
13
+ var checkConnection = require('../../shared/assets/check-connection.cjs');
13
14
  require('@dynamic-labs/wallet-book');
15
+ var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
14
16
  require('@dynamic-labs/utils');
15
17
  require('../../utils/constants/colors.cjs');
16
18
  require('../../shared/utils/classes/storage/localStorage.cjs');
@@ -22,6 +24,8 @@ var createUserProfile = require('../../utils/functions/createUserProfile/createU
22
24
  var isSupportedNetwork = require('../../utils/functions/isSupportedNetwork/isSupportedNetwork.cjs');
23
25
  require('../../components/ShadowDOM/ShadowDOM.cjs');
24
26
  require('../../context/ThemeContext/ThemeContext.cjs');
27
+ var classNames = require('../../utils/functions/classNames/classNames.cjs');
28
+ var Icon = require('../../components/Icon/Icon.cjs');
25
29
  require('react-dom');
26
30
  require('react-focus-lock');
27
31
  require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
@@ -62,12 +66,12 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
62
66
  require('../../components/InlineWidget/InlineWidget.cjs');
63
67
  require('../../components/MenuList/Dropdown/Dropdown.cjs');
64
68
  var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
65
- var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
66
69
  var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
67
70
  var OnboardingUserDataForm = require('./OnboardingUserDataForm/OnboardingUserDataForm.cjs');
68
71
 
69
72
  const CollectUserDataView = () => {
70
- const { appName, onboardingOnlyJwt, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext.useInternalDynamicContext();
73
+ var _a;
74
+ const { appName, onboardingOnlyJwt, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, handleLogOut, onboardingImageUrl, } = useInternalDynamicContext.useInternalDynamicContext();
71
75
  const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
72
76
  const nameService = useFetchNameService.useFetchNameService();
73
77
  if (!walletConnector || !decodedOnboardingOnlyToken) {
@@ -76,9 +80,12 @@ const CollectUserDataView = () => {
76
80
  const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
77
81
  const evmNetworks = walletConnector.evmNetworks || [];
78
82
  const _isSupportedNetwork = !network || isSupportedNetwork.isSupportedNetwork({ network, walletConnector });
79
- return (jsxRuntime.jsxs("div", { className: 'collect-user-data', "data-testid": 'collect-user-data-view', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, className: 'collect-user-data__error--not-supported', children: "This network is not available, please update." })), jsxRuntime.jsxs("div", { className: 'collect-user-data__form', children: [jsxRuntime.jsxs(OnboardingUserDataForm.OnboardingUserDataForm, { disableSubmit: !_isSupportedNetwork, userProfile: userProfile, children: [jsxRuntime.jsx("div", { className: 'collect-user-data__img-container', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: onboardingOnlyJwt })) }), jsxRuntime.jsx(UserAddress.UserAddress, { userProfile: userProfile }), jsxRuntime.jsx("div", { className: 'collect-user-data__network-container', children: jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) }), !_isSupportedNetwork ? (jsxRuntime.jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: "Update Network" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your wallet is not connected to a supported network. Please update before continuing." })] })) : (jsxRuntime.jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
80
- `Welcome to ${appName}` }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
81
- 'We need a bit of information to get started' })] }))] }), jsxRuntime.jsx(TextButton.TextButton, { className: 'collect-user-data__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
83
+ const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
84
+ return (jsxRuntime.jsxs("div", { className: 'collect-user-data', "data-testid": 'collect-user-data-view', children: [jsxRuntime.jsxs("div", { className: 'collect-user-data__network-container', children: [jsxRuntime.jsxs("div", { className: 'collect-user-data__img-container', children: [(nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: onboardingOnlyJwt, iconSize: 28 })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'collect-user-data__wallet-address', children: (nameService === null || nameService === void 0 ? void 0 : nameService.name) || shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) })] }), jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' })] }), onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, className: 'collect-user-data__error--not-supported', children: "This network is not available, please update." })), jsxRuntime.jsxs("div", { className: classNames.classNames('collect-user-data__form', {
85
+ 'collect-user-data__form--error': !_isSupportedNetwork,
86
+ }), children: [jsxRuntime.jsx("div", { className: 'collect-user-data__success-icon', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-primary', size: 'large', children: jsxRuntime.jsx(checkConnection.ReactComponent, {}) }) }), jsxRuntime.jsx(OnboardingUserDataForm.OnboardingUserDataForm, { disableSubmit: !_isSupportedNetwork, userProfile: userProfile, children: !_isSupportedNetwork ? (jsxRuntime.jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: "Update Network" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your wallet is not connected to a supported network. Please update before continuing." })] })) : (jsxRuntime.jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
87
+ `Welcome to ${appName}` }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
88
+ 'We need a bit of information to get started' })] })) }), jsxRuntime.jsx(TextButton.TextButton, { className: 'collect-user-data__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
82
89
  };
83
90
 
84
91
  exports.CollectUserDataView = CollectUserDataView;
@@ -6,7 +6,9 @@ import '../../shared/logger.js';
6
6
  import '@dynamic-labs/iconic';
7
7
  import '@dynamic-labs/wallet-connector-core';
8
8
  import '../../context/ViewContext/ViewContext.js';
9
+ import { ReactComponent as SvgCheckConnection } from '../../shared/assets/check-connection.js';
9
10
  import '@dynamic-labs/wallet-book';
11
+ import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
10
12
  import '@dynamic-labs/utils';
11
13
  import '../../utils/constants/colors.js';
12
14
  import '../../shared/utils/classes/storage/localStorage.js';
@@ -18,6 +20,8 @@ import { createUserProfile } from '../../utils/functions/createUserProfile/creat
18
20
  import { isSupportedNetwork } from '../../utils/functions/isSupportedNetwork/isSupportedNetwork.js';
19
21
  import '../../components/ShadowDOM/ShadowDOM.js';
20
22
  import '../../context/ThemeContext/ThemeContext.js';
23
+ import { classNames } from '../../utils/functions/classNames/classNames.js';
24
+ import { Icon } from '../../components/Icon/Icon.js';
21
25
  import 'react-dom';
22
26
  import 'react-focus-lock';
23
27
  import '../../components/Transition/ZoomTransition/ZoomTransition.js';
@@ -58,12 +62,12 @@ import '../../components/Popper/PopperContext/PopperContext.js';
58
62
  import '../../components/InlineWidget/InlineWidget.js';
59
63
  import '../../components/MenuList/Dropdown/Dropdown.js';
60
64
  import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
61
- import { UserAddress } from '../../components/UserAddress/UserAddress.js';
62
65
  import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
63
66
  import { OnboardingUserDataForm } from './OnboardingUserDataForm/OnboardingUserDataForm.js';
64
67
 
65
68
  const CollectUserDataView = () => {
66
- const { appName, onboardingOnlyJwt, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext();
69
+ var _a;
70
+ const { appName, onboardingOnlyJwt, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, handleLogOut, onboardingImageUrl, } = useInternalDynamicContext();
67
71
  const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
68
72
  const nameService = useFetchNameService();
69
73
  if (!walletConnector || !decodedOnboardingOnlyToken) {
@@ -72,9 +76,12 @@ const CollectUserDataView = () => {
72
76
  const userProfile = createUserProfile(decodedOnboardingOnlyToken);
73
77
  const evmNetworks = walletConnector.evmNetworks || [];
74
78
  const _isSupportedNetwork = !network || isSupportedNetwork({ network, walletConnector });
75
- return (jsxs("div", { className: 'collect-user-data', "data-testid": 'collect-user-data-view', children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { withIcon: false, className: 'collect-user-data__error--not-supported', children: "This network is not available, please update." })), jsxs("div", { className: 'collect-user-data__form', children: [jsxs(OnboardingUserDataForm, { disableSubmit: !_isSupportedNetwork, userProfile: userProfile, children: [jsx("div", { className: 'collect-user-data__img-container', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(AuthProviderIcon, { jwt: onboardingOnlyJwt })) }), jsx(UserAddress, { userProfile: userProfile }), jsx("div", { className: 'collect-user-data__network-container', children: jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) }), !_isSupportedNetwork ? (jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: "Update Network" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your wallet is not connected to a supported network. Please update before continuing." })] })) : (jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
76
- `Welcome to ${appName}` }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
77
- 'We need a bit of information to get started' })] }))] }), jsx(TextButton, { className: 'collect-user-data__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
79
+ const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
80
+ return (jsxs("div", { className: 'collect-user-data', "data-testid": 'collect-user-data-view', children: [jsxs("div", { className: 'collect-user-data__network-container', children: [jsxs("div", { className: 'collect-user-data__img-container', children: [(nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(AuthProviderIcon, { jwt: onboardingOnlyJwt, iconSize: 28 })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'collect-user-data__wallet-address', children: (nameService === null || nameService === void 0 ? void 0 : nameService.name) || shortenWalletAddress(walletAddress, 3, 3) })] }), jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' })] }), onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { withIcon: false, className: 'collect-user-data__error--not-supported', children: "This network is not available, please update." })), jsxs("div", { className: classNames('collect-user-data__form', {
81
+ 'collect-user-data__form--error': !_isSupportedNetwork,
82
+ }), children: [jsx("div", { className: 'collect-user-data__success-icon', children: jsx(Icon, { color: 'text-primary', size: 'large', children: jsx(SvgCheckConnection, {}) }) }), jsx(OnboardingUserDataForm, { disableSubmit: !_isSupportedNetwork, userProfile: userProfile, children: !_isSupportedNetwork ? (jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: "Update Network" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your wallet is not connected to a supported network. Please update before continuing." })] })) : (jsxs("div", { className: 'collect-user-data__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
83
+ `Welcome to ${appName}` }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
84
+ 'We need a bit of information to get started' })] })) }), jsx(TextButton, { className: 'collect-user-data__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
78
85
  };
79
86
 
80
87
  export { CollectUserDataView };
@@ -115,7 +115,7 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
115
115
  (enforcePolicies &&
116
116
  (policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.length) !==
117
117
  ((_a = values.policiesConsentArray) === null || _a === void 0 ? void 0 : _a.length));
118
- return (jsxRuntime.jsx(formik.Form, { className: 'user-data-form__form', children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(index.UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsxRuntime.jsx(Button.Button, { type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', buttonPadding: 'large', children: "Continue" })] }) }));
118
+ return (jsxRuntime.jsx(formik.Form, { className: 'user-data-form__form', children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(index.UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsxRuntime.jsx(Button.Button, { type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonPadding: 'large', children: "Continue" })] }) }));
119
119
  } }));
120
120
  };
121
121
 
@@ -111,7 +111,7 @@ const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
111
111
  (enforcePolicies &&
112
112
  (policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.length) !==
113
113
  ((_a = values.policiesConsentArray) === null || _a === void 0 ? void 0 : _a.length));
114
- return (jsx(Form, { className: 'user-data-form__form', children: jsxs(Fragment, { children: [children, jsx(UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsx(Button, { type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', buttonPadding: 'large', children: "Continue" })] }) }));
114
+ return (jsx(Form, { className: 'user-data-form__form', children: jsxs(Fragment, { children: [children, jsx(UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsx(Button, { type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonPadding: 'large', children: "Continue" })] }) }));
115
115
  } }));
116
116
  };
117
117
 
@@ -10,6 +10,7 @@ require('../../shared/logger.cjs');
10
10
  require('@dynamic-labs/iconic');
11
11
  require('@dynamic-labs/wallet-connector-core');
12
12
  require('../../context/ViewContext/ViewContext.cjs');
13
+ var checkConnection = require('../../shared/assets/check-connection.cjs');
13
14
  require('@dynamic-labs/wallet-book');
14
15
  require('@dynamic-labs/utils');
15
16
  require('../../utils/constants/colors.cjs');
@@ -21,6 +22,7 @@ require('@dynamic-labs/multi-wallet');
21
22
  var createUserProfile = require('../../utils/functions/createUserProfile/createUserProfile.cjs');
22
23
  require('../../components/ShadowDOM/ShadowDOM.cjs');
23
24
  require('../../context/ThemeContext/ThemeContext.cjs');
25
+ var Icon = require('../../components/Icon/Icon.cjs');
24
26
  require('react-dom');
25
27
  require('react-focus-lock');
26
28
  require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
@@ -67,7 +69,7 @@ const CollectUserDataViewLoginWithEmail = () => {
67
69
  return null;
68
70
  }
69
71
  const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
70
- return (jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsxRuntime.jsx("div", { className: 'collect-user-data-login-with-email__icon-container', children: jsxRuntime.jsx(UserAvatar.UserAvatar, { user: userProfile }) }), jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email__form', children: [jsxRuntime.jsx(OnboardingUserDataForm.OnboardingUserDataForm, { userProfile: userProfile, children: jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
72
+ return (jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email__user-info-container', children: [jsxRuntime.jsx("div", { className: 'collect-user-data-login-with-email__icon-container', children: jsxRuntime.jsx(UserAvatar.UserAvatar, { user: userProfile }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'collect-user-data-login-with-email__email-address', children: userProfile.email })] }), jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email__form', children: [jsxRuntime.jsx("div", { className: 'collect-user-data-login-with-email__success-icon', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-primary', size: 'large', children: jsxRuntime.jsx(checkConnection.ReactComponent, {}) }) }), jsxRuntime.jsx(OnboardingUserDataForm.OnboardingUserDataForm, { userProfile: userProfile, children: jsxRuntime.jsxs("div", { className: 'collect-user-data-login-with-email__welcome-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
71
73
  `Welcome to ${appName}` }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
72
74
  'We need a bit of information to get started' })] }) }), jsxRuntime.jsx(TextButton.TextButton, { className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
73
75
  };
@@ -6,6 +6,7 @@ import '../../shared/logger.js';
6
6
  import '@dynamic-labs/iconic';
7
7
  import '@dynamic-labs/wallet-connector-core';
8
8
  import '../../context/ViewContext/ViewContext.js';
9
+ import { ReactComponent as SvgCheckConnection } from '../../shared/assets/check-connection.js';
9
10
  import '@dynamic-labs/wallet-book';
10
11
  import '@dynamic-labs/utils';
11
12
  import '../../utils/constants/colors.js';
@@ -17,6 +18,7 @@ import '@dynamic-labs/multi-wallet';
17
18
  import { createUserProfile } from '../../utils/functions/createUserProfile/createUserProfile.js';
18
19
  import '../../components/ShadowDOM/ShadowDOM.js';
19
20
  import '../../context/ThemeContext/ThemeContext.js';
21
+ import { Icon } from '../../components/Icon/Icon.js';
20
22
  import 'react-dom';
21
23
  import 'react-focus-lock';
22
24
  import '../../components/Transition/ZoomTransition/ZoomTransition.js';
@@ -63,7 +65,7 @@ const CollectUserDataViewLoginWithEmail = () => {
63
65
  return null;
64
66
  }
65
67
  const userProfile = createUserProfile(decodedOnboardingOnlyToken);
66
- return (jsxs("div", { className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email', children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsx("div", { className: 'collect-user-data-login-with-email__icon-container', children: jsx(UserAvatar, { user: userProfile }) }), jsxs("div", { className: 'collect-user-data-login-with-email__form', children: [jsx(OnboardingUserDataForm, { userProfile: userProfile, children: jsxs("div", { className: 'collect-user-data-login-with-email__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
68
+ return (jsxs("div", { className: 'collect-user-data-login-with-email', "data-testid": 'collect-user-data-login-with-email', children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data-login-with-email__main-img', src: onboardingImageUrl, alt: 'onboarding' })), jsxs("div", { className: 'collect-user-data-login-with-email__user-info-container', children: [jsx("div", { className: 'collect-user-data-login-with-email__icon-container', children: jsx(UserAvatar, { user: userProfile }) }), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'collect-user-data-login-with-email__email-address', children: userProfile.email })] }), jsxs("div", { className: 'collect-user-data-login-with-email__form', children: [jsx("div", { className: 'collect-user-data-login-with-email__success-icon', children: jsx(Icon, { color: 'text-primary', size: 'large', children: jsx(SvgCheckConnection, {}) }) }), jsx(OnboardingUserDataForm, { userProfile: userProfile, children: jsxs("div", { className: 'collect-user-data-login-with-email__welcome-container', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'collect-user-data-login-with-email__welcome-title', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
67
69
  `Welcome to ${appName}` }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
68
70
  'We need a bit of information to get started' })] }) }), jsx(TextButton, { className: 'collect-user-data-login-with-email__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
69
71
  };
@@ -39,6 +39,7 @@ require('../../context/FooterAnimationContext/index.cjs');
39
39
  require('../../context/MockContext/MockContext.cjs');
40
40
  require('../../context/QrCodeContext/QrCodeContext.cjs');
41
41
  require('react-i18next');
42
+ var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
42
43
  require('../../context/WalletGroupContext/WalletGroupContext.cjs');
43
44
  require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
44
45
  var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
@@ -55,7 +56,6 @@ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
55
56
  require('formik');
56
57
  require('yup');
57
58
  var IconButton = require('../../components/IconButton/IconButton.cjs');
58
- var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
59
59
  require('../../components/Alert/Alert.cjs');
60
60
  require('../../components/Popper/Popper/Popper.cjs');
61
61
  require('../../components/Popper/PopperContext/PopperContext.cjs');
@@ -35,6 +35,7 @@ import '../../context/FooterAnimationContext/index.js';
35
35
  import '../../context/MockContext/MockContext.js';
36
36
  import '../../context/QrCodeContext/QrCodeContext.js';
37
37
  import 'react-i18next';
38
+ import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
38
39
  import '../../context/WalletGroupContext/WalletGroupContext.js';
39
40
  import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
40
41
  import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
@@ -51,7 +52,6 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
51
52
  import 'formik';
52
53
  import 'yup';
53
54
  import { IconButton } from '../../components/IconButton/IconButton.js';
54
- import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
55
55
  import '../../components/Alert/Alert.js';
56
56
  import '../../components/Popper/Popper/Popper.js';
57
57
  import '../../components/Popper/PopperContext/PopperContext.js';
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../_virtual/_tslib.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var React = require('react');
8
- var iconic = require('@dynamic-labs/iconic');
9
8
  var utils = require('@dynamic-labs/utils');
10
9
  var Typography = require('../../components/Typography/Typography.cjs');
11
10
  require('@dynamic-labs/sdk-api');
12
11
  var logger = require('../../shared/logger.cjs');
12
+ require('@dynamic-labs/iconic');
13
13
  require('@dynamic-labs/wallet-connector-core');
14
14
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
15
15
  var chevronLeft = require('../../shared/assets/chevron-left.cjs');
@@ -54,6 +54,7 @@ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
54
54
  require('formik');
55
55
  require('yup');
56
56
  var Button = require('../../components/Button/Button.cjs');
57
+ var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
57
58
  var IconButton = require('../../components/IconButton/IconButton.cjs');
58
59
  require('../../components/Alert/Alert.cjs');
59
60
  require('../../components/Popper/Popper/Popper.cjs');
@@ -73,6 +74,7 @@ const EmailUpdate = () => {
73
74
  setView('verify-email');
74
75
  setError(undefined);
75
76
  };
77
+ const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
76
78
  // If user tries to update an email for logged user there is already an authToken and onboardingOnlyJwt is undefined
77
79
  // If user tries to update the email in the authFlow, authToken is undefined and onboardingOnlyJwt is defined
78
80
  const jwtToken = authToken || onboardingOnlyJwt;
@@ -106,12 +108,9 @@ const EmailUpdate = () => {
106
108
  setLoading(false);
107
109
  }
108
110
  });
109
- return (jsxRuntime.jsxs("div", { className: 'email-update__container', children: [jsxRuntime.jsx("div", { className: 'email-update__header', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }) }), jsxRuntime.jsx(iconic.SignInWithEmailIcon, { style: {
110
- height: '3.125rem',
111
- width: '3.125rem',
112
- }, className: 'email-update__icon' }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: 'email-update__title', children: "Update Email" }), jsxRuntime.jsxs("div", { className: 'email-update__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your current email address is" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsxRuntime.jsx(Input.Input, { id: 'email_field', onChange: (e) => {
113
- setUpdatedEmail(e.target.value);
114
- }, type: 'email', label: 'Email address', className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, children: "Send Verification Code" })] }));
111
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: "Update email" }) }), jsxRuntime.jsxs("div", { className: 'email-update__container', children: [jsxRuntime.jsxs("div", { className: 'email-update__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your current email address is" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsxRuntime.jsx(Input.Input, { id: 'email_field', onChange: (e) => {
112
+ setUpdatedEmail(e.target.value);
113
+ }, type: 'email', label: 'Email address', className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, children: "Send Verification Code" })] })] }));
115
114
  };
116
115
 
117
116
  exports.EmailUpdate = EmailUpdate;
@@ -1,11 +1,11 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { useState } from 'react';
4
- import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
5
4
  import { EmailAlreadyExistsError } from '@dynamic-labs/utils';
6
5
  import { Typography } from '../../components/Typography/Typography.js';
7
6
  import '@dynamic-labs/sdk-api';
8
7
  import { logger } from '../../shared/logger.js';
8
+ import '@dynamic-labs/iconic';
9
9
  import '@dynamic-labs/wallet-connector-core';
10
10
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
11
11
  import { ReactComponent as SvgChevronLeft } from '../../shared/assets/chevron-left.js';
@@ -50,6 +50,7 @@ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
50
50
  import 'formik';
51
51
  import 'yup';
52
52
  import { Button } from '../../components/Button/Button.js';
53
+ import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
53
54
  import { IconButton } from '../../components/IconButton/IconButton.js';
54
55
  import '../../components/Alert/Alert.js';
55
56
  import '../../components/Popper/Popper/Popper.js';
@@ -69,6 +70,7 @@ const EmailUpdate = () => {
69
70
  setView('verify-email');
70
71
  setError(undefined);
71
72
  };
73
+ const backButton = (jsx(IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
72
74
  // If user tries to update an email for logged user there is already an authToken and onboardingOnlyJwt is undefined
73
75
  // If user tries to update the email in the authFlow, authToken is undefined and onboardingOnlyJwt is defined
74
76
  const jwtToken = authToken || onboardingOnlyJwt;
@@ -102,12 +104,9 @@ const EmailUpdate = () => {
102
104
  setLoading(false);
103
105
  }
104
106
  });
105
- return (jsxs("div", { className: 'email-update__container', children: [jsx("div", { className: 'email-update__header', children: jsx(IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }) }), jsx(SignInWithEmailIcon, { style: {
106
- height: '3.125rem',
107
- width: '3.125rem',
108
- }, className: 'email-update__icon' }), jsx(Typography, { weight: 'medium', variant: 'title', className: 'email-update__title', children: "Update Email" }), jsxs("div", { className: 'email-update__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your current email address is" }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsx(Input, { id: 'email_field', onChange: (e) => {
109
- setUpdatedEmail(e.target.value);
110
- }, type: 'email', label: 'Email address', className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, children: "Send Verification Code" })] }));
107
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: "Update email" }) }), jsxs("div", { className: 'email-update__container', children: [jsxs("div", { className: 'email-update__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "Your current email address is" }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsx(Input, { id: 'email_field', onChange: (e) => {
108
+ setUpdatedEmail(e.target.value);
109
+ }, type: 'email', label: 'Email address', className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, children: "Send Verification Code" })] })] }));
111
110
  };
112
111
 
113
112
  export { EmailUpdate };
@@ -11,7 +11,6 @@ var decodeJwt = require('../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
11
11
  require('@dynamic-labs/iconic');
12
12
  require('@dynamic-labs/wallet-connector-core');
13
13
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
14
- var close = require('../../shared/assets/close.cjs');
15
14
  var check = require('../../shared/assets/check.cjs');
16
15
  var checkCircle = require('../../shared/assets/check-circle.cjs');
17
16
  var signInWithEmail = require('../../shared/assets/sign-in-with-email.cjs');
@@ -64,9 +63,7 @@ require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs'
64
63
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
65
64
  require('formik');
66
65
  require('yup');
67
- var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
68
- var IconButton = require('../../components/IconButton/IconButton.cjs');
69
- var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
66
+ require('../../components/IconButton/IconButton.cjs');
70
67
  require('../../components/Alert/Alert.cjs');
71
68
  var useCountdown = require('../../utils/hooks/useCountdown/useCountdown.cjs');
72
69
  var useOnUnmount = require('../../utils/hooks/useOnUnmount/useOnUnmount.cjs');
@@ -82,6 +79,7 @@ var EmailVerificationContext = require('../../context/EmailVerificationContext/E
82
79
  const SECONDS_TO_RETRY = 15;
83
80
  const sleepToShowSuccessMessage = () => utils.sleep(1500);
84
81
  const EmailVerification = () => {
82
+ var _a, _b;
85
83
  const [hideRetryButton, setHideRetryButton] = React.useState(false);
86
84
  const [retried, setRetried] = React.useState(false);
87
85
  const [showTransferMessage, setShowTransferMessage] = React.useState(false);
@@ -95,7 +93,7 @@ const EmailVerification = () => {
95
93
  const { view, setView, goToInitialView } = ViewContext.useViewContext();
96
94
  const { error, setError, setErrorMessage } = ErrorContext.useErrorContext();
97
95
  const { setExistentAccountData } = AccountExistsContext.useAccountExistsContext();
98
- const { environmentId, onboardingOnlyJwt, handleLogOut, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, setIsVerificationInProgress, isVerificationInProgress, projectSettings, } = useInternalDynamicContext.useInternalDynamicContext();
96
+ const { environmentId, onboardingOnlyJwt, handleLogOut, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, setIsVerificationInProgress, projectSettings, } = useInternalDynamicContext.useInternalDynamicContext();
99
97
  const { email, verificationUUID, setVerificationUUID } = EmailVerificationContext.useEmailVerificationContext();
100
98
  const { loading, setLoading } = LoadingContext.useLoadingContext();
101
99
  const { createEmbeddedWallet } = useEmbeddedWallet.useEmbeddedWallet();
@@ -121,13 +119,8 @@ const EmailVerification = () => {
121
119
  const isLoginView = view === 'login-with-email-verification';
122
120
  const { verifyEmail } = useEmailVerificationRequest.useEmailVerificationRequest();
123
121
  const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback.useCreateUserProfileByJWTCallback();
124
- const close$1 = () => {
125
- setShowAuthFlow(false);
126
- if (isVerificationInProgress)
127
- setIsVerificationInProgress(false);
128
- };
129
122
  const handleComplete = React.useCallback((verificationToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
130
- var _a;
123
+ var _c;
131
124
  setError(undefined);
132
125
  setLoading(true);
133
126
  if (!verificationUUID || (!authToken && !onboardingOnlyJwt)) {
@@ -148,7 +141,7 @@ const EmailVerification = () => {
148
141
  try {
149
142
  // this function will check turnkey wallet enabled and create wallet if needed
150
143
  // if not enabled, it will throw an error.
151
- if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation) {
144
+ if ((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.automaticEmbeddedWalletCreation) {
152
145
  yield createEmbeddedWallet();
153
146
  }
154
147
  }
@@ -179,13 +172,14 @@ const EmailVerification = () => {
179
172
  verifyEmail,
180
173
  setOnboardingOnlyJwt,
181
174
  setCallback,
175
+ (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation,
182
176
  createEmbeddedWallet,
183
177
  setShowAuthFlow,
184
178
  setErrorMessage,
185
179
  setView,
186
180
  ]);
187
181
  const handleEmailLogin = React.useCallback((verificationToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
188
- var _b;
182
+ var _d;
189
183
  setError(undefined);
190
184
  setLoading(true);
191
185
  if (!verificationUUID) {
@@ -219,7 +213,7 @@ const EmailVerification = () => {
219
213
  try {
220
214
  // this function will check turnkey wallet enabled and create wallet if needed
221
215
  // if not enabled, it will throw an error.
222
- if ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation) {
216
+ if ((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.automaticEmbeddedWalletCreation) {
223
217
  yield createEmbeddedWallet();
224
218
  }
225
219
  }
@@ -252,6 +246,7 @@ const EmailVerification = () => {
252
246
  createUserProfileByJWT,
253
247
  setOnboardingOnlyJwt,
254
248
  setView,
249
+ (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation,
255
250
  createEmbeddedWallet,
256
251
  setShowAuthFlow,
257
252
  setErrorMessage,
@@ -292,14 +287,13 @@ const EmailVerification = () => {
292
287
  callCallbackOnUnmount.current = false;
293
288
  setView('update-email');
294
289
  };
295
- const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { onClick: close$1, type: 'button', "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
296
290
  const EmailIcon = React.useMemo(() => {
297
291
  const EmailIcon = (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signInWithEmail.ReactComponent, Object.assign({}, props)) }));
298
292
  return EmailIcon;
299
293
  }, []);
300
- return (jsxRuntime.jsxs("div", { className: 'email-verification__container', children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, className: 'email-verification__error-message', children: error })), showTransferMessage && (jsxRuntime.jsx("div", { className: 'email-verification__transfer-message', children: "Verification complete, the email is now verified to this account." })), jsxRuntime.jsx(ModalHeader.ModalHeader, { style: { paddingBlock: 0 }, trailing: !isLoginView && closeButton, children: isValidated ? (jsxRuntime.jsx("div", { className: 'email-verification__icon-container', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 50, InnerIcon: check.ReactComponent }) })) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { className: classNames.classNames({
301
- 'email-verification__icon-with-spinner': Boolean(!error),
302
- }), Icon: EmailIcon, iconSize: 80, isSpinning: true })) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary', children: "Confirm verification code" }), jsxRuntime.jsxs("div", { className: 'email-verification__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) })] }), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, children: "Edit email" })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: ["Re-send code in ", remainingSeconds] }), jsxRuntime.jsxs("span", { className: 'email-verification__retry-container', children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', children: "Code sent" })] })] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'secondary', children: "Did not receive your code yet?" }), jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), children: "Re-send code" })] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, children: "Log out" })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] }));
294
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, className: 'email-verification__error-message', children: error })), jsxRuntime.jsxs("div", { className: classNames.classNames('email-verification__container', {
295
+ 'email-verification__container--error': Boolean(error),
296
+ }), children: [showTransferMessage && (jsxRuntime.jsx("div", { className: 'email-verification__transfer-message', children: "Verification complete, the email is now verified to this account." })), isValidated ? (jsxRuntime.jsx("div", { className: 'email-verification__icon-container', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 64, InnerIcon: check.ReactComponent }) })) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: true, className: 'email-verification__icon-with-spinner' })), jsxRuntime.jsxs("div", { className: 'email-verification__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: "We\u2019ve sent a verification code to" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) })] }), !isLoginView && !isValidated && (jsxRuntime.jsx(TextButton.TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, children: "Edit email" })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'email-verification__retry-text', children: ["Re-send code in ", remainingSeconds] }), jsxRuntime.jsxs("span", { className: 'email-verification__retry-container', children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', children: "Code sent" })] })] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { className: 'email-verification__retry-copy', variant: 'body_small', weight: 'medium', color: 'secondary', children: "Did not receive your code yet?" }), jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), children: "Re-send code" })] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, children: "Log out" }))] })] }));
303
297
  };
304
298
 
305
299
  exports.EmailVerification = EmailVerification;