@dynamic-labs/sdk-react-core 0.19.4 → 0.19.6
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 +26 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/index.cjs +6 -2
- package/src/index.d.ts +2 -2
- package/src/index.js +3 -1
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -1
- package/src/lib/components/Modal/Modal.cjs +1 -1
- package/src/lib/components/Modal/Modal.js +1 -1
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +85 -5
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +86 -6
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +11 -9
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +11 -9
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -1
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -1
- package/src/lib/components/Portal/Portal.cjs +1 -1
- package/src/lib/components/Portal/Portal.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +2 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +2 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -1
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +1 -1
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
- package/src/lib/components/Tooltip/Tooltip.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -1
- package/src/lib/components/UserAddress/UserAddress.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -1
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -1
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +16 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +17 -3
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +9 -11
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +10 -12
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -0
- package/src/lib/locale/en/translation.cjs +7 -3
- package/src/lib/locale/en/translation.d.ts +6 -2
- package/src/lib/locale/en/translation.js +7 -3
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.cjs +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/getProperErrorMessage.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +8 -9
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +8 -9
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +8 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +9 -2
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs +34 -5
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.d.ts +33 -1
- package/src/lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js +34 -5
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +9 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +19 -18
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +19 -18
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +32 -8
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +33 -9
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +2 -5
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +2 -5
- package/src/lib/views/LoginView/useLoginView.cjs +106 -84
- package/src/lib/views/LoginView/useLoginView.js +107 -85
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +6 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +6 -3
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -1
- package/src/lib/views/QrCodeView/QRCode.js +1 -1
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -1
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -1
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -0
- 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/DynamicNav/DynamicNav.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +7 -7
- package/src/lib/widgets/DynamicWidget/helpers/helpers.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +7 -7
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +16 -6
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +16 -6
- package/src/lib/utils/functions/getEnabledProviders/index.cjs +0 -7
- package/src/lib/utils/functions/getEnabledProviders/index.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.19.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.5...v0.19.6) (2023-12-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* better handle recovery decrypt failure ([#4148](https://github.com/dynamic-labs/DynamicAuth/issues/4148)) ([#4151](https://github.com/dynamic-labs/DynamicAuth/issues/4151)) ([30178f9](https://github.com/dynamic-labs/DynamicAuth/commit/30178f9b92dc16d9aacea385e15319a413d54ac2))
|
|
8
|
+
* detect wallet network switch for secondary wallets ([#4139](https://github.com/dynamic-labs/DynamicAuth/issues/4139)) ([7096819](https://github.com/dynamic-labs/DynamicAuth/commit/70968199485e5e1bb68dfda577085adcf262137d))
|
|
9
|
+
* make the pin input fields responsive ([#4141](https://github.com/dynamic-labs/DynamicAuth/issues/4141)) ([d8a2e0b](https://github.com/dynamic-labs/DynamicAuth/commit/d8a2e0b01db25947237f0321640a7b8916ea361f))
|
|
10
|
+
* remove last separator from email or social only login view ([#4118](https://github.com/dynamic-labs/DynamicAuth/issues/4118)) ([3bdd25c](https://github.com/dynamic-labs/DynamicAuth/commit/3bdd25ca9c97d1d88f4f62a2e80c04ed634c1ed4)), closes [#4103](https://github.com/dynamic-labs/DynamicAuth/issues/4103)
|
|
11
|
+
* render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([#4096](https://github.com/dynamic-labs/DynamicAuth/issues/4096)) ([969eef1](https://github.com/dynamic-labs/DynamicAuth/commit/969eef1616e9891a8387746dbdd87162fd111a94))
|
|
12
|
+
* reset selected social provider on logout ([164363f](https://github.com/dynamic-labs/DynamicAuth/commit/164363f1435831e911e69f522212030ff66e5474))
|
|
13
|
+
* sync wagmi when using embedded wallets in connect-only ([#4110](https://github.com/dynamic-labs/DynamicAuth/issues/4110)) ([e97da0d](https://github.com/dynamic-labs/DynamicAuth/commit/e97da0d1b8a51857f69b578adc157a2ba694be7e))
|
|
14
|
+
* update wagmi to v1.4.12 to fix ledger security issue ([#4170](https://github.com/dynamic-labs/DynamicAuth/issues/4170)) ([3ad0a17](https://github.com/dynamic-labs/DynamicAuth/commit/3ad0a171cca9d97f6a62659b75826926cd955b27))
|
|
15
|
+
|
|
16
|
+
### [0.19.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.4...v0.19.5) (2023-12-05)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* add support for embedded wallets in connect-only ([#4041](https://github.com/dynamic-labs/DynamicAuth/issues/4041)) ([#4056](https://github.com/dynamic-labs/DynamicAuth/issues/4056)) ([78f34cb](https://github.com/dynamic-labs/DynamicAuth/commit/78f34cbedf127c301997a72e058f9a4ff62badad))
|
|
22
|
+
* show full passkey name on management view ([#4057](https://github.com/dynamic-labs/DynamicAuth/issues/4057)) ([be9c65a](https://github.com/dynamic-labs/DynamicAuth/commit/be9c65a04143b7253b9b6641e153cb100f626343)), closes [#4043](https://github.com/dynamic-labs/DynamicAuth/issues/4043)
|
|
23
|
+
* make passkey recovery more easily discoverable ([#4058](https://github.com/dynamic-labs/DynamicAuth/issues/4058)) ([#4061](https://github.com/dynamic-labs/DynamicAuth/issues/4061)) ([93c4c4f](https://github.com/dynamic-labs/DynamicAuth/commit/93c4c4fb563bc723e3cd180ba44925db87b25459))
|
|
24
|
+
* fix network picker when using embedded wallet ([#4054](https://github.com/dynamic-labs/DynamicAuth/issues/4054)) ([3bac838](https://github.com/dynamic-labs/DynamicAuth/commit/3bac838d434464ab33bca0fefb0c53208014f41b))
|
|
25
|
+
* clear project settings on page refresh ([#3826](https://github.com/dynamic-labs/DynamicAuth/issues/3826)) ([#4039](https://github.com/dynamic-labs/DynamicAuth/issues/4039)) ([bfbb7b2](https://github.com/dynamic-labs/DynamicAuth/commit/bfbb7b2c3349895e0812c3e884a1e71e4ab84c58))
|
|
26
|
+
* add close button to wallets list ([#4036](https://github.com/dynamic-labs/DynamicAuth/issues/4036)) ([#4046](https://github.com/dynamic-labs/DynamicAuth/issues/4046)) ([6e4038d](https://github.com/dynamic-labs/DynamicAuth/commit/6e4038d49de5c26ceda9be723298daaef4bf8356))
|
|
27
|
+
|
|
2
28
|
### [0.19.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.3...v0.19.4) (2023-11-29)
|
|
3
29
|
|
|
4
30
|
|
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": "0.19.
|
|
3
|
+
"version": "0.19.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"react-focus-lock": "2.9.2",
|
|
18
18
|
"react-i18next": "^13.2.0",
|
|
19
19
|
"yup": "0.32.11",
|
|
20
|
-
"@dynamic-labs/ethereum": "0.19.
|
|
21
|
-
"@dynamic-labs/logger": "0.19.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "0.19.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "0.19.
|
|
24
|
-
"@dynamic-labs/types": "0.19.
|
|
25
|
-
"@dynamic-labs/utils": "0.19.
|
|
26
|
-
"@dynamic-labs/wallet-book": "0.19.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "0.19.
|
|
20
|
+
"@dynamic-labs/ethereum": "0.19.6",
|
|
21
|
+
"@dynamic-labs/logger": "0.19.6",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "0.19.6",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "0.19.6",
|
|
24
|
+
"@dynamic-labs/types": "0.19.6",
|
|
25
|
+
"@dynamic-labs/utils": "0.19.6",
|
|
26
|
+
"@dynamic-labs/wallet-book": "0.19.6",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "0.19.6",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -122,6 +122,7 @@ require('./lib/components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
|
122
122
|
require('./lib/config/ApiEndpoint.cjs');
|
|
123
123
|
require('./lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
124
124
|
var isSameWalletName = require('./lib/utils/functions/isSameWalletName/isSameWalletName.cjs');
|
|
125
|
+
var useWalletConnectorEvent = require('./lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
125
126
|
require('./lib/context/ViewContext/ViewContext.cjs');
|
|
126
127
|
require('./lib/context/ErrorContext/ErrorContext.cjs');
|
|
127
128
|
require('./lib/context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -149,12 +150,13 @@ require('formik');
|
|
|
149
150
|
require('viem');
|
|
150
151
|
require('./lib/components/IconButton/IconButton.cjs');
|
|
151
152
|
require('./lib/components/Alert/Alert.cjs');
|
|
152
|
-
var
|
|
153
|
+
var usePasskeyRecovery = require('./lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
|
|
153
154
|
require('./lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
154
155
|
var useWalletItemActions = require('./lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs');
|
|
155
156
|
var useAuthenticateConnectedUser = require('./lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs');
|
|
156
157
|
require('./lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
157
158
|
require('./lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
159
|
+
var useEmbeddedWallet = require('./lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
|
|
158
160
|
var useIsLoggedIn = require('./lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs');
|
|
159
161
|
var DynamicConnectButton = require('./lib/components/DynamicConnectButton/DynamicConnectButton.cjs');
|
|
160
162
|
require('./lib/components/Popper/Popper/Popper.cjs');
|
|
@@ -297,6 +299,7 @@ Object.defineProperty(exports, 'DynamicJwtFromJSON', {
|
|
|
297
299
|
});
|
|
298
300
|
exports.ShadowDOM = ShadowDOM.ShadowDOM;
|
|
299
301
|
exports.isSameWalletName = isSameWalletName.isSameWalletName;
|
|
302
|
+
exports.useWalletConnectorEvent = useWalletConnectorEvent.useWalletConnectorEvent;
|
|
300
303
|
exports.MockContext = MockContext.MockContext;
|
|
301
304
|
exports.MockContextProvider = MockContext.MockContextProvider;
|
|
302
305
|
exports.MockContextWrapper = MockContext.MockContextWrapper;
|
|
@@ -305,9 +308,10 @@ exports.useEmailVerificationRequest = useEmailVerificationRequest.useEmailVerifi
|
|
|
305
308
|
exports.DynamicWidgetContextProvider = DynamicWidgetContext.DynamicWidgetContextProvider;
|
|
306
309
|
exports.useSocialAccounts = useSocialAccounts.useSocialAccounts;
|
|
307
310
|
exports.useUserUpdateRequest = useUserUpdateRequest.useUserUpdateRequest;
|
|
308
|
-
exports.
|
|
311
|
+
exports.usePasskeyRecovery = usePasskeyRecovery.usePasskeyRecovery;
|
|
309
312
|
exports.useWalletItemActions = useWalletItemActions.useWalletItemActions;
|
|
310
313
|
exports.useAuthenticateConnectedUser = useAuthenticateConnectedUser.useAuthenticateConnectedUser;
|
|
314
|
+
exports.useEmbeddedWallet = useEmbeddedWallet.useEmbeddedWallet;
|
|
311
315
|
exports.useIsLoggedIn = useIsLoggedIn.useIsLoggedIn;
|
|
312
316
|
exports.DynamicConnectButton = DynamicConnectButton.DynamicConnectButton;
|
|
313
317
|
exports.WalletList = WalletList.WalletList;
|
package/src/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export { classNames } from './lib/utils/functions/classNames';
|
|
|
23
23
|
export { getNetwork } from './lib/utils/functions/getNetwork';
|
|
24
24
|
export * from './lib/utils/functions/walletFilters';
|
|
25
25
|
export { DynamicWidgetContextProvider } from './lib/widgets/DynamicWidget/context';
|
|
26
|
-
export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useIsLoggedIn, } from './lib/utils/hooks';
|
|
27
|
-
export { useUserUpdateRequest } from './lib/utils/hooks';
|
|
26
|
+
export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, usePasskeyRecovery, useIsLoggedIn, } from './lib/utils/hooks';
|
|
27
|
+
export { useUserUpdateRequest, useWalletConnectorEvent, } from './lib/utils/hooks';
|
|
28
28
|
export { type VerifyEmailCallback, useEmailVerificationRequest, } from './lib/utils/hooks/authenticationHooks/';
|
|
29
29
|
export type { UpdateUserFieldsArg } from './lib/utils/hooks/';
|
|
30
30
|
export { type DynamicJwt, DynamicJwtFromJSON } from '@dynamic-labs/sdk-api';
|
package/src/index.js
CHANGED
|
@@ -118,6 +118,7 @@ import './lib/components/Transition/OpacityTransition/OpacityTransition.js';
|
|
|
118
118
|
import './lib/config/ApiEndpoint.js';
|
|
119
119
|
import './lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
120
120
|
export { isSameWalletName } from './lib/utils/functions/isSameWalletName/isSameWalletName.js';
|
|
121
|
+
export { useWalletConnectorEvent } from './lib/utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
121
122
|
import './lib/context/ViewContext/ViewContext.js';
|
|
122
123
|
import './lib/context/ErrorContext/ErrorContext.js';
|
|
123
124
|
import './lib/context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -145,12 +146,13 @@ import 'formik';
|
|
|
145
146
|
import 'viem';
|
|
146
147
|
import './lib/components/IconButton/IconButton.js';
|
|
147
148
|
import './lib/components/Alert/Alert.js';
|
|
148
|
-
export {
|
|
149
|
+
export { usePasskeyRecovery } from './lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
|
|
149
150
|
import './lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
150
151
|
export { useWalletItemActions } from './lib/utils/hooks/useWalletItemActions/useWalletItemActions.js';
|
|
151
152
|
export { useAuthenticateConnectedUser } from './lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js';
|
|
152
153
|
import './lib/context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
153
154
|
import './lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
155
|
+
export { useEmbeddedWallet } from './lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
|
|
154
156
|
export { useIsLoggedIn } from './lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js';
|
|
155
157
|
export { DynamicConnectButton } from './lib/components/DynamicConnectButton/DynamicConnectButton.js';
|
|
156
158
|
import './lib/components/Popper/Popper/Popper.js';
|
package/src/lib/Main.cjs
CHANGED
|
@@ -51,6 +51,7 @@ require('./utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
|
51
51
|
require('./context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
52
52
|
require('./components/Popper/Popper/Popper.cjs');
|
|
53
53
|
var PopperContext = require('./components/Popper/PopperContext/PopperContext.cjs');
|
|
54
|
+
require('i18next');
|
|
54
55
|
require('./components/InlineWidget/InlineWidget.cjs');
|
|
55
56
|
require('./components/MenuList/Dropdown/Dropdown.cjs');
|
|
56
57
|
require('./components/OverlayCard/OverlayCard.context.cjs');
|
package/src/lib/Main.js
CHANGED
|
@@ -47,6 +47,7 @@ import './utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
|
47
47
|
import './context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
48
48
|
import './components/Popper/Popper/Popper.js';
|
|
49
49
|
import { PopperProvider } from './components/Popper/PopperContext/PopperContext.js';
|
|
50
|
+
import 'i18next';
|
|
50
51
|
import './components/InlineWidget/InlineWidget.js';
|
|
51
52
|
import './components/MenuList/Dropdown/Dropdown.js';
|
|
52
53
|
import './components/OverlayCard/OverlayCard.context.js';
|
|
@@ -39,6 +39,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('i18next');
|
|
42
43
|
require('../../../InlineWidget/InlineWidget.cjs');
|
|
43
44
|
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
require('../../../OverlayCard/OverlayCard.context.cjs');
|
|
@@ -51,7 +52,6 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
51
52
|
require('../../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
52
53
|
require('qrcode');
|
|
53
54
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
54
|
-
require('i18next');
|
|
55
55
|
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
56
56
|
require('../../../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
57
57
|
require('@dynamic-labs/types');
|
|
@@ -35,6 +35,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import 'i18next';
|
|
38
39
|
import '../../../InlineWidget/InlineWidget.js';
|
|
39
40
|
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
import '../../../OverlayCard/OverlayCard.context.js';
|
|
@@ -47,7 +48,6 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
47
48
|
import '../../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
48
49
|
import 'qrcode';
|
|
49
50
|
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
50
|
-
import 'i18next';
|
|
51
51
|
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
52
52
|
import '../../../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
53
53
|
import '@dynamic-labs/types';
|
|
@@ -38,6 +38,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('i18next');
|
|
41
42
|
require('../InlineWidget/InlineWidget.cjs');
|
|
42
43
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
require('../OverlayCard/OverlayCard.context.cjs');
|
|
@@ -50,7 +51,6 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
50
51
|
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
51
52
|
require('qrcode');
|
|
52
53
|
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
53
|
-
require('i18next');
|
|
54
54
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
55
55
|
require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
56
56
|
require('@dynamic-labs/types');
|
|
@@ -34,6 +34,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import 'i18next';
|
|
37
38
|
import '../InlineWidget/InlineWidget.js';
|
|
38
39
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
import '../OverlayCard/OverlayCard.context.js';
|
|
@@ -46,7 +47,6 @@ import '../../context/CaptchaContext/CaptchaContext.js';
|
|
|
46
47
|
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
47
48
|
import 'qrcode';
|
|
48
49
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
49
|
-
import 'i18next';
|
|
50
50
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
51
51
|
import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
52
52
|
import '@dynamic-labs/types';
|
|
@@ -42,6 +42,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('i18next');
|
|
45
46
|
require('../InlineWidget/InlineWidget.cjs');
|
|
46
47
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
47
48
|
require('../OverlayCard/OverlayCard.context.cjs');
|
|
@@ -54,7 +55,6 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
54
55
|
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
55
56
|
require('qrcode');
|
|
56
57
|
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
57
|
-
require('i18next');
|
|
58
58
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
59
59
|
require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
60
60
|
require('@dynamic-labs/types');
|
|
@@ -38,6 +38,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import 'i18next';
|
|
41
42
|
import '../InlineWidget/InlineWidget.js';
|
|
42
43
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
43
44
|
import '../OverlayCard/OverlayCard.context.js';
|
|
@@ -50,7 +51,6 @@ import '../../context/CaptchaContext/CaptchaContext.js';
|
|
|
50
51
|
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
51
52
|
import 'qrcode';
|
|
52
53
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
53
|
-
import 'i18next';
|
|
54
54
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
55
55
|
import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
56
56
|
import '@dynamic-labs/types';
|
|
@@ -43,6 +43,7 @@ require('../../IconButton/IconButton.cjs');
|
|
|
43
43
|
require('../../Alert/Alert.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('i18next');
|
|
46
47
|
require('../../InlineWidget/InlineWidget.cjs');
|
|
47
48
|
require('../../OverlayCard/OverlayCard.context.cjs');
|
|
48
49
|
require('../../../context/FooterAnimationContext/index.cjs');
|
|
@@ -54,7 +55,6 @@ require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
54
55
|
require('../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
55
56
|
require('qrcode');
|
|
56
57
|
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
57
|
-
require('i18next');
|
|
58
58
|
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
59
59
|
require('../../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
60
60
|
require('@dynamic-labs/types');
|
|
@@ -39,6 +39,7 @@ import '../../IconButton/IconButton.js';
|
|
|
39
39
|
import '../../Alert/Alert.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import 'i18next';
|
|
42
43
|
import '../../InlineWidget/InlineWidget.js';
|
|
43
44
|
import '../../OverlayCard/OverlayCard.context.js';
|
|
44
45
|
import '../../../context/FooterAnimationContext/index.js';
|
|
@@ -50,7 +51,6 @@ import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
50
51
|
import '../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
51
52
|
import 'qrcode';
|
|
52
53
|
import '../../../context/LoadingContext/LoadingContext.js';
|
|
53
|
-
import 'i18next';
|
|
54
54
|
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
55
55
|
import '../../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
56
56
|
import '@dynamic-labs/types';
|
|
@@ -38,6 +38,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('i18next');
|
|
41
42
|
require('../InlineWidget/InlineWidget.cjs');
|
|
42
43
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
require('../OverlayCard/OverlayCard.context.cjs');
|
|
@@ -50,7 +51,6 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
50
51
|
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
51
52
|
require('qrcode');
|
|
52
53
|
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
53
|
-
require('i18next');
|
|
54
54
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
55
55
|
require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
56
56
|
require('@dynamic-labs/types');
|
|
@@ -34,6 +34,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import 'i18next';
|
|
37
38
|
import '../InlineWidget/InlineWidget.js';
|
|
38
39
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
import '../OverlayCard/OverlayCard.context.js';
|
|
@@ -46,7 +47,6 @@ import '../../context/CaptchaContext/CaptchaContext.js';
|
|
|
46
47
|
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
47
48
|
import 'qrcode';
|
|
48
49
|
import '../../context/LoadingContext/LoadingContext.js';
|
|
49
|
-
import 'i18next';
|
|
50
50
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
51
51
|
import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
52
52
|
import '@dynamic-labs/types';
|
|
@@ -4,19 +4,99 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var reactI18next = require('react-i18next');
|
|
7
|
+
var sdkApi = require('@dynamic-labs/sdk-api');
|
|
7
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
|
+
require('react');
|
|
10
|
+
require('@dynamic-labs/utils');
|
|
11
|
+
require('../../config/ApiEndpoint.cjs');
|
|
12
|
+
require('../../shared/logger.cjs');
|
|
13
|
+
require('@dynamic-labs/iconic');
|
|
14
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
15
|
+
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
16
|
+
require('@dynamic-labs/wallet-book');
|
|
17
|
+
require('../../utils/constants/colors.cjs');
|
|
18
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
+
require('viem');
|
|
20
|
+
require('../../shared/consts/index.cjs');
|
|
21
|
+
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('@dynamic-labs/rpc-providers');
|
|
23
|
+
require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
24
|
+
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
25
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
26
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
27
|
+
require('react-dom');
|
|
8
28
|
var Typography = require('../Typography/Typography.cjs');
|
|
29
|
+
require('../ShadowDOM/ShadowDOM.cjs');
|
|
30
|
+
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
31
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
32
|
+
require('react-focus-lock');
|
|
33
|
+
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
34
|
+
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
35
|
+
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
36
|
+
var TextButton = require('../TextButton/TextButton.cjs');
|
|
37
|
+
require('../IconButton/IconButton.cjs');
|
|
38
|
+
require('../Alert/Alert.cjs');
|
|
39
|
+
require('../Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../Popper/PopperContext/PopperContext.cjs');
|
|
41
|
+
require('formik');
|
|
42
|
+
require('yup');
|
|
43
|
+
require('i18next');
|
|
44
|
+
require('../InlineWidget/InlineWidget.cjs');
|
|
45
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
46
|
+
require('../OverlayCard/OverlayCard.context.cjs');
|
|
47
|
+
require('../../context/FooterAnimationContext/index.cjs');
|
|
48
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
49
|
+
require('../../context/QrCodeContext/QrCodeContext.cjs');
|
|
50
|
+
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
51
|
+
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
52
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
53
|
+
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
54
|
+
require('qrcode');
|
|
55
|
+
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
56
|
+
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
57
|
+
require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
58
|
+
require('@dynamic-labs/types');
|
|
59
|
+
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
60
|
+
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
61
|
+
var usePasskeyRecovery = require('../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
|
|
62
|
+
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
9
63
|
|
|
10
64
|
const NeedHelpSection = () => {
|
|
65
|
+
var _a, _b, _c, _d, _e;
|
|
11
66
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
12
67
|
const { t } = reactI18next.useTranslation();
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
68
|
+
const { initPasskeyRecoveryProcess } = usePasskeyRecovery.usePasskeyRecovery();
|
|
69
|
+
const { view } = ViewContext.useViewContext();
|
|
70
|
+
const supportEmail = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _a === void 0 ? void 0 : _a.supportEmail;
|
|
71
|
+
const supportUrl = ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _b === void 0 ? void 0 : _b.supportUrls) &&
|
|
72
|
+
((_c = Object.values(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.supportUrls)) === null || _c === void 0 ? void 0 : _c[0]);
|
|
73
|
+
// don't show passkey recovery helper on passkey creation flow views
|
|
74
|
+
const isRecoveryEnabled = !view.startsWith('passkey') &&
|
|
75
|
+
((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === sdkApi.ProviderEnum.Turnkey && p.enabledAt)) &&
|
|
76
|
+
Boolean((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _e === void 0 ? void 0 : _e.passkeyEmbeddedWalletRecoveryEnabled);
|
|
77
|
+
const hasContactInfo = Boolean(supportEmail || supportUrl);
|
|
78
|
+
const getSupportHelpSession = () => {
|
|
79
|
+
if (!hasContactInfo) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
return (jsxRuntime.jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
83
|
+
};
|
|
84
|
+
const getPasskeyRecoverySession = () => {
|
|
85
|
+
if (!isRecoveryEnabled) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const recoveryText = t('dyn_need_help_section.recovery_button');
|
|
89
|
+
const finalRecoveryText = hasContactInfo
|
|
90
|
+
? recoveryText
|
|
91
|
+
: recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
|
|
92
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasContactInfo && (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsxRuntime.jsx(TextButton.TextButton, { className: classNames.classNames('helper-link', {
|
|
93
|
+
'need-help-section--captalize': !hasContactInfo,
|
|
94
|
+
}), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
|
|
95
|
+
};
|
|
96
|
+
if (!hasContactInfo && !isRecoveryEnabled) {
|
|
17
97
|
return null;
|
|
18
98
|
}
|
|
19
|
-
return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }),
|
|
99
|
+
return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
20
100
|
};
|
|
21
101
|
|
|
22
102
|
exports.NeedHelpSection = NeedHelpSection;
|
|
@@ -1,18 +1,98 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { ProviderEnum } from '@dynamic-labs/sdk-api';
|
|
3
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@dynamic-labs/utils';
|
|
7
|
+
import '../../config/ApiEndpoint.js';
|
|
8
|
+
import '../../shared/logger.js';
|
|
9
|
+
import '@dynamic-labs/iconic';
|
|
10
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
11
|
+
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
12
|
+
import '@dynamic-labs/wallet-book';
|
|
13
|
+
import '../../utils/constants/colors.js';
|
|
14
|
+
import '../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
+
import 'viem';
|
|
16
|
+
import '../../shared/consts/index.js';
|
|
17
|
+
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '@dynamic-labs/rpc-providers';
|
|
19
|
+
import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
20
|
+
import '../../context/ErrorContext/ErrorContext.js';
|
|
21
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
22
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
23
|
+
import 'react-dom';
|
|
4
24
|
import { Typography } from '../Typography/Typography.js';
|
|
25
|
+
import '../ShadowDOM/ShadowDOM.js';
|
|
26
|
+
import '../../context/ThemeContext/ThemeContext.js';
|
|
27
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
28
|
+
import 'react-focus-lock';
|
|
29
|
+
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
30
|
+
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
31
|
+
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
32
|
+
import { TextButton } from '../TextButton/TextButton.js';
|
|
33
|
+
import '../IconButton/IconButton.js';
|
|
34
|
+
import '../Alert/Alert.js';
|
|
35
|
+
import '../Popper/Popper/Popper.js';
|
|
36
|
+
import '../Popper/PopperContext/PopperContext.js';
|
|
37
|
+
import 'formik';
|
|
38
|
+
import 'yup';
|
|
39
|
+
import 'i18next';
|
|
40
|
+
import '../InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
42
|
+
import '../OverlayCard/OverlayCard.context.js';
|
|
43
|
+
import '../../context/FooterAnimationContext/index.js';
|
|
44
|
+
import '../../context/MockContext/MockContext.js';
|
|
45
|
+
import '../../context/QrCodeContext/QrCodeContext.js';
|
|
46
|
+
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
47
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
48
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
49
|
+
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
50
|
+
import 'qrcode';
|
|
51
|
+
import '../../context/LoadingContext/LoadingContext.js';
|
|
52
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
53
|
+
import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
54
|
+
import '@dynamic-labs/types';
|
|
55
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
56
|
+
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
57
|
+
import { usePasskeyRecovery } from '../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
|
|
58
|
+
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
5
59
|
|
|
6
60
|
const NeedHelpSection = () => {
|
|
61
|
+
var _a, _b, _c, _d, _e;
|
|
7
62
|
const { projectSettings } = useInternalDynamicContext();
|
|
8
63
|
const { t } = useTranslation();
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
64
|
+
const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
|
|
65
|
+
const { view } = useViewContext();
|
|
66
|
+
const supportEmail = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _a === void 0 ? void 0 : _a.supportEmail;
|
|
67
|
+
const supportUrl = ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _b === void 0 ? void 0 : _b.supportUrls) &&
|
|
68
|
+
((_c = Object.values(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.supportUrls)) === null || _c === void 0 ? void 0 : _c[0]);
|
|
69
|
+
// don't show passkey recovery helper on passkey creation flow views
|
|
70
|
+
const isRecoveryEnabled = !view.startsWith('passkey') &&
|
|
71
|
+
((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === ProviderEnum.Turnkey && p.enabledAt)) &&
|
|
72
|
+
Boolean((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _e === void 0 ? void 0 : _e.passkeyEmbeddedWalletRecoveryEnabled);
|
|
73
|
+
const hasContactInfo = Boolean(supportEmail || supportUrl);
|
|
74
|
+
const getSupportHelpSession = () => {
|
|
75
|
+
if (!hasContactInfo) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return (jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
79
|
+
};
|
|
80
|
+
const getPasskeyRecoverySession = () => {
|
|
81
|
+
if (!isRecoveryEnabled) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
const recoveryText = t('dyn_need_help_section.recovery_button');
|
|
85
|
+
const finalRecoveryText = hasContactInfo
|
|
86
|
+
? recoveryText
|
|
87
|
+
: recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
|
|
88
|
+
return (jsxs(Fragment, { children: [hasContactInfo && (jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsx(TextButton, { className: classNames('helper-link', {
|
|
89
|
+
'need-help-section--captalize': !hasContactInfo,
|
|
90
|
+
}), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
|
|
91
|
+
};
|
|
92
|
+
if (!hasContactInfo && !isRecoveryEnabled) {
|
|
13
93
|
return null;
|
|
14
94
|
}
|
|
15
|
-
return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }),
|
|
95
|
+
return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
16
96
|
};
|
|
17
97
|
|
|
18
98
|
export { NeedHelpSection };
|