@dynamic-labs/sdk-react-core 1.4.8 → 1.4.10
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/validateUpdateRequest/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +2 -4
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -4
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -3
- package/src/lib/views/CollectUserDataView/useFields.cjs +2 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +2 -0
- package/src/lib/views/CollectUserDataView/useFields.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [1.4.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.9...v1.4.10) (2024-04-23)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* add autocomplete attribute to email and phone inputs ([#5444](https://github.com/dynamic-labs/DynamicAuth/issues/5444)) ([01fc1b0](https://github.com/dynamic-labs/DynamicAuth/commit/01fc1b0e0b93a5104112a7682907ea2948ece7b2))
|
|
8
|
+
|
|
9
|
+
### [1.4.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.8...v1.4.9) (2024-04-20)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* disconnect wallet on lock in connect-only ([#5396](https://github.com/dynamic-labs/DynamicAuth/issues/5396)) ([5248098](https://github.com/dynamic-labs/DynamicAuth/commit/5248098f4305c748325a12cad243ff910ccc8163))
|
|
15
|
+
|
|
2
16
|
### [1.4.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.7...v1.4.8) (2024-04-18)
|
|
3
17
|
|
|
4
18
|
|
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.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"react-focus-lock": "2.9.2",
|
|
17
17
|
"react-i18next": "^13.2.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
|
-
"@dynamic-labs/ethereum": "1.4.
|
|
20
|
-
"@dynamic-labs/iconic": "1.4.
|
|
21
|
-
"@dynamic-labs/logger": "1.4.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "1.4.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "1.4.
|
|
24
|
-
"@dynamic-labs/types": "1.4.
|
|
25
|
-
"@dynamic-labs/utils": "1.4.
|
|
26
|
-
"@dynamic-labs/viem-utils": "1.4.
|
|
27
|
-
"@dynamic-labs/wallet-book": "1.4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "1.4.
|
|
19
|
+
"@dynamic-labs/ethereum": "1.4.10",
|
|
20
|
+
"@dynamic-labs/iconic": "1.4.10",
|
|
21
|
+
"@dynamic-labs/logger": "1.4.10",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "1.4.10",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "1.4.10",
|
|
24
|
+
"@dynamic-labs/types": "1.4.10",
|
|
25
|
+
"@dynamic-labs/utils": "1.4.10",
|
|
26
|
+
"@dynamic-labs/viem-utils": "1.4.10",
|
|
27
|
+
"@dynamic-labs/wallet-book": "1.4.10",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "1.4.10",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -350,6 +350,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
350
350
|
});
|
|
351
351
|
const { loadingNetwork, network, setNetwork } = useWalletEventListeners.useWalletEventListeners({
|
|
352
352
|
authMode,
|
|
353
|
+
disconnectWallet,
|
|
353
354
|
handleLogOut,
|
|
354
355
|
multiWallet,
|
|
355
356
|
multiWalletWidgetState,
|
|
@@ -346,6 +346,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, }) =>
|
|
|
346
346
|
});
|
|
347
347
|
const { loadingNetwork, network, setNetwork } = useWalletEventListeners({
|
|
348
348
|
authMode,
|
|
349
|
+
disconnectWallet,
|
|
349
350
|
handleLogOut,
|
|
350
351
|
multiWallet,
|
|
351
352
|
multiWalletWidgetState,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './validateUpdateRequest';
|
|
@@ -20,7 +20,7 @@ require('../../../shared/consts/index.cjs');
|
|
|
20
20
|
require('../../../events/dynamicEvents.cjs');
|
|
21
21
|
var useWalletConnectorEvent = require('../events/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
22
22
|
|
|
23
|
-
const useWalletEventListeners = ({ handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }) => {
|
|
23
|
+
const useWalletEventListeners = ({ disconnectWallet, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }) => {
|
|
24
24
|
const [loadingNetwork, setLoadingNetwork] = React.useState(true);
|
|
25
25
|
const [network, setNetwork] = React.useState(undefined);
|
|
26
26
|
React.useEffect(() => {
|
|
@@ -136,13 +136,11 @@ const useWalletEventListeners = ({ handleLogOut, multiWallet, multiWalletWidgetS
|
|
|
136
136
|
}));
|
|
137
137
|
useWalletConnectorEvent.useWalletConnectorEvent(uniqueNonPrimaryWallets, 'disconnect', (affectedConnector) => {
|
|
138
138
|
logger.logger.debug('secondary wallet disconnect');
|
|
139
|
-
// argent sends a disconnect event when the user adds a new account
|
|
140
139
|
if (authMode === 'connect-only') {
|
|
141
140
|
// Get all wallets with this connector
|
|
142
141
|
const affectedWallets = secondaryWallets.filter(({ connector }) => connector.key === affectedConnector.key);
|
|
143
142
|
for (const wallet of affectedWallets) {
|
|
144
|
-
|
|
145
|
-
refreshConnectedWallet(wallet.id, wallet.connector);
|
|
143
|
+
disconnectWallet(wallet.id);
|
|
146
144
|
}
|
|
147
145
|
}
|
|
148
146
|
});
|
|
@@ -4,6 +4,7 @@ import { IDynamicContext } from '../../../context/DynamicContext/types';
|
|
|
4
4
|
import { AuthModeType, MultiWalletWidgetState, UserProfile, Wallet, WalletWithAction } from '../../../shared';
|
|
5
5
|
import { MultiWalletWidgetStateSetter } from '../multiWallet';
|
|
6
6
|
export type UseWalletEventListenersArgs = {
|
|
7
|
+
disconnectWallet: (walletId: string) => Promise<void>;
|
|
7
8
|
handleLogOut(): Promise<void>;
|
|
8
9
|
multiWallet: boolean;
|
|
9
10
|
multiWalletWidgetState: MultiWalletWidgetState;
|
|
@@ -19,7 +20,7 @@ export type UseWalletEventListenersArgs = {
|
|
|
19
20
|
authMode: AuthModeType;
|
|
20
21
|
refreshConnectedWallet: (walletId: string, walletConnector: WalletConnector, shouldCallCallback?: boolean) => Promise<void>;
|
|
21
22
|
};
|
|
22
|
-
export declare const useWalletEventListeners: ({ handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }: UseWalletEventListenersArgs) => {
|
|
23
|
+
export declare const useWalletEventListeners: ({ disconnectWallet, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }: UseWalletEventListenersArgs) => {
|
|
23
24
|
loadingNetwork: boolean;
|
|
24
25
|
network: string | number | undefined;
|
|
25
26
|
setNetwork: import("react").Dispatch<import("react").SetStateAction<string | number | undefined>>;
|
|
@@ -16,7 +16,7 @@ import '../../../shared/consts/index.js';
|
|
|
16
16
|
import '../../../events/dynamicEvents.js';
|
|
17
17
|
import { useWalletConnectorEvent } from '../events/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
18
18
|
|
|
19
|
-
const useWalletEventListeners = ({ handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }) => {
|
|
19
|
+
const useWalletEventListeners = ({ disconnectWallet, handleLogOut, multiWallet, multiWalletWidgetState, primaryWallet, secondaryWallets, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletConnectorKey, setSelectedWalletWithAction, setMultiWalletWidgetState, user, setPrimaryWalletId, authMode, refreshConnectedWallet, }) => {
|
|
20
20
|
const [loadingNetwork, setLoadingNetwork] = useState(true);
|
|
21
21
|
const [network, setNetwork] = useState(undefined);
|
|
22
22
|
useEffect(() => {
|
|
@@ -132,13 +132,11 @@ const useWalletEventListeners = ({ handleLogOut, multiWallet, multiWalletWidgetS
|
|
|
132
132
|
}));
|
|
133
133
|
useWalletConnectorEvent(uniqueNonPrimaryWallets, 'disconnect', (affectedConnector) => {
|
|
134
134
|
logger.debug('secondary wallet disconnect');
|
|
135
|
-
// argent sends a disconnect event when the user adds a new account
|
|
136
135
|
if (authMode === 'connect-only') {
|
|
137
136
|
// Get all wallets with this connector
|
|
138
137
|
const affectedWallets = secondaryWallets.filter(({ connector }) => connector.key === affectedConnector.key);
|
|
139
138
|
for (const wallet of affectedWallets) {
|
|
140
|
-
|
|
141
|
-
refreshConnectedWallet(wallet.id, wallet.connector);
|
|
139
|
+
disconnectWallet(wallet.id);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
142
|
});
|
|
@@ -82,7 +82,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
82
82
|
const { fieldsConfig } = useFields.useFields();
|
|
83
83
|
const { t } = reactI18next.useTranslation();
|
|
84
84
|
return (jsxRuntime.jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
85
|
-
const { label, type, key } = index.getValueByKey(fieldsConfig, name);
|
|
85
|
+
const { label, type, key, autoComplete } = index.getValueByKey(fieldsConfig, name);
|
|
86
86
|
if (name === 'tShirtSize') {
|
|
87
87
|
return (jsxRuntime.jsx(formik.Field, { copykey: key, as: Select.Select, type: type, id: name, name: name, label: label, error: errors[name] && touched[name], selectDataTestId: 'tShirtSizeSelect', message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]), children: index$1.tShirtSizes.map((size) => (jsxRuntime.jsx("option", { value: size, children: size }, size))) }, name));
|
|
88
88
|
}
|
|
@@ -96,10 +96,10 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
96
96
|
return (jsxRuntime.jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxRuntime.jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsxRuntime.jsx(formik.Field, { copykey: key, as: Checkbox.Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsxRuntime.jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
|
|
97
97
|
}
|
|
98
98
|
else if (name === 'email' && !enabled) {
|
|
99
|
-
return (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
|
|
99
|
+
return (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label, autoComplete: autoComplete }, name) }, 'disabled-email-tooltip'));
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
|
-
return (jsxRuntime.jsx(formik.Field, { copykey: key, disabled: !enabled, as: Input.Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]) }, name));
|
|
102
|
+
return (jsxRuntime.jsx(formik.Field, { copykey: key, disabled: !enabled, as: Input.Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]), autoComplete: autoComplete }, name));
|
|
103
103
|
}
|
|
104
104
|
}) }));
|
|
105
105
|
};
|
|
@@ -78,7 +78,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
78
78
|
const { fieldsConfig } = useFields();
|
|
79
79
|
const { t } = useTranslation();
|
|
80
80
|
return (jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
|
|
81
|
-
const { label, type, key } = getValueByKey(fieldsConfig, name);
|
|
81
|
+
const { label, type, key, autoComplete } = getValueByKey(fieldsConfig, name);
|
|
82
82
|
if (name === 'tShirtSize') {
|
|
83
83
|
return (jsx(Field, { copykey: key, as: Select, type: type, id: name, name: name, label: label, error: errors[name] && touched[name], selectDataTestId: 'tShirtSizeSelect', message: touched[name] && getDisplayErrorMessage(label, errors[name]), children: tShirtSizes.map((size) => (jsx("option", { value: size, children: size }, size))) }, name));
|
|
84
84
|
}
|
|
@@ -92,10 +92,10 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
|
|
|
92
92
|
return (jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsx(Field, { copykey: key, as: Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsx(Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
|
|
93
93
|
}
|
|
94
94
|
else if (name === 'email' && !enabled) {
|
|
95
|
-
return (jsx(Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
|
|
95
|
+
return (jsx(Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label, autoComplete: autoComplete }, name) }, 'disabled-email-tooltip'));
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
-
return (jsx(Field, { copykey: key, disabled: !enabled, as: Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage(label, errors[name]) }, name));
|
|
98
|
+
return (jsx(Field, { copykey: key, disabled: !enabled, as: Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage(label, errors[name]), autoComplete: autoComplete }, name));
|
|
99
99
|
}
|
|
100
100
|
}) }));
|
|
101
101
|
};
|
|
@@ -35,6 +35,7 @@ const useFields = () => {
|
|
|
35
35
|
validation: yup.string().oneOf(index.countryCodes.map((c) => c.code)),
|
|
36
36
|
},
|
|
37
37
|
email: {
|
|
38
|
+
autoComplete: 'email',
|
|
38
39
|
key: 'dyn_collect_user_data.fields.email.label',
|
|
39
40
|
label: t('dyn_collect_user_data.fields.email.label'),
|
|
40
41
|
type: 'email',
|
|
@@ -59,6 +60,7 @@ const useFields = () => {
|
|
|
59
60
|
validation: yup.string().trim(),
|
|
60
61
|
},
|
|
61
62
|
phoneNumber: {
|
|
63
|
+
autoComplete: 'tel',
|
|
62
64
|
key: 'dyn_collect_user_data.fields.phone_number.label',
|
|
63
65
|
label: t('dyn_collect_user_data.fields.phone_number.label'),
|
|
64
66
|
type: 'string',
|
|
@@ -13,6 +13,7 @@ export declare const useFields: () => {
|
|
|
13
13
|
validation: import("yup").StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
14
14
|
};
|
|
15
15
|
email: {
|
|
16
|
+
autoComplete: string;
|
|
16
17
|
key: string;
|
|
17
18
|
label: string;
|
|
18
19
|
type: string;
|
|
@@ -37,6 +38,7 @@ export declare const useFields: () => {
|
|
|
37
38
|
validation: import("yup").StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
38
39
|
};
|
|
39
40
|
phoneNumber: {
|
|
41
|
+
autoComplete: string;
|
|
40
42
|
key: string;
|
|
41
43
|
label: string;
|
|
42
44
|
type: string;
|
|
@@ -31,6 +31,7 @@ const useFields = () => {
|
|
|
31
31
|
validation: string().oneOf(countryCodes.map((c) => c.code)),
|
|
32
32
|
},
|
|
33
33
|
email: {
|
|
34
|
+
autoComplete: 'email',
|
|
34
35
|
key: 'dyn_collect_user_data.fields.email.label',
|
|
35
36
|
label: t('dyn_collect_user_data.fields.email.label'),
|
|
36
37
|
type: 'email',
|
|
@@ -55,6 +56,7 @@ const useFields = () => {
|
|
|
55
56
|
validation: string().trim(),
|
|
56
57
|
},
|
|
57
58
|
phoneNumber: {
|
|
59
|
+
autoComplete: 'tel',
|
|
58
60
|
key: 'dyn_collect_user_data.fields.phone_number.label',
|
|
59
61
|
label: t('dyn_collect_user_data.fields.phone_number.label'),
|
|
60
62
|
type: 'string',
|
|
@@ -125,7 +125,7 @@ const EmailUpdate = () => {
|
|
|
125
125
|
});
|
|
126
126
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_email_update.title', children: t('dyn_email_update.title') }) }), jsxRuntime.jsxs("div", { className: 'email-update__container', children: [jsxRuntime.jsxs("div", { className: 'email-update__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_update.current_email', children: t('dyn_email_update.current_email') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsxRuntime.jsx(Input.Input, { id: 'email_field', onChange: (e) => {
|
|
127
127
|
setUpdatedEmail(e.target.value);
|
|
128
|
-
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
128
|
+
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError, autoComplete: 'email' }), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
exports.EmailUpdate = EmailUpdate;
|
|
@@ -121,7 +121,7 @@ const EmailUpdate = () => {
|
|
|
121
121
|
});
|
|
122
122
|
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, displayLeading: true, displayBorder: true, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_email_update.title', children: t('dyn_email_update.title') }) }), jsxs("div", { className: 'email-update__container', children: [jsxs("div", { className: 'email-update__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_update.current_email', children: t('dyn_email_update.current_email') }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: email })] }), jsx(Input, { id: 'email_field', onChange: (e) => {
|
|
123
123
|
setUpdatedEmail(e.target.value);
|
|
124
|
-
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
124
|
+
}, type: 'email', copykey: 'dyn_email_update.label', label: t('dyn_email_update.label'), className: 'email-update__input', error: Boolean(emailError), message: emailError, autoComplete: 'email' }), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'email-update__button', onClick: () => handleEmailUpdate(), loading: loading, copykey: 'dyn_email_update.send_verification', children: t('dyn_email_update.send_verification') })] })] }));
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
export { EmailUpdate };
|
|
@@ -158,7 +158,7 @@ const LoginEmailForm = ({ isLoading: isExternalLoading, onSubmit, onSubmitError,
|
|
|
158
158
|
}
|
|
159
159
|
return (jsxRuntime.jsxs("form", { className: 'login-with-email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _b === void 0 ? void 0 : _b.emailSubmitButtonInsideInput)
|
|
160
160
|
? emailInputSuffixIcon
|
|
161
|
-
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]) }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsxRuntime.jsx(Button.Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
161
|
+
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]), autoComplete: 'email' }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsxRuntime.jsx(Button.Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
162
162
|
color: 'inherit',
|
|
163
163
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
164
164
|
};
|
|
@@ -154,7 +154,7 @@ const LoginEmailForm = ({ isLoading: isExternalLoading, onSubmit, onSubmitError,
|
|
|
154
154
|
}
|
|
155
155
|
return (jsxs("form", { className: 'login-with-email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _b === void 0 ? void 0 : _b.emailSubmitButtonInsideInput)
|
|
156
156
|
? emailInputSuffixIcon
|
|
157
|
-
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]) }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsx(Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
157
|
+
: null, disabled: isLoading, type: 'email', onPointerEnter: () => dispatchInputState(['hovered', true]), onPointerLeave: () => dispatchInputState(['hovered', false]), onFocus: () => dispatchInputState(['focused', true]), onBlur: () => dispatchInputState(['focused', false]), autoComplete: 'email' }), !((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _c === void 0 ? void 0 : _c.emailSubmitButtonInsideInput) && (jsx(Button, { dataTestId: 'email_submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
158
158
|
color: 'inherit',
|
|
159
159
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
160
160
|
};
|