@tap-payments/auth-jsconnect 2.0.114-test → 2.0.116-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/constants/validation.js +1 -1
- package/build/features/app/business/businessStore.js +1 -1
- package/build/features/app/connect/connectStore.js +2 -2
- package/build/features/bank/screens/BankDetails/BankName.js +2 -1
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +1 -0
- package/build/features/connect/screens/Individual/Individual.js +16 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +1 -0
- package/build/utils/object.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa
|
|
|
16
16
|
export var REGEX_ALPHANUMERIC = /^[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]*$/g;
|
|
17
17
|
export var REGEX_BRAND_NAME = /^(([a-zA-Z0-9])+\s)*[a-zA-Z0-9]+$/;
|
|
18
18
|
export var EMAIL_MAX_LENGTH = 50;
|
|
19
|
-
export var LINKEDIN_URL = /^((http|https):\/\/)(www.linkedin.com\/)in(\/)[a-zA-Z0-9
|
|
19
|
+
export var LINKEDIN_URL = /^((http|https):\/\/)(www.linkedin.com\/)in(\/)[a-zA-Z0-9-\/]+$/;
|
|
20
20
|
export var SOCIAL_USERNAME = /^[A-Za-z-0-9\d._]{3,}$/;
|
|
21
21
|
export var DIGITS_ONLY = /^\d+$/;
|
|
22
22
|
export var REGEX_PHONE_APP_NAME = /^[a-zA-Z0-9[._-]*$/;
|
|
@@ -218,7 +218,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
218
218
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
219
219
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
220
220
|
isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
221
|
-
if (!isSA(countryIso2)) return [3, 4];
|
|
221
|
+
if (!(isSA(countryIso2) && !isIdentityAuthStep)) return [3, 4];
|
|
222
222
|
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
223
223
|
case 3:
|
|
224
224
|
_j.sent();
|
|
@@ -711,7 +711,7 @@ export var connectSlice = createSlice({
|
|
|
711
711
|
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, isNewUser = _b.isNewUser, countryCode = _b.countryCode, userInfoMissed = _b.userInfoMissed;
|
|
712
712
|
var name = leadResponse.name, contact = leadResponse.contact, brand = leadResponse.brand, brand_list = leadResponse.brand_list, channel_list = leadResponse.channel_list, is_new_individual = leadResponse.is_new_individual, id = leadResponse.id;
|
|
713
713
|
var _c = contact || {}, email = _c.email, phone = _c.phone;
|
|
714
|
-
var fullName = concatenateObjectValues(name, ['first', 'middle', '
|
|
714
|
+
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
715
715
|
if (!!fullName) {
|
|
716
716
|
var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
|
|
717
717
|
state.data.individualData.name = capitalizedName;
|
|
@@ -747,7 +747,7 @@ export var connectSlice = createSlice({
|
|
|
747
747
|
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, isNewUser = _b.isNewUser, countryCode = _b.countryCode, userInfoMissed = _b.userInfoMissed;
|
|
748
748
|
var name = leadResponse.name, contact = leadResponse.contact, brand = leadResponse.brand, brand_list = leadResponse.brand_list, channel_list = leadResponse.channel_list, is_new_individual = leadResponse.is_new_individual, id = leadResponse.id;
|
|
749
749
|
var _c = contact || {}, email = _c.email, phone = _c.phone;
|
|
750
|
-
var fullName = concatenateObjectValues(name, ['first', 'middle', '
|
|
750
|
+
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
751
751
|
if (!!fullName) {
|
|
752
752
|
var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
|
|
753
753
|
state.data.individualData.name = capitalizedName;
|
|
@@ -47,7 +47,8 @@ var BankName = function () {
|
|
|
47
47
|
React.useEffect(function () {
|
|
48
48
|
var _a;
|
|
49
49
|
var bankName = (_a = data.bankData.responseBody) === null || _a === void 0 ? void 0 : _a.bank_name;
|
|
50
|
-
|
|
50
|
+
if (bankName && !bankNameValue)
|
|
51
|
+
setValue('bankName', bankName);
|
|
51
52
|
}, [(_b = data.bankData.responseBody) === null || _b === void 0 ? void 0 : _b.bank_name]);
|
|
52
53
|
var handleBankChange = function (_a) {
|
|
53
54
|
var target = _a.target;
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import { styled } from '@mui/material/styles';
|
|
14
25
|
import Email from './Email';
|
|
@@ -46,10 +57,11 @@ var Individual = function (_a) {
|
|
|
46
57
|
var startWithNID = otpData.authFor === AuthForType.NATIONAL_ID;
|
|
47
58
|
var isMobile = mobileData.mobile;
|
|
48
59
|
var _e = otpData.responseBody || {}, contact = _e.contact, name = _e.name, userInfoMissed = _e.userInfoMissed, is_new_individual = _e.is_new_individual;
|
|
49
|
-
var
|
|
60
|
+
var responseBody = individualData.responseBody, individualDataForm = __rest(individualData, ["responseBody"]);
|
|
61
|
+
var is_available = (responseBody || {}).is_available;
|
|
50
62
|
var methods = useForm({
|
|
51
63
|
resolver: yupResolver(isMobile ? IndividualValidation : IndividualMobileValidation),
|
|
52
|
-
defaultValues:
|
|
64
|
+
defaultValues: individualDataForm,
|
|
53
65
|
mode: 'onChange'
|
|
54
66
|
});
|
|
55
67
|
var onSubmit = function (formData) {
|
|
@@ -81,10 +93,9 @@ var Individual = function (_a) {
|
|
|
81
93
|
listActive ? setListActive(false) : setListActive(true);
|
|
82
94
|
};
|
|
83
95
|
React.useEffect(function () {
|
|
84
|
-
|
|
85
|
-
if (((_a = individualData === null || individualData === void 0 ? void 0 : individualData.responseBody) === null || _a === void 0 ? void 0 : _a.is_available) === false)
|
|
96
|
+
if (is_available === false)
|
|
86
97
|
methods.setError('email', { message: 'tap_js_email_already_exist' });
|
|
87
|
-
}, [
|
|
98
|
+
}, [responseBody]);
|
|
88
99
|
var isLeadEmailAvailable = (contact === null || contact === void 0 ? void 0 : contact.email) === methods.watch('email');
|
|
89
100
|
var isEmailValid = typeof is_available === 'undefined' ? isLeadEmailAvailable : is_available;
|
|
90
101
|
var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email || !!error;
|
package/build/utils/object.js
CHANGED
|
@@ -28,7 +28,7 @@ export var concatenateObjectValues = function (data, keys) {
|
|
|
28
28
|
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
|
|
29
29
|
var key = keys_1[_i];
|
|
30
30
|
if (data[key]) {
|
|
31
|
-
result += data[key] + ' ';
|
|
31
|
+
result += data[key].trim() + ' ';
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
return result.trim();
|