@tap-payments/auth-jsconnect 2.0.62-test → 2.0.64-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/lead.d.ts +2 -2
- package/build/app/settings.d.ts +2 -1
- package/build/app/settings.js +5 -1
- package/build/constants/api.js +6 -6
- package/build/constants/app.js +20 -7
- package/build/features/app/business/businessStore.js +93 -84
- package/build/features/app/individual/individualStore.js +1 -1
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/featuresScreens.js +14 -4
- package/package.json +129 -129
package/build/api/lead.d.ts
CHANGED
|
@@ -77,8 +77,8 @@ export declare type LeadIdentityUpdateBody = {
|
|
|
77
77
|
id: string;
|
|
78
78
|
country_code: string;
|
|
79
79
|
identification_id: string;
|
|
80
|
-
identification_id_type
|
|
81
|
-
date_of_birth
|
|
80
|
+
identification_id_type?: string;
|
|
81
|
+
date_of_birth?: string;
|
|
82
82
|
step_name: string;
|
|
83
83
|
encryption_contract: Array<string>;
|
|
84
84
|
};
|
package/build/app/settings.d.ts
CHANGED
|
@@ -30,8 +30,9 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
30
30
|
handlePrevScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
31
31
|
handleActiveFlowScreens: (state: SettingsState, action: ActionState<Array<ScreenStepNavigation>>) => void;
|
|
32
32
|
handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
|
|
33
|
+
handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
|
|
33
34
|
}, "settings">;
|
|
34
|
-
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
35
|
+
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, string>, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
35
36
|
declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
|
|
36
37
|
export default _default;
|
|
37
38
|
export declare const settingsSelector: (state: RootState) => SettingsState;
|
package/build/app/settings.js
CHANGED
|
@@ -220,6 +220,10 @@ export var settingsSlice = createSlice({
|
|
|
220
220
|
if (typeof open !== 'boolean')
|
|
221
221
|
throw new Error('Open is required');
|
|
222
222
|
state.data.appConfig = action.payload;
|
|
223
|
+
},
|
|
224
|
+
handleSetCountryByIso2: function (state, action) {
|
|
225
|
+
var country = findCountryByIso2(state.data.countries, action.payload);
|
|
226
|
+
state.data.businessCountry = country || defaultCountry;
|
|
223
227
|
}
|
|
224
228
|
},
|
|
225
229
|
extraReducers: function (builder) {
|
|
@@ -241,6 +245,6 @@ export var settingsSlice = createSlice({
|
|
|
241
245
|
});
|
|
242
246
|
}
|
|
243
247
|
});
|
|
244
|
-
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleIsTapOrigin = _a.handleIsTapOrigin;
|
|
248
|
+
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin;
|
|
245
249
|
export default settingsSlice.reducer;
|
|
246
250
|
export var settingsSelector = function (state) { return state.settings; };
|
package/build/constants/api.js
CHANGED
|
@@ -15,14 +15,14 @@ var IBAN_PATH = '/iban';
|
|
|
15
15
|
var CHECK_EMAIL = '/individual/email/availability';
|
|
16
16
|
var CHECK_BRAND = '/brand/name/check';
|
|
17
17
|
var CREATE_ACCOUNT_PATH = '/account';
|
|
18
|
-
var CHANNEL_PATH = '/v2/
|
|
19
|
-
var CUSTOMER_BASES_PATH = '/v2/
|
|
20
|
-
var SALES_PATH = '/v2/
|
|
21
|
-
var EXPECTED_CUSTOMERS_PATH = '/v2/
|
|
18
|
+
var CHANNEL_PATH = '/v2/channel';
|
|
19
|
+
var CUSTOMER_BASES_PATH = '/v2/customerBases';
|
|
20
|
+
var SALES_PATH = '/v2/sales';
|
|
21
|
+
var EXPECTED_CUSTOMERS_PATH = '/v2/expectedCustomers';
|
|
22
22
|
var SIGNUP_PATH = '/signup';
|
|
23
|
-
var SOURCE_INCOME_PATH = '/v2/
|
|
23
|
+
var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
|
|
24
24
|
var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
|
|
25
|
-
var OCCUPATION_PATH = '/v2/
|
|
25
|
+
var OCCUPATION_PATH = '/v2/occupation';
|
|
26
26
|
var BRAND_PATH = '/brand';
|
|
27
27
|
var BRAND_LIST_PATH = "".concat(BRAND_PATH, "/list");
|
|
28
28
|
var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/locale.json';
|
package/build/constants/app.js
CHANGED
|
@@ -37,7 +37,7 @@ export var CONNECT_SCREENS_NAVIGATION = [
|
|
|
37
37
|
name: 'CONNECT_VERIFY_PACI_STEP',
|
|
38
38
|
next: ['CONNECT_INDIVIDUAL_STEP', 'CONNECT_MERCHANT_INFO_STEP'],
|
|
39
39
|
prev: 'CONNECT_CIVIL_ID_STEP',
|
|
40
|
-
order:
|
|
40
|
+
order: 2
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
name: 'CONNECT_OTP_STEP',
|
|
@@ -73,22 +73,29 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
73
73
|
'BUSINESS_CUSTOMERS_STEP',
|
|
74
74
|
'BUSINESS_SUCCESS_STEP',
|
|
75
75
|
'BUSINESS_ACTIVITIES_STEP',
|
|
76
|
-
'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'
|
|
76
|
+
'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
77
|
+
'BUSINESS_CIVIL_ID_STEP'
|
|
77
78
|
],
|
|
78
79
|
prev: '',
|
|
79
80
|
order: 1
|
|
80
81
|
},
|
|
82
|
+
{
|
|
83
|
+
name: 'BUSINESS_CIVIL_ID_STEP',
|
|
84
|
+
next: 'BUSINESS_VERIFY_PACI_STEP',
|
|
85
|
+
prev: '',
|
|
86
|
+
order: 2
|
|
87
|
+
},
|
|
81
88
|
{
|
|
82
89
|
name: 'BUSINESS_IDBOD_STEP',
|
|
83
90
|
next: 'BUSINESS_OTP_STEP',
|
|
84
|
-
prev: '
|
|
91
|
+
prev: '',
|
|
85
92
|
order: 2
|
|
86
93
|
},
|
|
87
94
|
{
|
|
88
|
-
name: '
|
|
89
|
-
next: '
|
|
90
|
-
prev: '
|
|
91
|
-
order:
|
|
95
|
+
name: 'BUSINESS_VERIFY_PACI_STEP',
|
|
96
|
+
next: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
97
|
+
prev: 'BUSINESS_CIVIL_ID_STEP',
|
|
98
|
+
order: 3
|
|
92
99
|
},
|
|
93
100
|
{
|
|
94
101
|
name: 'BUSINESS_OTP_STEP',
|
|
@@ -96,6 +103,12 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
96
103
|
prev: 'BUSINESS_IDBOD_STEP',
|
|
97
104
|
order: 3
|
|
98
105
|
},
|
|
106
|
+
{
|
|
107
|
+
name: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
108
|
+
next: 'BUSINESS_ACTIVITIES_STEP',
|
|
109
|
+
prev: 'BUSINESS_IDBOD_STEP',
|
|
110
|
+
order: 2
|
|
111
|
+
},
|
|
99
112
|
{
|
|
100
113
|
name: 'BUSINESS_CONFIRM_STEP',
|
|
101
114
|
next: 'BUSINESS_ACTIVITIES_STEP',
|
|
@@ -60,13 +60,13 @@ import moment from 'moment';
|
|
|
60
60
|
import API from '../../../api';
|
|
61
61
|
import { BusinessType, FlowsTypes } from '../../../@types';
|
|
62
62
|
import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
63
|
-
import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep } from '../../../utils';
|
|
64
|
-
import { handleNextScreenStep } from '../../../app/settings';
|
|
63
|
+
import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW } from '../../../utils';
|
|
64
|
+
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
65
65
|
export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var payload, data, leadResponse, brandInfo, boardResponse, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
|
|
67
|
-
var _a, _b, _c, _d, _e, _f;
|
|
68
|
-
return __generator(this, function (
|
|
69
|
-
switch (
|
|
66
|
+
var payload, data, leadResponse, brandInfo, boardResponse, countryIso2, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
|
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
68
|
+
return __generator(this, function (_h) {
|
|
69
|
+
switch (_h.label) {
|
|
70
70
|
case 0:
|
|
71
71
|
payload = {
|
|
72
72
|
service_name: 'tap_email',
|
|
@@ -74,28 +74,33 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
74
74
|
};
|
|
75
75
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
76
76
|
case 1:
|
|
77
|
-
data = (
|
|
77
|
+
data = (_h.sent()).data;
|
|
78
78
|
leadResponse = undefined;
|
|
79
79
|
brandInfo = undefined;
|
|
80
80
|
boardResponse = undefined;
|
|
81
81
|
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 17];
|
|
82
82
|
return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
|
|
83
83
|
case 2:
|
|
84
|
-
leadResponse =
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
leadResponse = _h.sent();
|
|
85
|
+
countryIso2 = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.country_code;
|
|
86
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
87
|
+
board_id = (_b = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _b === void 0 ? void 0 : _b.board_id;
|
|
88
|
+
board_info_id = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.board_info_id;
|
|
87
89
|
if (!(!!board_id && !!board_info_id)) return [3, 4];
|
|
88
90
|
return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
|
|
89
91
|
case 3:
|
|
90
|
-
boardResponse =
|
|
91
|
-
|
|
92
|
+
boardResponse = _h.sent();
|
|
93
|
+
_h.label = 4;
|
|
92
94
|
case 4:
|
|
93
|
-
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
|
|
95
|
+
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
|
|
96
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
97
|
+
}
|
|
98
|
+
if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
|
|
94
99
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
95
100
|
}
|
|
96
101
|
if (!(data.step_name === 'business_info')) return [3, 17];
|
|
97
|
-
steps = (
|
|
98
|
-
brandID = (
|
|
102
|
+
steps = (_d = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _d === void 0 ? void 0 : _d.steps;
|
|
103
|
+
brandID = (_f = (_e = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _e === void 0 ? void 0 : _e.brand) === null || _f === void 0 ? void 0 : _f.id;
|
|
99
104
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
100
105
|
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
101
106
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
@@ -103,7 +108,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
103
108
|
if (!hasBusinessCompleted) return [3, 6];
|
|
104
109
|
return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
|
|
105
110
|
case 5:
|
|
106
|
-
|
|
111
|
+
_h.sent();
|
|
107
112
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
108
113
|
return [3, 17];
|
|
109
114
|
case 6:
|
|
@@ -118,36 +123,36 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
|
|
|
118
123
|
if (!hasBusinessCRActivitiesCompleted) return [3, 12];
|
|
119
124
|
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
120
125
|
case 9:
|
|
121
|
-
|
|
126
|
+
_h.sent();
|
|
122
127
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
123
128
|
case 10:
|
|
124
|
-
|
|
129
|
+
_h.sent();
|
|
125
130
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
126
131
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
127
132
|
case 11:
|
|
128
|
-
brandInfo =
|
|
133
|
+
brandInfo = _h.sent();
|
|
129
134
|
return [3, 17];
|
|
130
135
|
case 12:
|
|
131
136
|
if (!hasBusinessCRInfoCompleted) return [3, 15];
|
|
132
137
|
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
133
138
|
case 13:
|
|
134
|
-
|
|
139
|
+
_h.sent();
|
|
135
140
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
136
141
|
case 14:
|
|
137
|
-
brandInfo =
|
|
142
|
+
brandInfo = _h.sent();
|
|
138
143
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
139
144
|
return [3, 17];
|
|
140
145
|
case 15: return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
141
146
|
case 16:
|
|
142
|
-
|
|
147
|
+
_h.sent();
|
|
143
148
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
144
|
-
|
|
149
|
+
_h.label = 17;
|
|
145
150
|
case 17: return [2, {
|
|
146
151
|
data: data,
|
|
147
152
|
leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
|
|
148
153
|
token: token,
|
|
149
154
|
brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand,
|
|
150
|
-
boardId: (
|
|
155
|
+
boardId: (_g = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _g === void 0 ? void 0 : _g.board_id
|
|
151
156
|
}];
|
|
152
157
|
}
|
|
153
158
|
});
|
|
@@ -170,93 +175,99 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
|
|
|
170
175
|
});
|
|
171
176
|
}); });
|
|
172
177
|
export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
|
-
var _a, business, settings, isNID, responseBody, verifyResponse, stepName, brandID, payload, data, brandInfo, steps, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
|
|
174
|
-
var _b, _c, _d, _e, _f, _g, _h
|
|
175
|
-
return __generator(this, function (
|
|
176
|
-
switch (
|
|
178
|
+
var _a, business, settings, isNID, responseBody, verifyResponse, stepName, brandID, countryIso2, payload, data, brandInfo, steps, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep;
|
|
179
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
180
|
+
return __generator(this, function (_j) {
|
|
181
|
+
switch (_j.label) {
|
|
177
182
|
case 0:
|
|
178
183
|
_a = thunkApi.getState(), business = _a.business, settings = _a.settings;
|
|
179
184
|
isNID = business.data.otpData.isNID;
|
|
180
185
|
responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
|
|
181
186
|
verifyResponse = business.data.verify.responseBody;
|
|
182
187
|
stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
|
|
183
|
-
brandID = (
|
|
188
|
+
brandID = (_b = verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.brand) === null || _b === void 0 ? void 0 : _b.id;
|
|
189
|
+
countryIso2 = verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.country_code;
|
|
184
190
|
payload = {
|
|
185
191
|
data: params.otp,
|
|
186
|
-
service_name: ((
|
|
187
|
-
verify_token: ((
|
|
192
|
+
service_name: ((_d = (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _c === void 0 ? void 0 : _c.verification_by) === null || _d === void 0 ? void 0 : _d.service_name) || ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _e === void 0 ? void 0 : _e.service_name),
|
|
193
|
+
verify_token: ((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _f === void 0 ? void 0 : _f.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
|
|
188
194
|
step_name: stepName,
|
|
189
195
|
encryption_contract: ['data']
|
|
190
196
|
};
|
|
191
197
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
192
198
|
case 1:
|
|
193
|
-
data = (
|
|
199
|
+
data = (_j.sent()).data;
|
|
194
200
|
brandInfo = undefined;
|
|
195
|
-
if (!!data.errors) return [3,
|
|
201
|
+
if (!!data.errors) return [3, 15];
|
|
196
202
|
thunkApi.dispatch(updateStepName(stepName));
|
|
197
203
|
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
198
204
|
case 2:
|
|
199
|
-
|
|
200
|
-
(
|
|
205
|
+
_j.sent();
|
|
206
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
|
|
201
207
|
steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
|
|
202
208
|
hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
|
|
203
209
|
hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
|
|
204
210
|
hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
|
|
205
211
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
212
|
+
isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
|
|
206
213
|
if (!isNID) return [3, 3];
|
|
207
214
|
thunkApi.dispatch(handleNextScreenStep());
|
|
208
|
-
return [3,
|
|
215
|
+
return [3, 15];
|
|
209
216
|
case 3:
|
|
210
|
-
if (!
|
|
211
|
-
|
|
217
|
+
if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 4];
|
|
218
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
|
|
219
|
+
return [3, 15];
|
|
212
220
|
case 4:
|
|
213
|
-
|
|
214
|
-
thunkApi.dispatch(
|
|
215
|
-
return [3, 14];
|
|
221
|
+
if (!hasBusinessCompleted) return [3, 6];
|
|
222
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.board_id))];
|
|
216
223
|
case 5:
|
|
217
|
-
|
|
218
|
-
thunkApi.dispatch(handleNextScreenStep('
|
|
219
|
-
return [3,
|
|
224
|
+
_j.sent();
|
|
225
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
226
|
+
return [3, 15];
|
|
220
227
|
case 6:
|
|
221
|
-
if (!
|
|
222
|
-
thunkApi.dispatch(handleNextScreenStep('
|
|
223
|
-
return [3,
|
|
228
|
+
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 7];
|
|
229
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
230
|
+
return [3, 15];
|
|
224
231
|
case 7:
|
|
225
|
-
if (!
|
|
232
|
+
if (!hasBusinessCustomersCompleted) return [3, 8];
|
|
233
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
234
|
+
return [3, 15];
|
|
235
|
+
case 8:
|
|
236
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 11];
|
|
226
237
|
thunkApi.dispatch(retrieveChannels());
|
|
227
238
|
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
228
|
-
case
|
|
229
|
-
|
|
239
|
+
case 9:
|
|
240
|
+
_j.sent();
|
|
230
241
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
231
242
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
232
|
-
case 9:
|
|
233
|
-
brandInfo = _k.sent();
|
|
234
|
-
return [3, 14];
|
|
235
243
|
case 10:
|
|
236
|
-
|
|
237
|
-
return [
|
|
244
|
+
brandInfo = _j.sent();
|
|
245
|
+
return [3, 15];
|
|
238
246
|
case 11:
|
|
239
|
-
|
|
240
|
-
return [4,
|
|
247
|
+
if (!hasBusinessCRInfoCompleted) return [3, 14];
|
|
248
|
+
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
241
249
|
case 12:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return [3, 14];
|
|
250
|
+
_j.sent();
|
|
251
|
+
return [4, API.brandService.retrieveBrand(brandID)];
|
|
245
252
|
case 13:
|
|
253
|
+
brandInfo = _j.sent();
|
|
254
|
+
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
255
|
+
return [3, 15];
|
|
256
|
+
case 14:
|
|
246
257
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
247
|
-
|
|
248
|
-
case
|
|
258
|
+
_j.label = 15;
|
|
259
|
+
case 15: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand }];
|
|
249
260
|
}
|
|
250
261
|
});
|
|
251
262
|
}); });
|
|
252
263
|
export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
253
|
-
var _a, settings,
|
|
264
|
+
var _a, settings, business, responseBody, expiry, interval, maxCalls, response, count, data, isSuccess;
|
|
254
265
|
var _b, _c;
|
|
255
266
|
return __generator(this, function (_d) {
|
|
256
267
|
switch (_d.label) {
|
|
257
268
|
case 0:
|
|
258
|
-
_a = thunkApi.getState(), settings = _a.settings,
|
|
259
|
-
responseBody =
|
|
269
|
+
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
270
|
+
responseBody = business.data.civilIdData.responseBody;
|
|
260
271
|
expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
|
|
261
272
|
interval = 5;
|
|
262
273
|
maxCalls = Math.floor(expiry / interval);
|
|
@@ -292,29 +303,26 @@ export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkAp
|
|
|
292
303
|
});
|
|
293
304
|
}); });
|
|
294
305
|
export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
295
|
-
var settings, requestBody, data;
|
|
296
|
-
var
|
|
297
|
-
return __generator(this, function (
|
|
298
|
-
switch (
|
|
306
|
+
var _a, settings, business, stepName, requestBody, data;
|
|
307
|
+
var _b, _c, _d;
|
|
308
|
+
return __generator(this, function (_e) {
|
|
309
|
+
switch (_e.label) {
|
|
299
310
|
case 0:
|
|
300
|
-
|
|
311
|
+
_a = thunkApi.getState(), settings = _a.settings, business = _a.business;
|
|
312
|
+
stepName = BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID;
|
|
301
313
|
requestBody = {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
step_name: BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID,
|
|
309
|
-
encryption_contract: ['user_credentail.identification_id']
|
|
314
|
+
id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
|
|
315
|
+
identification_id: params.civilId,
|
|
316
|
+
country_code: settings.data.businessCountry.iso2,
|
|
317
|
+
step_name: stepName,
|
|
318
|
+
identification_id_type: 'civil_id',
|
|
319
|
+
encryption_contract: ['identification_id']
|
|
310
320
|
};
|
|
311
|
-
return [4, API.
|
|
321
|
+
return [4, API.leadService.updateLead(requestBody)];
|
|
312
322
|
case 1:
|
|
313
|
-
data =
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
317
|
-
}
|
|
323
|
+
data = _e.sent();
|
|
324
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
325
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
|
|
318
326
|
return [2, { response: data, formData: params }];
|
|
319
327
|
}
|
|
320
328
|
});
|
|
@@ -841,6 +849,7 @@ export var businessSlice = createSlice({
|
|
|
841
849
|
state.error = description;
|
|
842
850
|
return;
|
|
843
851
|
}
|
|
852
|
+
state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
|
|
844
853
|
})
|
|
845
854
|
.addCase(createCivilIdAuth.rejected, function (state, action) {
|
|
846
855
|
state.loading = false;
|
|
@@ -324,7 +324,7 @@ export var individualSlice = createSlice({
|
|
|
324
324
|
var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a, _b, _c; return ((_b = (_a = source === null || source === void 0 ? void 0 : source.range) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) === ((_c = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _c === void 0 ? void 0 : _c.toLocaleLowerCase()); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
|
|
325
325
|
if (!!selectedSourceIncome)
|
|
326
326
|
state.data.individualData.sourceIncome = selectedSourceIncome;
|
|
327
|
-
var selectedMonthlyIncome = (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) { var _a; return ((_a = income === null || income === void 0 ? void 0 : income.name
|
|
327
|
+
var selectedMonthlyIncome = (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) { var _a, _b; return ((_b = (_a = income === null || income === void 0 ? void 0 : income.name) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) === (actual_income === null || actual_income === void 0 ? void 0 : actual_income.toLocaleLowerCase()); })) || (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
|
|
328
328
|
if (!!selectedMonthlyIncome)
|
|
329
329
|
state.data.individualData.monthlyIncome = selectedMonthlyIncome;
|
|
330
330
|
var code = (data === null || data === void 0 ? void 0 : data.employer_country) || countryCode;
|
|
@@ -63,7 +63,7 @@ var CivilID = function (_a) {
|
|
|
63
63
|
var settingsStore = useAppSelector(settingsSelector);
|
|
64
64
|
var methods = useForm({
|
|
65
65
|
resolver: yupResolver(civilIDValidationSchema),
|
|
66
|
-
defaultValues:
|
|
66
|
+
defaultValues: data.civilIdData,
|
|
67
67
|
mode: 'onChange'
|
|
68
68
|
});
|
|
69
69
|
React.useEffect(function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MobileScreen from './connect/screens/Mobile';
|
|
2
2
|
import NIDScreen from './connect/screens/NID';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import ConnectCivilIDScreen from '../features/connect/screens/CivilID';
|
|
4
|
+
import ConnectVerifyPACIScreen from './connect/screens/VerifyPACI';
|
|
5
5
|
import IndividualScreen from './connect/screens/Individual';
|
|
6
6
|
import MerchantInfoScreen from './connect/screens/Merchant';
|
|
7
7
|
import ConnectOTPScreen from './connect/screens/OTP';
|
|
@@ -15,6 +15,8 @@ import ActivitiesPage from './business/screens/Activities';
|
|
|
15
15
|
import SuccessPage from './business/screens/Success';
|
|
16
16
|
import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
|
|
17
17
|
import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
18
|
+
import BusCivilIDscreen from './business/screens/CivilID';
|
|
19
|
+
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
18
20
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
19
21
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
20
22
|
import PasswordOTPPage from './password/screens/OTP';
|
|
@@ -54,7 +56,7 @@ export var connectFeatureScreens = [
|
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
name: 'CONNECT_CIVIL_ID_STEP',
|
|
57
|
-
element:
|
|
59
|
+
element: ConnectCivilIDScreen
|
|
58
60
|
},
|
|
59
61
|
{
|
|
60
62
|
name: 'CONNECT_MOBILE_STEP',
|
|
@@ -66,7 +68,7 @@ export var connectFeatureScreens = [
|
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
70
|
name: 'CONNECT_VERIFY_PACI_STEP',
|
|
69
|
-
element:
|
|
71
|
+
element: ConnectVerifyPACIScreen
|
|
70
72
|
},
|
|
71
73
|
{
|
|
72
74
|
name: 'CONNECT_INDIVIDUAL_STEP',
|
|
@@ -90,6 +92,14 @@ export var businessFeatureScreens = [
|
|
|
90
92
|
name: 'BUSINESS_IDBOD_STEP',
|
|
91
93
|
element: IDBODPage
|
|
92
94
|
},
|
|
95
|
+
{
|
|
96
|
+
name: 'BUSINESS_CIVIL_ID_STEP',
|
|
97
|
+
element: BusCivilIDscreen
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'BUSINESS_VERIFY_PACI_STEP',
|
|
101
|
+
element: BusVerifyPACIScreen
|
|
102
|
+
},
|
|
93
103
|
{
|
|
94
104
|
name: 'BUSINESS_OTP_STEP',
|
|
95
105
|
element: BusinessOTPPage
|
package/package.json
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "connect library, auth",
|
|
5
|
-
"private": false,
|
|
6
|
-
"main": "build/index.js",
|
|
7
|
-
"module": "build/index.js",
|
|
8
|
-
"types": "build/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"build",
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"husky:setup": "npx husky install",
|
|
15
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
-
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
-
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
-
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
-
"build": "rm -rf build && cross-env NODE_ENV=production webpack",
|
|
21
|
-
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
-
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [],
|
|
27
|
-
"author": {
|
|
28
|
-
"name": "Ahmed Elsharkawy",
|
|
29
|
-
"email": "a.elsharkawy@tap.company"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC",
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.18.6",
|
|
34
|
-
"@babel/preset-env": "^7.18.6",
|
|
35
|
-
"@babel/preset-react": "^7.18.6",
|
|
36
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
-
"@types/lodash-es": "^4.17.6",
|
|
38
|
-
"@types/moment-hijri": "^2.1.0",
|
|
39
|
-
"@types/react": "^18.0.15",
|
|
40
|
-
"@types/react-calendar": "~3.5.1",
|
|
41
|
-
"@types/react-dom": "^18.0.6",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
43
|
-
"@typescript-eslint/parser": "^5.30.5",
|
|
44
|
-
"babel-loader": "^8.2.5",
|
|
45
|
-
"copyfiles": "^2.4.1",
|
|
46
|
-
"cross-env": "^7.0.3",
|
|
47
|
-
"css-loader": "^6.7.1",
|
|
48
|
-
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
49
|
-
"eslint": "^8.19.0",
|
|
50
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
51
|
-
"eslint-config-prettier": "^8.5.0",
|
|
52
|
-
"eslint-plugin-import": "^2.26.0",
|
|
53
|
-
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
54
|
-
"eslint-plugin-node": "^11.1.0",
|
|
55
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
-
"eslint-plugin-react": "^7.30.1",
|
|
57
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
-
"file-loader": "^6.2.0",
|
|
59
|
-
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
60
|
-
"html-loader": "^3.1.2",
|
|
61
|
-
"html-webpack-plugin": "^5.5.0",
|
|
62
|
-
"husky": "^8.0.1",
|
|
63
|
-
"lint-staged": "^13.0.3",
|
|
64
|
-
"mini-css-extract-plugin": "^2.6.1",
|
|
65
|
-
"prettier": "^2.7.1",
|
|
66
|
-
"sass": "^1.53.0",
|
|
67
|
-
"sass-loader": "^13.0.2",
|
|
68
|
-
"style-loader": "^3.3.1",
|
|
69
|
-
"terser-webpack-plugin": "^5.3.3",
|
|
70
|
-
"tsc-alias": "^1.6.11",
|
|
71
|
-
"typescript": "^4.7.4",
|
|
72
|
-
"webpack": "^5.73.0",
|
|
73
|
-
"webpack-cli": "^4.10.0",
|
|
74
|
-
"webpack-dev-server": "^4.9.3",
|
|
75
|
-
"webpack-merge": "^5.8.0"
|
|
76
|
-
},
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"@emotion/react": "^11.9.3",
|
|
79
|
-
"@emotion/styled": "^11.9.3",
|
|
80
|
-
"@fingerprintjs/fingerprintjs": "~3.3.4",
|
|
81
|
-
"@hookform/resolvers": "^2.9.6",
|
|
82
|
-
"@mui/icons-material": "^5.8.4",
|
|
83
|
-
"@mui/material": "^5.8.7",
|
|
84
|
-
"@reduxjs/toolkit": "^1.8.3",
|
|
85
|
-
"axios": "^0.27.2",
|
|
86
|
-
"device-detector-js": "^3.0.3",
|
|
87
|
-
"i18next": "^21.8.14",
|
|
88
|
-
"i18next-browser-languagedetector": "^6.1.4",
|
|
89
|
-
"i18next-http-backend": "^1.4.1",
|
|
90
|
-
"jsencrypt": "^2.3.1",
|
|
91
|
-
"lodash-es": "^4.17.21",
|
|
92
|
-
"lottie-web": "^5.9.6",
|
|
93
|
-
"moment-hijri": "~2.1.2",
|
|
94
|
-
"react": "^18.2.0",
|
|
95
|
-
"react-calendar": "~3.7.0",
|
|
96
|
-
"react-device-detect": "^2.2.2",
|
|
97
|
-
"react-dom": "^18.2.0",
|
|
98
|
-
"react-dropzone": "^14.2.2",
|
|
99
|
-
"react-hook-form": "^7.33.1",
|
|
100
|
-
"react-i18next": "^11.18.1",
|
|
101
|
-
"react-otp-input": "^2.4.0",
|
|
102
|
-
"react-redux": "^8.0.2",
|
|
103
|
-
"react-spring-bottom-sheet": "^3.4.1",
|
|
104
|
-
"yup": "^0.32.11"
|
|
105
|
-
},
|
|
106
|
-
"peerDependencies": {
|
|
107
|
-
"react": "^18.2.0",
|
|
108
|
-
"react-dom": "^18.2.0"
|
|
109
|
-
},
|
|
110
|
-
"lint-staged": {
|
|
111
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
112
|
-
"yarn run prettier:fix",
|
|
113
|
-
"yarn run lint",
|
|
114
|
-
"git add ."
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
"browserslist": {
|
|
118
|
-
"production": [
|
|
119
|
-
">0.2%",
|
|
120
|
-
"not dead",
|
|
121
|
-
"not op_mini all"
|
|
122
|
-
],
|
|
123
|
-
"development": [
|
|
124
|
-
"last 1 chrome version",
|
|
125
|
-
"last 1 firefox version",
|
|
126
|
-
"last 1 safari version"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
+
"version": "2.0.64-test",
|
|
4
|
+
"description": "connect library, auth",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/index.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"build",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"husky:setup": "npx husky install",
|
|
15
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
+
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
+
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
+
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
+
"build": "rm -rf build && cross-env NODE_ENV=production webpack",
|
|
21
|
+
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
+
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
+
"push": "npm publish --access public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Ahmed Elsharkawy",
|
|
29
|
+
"email": "a.elsharkawy@tap.company"
|
|
30
|
+
},
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "^7.18.6",
|
|
34
|
+
"@babel/preset-env": "^7.18.6",
|
|
35
|
+
"@babel/preset-react": "^7.18.6",
|
|
36
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
+
"@types/lodash-es": "^4.17.6",
|
|
38
|
+
"@types/moment-hijri": "^2.1.0",
|
|
39
|
+
"@types/react": "^18.0.15",
|
|
40
|
+
"@types/react-calendar": "~3.5.1",
|
|
41
|
+
"@types/react-dom": "^18.0.6",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
43
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
44
|
+
"babel-loader": "^8.2.5",
|
|
45
|
+
"copyfiles": "^2.4.1",
|
|
46
|
+
"cross-env": "^7.0.3",
|
|
47
|
+
"css-loader": "^6.7.1",
|
|
48
|
+
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
49
|
+
"eslint": "^8.19.0",
|
|
50
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
51
|
+
"eslint-config-prettier": "^8.5.0",
|
|
52
|
+
"eslint-plugin-import": "^2.26.0",
|
|
53
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
54
|
+
"eslint-plugin-node": "^11.1.0",
|
|
55
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
+
"eslint-plugin-react": "^7.30.1",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
+
"file-loader": "^6.2.0",
|
|
59
|
+
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
60
|
+
"html-loader": "^3.1.2",
|
|
61
|
+
"html-webpack-plugin": "^5.5.0",
|
|
62
|
+
"husky": "^8.0.1",
|
|
63
|
+
"lint-staged": "^13.0.3",
|
|
64
|
+
"mini-css-extract-plugin": "^2.6.1",
|
|
65
|
+
"prettier": "^2.7.1",
|
|
66
|
+
"sass": "^1.53.0",
|
|
67
|
+
"sass-loader": "^13.0.2",
|
|
68
|
+
"style-loader": "^3.3.1",
|
|
69
|
+
"terser-webpack-plugin": "^5.3.3",
|
|
70
|
+
"tsc-alias": "^1.6.11",
|
|
71
|
+
"typescript": "^4.7.4",
|
|
72
|
+
"webpack": "^5.73.0",
|
|
73
|
+
"webpack-cli": "^4.10.0",
|
|
74
|
+
"webpack-dev-server": "^4.9.3",
|
|
75
|
+
"webpack-merge": "^5.8.0"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@emotion/react": "^11.9.3",
|
|
79
|
+
"@emotion/styled": "^11.9.3",
|
|
80
|
+
"@fingerprintjs/fingerprintjs": "~3.3.4",
|
|
81
|
+
"@hookform/resolvers": "^2.9.6",
|
|
82
|
+
"@mui/icons-material": "^5.8.4",
|
|
83
|
+
"@mui/material": "^5.8.7",
|
|
84
|
+
"@reduxjs/toolkit": "^1.8.3",
|
|
85
|
+
"axios": "^0.27.2",
|
|
86
|
+
"device-detector-js": "^3.0.3",
|
|
87
|
+
"i18next": "^21.8.14",
|
|
88
|
+
"i18next-browser-languagedetector": "^6.1.4",
|
|
89
|
+
"i18next-http-backend": "^1.4.1",
|
|
90
|
+
"jsencrypt": "^2.3.1",
|
|
91
|
+
"lodash-es": "^4.17.21",
|
|
92
|
+
"lottie-web": "^5.9.6",
|
|
93
|
+
"moment-hijri": "~2.1.2",
|
|
94
|
+
"react": "^18.2.0",
|
|
95
|
+
"react-calendar": "~3.7.0",
|
|
96
|
+
"react-device-detect": "^2.2.2",
|
|
97
|
+
"react-dom": "^18.2.0",
|
|
98
|
+
"react-dropzone": "^14.2.2",
|
|
99
|
+
"react-hook-form": "^7.33.1",
|
|
100
|
+
"react-i18next": "^11.18.1",
|
|
101
|
+
"react-otp-input": "^2.4.0",
|
|
102
|
+
"react-redux": "^8.0.2",
|
|
103
|
+
"react-spring-bottom-sheet": "^3.4.1",
|
|
104
|
+
"yup": "^0.32.11"
|
|
105
|
+
},
|
|
106
|
+
"peerDependencies": {
|
|
107
|
+
"react": "^18.2.0",
|
|
108
|
+
"react-dom": "^18.2.0"
|
|
109
|
+
},
|
|
110
|
+
"lint-staged": {
|
|
111
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
112
|
+
"yarn run prettier:fix",
|
|
113
|
+
"yarn run lint",
|
|
114
|
+
"git add ."
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"browserslist": {
|
|
118
|
+
"production": [
|
|
119
|
+
">0.2%",
|
|
120
|
+
"not dead",
|
|
121
|
+
"not op_mini all"
|
|
122
|
+
],
|
|
123
|
+
"development": [
|
|
124
|
+
"last 1 chrome version",
|
|
125
|
+
"last 1 firefox version",
|
|
126
|
+
"last 1 safari version"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
}
|