@tap-payments/auth-jsconnect 2.4.1 → 2.4.3
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.
|
@@ -15,7 +15,7 @@ export var MAX_FILE_SIZE = 5000000;
|
|
|
15
15
|
export var MAX_FILE_SIZE_FOUR_MB = 4000000;
|
|
16
16
|
export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'];
|
|
17
17
|
export var VALID_FILE_FORMATS_FOR_IMAGE = ['image/jpeg', 'image/png', 'image/jpg'];
|
|
18
|
-
export var REGEX_FULL_NAME = /^
|
|
18
|
+
export var REGEX_FULL_NAME = /^[a-z]{3,} ([a-z] ?)*[a-z]{3,}$/gi;
|
|
19
19
|
export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
|
|
20
20
|
export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z()\s])*$/g;
|
|
21
21
|
export var REGEX_ALPHANUMERIC = /^[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]*$/g;
|
|
@@ -854,18 +854,25 @@ export var businessSlice = createSlice({
|
|
|
854
854
|
var _g = action.payload, data = _g.data, boardId = _g.boardId, brandData = _g.brandData, leadData = _g.leadData, token = _g.token, isRequireOTP = _g.isRequireOTP, isicActivityList = _g.isicActivityList, currencyData = _g.currencyData;
|
|
855
855
|
var responseBody = state.data.verify.responseBody;
|
|
856
856
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id }), (brandData && { brand: brandData }));
|
|
857
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
858
|
+
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
859
|
+
state.data.nidData.nid = identification.id;
|
|
860
|
+
if (date_of_birth)
|
|
861
|
+
state.data.nidData.dob = dateFormat(date_of_birth);
|
|
862
|
+
if (identification === null || identification === void 0 ? void 0 : identification.type)
|
|
863
|
+
state.data.nidData.type = identification.type;
|
|
857
864
|
if (token)
|
|
858
865
|
state.data.verify.token = token;
|
|
859
866
|
state.data.otpData.isNID = false;
|
|
860
867
|
if (isRequireOTP)
|
|
861
868
|
return;
|
|
862
|
-
var
|
|
869
|
+
var _j = state.data.verify.responseBody || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
863
870
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
864
871
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
865
872
|
var issuingDate = ((_a = brandData === null || brandData === void 0 ? void 0 : brandData.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
|
|
866
873
|
if (issuingDate)
|
|
867
874
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
868
|
-
var
|
|
875
|
+
var _k = brandData || {}, terms = _k.terms, activities = _k.activities;
|
|
869
876
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
870
877
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
871
878
|
})) || [];
|
|
@@ -917,13 +924,20 @@ export var businessSlice = createSlice({
|
|
|
917
924
|
if ((_a = currencyData === null || currencyData === void 0 ? void 0 : currencyData.code) === null || _a === void 0 ? void 0 : _a.english)
|
|
918
925
|
state.data.currency = currencyData.code.english;
|
|
919
926
|
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, leadData), state.data.verify.responseBody), (brand && { brand: brand })), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
|
|
920
|
-
var _h = leadData || {},
|
|
927
|
+
var _h = leadData || {}, identification = _h.identification, date_of_birth = _h.date_of_birth;
|
|
928
|
+
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
929
|
+
state.data.nidData.nid = identification.id;
|
|
930
|
+
if (date_of_birth)
|
|
931
|
+
state.data.nidData.dob = dateFormat(date_of_birth);
|
|
932
|
+
if (identification === null || identification === void 0 ? void 0 : identification.type)
|
|
933
|
+
state.data.nidData.type = identification.type;
|
|
934
|
+
var _j = leadData || {}, entity = _j.entity, entity_activities = _j.entity_activities, business_name = _j.business_name;
|
|
921
935
|
if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
|
|
922
936
|
state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
|
|
923
937
|
var issuingDate = ((_b = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _b === void 0 ? void 0 : _b.start_date) || ((_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date);
|
|
924
938
|
if (issuingDate)
|
|
925
939
|
state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
|
|
926
|
-
var
|
|
940
|
+
var _k = brand || {}, terms = _k.terms, activities = _k.activities;
|
|
927
941
|
var entityActivities = (entity_activities === null || entity_activities === void 0 ? void 0 : entity_activities.filter(function (activity) {
|
|
928
942
|
return !(activities === null || activities === void 0 ? void 0 : activities.some(function (value) { return value.id === activity.id; }));
|
|
929
943
|
})) || [];
|
|
@@ -95,8 +95,6 @@ var ConnectExpress = memo(function (_a) {
|
|
|
95
95
|
useStepStartedListener();
|
|
96
96
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant;
|
|
97
97
|
React.useEffect(function () {
|
|
98
|
-
if (!postURL)
|
|
99
|
-
throw new Error('postURL is required and you have to pass it in the lib configuration!');
|
|
100
98
|
if (typeof showBoard === 'boolean')
|
|
101
99
|
dispatch(setShowBoard(showBoard));
|
|
102
100
|
sendPageView({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
22
|
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
23
|
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public
|
|
24
|
+
"push": "npm publish --access public"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|