@dynamic-labs/sdk-react-core 1.1.0 → 1.1.2
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 +17 -0
- package/package.cjs +1 -2
- package/package.js +1 -2
- package/package.json +11 -11
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +4 -2
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.cjs +3 -0
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.d.ts +1 -1
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.js +3 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -8
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
### [1.1.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.1...v1.1.2) (2024-02-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* coinbasesocial should display coinbase in profile linking section ([#4681](https://github.com/dynamic-labs/DynamicAuth/issues/4681)) ([dea7dc6](https://github.com/dynamic-labs/DynamicAuth/commit/dea7dc63fcc84ac2b99eb561ca26fe5c8f1d3edf))
|
|
8
|
+
* prompt to change network on signin when using wallet-connect ([#4675](https://github.com/dynamic-labs/DynamicAuth/issues/4675)) ([2f5f2a0](https://github.com/dynamic-labs/DynamicAuth/commit/2f5f2a0cad538f2bb706296d8a664488d2dc35ac)), closes [#4672](https://github.com/dynamic-labs/DynamicAuth/issues/4672)
|
|
9
|
+
|
|
10
|
+
### [1.1.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0...v1.1.1) (2024-02-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* current wallet being clipped inside a circle ([#4470](https://github.com/dynamic-labs/DynamicAuth/issues/4470)) ([#4649](https://github.com/dynamic-labs/DynamicAuth/issues/4649)) ([43537af](https://github.com/dynamic-labs/DynamicAuth/commit/43537af0809c96bc8ae8726d9260e2c526d2921b))
|
|
16
|
+
* old iconic dependency version ([#4674](https://github.com/dynamic-labs/DynamicAuth/issues/4674)) ([04f5b03](https://github.com/dynamic-labs/DynamicAuth/commit/04f5b0387303563637ad414eda0170186aad0e44))
|
|
17
|
+
* solana turnkey connector not refreshing account after session expiration ([#4637](https://github.com/dynamic-labs/DynamicAuth/issues/4637)) ([ed0f964](https://github.com/dynamic-labs/DynamicAuth/commit/ed0f964bc1e0ab2e5069c51b9e6f3c0bc2a16df7))
|
|
18
|
+
|
|
2
19
|
## [1.1.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.25...v1.1.0) (2024-02-07)
|
|
3
20
|
|
|
4
21
|
Check out our changelog here: https://docs.dynamic.xyz/changelog/v1-1
|
package/package.cjs
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "1.1.
|
|
5
|
+
var version = "1.1.2";
|
|
6
6
|
var dependencies = {
|
|
7
|
-
"@dynamic-labs/iconic": "0.1.52",
|
|
8
7
|
"@dynamic-labs/sdk-api": "0.0.363",
|
|
9
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
9
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
7
7
|
"directory": "packages/sdk-react-core"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dynamic-labs/iconic": "0.1.52",
|
|
11
10
|
"@dynamic-labs/sdk-api": "0.0.363",
|
|
12
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
13
12
|
"country-list": "2.3.0",
|
|
@@ -17,15 +16,16 @@
|
|
|
17
16
|
"react-focus-lock": "2.9.2",
|
|
18
17
|
"react-i18next": "^13.2.0",
|
|
19
18
|
"yup": "0.32.11",
|
|
20
|
-
"@dynamic-labs/ethereum": "1.1.
|
|
21
|
-
"@dynamic-labs/
|
|
22
|
-
"@dynamic-labs/
|
|
23
|
-
"@dynamic-labs/
|
|
24
|
-
"@dynamic-labs/
|
|
25
|
-
"@dynamic-labs/
|
|
26
|
-
"@dynamic-labs/
|
|
27
|
-
"@dynamic-labs/
|
|
28
|
-
"@dynamic-labs/wallet-
|
|
19
|
+
"@dynamic-labs/ethereum": "1.1.2",
|
|
20
|
+
"@dynamic-labs/iconic": "1.1.2",
|
|
21
|
+
"@dynamic-labs/logger": "1.1.2",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "1.1.2",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "1.1.2",
|
|
24
|
+
"@dynamic-labs/types": "1.1.2",
|
|
25
|
+
"@dynamic-labs/utils": "1.1.2",
|
|
26
|
+
"@dynamic-labs/viem-utils": "1.1.2",
|
|
27
|
+
"@dynamic-labs/wallet-book": "1.1.2",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "1.1.2",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -20,11 +20,13 @@ require('../../../../utils/constants/colors.cjs');
|
|
|
20
20
|
require('../../../../utils/constants/values.cjs');
|
|
21
21
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
22
22
|
require('viem');
|
|
23
|
+
var providerLabel = require('../../../../shared/utils/functions/providerLabel/providerLabel.cjs');
|
|
23
24
|
require('../../../../shared/consts/index.cjs');
|
|
24
25
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
|
|
25
26
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
26
27
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
28
|
require('@dynamic-labs/multi-wallet');
|
|
29
|
+
var getSocialSignInProviderForProviderEnum = require('../../../../utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.cjs');
|
|
28
30
|
require('viem/chains');
|
|
29
31
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
30
32
|
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
@@ -53,7 +55,7 @@ require('react-focus-lock');
|
|
|
53
55
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
54
56
|
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
55
57
|
var Icon = require('../../../Icon/Icon.cjs');
|
|
56
|
-
|
|
58
|
+
require('i18next');
|
|
57
59
|
require('qrcode');
|
|
58
60
|
require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
59
61
|
require('../UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
@@ -95,7 +97,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
95
97
|
}, startSlot:
|
|
96
98
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
97
99
|
jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', size: 'small', children: isProviderLinked ? jsxRuntime.jsx(unlink.ReactComponent, {}) : jsxRuntime.jsx(add.ReactComponent, {}) }), children: isProviderLinked ? null : 'Connect' }));
|
|
98
|
-
return (jsxRuntime.jsxs("div", { className: 'user-profile-social-account', "data-testid": `social-account-${provider}`, children: [jsxRuntime.jsx("div", { className: 'user-profile-social-account__icon', children: isProviderLinked ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) }), jsxRuntime.jsx("div", { className: 'user-profile-social-account__label', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a :
|
|
100
|
+
return (jsxRuntime.jsxs("div", { className: 'user-profile-social-account', "data-testid": `social-account-${provider}`, children: [jsxRuntime.jsx("div", { className: 'user-profile-social-account__icon', children: isProviderLinked ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) }), jsxRuntime.jsx("div", { className: 'user-profile-social-account__label', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : providerLabel.providerLabel(getSocialSignInProviderForProviderEnum.getSocialSignInProviderForProviderEnum(provider)) }) }), !isActiveCredential ? renderButton() : null] }));
|
|
99
101
|
};
|
|
100
102
|
|
|
101
103
|
exports.UserProfileSocialAccount = UserProfileSocialAccount;
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -16,11 +16,13 @@ import '../../../../utils/constants/colors.js';
|
|
|
16
16
|
import '../../../../utils/constants/values.js';
|
|
17
17
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
18
18
|
import 'viem';
|
|
19
|
+
import { providerLabel } from '../../../../shared/utils/functions/providerLabel/providerLabel.js';
|
|
19
20
|
import '../../../../shared/consts/index.js';
|
|
20
21
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
21
22
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
22
23
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
23
24
|
import '@dynamic-labs/multi-wallet';
|
|
25
|
+
import { getSocialSignInProviderForProviderEnum } from '../../../../utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.js';
|
|
24
26
|
import 'viem/chains';
|
|
25
27
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
26
28
|
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
@@ -49,7 +51,7 @@ import 'react-focus-lock';
|
|
|
49
51
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
50
52
|
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
51
53
|
import { Icon } from '../../../Icon/Icon.js';
|
|
52
|
-
import
|
|
54
|
+
import 'i18next';
|
|
53
55
|
import 'qrcode';
|
|
54
56
|
import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
55
57
|
import '../UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
@@ -91,7 +93,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
|
|
|
91
93
|
}, startSlot:
|
|
92
94
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
93
95
|
jsx(Icon, { color: 'text-tertiary', size: 'small', children: isProviderLinked ? jsx(SvgUnlink, {}) : jsx(SvgAdd, {}) }), children: isProviderLinked ? null : 'Connect' }));
|
|
94
|
-
return (jsxs("div", { className: 'user-profile-social-account', "data-testid": `social-account-${provider}`, children: [jsx("div", { className: 'user-profile-social-account__icon', children: isProviderLinked ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) }), jsx("div", { className: 'user-profile-social-account__label', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a :
|
|
96
|
+
return (jsxs("div", { className: 'user-profile-social-account', "data-testid": `social-account-${provider}`, children: [jsx("div", { className: 'user-profile-social-account__icon', children: isProviderLinked ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) }), jsx("div", { className: 'user-profile-social-account__label', children: jsx(Typography, { weight: 'medium', variant: 'body_normal', color: 'primary', children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : providerLabel(getSocialSignInProviderForProviderEnum(provider)) }) }), !isActiveCredential ? renderButton() : null] }));
|
|
95
97
|
};
|
|
96
98
|
|
|
97
99
|
export { UserProfileSocialAccount };
|
|
@@ -6,6 +6,9 @@ var sdkApi = require('@dynamic-labs/sdk-api');
|
|
|
6
6
|
var capitalize = require('../capitalize/capitalize.cjs');
|
|
7
7
|
|
|
8
8
|
const providerLabel = (provider) => {
|
|
9
|
+
if (!provider) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
9
12
|
if (provider === sdkApi.SocialSignInProviderEnum.Coinbasesocial) {
|
|
10
13
|
return 'Coinbase';
|
|
11
14
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SocialSignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
2
|
-
export declare const providerLabel: (provider
|
|
2
|
+
export declare const providerLabel: (provider?: SocialSignInProviderEnum) => string | undefined;
|
|
@@ -2,6 +2,9 @@ import { SocialSignInProviderEnum } from '@dynamic-labs/sdk-api';
|
|
|
2
2
|
import { capitalize } from '../capitalize/capitalize.js';
|
|
3
3
|
|
|
4
4
|
const providerLabel = (provider) => {
|
|
5
|
+
if (!provider) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
5
8
|
if (provider === SocialSignInProviderEnum.Coinbasesocial) {
|
|
6
9
|
return 'Coinbase';
|
|
7
10
|
}
|