@tap-payments/auth-jsconnect 2.0.84-test → 2.0.85-test
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/build/api/auth.d.ts +1 -1
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/features/app/auth/authStore.js +1 -2
- package/build/features/auth/screens/OTP/OTPInput.js +2 -2
- package/build/features/connect/screens/Merchant/BrandName.js +1 -2
- package/build/features/connect/screens/Merchant/validation.js +8 -8
- package/package.json +1 -1
package/build/api/auth.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ var OTPTimerComponent = function (_a) {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
return (_jsx(OTPTimerStyled, __assign({ onClick: resetTimer }, rest, { children: _jsx(OTPTimerTextStyled, __assign({ variant: 'h4', color: 'primary', sx: {
|
|
64
|
-
cursor: timeValue <= 0 ? 'pointer' : 'default'
|
|
64
|
+
cursor: timeValue <= 0 && onResetClick ? 'pointer' : 'default'
|
|
65
65
|
} }, { children: timeValue > 0 ? (timeValue > 9 ? "00:".concat(timeValue) : "00:0".concat(timeValue)) : timeEndLabel })) })));
|
|
66
66
|
};
|
|
67
67
|
OTPTimerComponent.defaultProps = {
|
|
@@ -62,7 +62,6 @@ export var verifyAuthOTP = createAsyncThunk('verifyAuthOTPKit', function (params
|
|
|
62
62
|
verify_token: verifyToken,
|
|
63
63
|
data: params.otp,
|
|
64
64
|
post_url: postUrl,
|
|
65
|
-
scopes: settings.data.appConfig.scope || [],
|
|
66
65
|
terms: auth.data.termAndConditionChecked ? ['general'] : [],
|
|
67
66
|
encryption_contract: ['data']
|
|
68
67
|
};
|
|
@@ -92,7 +91,7 @@ export var resendOTP = createAsyncThunk('authResendOTP', function (params, thunk
|
|
|
92
91
|
country_code: settings.data.businessCountry.iso2
|
|
93
92
|
},
|
|
94
93
|
sign_in: false,
|
|
95
|
-
is_lead:
|
|
94
|
+
is_lead: false,
|
|
96
95
|
encryption_contract: [
|
|
97
96
|
'user_credentail.country_code',
|
|
98
97
|
'user_credentail.identification_id',
|
|
@@ -32,7 +32,7 @@ var OTPInput = function (_a) {
|
|
|
32
32
|
var t = useTranslation().t;
|
|
33
33
|
var dispatch = useAppDispatch();
|
|
34
34
|
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
-
var
|
|
35
|
+
var _c = useAppSelector(authSelector), error = _c.error, loading = _c.loading;
|
|
36
36
|
var handleOnOTPChange = function (otp) {
|
|
37
37
|
if (!!error)
|
|
38
38
|
dispatch(clearError());
|
|
@@ -46,6 +46,6 @@ var OTPInput = function (_a) {
|
|
|
46
46
|
dispatch(resendOTP());
|
|
47
47
|
};
|
|
48
48
|
var otpValue = otpControl.field.value;
|
|
49
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
49
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: loading ? undefined : handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
50
50
|
};
|
|
51
51
|
export default React.memo(OTPInput);
|
|
@@ -129,8 +129,7 @@ var BrandName = function (_a) {
|
|
|
129
129
|
var brandValue = value.replaceAll(' ', '-').toLowerCase();
|
|
130
130
|
var address = (brandValue[brandValue.length - 1] === '-' ? brandValue.slice(0, -1) : brandValue) + '.com';
|
|
131
131
|
var updatedSalesChannels = salesChannels.map(function (channel) {
|
|
132
|
-
|
|
133
|
-
if (((_a = channel.name) === null || _a === void 0 ? void 0 : _a.en.toLowerCase()) === 'website') {
|
|
132
|
+
if (channel.id.toLowerCase() === 'website') {
|
|
134
133
|
return __assign(__assign({}, channel), { address: address });
|
|
135
134
|
}
|
|
136
135
|
return channel;
|
|
@@ -31,17 +31,17 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
31
31
|
var channels = (value || []);
|
|
32
32
|
var dic = {};
|
|
33
33
|
channels.forEach(function (channel) {
|
|
34
|
-
var _a, _b
|
|
34
|
+
var _a, _b;
|
|
35
35
|
if ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) {
|
|
36
36
|
channel.sub.forEach(function (sub) {
|
|
37
|
-
var _a
|
|
38
|
-
var key = (
|
|
37
|
+
var _a;
|
|
38
|
+
var key = (_a = sub.id) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
39
39
|
if (key)
|
|
40
40
|
dic[key] = sub.address || '';
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
var key = (
|
|
44
|
+
var key = (_b = channel.id) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
45
45
|
if (key)
|
|
46
46
|
dic[key] = channel.address || '';
|
|
47
47
|
}
|
|
@@ -72,17 +72,17 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
72
72
|
var channels = (value || []);
|
|
73
73
|
var dic = {};
|
|
74
74
|
channels.forEach(function (channel) {
|
|
75
|
-
var _a, _b
|
|
75
|
+
var _a, _b;
|
|
76
76
|
if ((_a = channel.sub) === null || _a === void 0 ? void 0 : _a.length) {
|
|
77
77
|
channel.sub.forEach(function (sub) {
|
|
78
|
-
var _a
|
|
79
|
-
var key = (
|
|
78
|
+
var _a;
|
|
79
|
+
var key = (_a = sub.id) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
80
80
|
if (key)
|
|
81
81
|
dic[key] = sub.address || '';
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
var key = (
|
|
85
|
+
var key = (_b = channel.id) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
86
86
|
if (key)
|
|
87
87
|
dic[key] = channel.address || '';
|
|
88
88
|
}
|