@dynamic-labs/sdk-react-core 1.0.4 → 1.0.5
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 +8 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/lib/layout/DynamicAuthLayout/DefaultFooter/DefaultFooter.cjs +12 -0
- package/src/lib/layout/DynamicAuthLayout/DefaultFooter/DefaultFooter.d.ts +6 -0
- package/src/lib/layout/DynamicAuthLayout/DefaultFooter/DefaultFooter.js +8 -0
- package/src/lib/layout/DynamicAuthLayout/DefaultFooter/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -3
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -3
- package/src/lib/shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.cjs +1 -2
- package/src/lib/shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.js +1 -2
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -28
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -28
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +3 -2
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +3 -2
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -1
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +5 -4
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +2 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +5 -5
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +0 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +0 -3
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +14 -20
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +14 -20
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +4 -26
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +4 -26
- package/src/lib/views/EmailVerification/EmailVerification.cjs +23 -34
- package/src/lib/views/EmailVerification/EmailVerification.js +23 -34
- package/src/lib/views/LoginView/LoginView.cjs +6 -1
- package/src/lib/views/LoginView/LoginView.js +6 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +3 -4
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +3 -4
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.cjs +17 -0
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.d.ts +3 -0
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.js +13 -0
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/index.d.ts +1 -0
- package/src/lib/views/Passkey/utils/index.d.ts +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +6 -7
- package/src/lib/views/WalletList/WalletList.js +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
### [1.0.5](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.4...v1.0.5) (2024-01-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* trigger onAuthSuccess before embedded wallet creation ([eff7166](https://github.com/dynamic-labs/DynamicAuth/commit/eff7166902e851e726d5ee7a6bf51f9a9a85dba1))
|
|
8
|
+
* turnkeyWalletConnector is not an email otp connector and uses dynamic otp ([#4314](https://github.com/dynamic-labs/DynamicAuth/issues/4314)) ([446b536](https://github.com/dynamic-labs/DynamicAuth/commit/446b536c83ab2ff9d2bc727047dd2ff2601fa2a6))
|
|
9
|
+
|
|
2
10
|
### [1.0.4](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.3...v1.0.4) (2024-01-04)
|
|
3
11
|
|
|
4
12
|
|
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": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,15 +17,15 @@
|
|
|
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": "1.0.
|
|
21
|
-
"@dynamic-labs/logger": "1.0.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "1.0.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "1.0.
|
|
24
|
-
"@dynamic-labs/types": "1.0.
|
|
25
|
-
"@dynamic-labs/utils": "1.0.
|
|
26
|
-
"@dynamic-labs/viem-utils": "1.0.
|
|
27
|
-
"@dynamic-labs/wallet-book": "1.0.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "1.0.
|
|
20
|
+
"@dynamic-labs/ethereum": "1.0.5",
|
|
21
|
+
"@dynamic-labs/logger": "1.0.5",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "1.0.5",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "1.0.5",
|
|
24
|
+
"@dynamic-labs/types": "1.0.5",
|
|
25
|
+
"@dynamic-labs/utils": "1.0.5",
|
|
26
|
+
"@dynamic-labs/viem-utils": "1.0.5",
|
|
27
|
+
"@dynamic-labs/wallet-book": "1.0.5",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "1.0.5",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var classNames = require('../../../utils/functions/classNames/classNames.cjs');
|
|
7
|
+
|
|
8
|
+
const DefaultFooter = ({ hideBorder }) => (jsxRuntime.jsx("div", { className: classNames.classNames('default-footer', {
|
|
9
|
+
'default-footer__hide-border': hideBorder,
|
|
10
|
+
}), "data-testid": 'default-footer' }));
|
|
11
|
+
|
|
12
|
+
exports.DefaultFooter = DefaultFooter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { classNames } from '../../../utils/functions/classNames/classNames.js';
|
|
3
|
+
|
|
4
|
+
const DefaultFooter = ({ hideBorder }) => (jsx("div", { className: classNames('default-footer', {
|
|
5
|
+
'default-footer__hide-border': hideBorder,
|
|
6
|
+
}), "data-testid": 'default-footer' }));
|
|
7
|
+
|
|
8
|
+
export { DefaultFooter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DefaultFooter } from './DefaultFooter';
|
|
@@ -72,13 +72,11 @@ const DynamicAuthLayout = ({ children, className, style, onClose, projectSetting
|
|
|
72
72
|
const { view } = ViewContext.useViewContext();
|
|
73
73
|
const { walletConnector, authMode } = useInternalDynamicContext.useInternalDynamicContext();
|
|
74
74
|
const { isFooterExpanded } = index.useFooterAnimationContext();
|
|
75
|
-
const { showHeader, showHelpContent, showToSFooter } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
|
|
76
75
|
const { headerData, helpHeaderData } = useDynamicLayoutData.useDynamicLayoutData({
|
|
77
76
|
authMode,
|
|
78
77
|
view,
|
|
79
78
|
});
|
|
80
|
-
const { showConnectedWalletProgress } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
|
|
81
|
-
const { showDynamicFooter } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
|
|
79
|
+
const { showConnectedWalletProgress, showHeader, showHelpContent, showToSFooter, showDynamicFooter, } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
|
|
82
80
|
return (jsxRuntime.jsx(OverlayCardTarget.OverlayCardTarget, { children: jsxRuntime.jsxs(VerticalAccordion.VerticalAccordion, { style: style, className: className, children: [jsxRuntime.jsxs(AccordionItem.AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsxRuntime.jsx(WalletProgressStepper.WalletProgressStepper, {})), showHeader && (jsxRuntime.jsx(header.Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector, copykey: headerData === null || headerData === void 0 ? void 0 : headerData.copykey })), children, showDynamicFooter && jsxRuntime.jsx(DynamicFooter.DynamicFooter, {}), showToSFooter && jsxRuntime.jsx(ToSFooter.ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsxRuntime.jsx(AccordionItem.AccordionItem, { isOpen: isFooterExpanded, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(HelpContent.HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
|
|
83
81
|
};
|
|
84
82
|
|
|
@@ -68,13 +68,11 @@ const DynamicAuthLayout = ({ children, className, style, onClose, projectSetting
|
|
|
68
68
|
const { view } = useViewContext();
|
|
69
69
|
const { walletConnector, authMode } = useInternalDynamicContext();
|
|
70
70
|
const { isFooterExpanded } = useFooterAnimationContext();
|
|
71
|
-
const { showHeader, showHelpContent, showToSFooter } = useAuthLayoutChecks(walletConnector);
|
|
72
71
|
const { headerData, helpHeaderData } = useDynamicLayoutData({
|
|
73
72
|
authMode,
|
|
74
73
|
view,
|
|
75
74
|
});
|
|
76
|
-
const { showConnectedWalletProgress } = useAuthLayoutChecks(walletConnector);
|
|
77
|
-
const { showDynamicFooter } = useAuthLayoutChecks(walletConnector);
|
|
75
|
+
const { showConnectedWalletProgress, showHeader, showHelpContent, showToSFooter, showDynamicFooter, } = useAuthLayoutChecks(walletConnector);
|
|
78
76
|
return (jsx(OverlayCardTarget, { children: jsxs(VerticalAccordion, { style: style, className: className, children: [jsxs(AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsx(WalletProgressStepper, {})), showHeader && (jsx(Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector, copykey: headerData === null || headerData === void 0 ? void 0 : headerData.copykey })), children, showDynamicFooter && jsx(DynamicFooter, {}), showToSFooter && jsx(ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsx(AccordionItem, { isOpen: isFooterExpanded, children: jsx("div", { children: jsx(HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
|
|
79
77
|
};
|
|
80
78
|
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const isUserLinkingWallet = (user, view, isMockedSDK) => (user === null || user === void 0 ? void 0 : user.verifiedCredentials) !== undefined &&
|
|
6
6
|
(view === 'wallet-list' ||
|
|
7
|
-
view === 'login-with-email-or-wallet-full-wallet-list'
|
|
8
|
-
view === 'multi-wallet-wallet-list') &&
|
|
7
|
+
view === 'login-with-email-or-wallet-full-wallet-list') &&
|
|
9
8
|
// Mocked SDK is used in the dashboard and the user is
|
|
10
9
|
// the actual user that the user logged in to the dashboard
|
|
11
10
|
!isMockedSDK;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const isUserLinkingWallet = (user, view, isMockedSDK) => (user === null || user === void 0 ? void 0 : user.verifiedCredentials) !== undefined &&
|
|
2
2
|
(view === 'wallet-list' ||
|
|
3
|
-
view === 'login-with-email-or-wallet-full-wallet-list'
|
|
4
|
-
view === 'multi-wallet-wallet-list') &&
|
|
3
|
+
view === 'login-with-email-or-wallet-full-wallet-list') &&
|
|
5
4
|
// Mocked SDK is used in the dashboard and the user is
|
|
6
5
|
// the actual user that the user logged in to the dashboard
|
|
7
6
|
!isMockedSDK;
|