@dynamic-labs/sdk-react-core 3.0.0-alpha.37 → 3.0.0-alpha.39
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 +19 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/EmailForm/EmailForm.cjs +1 -1
- package/src/lib/components/EmailForm/EmailForm.js +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -1
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +3 -2
- package/src/lib/components/UserProfile/UserProfile.js +3 -2
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +112 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.d.ts +2 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +108 -0
- package/src/lib/components/UserProfile/parts/EditProfileButton/index.d.ts +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.d.ts +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -2
- 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/components/index.d.ts +1 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +22 -12
- package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +1 -4
- package/src/lib/context/CaptchaContext/CaptchaContext.js +23 -12
- package/src/lib/data/api/mfa/mfa.cjs +2 -1
- package/src/lib/data/api/mfa/mfa.d.ts +2 -1
- package/src/lib/data/api/mfa/mfa.js +2 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +41 -3
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +42 -4
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +39 -7
- package/src/lib/locale/en/translation.d.ts +37 -5
- package/src/lib/locale/en/translation.js +39 -7
- package/src/lib/shared/assets/authenticator.cjs +54 -0
- package/src/lib/shared/assets/authenticator.js +30 -0
- package/src/lib/shared/assets/currency.cjs +70 -0
- package/src/lib/shared/assets/currency.js +46 -0
- package/src/lib/shared/assets/index.d.ts +9 -0
- package/src/lib/shared/assets/profile-outline.cjs +54 -0
- package/src/lib/shared/assets/profile-outline.js +30 -0
- package/src/lib/shared/assets/profile.cjs +65 -0
- package/src/lib/shared/assets/profile.js +41 -0
- package/src/lib/shared/assets/settings-outline.cjs +54 -0
- package/src/lib/shared/assets/settings-outline.js +30 -0
- package/src/lib/shared/assets/settings.cjs +54 -0
- package/src/lib/shared/assets/settings.js +30 -0
- package/src/lib/shared/assets/shield.cjs +59 -0
- package/src/lib/shared/assets/shield.js +35 -0
- package/src/lib/shared/assets/wallet-outline-v2.cjs +54 -0
- package/src/lib/shared/assets/wallet-outline-v2.js +30 -0
- package/src/lib/shared/assets/wallet.cjs +52 -0
- package/src/lib/shared/assets/wallet.js +28 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +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/hooks/useMfa/useMfa.cjs +2 -1
- package/src/lib/utils/hooks/useMfa/useMfa.d.ts +1 -1
- package/src/lib/utils/hooks/useMfa/useMfa.js +2 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +2 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +1 -1
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +1 -1
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +1 -1
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -1
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +1 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +1 -1
- package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.cjs +1 -4
- package/src/lib/views/FarcasterQrCodeView/FarcasterQrCodeView.js +1 -4
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +3 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +3 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -2
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -2
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -1
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
- package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +2 -2
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +2 -2
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +15 -15
- package/src/lib/views/MfaVerificationView/MfaVerificationView.d.ts +2 -1
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +15 -15
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -1
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -1
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -1
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -1
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/views/viewToComponentMap.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +16 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.d.ts +13 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +12 -0
- package/src/lib/widgets/DynamicWidget/components/BottomNavBar/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +23 -45
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +24 -46
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +14 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +14 -3
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +15 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +15 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +6 -3
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +128 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +4 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +123 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.cjs +109 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/UserDeviceTile.js +105 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -105
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -106
- package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.cjs → SettingsView/SettingsView.cjs} +35 -25
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/{WalletSettingsView/WalletSettingsView.js → SettingsView/SettingsView.js} +36 -26
- package/src/lib/widgets/DynamicWidget/views/SettingsView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -15
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -15
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/index.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.39](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.38...v3.0.0-alpha.39) (2024-08-09)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add MFA settings ([e5a5755](https://github.com/dynamic-labs/DynamicAuth/commit/e5a5755a6349d3076c0e4fb8bab0853784bef9cc))
|
|
8
|
+
|
|
9
|
+
## [3.0.0-alpha.38](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.37...v3.0.0-alpha.38) (2024-08-09)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add dynamic footer options switcher ([#6528](https://github.com/dynamic-labs/DynamicAuth/issues/6528)) ([7d8a7ff](https://github.com/dynamic-labs/DynamicAuth/commit/7d8a7ff5c7d07e3ac2a916bd8b37e87e7cbfdaa2))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* hcaptcha for mobile login ([#6525](https://github.com/dynamic-labs/DynamicAuth/issues/6525)) ([146888e](https://github.com/dynamic-labs/DynamicAuth/commit/146888e91add7f3be3ed4defafc038107648c20a))
|
|
20
|
+
|
|
2
21
|
## [3.0.0-alpha.37](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.36...v3.0.0-alpha.37) (2024-08-08)
|
|
3
22
|
|
|
4
23
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.39",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"react-i18next": "13.5.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
19
|
"react-international-phone": "4.2.5",
|
|
20
|
-
"@dynamic-labs/iconic": "3.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/message-transport": "3.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "3.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "3.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/store": "3.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
20
|
+
"@dynamic-labs/iconic": "3.0.0-alpha.39",
|
|
21
|
+
"@dynamic-labs/logger": "3.0.0-alpha.39",
|
|
22
|
+
"@dynamic-labs/message-transport": "3.0.0-alpha.39",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "3.0.0-alpha.39",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "3.0.0-alpha.39",
|
|
25
|
+
"@dynamic-labs/store": "3.0.0-alpha.39",
|
|
26
|
+
"@dynamic-labs/types": "3.0.0-alpha.39",
|
|
27
|
+
"@dynamic-labs/utils": "3.0.0-alpha.39",
|
|
28
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.39",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.39",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -62,8 +62,8 @@ require('react-focus-lock');
|
|
|
62
62
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
63
63
|
require('../IconButton/IconButton.cjs');
|
|
64
64
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
65
|
-
require('formik');
|
|
66
65
|
var TypographyButton = require('../TypographyButton/TypographyButton.cjs');
|
|
66
|
+
require('formik');
|
|
67
67
|
require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
68
68
|
var Input = require('../Input/Input.cjs');
|
|
69
69
|
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
@@ -58,8 +58,8 @@ import 'react-focus-lock';
|
|
|
58
58
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
59
59
|
import '../IconButton/IconButton.js';
|
|
60
60
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
61
|
-
import 'formik';
|
|
62
61
|
import { TypographyButton } from '../TypographyButton/TypographyButton.js';
|
|
62
|
+
import 'formik';
|
|
63
63
|
import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
64
64
|
import { Input } from '../Input/Input.js';
|
|
65
65
|
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -66,8 +66,8 @@ var useWalletDownloadLinks = require('../../../widgets/DynamicWidget/hooks/useWa
|
|
|
66
66
|
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
67
67
|
require('../../IconButton/IconButton.cjs');
|
|
68
68
|
require('../../MenuList/Dropdown/Dropdown.cjs');
|
|
69
|
-
require('formik');
|
|
70
69
|
var TypographyButton = require('../../TypographyButton/TypographyButton.cjs');
|
|
70
|
+
require('formik');
|
|
71
71
|
require('../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
72
72
|
require('../../Input/Input.cjs');
|
|
73
73
|
require('../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
@@ -62,8 +62,8 @@ import { useWalletDownloadLinks } from '../../../widgets/DynamicWidget/hooks/use
|
|
|
62
62
|
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
63
63
|
import '../../IconButton/IconButton.js';
|
|
64
64
|
import '../../MenuList/Dropdown/Dropdown.js';
|
|
65
|
-
import 'formik';
|
|
66
65
|
import { TypographyButton } from '../../TypographyButton/TypographyButton.js';
|
|
66
|
+
import 'formik';
|
|
67
67
|
import '../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
68
68
|
import '../../Input/Input.js';
|
|
69
69
|
import '../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -73,6 +73,7 @@ var ErrorContainer = require('../ErrorContainer/ErrorContainer.cjs');
|
|
|
73
73
|
var UserProfileField = require('./parts/UserProfileField/UserProfileField.cjs');
|
|
74
74
|
var UserProfileSection = require('./parts/UserProfileSection/UserProfileSection.cjs');
|
|
75
75
|
var UserProfileSocialAccount = require('./parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs');
|
|
76
|
+
var EditProfileButton = require('./parts/EditProfileButton/EditProfileButton.cjs');
|
|
76
77
|
require('formik');
|
|
77
78
|
var TypographyButton = require('../TypographyButton/TypographyButton.cjs');
|
|
78
79
|
require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
@@ -81,12 +82,12 @@ require('../Input/Input.cjs');
|
|
|
81
82
|
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
82
83
|
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
83
84
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
85
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
84
86
|
require('../../../polyfills.cjs');
|
|
85
87
|
require('../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
86
88
|
require('../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
87
89
|
require('../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
|
|
88
90
|
require('../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
89
|
-
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
90
91
|
require('../IsBrowser/IsBrowser.cjs');
|
|
91
92
|
require('../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
|
|
92
93
|
require('../../context/FundingContext/FundingContext.cjs');
|
|
@@ -137,7 +138,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
137
138
|
// if it's multiwallet, the wallet should appear in the wallets tab
|
|
138
139
|
// if there's a primary wallet, it will be displayed in the header
|
|
139
140
|
const wallet = !multiWallet && !primaryWallet && userWallets[0];
|
|
140
|
-
return (jsxRuntime.jsxs("div", { "data-testid": 'userProfile', className: classNames.classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), wallet && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.my_wallet.title'), children: jsxRuntime.jsx(Wallet.Wallet, { ens: (_a = getWalletVerifiedCredential.getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id) })), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.my_information.title'), children: jsxRuntime.jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name, validationType, type, label }) => {
|
|
141
|
+
return (jsxRuntime.jsxs("div", { "data-testid": 'userProfile', className: classNames.classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), wallet && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.my_wallet.title'), children: jsxRuntime.jsx(Wallet.Wallet, { ens: (_a = getWalletVerifiedCredential.getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id) })), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, { title: t('dyn_user_profile.my_information.title'), action: jsxRuntime.jsx(EditProfileButton.EditProfileButton, {}), children: jsxRuntime.jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name, validationType, type, label }) => {
|
|
141
142
|
var _a, _b;
|
|
142
143
|
if (type === sdkApiCore.KycFieldType.Custom) {
|
|
143
144
|
const value = (_b = (_a = user.metadata) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : '';
|
|
@@ -69,6 +69,7 @@ import { ErrorContainer } from '../ErrorContainer/ErrorContainer.js';
|
|
|
69
69
|
import { UserProfileField } from './parts/UserProfileField/UserProfileField.js';
|
|
70
70
|
import { UserProfileSection } from './parts/UserProfileSection/UserProfileSection.js';
|
|
71
71
|
import { UserProfileSocialAccount } from './parts/UserProfileSocialAccount/UserProfileSocialAccount.js';
|
|
72
|
+
import { EditProfileButton } from './parts/EditProfileButton/EditProfileButton.js';
|
|
72
73
|
import 'formik';
|
|
73
74
|
import { TypographyButton } from '../TypographyButton/TypographyButton.js';
|
|
74
75
|
import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
@@ -77,12 +78,12 @@ import '../Input/Input.js';
|
|
|
77
78
|
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
78
79
|
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
79
80
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
81
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
80
82
|
import '../../../polyfills.js';
|
|
81
83
|
import '../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
82
84
|
import '../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
83
85
|
import '../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
|
|
84
86
|
import '../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
85
|
-
import '../MenuList/Dropdown/Dropdown.js';
|
|
86
87
|
import '../IsBrowser/IsBrowser.js';
|
|
87
88
|
import '../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
|
|
88
89
|
import '../../context/FundingContext/FundingContext.js';
|
|
@@ -133,7 +134,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
133
134
|
// if it's multiwallet, the wallet should appear in the wallets tab
|
|
134
135
|
// if there's a primary wallet, it will be displayed in the header
|
|
135
136
|
const wallet = !multiWallet && !primaryWallet && userWallets[0];
|
|
136
|
-
return (jsxs("div", { "data-testid": 'userProfile', className: classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsx(ErrorContainer, { children: error }), wallet && (jsx(UserProfileSection, { title: t('dyn_user_profile.my_wallet.title'), children: jsx(Wallet, { ens: (_a = getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id) })), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsx(UserProfileSection, { title: t('dyn_user_profile.my_information.title'), children: jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name, validationType, type, label }) => {
|
|
137
|
+
return (jsxs("div", { "data-testid": 'userProfile', className: classNames('user-profile', rootClassName), ref: containerRef, children: [error && jsx(ErrorContainer, { children: error }), wallet && (jsx(UserProfileSection, { title: t('dyn_user_profile.my_wallet.title'), children: jsx(Wallet, { ens: (_a = getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id) })), (allUserFields === null || allUserFields === void 0 ? void 0 : allUserFields.length) > 0 && (jsx(UserProfileSection, { title: t('dyn_user_profile.my_information.title'), action: jsx(EditProfileButton, {}), children: jsx("div", { className: 'user-profile__fields', children: allUserFields.map(({ name, validationType, type, label }) => {
|
|
137
138
|
var _a, _b;
|
|
138
139
|
if (type === KycFieldType.Custom) {
|
|
139
140
|
const value = (_b = (_a = user.metadata) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : '';
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
require('react');
|
|
9
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
10
|
+
require('@dynamic-labs/sdk-api-core');
|
|
11
|
+
require('../../../../shared/logger.cjs');
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
15
|
+
var pencil = require('../../../../shared/assets/pencil.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-book');
|
|
17
|
+
require('../../../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../../../utils/constants/values.cjs');
|
|
19
|
+
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
20
|
+
require('../../../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
21
|
+
require('@dynamic-labs/utils');
|
|
22
|
+
require('../../../../shared/consts/index.cjs');
|
|
23
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
24
|
+
require('../../../../../../_virtual/_tslib.cjs');
|
|
25
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
26
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
|
+
require('@dynamic-labs/multi-wallet');
|
|
28
|
+
require('react-international-phone');
|
|
29
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
30
|
+
require('@dynamic-labs/store');
|
|
31
|
+
require('../../../../locale/locale.cjs');
|
|
32
|
+
var getUserProfileFields = require('../../../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
33
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
35
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
36
|
+
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
37
|
+
require('react-dom');
|
|
38
|
+
require('../../../../context/WalletContext/WalletContext.cjs');
|
|
39
|
+
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
40
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
41
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
42
|
+
require('@dynamic-labs/types');
|
|
43
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
44
|
+
require('yup');
|
|
45
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
46
|
+
require('../../../../views/CollectUserDataView/useFields.cjs');
|
|
47
|
+
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
48
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
49
|
+
require('@dynamic-labs/rpc-providers');
|
|
50
|
+
require('../../../Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
51
|
+
require('../../../Alert/Alert.cjs');
|
|
52
|
+
var TypographyButton = require('../../../TypographyButton/TypographyButton.cjs');
|
|
53
|
+
require('../../../ShadowDOM/ShadowDOM.cjs');
|
|
54
|
+
require('../../../IconButton/IconButton.cjs');
|
|
55
|
+
require('../../../InlineWidget/InlineWidget.cjs');
|
|
56
|
+
require('../../../Input/Input.cjs');
|
|
57
|
+
require('../../../IsBrowser/IsBrowser.cjs');
|
|
58
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
59
|
+
require('../../../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
60
|
+
require('../../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
61
|
+
require('../../../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
62
|
+
require('../../../OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
63
|
+
require('../../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
64
|
+
require('../../../Popper/Popper/Popper.cjs');
|
|
65
|
+
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
66
|
+
require('react-focus-lock');
|
|
67
|
+
require('qrcode');
|
|
68
|
+
require('formik');
|
|
69
|
+
require('../../../../views/WalletList/WalletList.cjs');
|
|
70
|
+
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
71
|
+
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
72
|
+
require('@hcaptcha/react-hcaptcha');
|
|
73
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
74
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
75
|
+
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
76
|
+
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
77
|
+
require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
78
|
+
var DynamicWidgetContext = require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
79
|
+
require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
80
|
+
require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
81
|
+
require('../../../../../polyfills.cjs');
|
|
82
|
+
require('../../../../context/ErrorBoundary/ErrorBoundaryBase.cjs');
|
|
83
|
+
require('../../../../context/ErrorBoundary/ErrorBoundaryContext.cjs');
|
|
84
|
+
require('../../../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs');
|
|
85
|
+
require('../../../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
86
|
+
require('../../../../context/WidgetRegistry/WidgetRegistryContextProvider.cjs');
|
|
87
|
+
require('../../../../context/FundingContext/FundingContext.cjs');
|
|
88
|
+
require('../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
89
|
+
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
90
|
+
require('../../../../context/ConnectWithOtpContext/constants.cjs');
|
|
91
|
+
require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs');
|
|
92
|
+
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
93
|
+
|
|
94
|
+
const EditProfileButton = () => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
const { t } = reactI18next.useTranslation();
|
|
97
|
+
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
98
|
+
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
99
|
+
// Allow to navigate to edit profile view when there are fields what can be edited
|
|
100
|
+
const editableUserFields = getUserProfileFields.getEditableUserProfileFields([
|
|
101
|
+
...((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc) !== null && _a !== void 0 ? _a : []),
|
|
102
|
+
...((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.customFields) !== null && _b !== void 0 ? _b : []),
|
|
103
|
+
]);
|
|
104
|
+
if (!(editableUserFields === null || editableUserFields === void 0 ? void 0 : editableUserFields.length))
|
|
105
|
+
return null;
|
|
106
|
+
return (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
|
|
107
|
+
color: 'secondary',
|
|
108
|
+
variant: 'button_tertiary',
|
|
109
|
+
}, copykey: 'dyn_user_profile.edit_profile_button', onClick: () => setDynamicWidgetView('edit-profile'), startSlot: jsxRuntime.jsx(pencil.ReactComponent, {}), children: t('dyn_user_profile.edit_profile_button') }));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
exports.EditProfileButton = EditProfileButton;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
6
|
+
import '@dynamic-labs/sdk-api-core';
|
|
7
|
+
import '../../../../shared/logger.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
11
|
+
import { ReactComponent as SvgPencil } from '../../../../shared/assets/pencil.js';
|
|
12
|
+
import '@dynamic-labs/wallet-book';
|
|
13
|
+
import '../../../../utils/constants/colors.js';
|
|
14
|
+
import '../../../../utils/constants/values.js';
|
|
15
|
+
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
16
|
+
import '../../../../shared/utils/classes/storage/sessionStorage.js';
|
|
17
|
+
import '@dynamic-labs/utils';
|
|
18
|
+
import '../../../../shared/consts/index.js';
|
|
19
|
+
import '../../../../events/dynamicEvents.js';
|
|
20
|
+
import '../../../../../../_virtual/_tslib.js';
|
|
21
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
22
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
23
|
+
import '@dynamic-labs/multi-wallet';
|
|
24
|
+
import 'react-international-phone';
|
|
25
|
+
import '../../../../config/ApiEndpoint.js';
|
|
26
|
+
import '@dynamic-labs/store';
|
|
27
|
+
import '../../../../locale/locale.js';
|
|
28
|
+
import { getEditableUserProfileFields } from '../../../../utils/functions/getUserProfileFields/getUserProfileFields.js';
|
|
29
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
31
|
+
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
32
|
+
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
33
|
+
import 'react-dom';
|
|
34
|
+
import '../../../../context/WalletContext/WalletContext.js';
|
|
35
|
+
import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
36
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
37
|
+
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
38
|
+
import '@dynamic-labs/types';
|
|
39
|
+
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
40
|
+
import 'yup';
|
|
41
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
42
|
+
import '../../../../views/CollectUserDataView/useFields.js';
|
|
43
|
+
import '../../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
44
|
+
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
45
|
+
import '@dynamic-labs/rpc-providers';
|
|
46
|
+
import '../../../Accordion/components/AccordionItem/AccordionItem.js';
|
|
47
|
+
import '../../../Alert/Alert.js';
|
|
48
|
+
import { TypographyButton } from '../../../TypographyButton/TypographyButton.js';
|
|
49
|
+
import '../../../ShadowDOM/ShadowDOM.js';
|
|
50
|
+
import '../../../IconButton/IconButton.js';
|
|
51
|
+
import '../../../InlineWidget/InlineWidget.js';
|
|
52
|
+
import '../../../Input/Input.js';
|
|
53
|
+
import '../../../IsBrowser/IsBrowser.js';
|
|
54
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
55
|
+
import '../../../Transition/ZoomTransition/ZoomTransition.js';
|
|
56
|
+
import '../../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
57
|
+
import '../../../Transition/OpacityTransition/OpacityTransition.js';
|
|
58
|
+
import '../../../OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
59
|
+
import '../../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
60
|
+
import '../../../Popper/Popper/Popper.js';
|
|
61
|
+
import '../../../Popper/PopperContext/PopperContext.js';
|
|
62
|
+
import 'react-focus-lock';
|
|
63
|
+
import 'qrcode';
|
|
64
|
+
import 'formik';
|
|
65
|
+
import '../../../../views/WalletList/WalletList.js';
|
|
66
|
+
import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
67
|
+
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
68
|
+
import '@hcaptcha/react-hcaptcha';
|
|
69
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
70
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
71
|
+
import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
72
|
+
import '../../../../context/PasskeyContext/PasskeyContext.js';
|
|
73
|
+
import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
74
|
+
import { useWidgetContext } from '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
75
|
+
import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
76
|
+
import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
77
|
+
import '../../../../../polyfills.js';
|
|
78
|
+
import '../../../../context/ErrorBoundary/ErrorBoundaryBase.js';
|
|
79
|
+
import '../../../../context/ErrorBoundary/ErrorBoundaryContext.js';
|
|
80
|
+
import '../../../../widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js';
|
|
81
|
+
import '../../../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
82
|
+
import '../../../../context/WidgetRegistry/WidgetRegistryContextProvider.js';
|
|
83
|
+
import '../../../../context/FundingContext/FundingContext.js';
|
|
84
|
+
import '../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
85
|
+
import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
86
|
+
import '../../../../context/ConnectWithOtpContext/constants.js';
|
|
87
|
+
import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
88
|
+
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
89
|
+
|
|
90
|
+
const EditProfileButton = () => {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
const { t } = useTranslation();
|
|
93
|
+
const { projectSettings } = useInternalDynamicContext();
|
|
94
|
+
const { setDynamicWidgetView } = useWidgetContext();
|
|
95
|
+
// Allow to navigate to edit profile view when there are fields what can be edited
|
|
96
|
+
const editableUserFields = getEditableUserProfileFields([
|
|
97
|
+
...((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc) !== null && _a !== void 0 ? _a : []),
|
|
98
|
+
...((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.customFields) !== null && _b !== void 0 ? _b : []),
|
|
99
|
+
]);
|
|
100
|
+
if (!(editableUserFields === null || editableUserFields === void 0 ? void 0 : editableUserFields.length))
|
|
101
|
+
return null;
|
|
102
|
+
return (jsx(TypographyButton, { buttonClassName: 'dynamic-widget-footer__button', buttonVariant: 'tertiary', buttonPadding: 'none', typographyProps: {
|
|
103
|
+
color: 'secondary',
|
|
104
|
+
variant: 'button_tertiary',
|
|
105
|
+
}, copykey: 'dyn_user_profile.edit_profile_button', onClick: () => setDynamicWidgetView('edit-profile'), startSlot: jsx(SvgPencil, {}), children: t('dyn_user_profile.edit_profile_button') }));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export { EditProfileButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EditProfileButton } from './EditProfileButton';
|
|
@@ -88,6 +88,6 @@ require('../../../../context/ReinitializeContext/ReinitializeContextProvider.cjs
|
|
|
88
88
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
89
89
|
require('qrcode');
|
|
90
90
|
|
|
91
|
-
const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", { className: 'user-profile-section', children: [title && (jsxRuntime.jsx(Typography.Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title })), children] }));
|
|
91
|
+
const UserProfileSection = ({ title, children, action, }) => (jsxRuntime.jsxs("div", { className: 'user-profile-section', children: [jsxRuntime.jsx("div", { className: 'user-profile-section__header', children: title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title }), action && (jsxRuntime.jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
|
|
92
92
|
|
|
93
93
|
exports.UserProfileSection = UserProfileSection;
|
|
@@ -2,5 +2,6 @@ import React from 'react';
|
|
|
2
2
|
export type UserProfileSectionProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
title?: string;
|
|
5
|
+
action?: React.ReactNode;
|
|
5
6
|
};
|
|
6
|
-
export declare const UserProfileSection: ({ title, children, }: UserProfileSectionProps) => JSX.Element;
|
|
7
|
+
export declare const UserProfileSection: ({ title, children, action, }: UserProfileSectionProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import '../../../Accordion/components/AccordionItem/AccordionItem.js';
|
|
4
4
|
import '../../../Alert/Alert.js';
|
|
5
5
|
import 'react';
|
|
@@ -84,6 +84,6 @@ import '../../../../context/ReinitializeContext/ReinitializeContextProvider.js';
|
|
|
84
84
|
import '../../../InlineWidget/InlineWidget.js';
|
|
85
85
|
import 'qrcode';
|
|
86
86
|
|
|
87
|
-
const UserProfileSection = ({ title, children, }) => (jsxs("div", { className: 'user-profile-section', children: [title && (jsx(Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title })), children] }));
|
|
87
|
+
const UserProfileSection = ({ title, children, action, }) => (jsxs("div", { className: 'user-profile-section', children: [jsx("div", { className: 'user-profile-section__header', children: title && (jsxs(Fragment, { children: [jsx(Typography, { as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title', children: title }), action && (jsx("div", { className: 'user-profile-section__action', children: action }))] })) }), children] }));
|
|
88
88
|
|
|
89
89
|
export { UserProfileSection };
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -69,8 +69,8 @@ require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
|
69
69
|
require('../../../IconButton/IconButton.cjs');
|
|
70
70
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
71
71
|
var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
|
|
72
|
-
require('formik');
|
|
73
72
|
var TypographyButton = require('../../../TypographyButton/TypographyButton.cjs');
|
|
73
|
+
require('formik');
|
|
74
74
|
require('../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
75
75
|
require('../../../Input/Input.cjs');
|
|
76
76
|
require('../../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -65,8 +65,8 @@ import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
|
65
65
|
import '../../../IconButton/IconButton.js';
|
|
66
66
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
67
67
|
import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
|
|
68
|
-
import 'formik';
|
|
69
68
|
import { TypographyButton } from '../../../TypographyButton/TypographyButton.js';
|
|
69
|
+
import 'formik';
|
|
70
70
|
import '../../../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
71
71
|
import '../../../Input/Input.js';
|
|
72
72
|
import '../../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
@@ -34,7 +34,6 @@ export * from './ModalHeader';
|
|
|
34
34
|
export * from './ModalHeaderBanner';
|
|
35
35
|
export * from './NeedHelpSection';
|
|
36
36
|
export * from './OTPVerificationView';
|
|
37
|
-
export * from './OptionsSwitcher';
|
|
38
37
|
export * from './PasskeyCreatedSuccessBanner';
|
|
39
38
|
export * from './PhoneNumberField';
|
|
40
39
|
export * from './PinField';
|
|
@@ -71,3 +70,4 @@ export * from './TypographyButton';
|
|
|
71
70
|
export * from './WalletInformationCard';
|
|
72
71
|
export * from './EmailForm';
|
|
73
72
|
export * from './StatusDot';
|
|
73
|
+
export * from './OptionsSwitcher';
|
|
@@ -6,37 +6,48 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var ViewContext = require('../ViewContext/ViewContext.cjs');
|
|
9
|
+
require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
require('../../shared/logger.cjs');
|
|
11
|
+
require('@dynamic-labs/iconic');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
|
+
require('@dynamic-labs/wallet-book');
|
|
14
|
+
var localStorage = require('../../utils/constants/localStorage.cjs');
|
|
15
|
+
require('../../utils/constants/colors.cjs');
|
|
16
|
+
require('../../utils/constants/values.cjs');
|
|
17
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
18
|
+
require('../../shared/utils/classes/storage/sessionStorage.cjs');
|
|
19
|
+
var useLocalStorage = require('../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
20
|
+
require('@dynamic-labs/utils');
|
|
21
|
+
require('../../shared/consts/index.cjs');
|
|
9
22
|
|
|
10
|
-
const CaptchaTokenLocalStorageKey = 'dynamic-captcha-token';
|
|
11
23
|
const CaptchaContext = React.createContext(undefined);
|
|
12
24
|
const CaptchaContextProvider = ({ children, }) => {
|
|
13
25
|
const { setView } = ViewContext.useViewContext();
|
|
14
|
-
const [captchaToken, setCaptchaToken] =
|
|
26
|
+
const [captchaToken, setCaptchaToken, removeCaptchaToken] = useLocalStorage.useLocalStorage(localStorage.CAPTCHA_TOKEN, undefined);
|
|
15
27
|
const [captchaAuthState, setCaptchaAuthState] = React.useState();
|
|
16
|
-
const setCaptchaTokenInLS = React.useCallback((token) => localStorage.setItem(CaptchaTokenLocalStorageKey, token), []);
|
|
17
28
|
const engageCaptcha = React.useCallback(({ authMethod, onCaptchaSuccess, }) => {
|
|
18
29
|
setCaptchaAuthState({ authMethod, onCaptchaSuccess });
|
|
19
30
|
setView('captcha');
|
|
20
31
|
}, [setView, setCaptchaAuthState]);
|
|
21
32
|
const getCaptchaToken = React.useCallback(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
const token = captchaToken;
|
|
34
|
+
removeCaptchaToken();
|
|
35
|
+
return token;
|
|
36
|
+
}, [captchaToken, removeCaptchaToken]);
|
|
25
37
|
const value = React.useMemo(() => ({
|
|
26
38
|
captchaAuthState,
|
|
27
|
-
captchaToken,
|
|
28
39
|
engageCaptcha,
|
|
29
40
|
getCaptchaToken,
|
|
41
|
+
removeCaptchaToken,
|
|
30
42
|
setCaptchaAuthState,
|
|
31
43
|
setCaptchaToken,
|
|
32
|
-
setCaptchaTokenInLS,
|
|
33
44
|
}), [
|
|
34
45
|
captchaAuthState,
|
|
35
|
-
|
|
46
|
+
getCaptchaToken,
|
|
36
47
|
engageCaptcha,
|
|
37
48
|
setCaptchaAuthState,
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
setCaptchaToken,
|
|
50
|
+
removeCaptchaToken,
|
|
40
51
|
]);
|
|
41
52
|
return (jsxRuntime.jsx(CaptchaContext.Provider, { value: value, children: children }));
|
|
42
53
|
};
|
|
@@ -50,5 +61,4 @@ const useCaptchaContext = () => {
|
|
|
50
61
|
|
|
51
62
|
exports.CaptchaContext = CaptchaContext;
|
|
52
63
|
exports.CaptchaContextProvider = CaptchaContextProvider;
|
|
53
|
-
exports.CaptchaTokenLocalStorageKey = CaptchaTokenLocalStorageKey;
|
|
54
64
|
exports.useCaptchaContext = useCaptchaContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, SetStateAction, Dispatch } from 'react';
|
|
2
2
|
type CaptchaContextProps = {
|
|
3
|
-
|
|
3
|
+
getCaptchaToken: () => string | undefined;
|
|
4
4
|
setCaptchaToken: Dispatch<SetStateAction<string | undefined>>;
|
|
5
5
|
captchaAuthState: CaptchaAuthenticationState | undefined;
|
|
6
6
|
setCaptchaAuthState: Dispatch<SetStateAction<CaptchaAuthenticationState | undefined>>;
|
|
@@ -8,11 +8,8 @@ type CaptchaContextProps = {
|
|
|
8
8
|
authMethod: AuthMethod;
|
|
9
9
|
onCaptchaSuccess: (captchaToken: string) => Promise<void>;
|
|
10
10
|
}) => void;
|
|
11
|
-
setCaptchaTokenInLS: (token: string) => void;
|
|
12
|
-
getCaptchaToken: () => string | undefined;
|
|
13
11
|
};
|
|
14
12
|
export type AuthMethod = 'wallet' | 'email' | 'social' | 'phone';
|
|
15
|
-
export declare const CaptchaTokenLocalStorageKey = "dynamic-captcha-token";
|
|
16
13
|
interface CaptchaAuthenticationState {
|
|
17
14
|
authMethod: AuthMethod;
|
|
18
15
|
onCaptchaSuccess: (captchaToken: string) => Promise<void>;
|