@tap-payments/auth-jsconnect 2.8.44-test → 2.8.45-sandbox
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/app.d.ts +1 -0
- package/build/constants/app.js +10 -3
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +98 -47
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/featuresScreens.js +5 -0
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
package/build/constants/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
|
+
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
3
4
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
4
5
|
export declare const CLIENT_ORIGIN: string;
|
|
5
6
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
package/build/constants/app.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
3
|
+
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
3
4
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
4
5
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
5
6
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -202,21 +203,27 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
202
203
|
},
|
|
203
204
|
{
|
|
204
205
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
205
|
-
next: '
|
|
206
|
+
next: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
206
207
|
prev: '',
|
|
207
208
|
order: 7
|
|
208
209
|
},
|
|
210
|
+
{
|
|
211
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
212
|
+
next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
213
|
+
prev: '',
|
|
214
|
+
order: 8
|
|
215
|
+
},
|
|
209
216
|
{
|
|
210
217
|
name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
|
|
211
218
|
next: '',
|
|
212
219
|
prev: '',
|
|
213
|
-
order:
|
|
220
|
+
order: 9
|
|
214
221
|
},
|
|
215
222
|
{
|
|
216
223
|
name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
217
224
|
next: '',
|
|
218
225
|
prev: '',
|
|
219
|
-
order:
|
|
226
|
+
order: 9
|
|
220
227
|
}
|
|
221
228
|
];
|
|
222
229
|
export var AUTH_SCREENS_NAVIGATION = [
|
|
@@ -278,14 +278,23 @@ export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit")
|
|
|
278
278
|
rejectedMeta?: unknown;
|
|
279
279
|
}>;
|
|
280
280
|
export declare const createAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
281
|
+
accountData: any;
|
|
282
|
+
} | undefined, {
|
|
283
|
+
isRetry: boolean;
|
|
284
|
+
}, {
|
|
285
|
+
state?: unknown;
|
|
286
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
287
|
+
extra?: unknown;
|
|
288
|
+
rejectValue?: unknown;
|
|
289
|
+
serializedErrorType?: unknown;
|
|
290
|
+
pendingMeta?: unknown;
|
|
291
|
+
fulfilledMeta?: unknown;
|
|
292
|
+
rejectedMeta?: unknown;
|
|
293
|
+
}>;
|
|
294
|
+
export declare const retrieveDetailsAfterCreateAccountAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
281
295
|
boardInfo: any;
|
|
282
296
|
boardData: any;
|
|
283
|
-
|
|
284
|
-
} | {
|
|
285
|
-
account: any;
|
|
286
|
-
boardInfo?: undefined;
|
|
287
|
-
boardData?: undefined;
|
|
288
|
-
} | undefined, void, {
|
|
297
|
+
}, void, {
|
|
289
298
|
state?: unknown;
|
|
290
299
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
291
300
|
extra?: unknown;
|
|
@@ -870,62 +870,100 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
});
|
|
873
|
-
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (
|
|
874
|
-
var
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
874
|
+
var isRetry = _a.isRetry;
|
|
875
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
876
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, urlQueryStart;
|
|
877
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
878
|
+
return __generator(this, function (_v) {
|
|
879
|
+
switch (_v.label) {
|
|
880
|
+
case 0:
|
|
881
|
+
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
882
|
+
responseData = connectExpress.data.responseData;
|
|
883
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard;
|
|
884
|
+
platforms = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
885
|
+
payment_provider = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _f === void 0 ? void 0 : _f.payment_provider) !== null && _g !== void 0 ? _g : settings.data.appConfig.paymentProvider;
|
|
886
|
+
leadId = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _h === void 0 ? void 0 : _h.id;
|
|
887
|
+
authId = (_k = (_j = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.id;
|
|
888
|
+
bi = settings.data.deviceInfo.browser.browser_id;
|
|
889
|
+
accountData = undefined;
|
|
890
|
+
if (!isRetry) return [3, 2];
|
|
891
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
892
|
+
case 1:
|
|
893
|
+
data = (_v.sent()).data;
|
|
894
|
+
if (data === null || data === void 0 ? void 0 : data.board_id) {
|
|
895
|
+
leadData = data;
|
|
896
|
+
accountData = data;
|
|
897
|
+
}
|
|
898
|
+
_v.label = 2;
|
|
899
|
+
case 2:
|
|
900
|
+
body = {
|
|
901
|
+
lead_id: leadId,
|
|
902
|
+
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
903
|
+
platforms: platforms,
|
|
904
|
+
payment_provider: payment_provider
|
|
905
|
+
};
|
|
906
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
907
|
+
return [4, API.accountService.expressCreateAccount(body)];
|
|
908
|
+
case 3:
|
|
909
|
+
accountData = _v.sent();
|
|
910
|
+
_v.label = 4;
|
|
911
|
+
case 4:
|
|
912
|
+
(_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
|
|
913
|
+
(_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
|
|
914
|
+
(_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
|
|
915
|
+
if (showBoard) {
|
|
916
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
917
|
+
return [2, { accountData: accountData }];
|
|
918
|
+
}
|
|
919
|
+
if (!(scope === SCOPE_AUTH)) return [3, 8];
|
|
920
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 6];
|
|
921
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()];
|
|
922
|
+
case 5:
|
|
923
|
+
leadData = _v.sent();
|
|
924
|
+
_v.label = 6;
|
|
925
|
+
case 6: return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_s = leadData === null || leadData === void 0 ? void 0 : leadData.merchant) === null || _s === void 0 ? void 0 : _s.id, brandId: (_t = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _t === void 0 ? void 0 : _t.id, entityId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _u === void 0 ? void 0 : _u.id }))];
|
|
926
|
+
case 7:
|
|
927
|
+
_v.sent();
|
|
928
|
+
return [2, { accountData: accountData }];
|
|
929
|
+
case 8:
|
|
930
|
+
if (redirectUrl && mode === 'page') {
|
|
931
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
932
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
933
|
+
return [2, { accountData: accountData }];
|
|
934
|
+
}
|
|
935
|
+
thunkApi.dispatch(handleOpen(false));
|
|
936
|
+
return [2];
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
export var retrieveDetailsAfterCreateAccountAsync = createAsyncThunk('connectExpress/retrieveDetailsAfterCreateAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
942
|
+
var connectExpress, _a, accountData, leadData, leadResData, data, board_id, board_info_id, _b, boardInfo, boardData;
|
|
943
|
+
var _c, _d;
|
|
944
|
+
return __generator(this, function (_e) {
|
|
945
|
+
switch (_e.label) {
|
|
878
946
|
case 0:
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
authId = (_j = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _h === void 0 ? void 0 : _h.auth) === null || _j === void 0 ? void 0 : _j.id;
|
|
885
|
-
bi = settings.data.deviceInfo.browser.browser_id;
|
|
886
|
-
body = {
|
|
887
|
-
lead_id: responseData === null || responseData === void 0 ? void 0 : responseData.leadData.id,
|
|
888
|
-
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
889
|
-
platforms: platforms,
|
|
890
|
-
payment_provider: payment_provider
|
|
891
|
-
};
|
|
892
|
-
return [4, API.accountService.expressCreateAccount(body)];
|
|
947
|
+
connectExpress = thunkApi.getState().connectExpress;
|
|
948
|
+
_a = connectExpress.data.responseData || {}, accountData = _a.accountData, leadData = _a.leadData;
|
|
949
|
+
leadResData = undefined;
|
|
950
|
+
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 2];
|
|
951
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadData === null || leadData === void 0 ? void 0 : leadData.id)).unwrap()];
|
|
893
952
|
case 1:
|
|
894
|
-
data =
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
(_q = (_p = settings.data.appConfig).onStepCompleted) === null || _q === void 0 ? void 0 : _q.call(_p, settings.data.activeScreen.name, data);
|
|
898
|
-
if (!showBoard) return [3, 4];
|
|
899
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
953
|
+
data = (_e.sent()).data;
|
|
954
|
+
leadResData = data;
|
|
955
|
+
_e.label = 2;
|
|
900
956
|
case 2:
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
board_info_id = (_s = data.board_info_id) !== null && _s !== void 0 ? _s : leadData.board_info_id;
|
|
957
|
+
board_id = (_c = accountData === null || accountData === void 0 ? void 0 : accountData.board_id) !== null && _c !== void 0 ? _c : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_id;
|
|
958
|
+
board_info_id = (_d = accountData === null || accountData === void 0 ? void 0 : accountData.board_info_id) !== null && _d !== void 0 ? _d : leadResData === null || leadResData === void 0 ? void 0 : leadResData.board_info_id;
|
|
904
959
|
return [4, Promise.all([
|
|
905
960
|
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
906
961
|
API.boardService.retrieveBoardDetails(board_id)
|
|
907
962
|
])];
|
|
908
963
|
case 3:
|
|
909
|
-
|
|
964
|
+
_b = _e.sent(), boardInfo = _b[0], boardData = _b[1];
|
|
910
965
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
911
|
-
return [2, { boardInfo: boardInfo, boardData: boardData
|
|
912
|
-
case 4:
|
|
913
|
-
if (!(scope === SCOPE_AUTH)) return [3, 7];
|
|
914
|
-
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
915
|
-
case 5:
|
|
916
|
-
leadData = (_w.sent()).data;
|
|
917
|
-
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: (_t = data === null || data === void 0 ? void 0 : data.merchant) === null || _t === void 0 ? void 0 : _t.id, brandId: (_u = leadData === null || leadData === void 0 ? void 0 : leadData.brand) === null || _u === void 0 ? void 0 : _u.id, entityId: (_v = leadData === null || leadData === void 0 ? void 0 : leadData.entity) === null || _v === void 0 ? void 0 : _v.id }))];
|
|
918
|
-
case 6:
|
|
919
|
-
_w.sent();
|
|
920
|
-
return [2, { account: data }];
|
|
921
|
-
case 7:
|
|
922
|
-
if (redirectUrl && mode === 'page') {
|
|
923
|
-
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
924
|
-
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
925
|
-
return [2, { account: data }];
|
|
926
|
-
}
|
|
927
|
-
thunkApi.dispatch(handleOpen(false));
|
|
928
|
-
return [2];
|
|
966
|
+
return [2, { boardInfo: boardInfo, boardData: boardData }];
|
|
929
967
|
}
|
|
930
968
|
});
|
|
931
969
|
}); });
|
|
@@ -1567,6 +1605,19 @@ export var connectSlice = createSlice({
|
|
|
1567
1605
|
.addCase(createAccountAsync.rejected, function (state, action) {
|
|
1568
1606
|
state.loading = false;
|
|
1569
1607
|
state.error = action.error.message;
|
|
1608
|
+
})
|
|
1609
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.pending, function (state) {
|
|
1610
|
+
state.loading = true;
|
|
1611
|
+
state.error = null;
|
|
1612
|
+
})
|
|
1613
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.fulfilled, function (state, action) {
|
|
1614
|
+
state.loading = false;
|
|
1615
|
+
state.error = null;
|
|
1616
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
|
|
1617
|
+
})
|
|
1618
|
+
.addCase(retrieveDetailsAfterCreateAccountAsync.rejected, function (state, action) {
|
|
1619
|
+
state.loading = false;
|
|
1620
|
+
state.error = action.error.message;
|
|
1570
1621
|
})
|
|
1571
1622
|
.addCase(getMerchantListAsync.pending, function (state) {
|
|
1572
1623
|
state.loading = true;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import * as React from 'react';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
3
|
+
import { isNetworkError, sleep } from '../../../../utils';
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
5
|
import { connectExpressSelector, createAccountAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
18
6
|
import CreateAccountLoading from '../../../shared/CreateAccountLoading';
|
|
19
|
-
import Button from '../../../shared/Button';
|
|
20
7
|
var CreateAccountLoader = function (_a) {
|
|
21
8
|
var dispatch = useAppDispatch();
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
9
|
+
var error = useAppSelector(connectExpressSelector).error;
|
|
10
|
+
var _b = React.useState(0), isRetryCount = _b[0], setIsRetryCount = _b[1];
|
|
11
|
+
var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
|
|
25
12
|
React.useEffect(function () {
|
|
26
|
-
dispatch(createAccountAsync());
|
|
13
|
+
dispatch(createAccountAsync({ isRetry: false }));
|
|
27
14
|
}, []);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
React.useEffect(function () {
|
|
16
|
+
if (isNE && isRetryCount <= 3) {
|
|
17
|
+
sleep(2000);
|
|
18
|
+
setIsRetryCount(isRetryCount + 1);
|
|
19
|
+
dispatch(createAccountAsync({ isRetry: true }));
|
|
20
|
+
}
|
|
21
|
+
}, [isNE]);
|
|
22
|
+
return _jsx(CreateAccountLoading, { error: isNE && isRetryCount <= 3 ? '' : error });
|
|
33
23
|
};
|
|
34
24
|
export default React.memo(CreateAccountLoader);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { isNetworkError } from '../../../../utils';
|
|
16
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
+
import DataLoading from '../../../shared/DataLoading';
|
|
18
|
+
import Button from '../../../shared/Button';
|
|
19
|
+
import { connectExpressSelector, retrieveDetailsAfterCreateAccountAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
20
|
+
var PrepareDataLoading = function (_a) {
|
|
21
|
+
var dispatch = useAppDispatch();
|
|
22
|
+
var isAr = useLanguage().isAr;
|
|
23
|
+
var t = useTranslation().t;
|
|
24
|
+
var _b = useAppSelector(connectExpressSelector), error = _b.error, loading = _b.loading;
|
|
25
|
+
React.useEffect(function () {
|
|
26
|
+
dispatch(retrieveDetailsAfterCreateAccountAsync());
|
|
27
|
+
}, []);
|
|
28
|
+
var onReTry = function () {
|
|
29
|
+
dispatch(retrieveDetailsAfterCreateAccountAsync());
|
|
30
|
+
};
|
|
31
|
+
var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
|
|
32
|
+
return (_jsx(DataLoading, __assign({ error: error }, { children: isNE && (_jsx(Button, __assign({ onClick: onReTry, disableBack: true, isAr: isAr, loading: loading }, { children: t('try_again') }))) })));
|
|
33
|
+
};
|
|
34
|
+
export default React.memo(PrepareDataLoading);
|
|
@@ -22,6 +22,7 @@ import ConnectExpressIdentityVerifyOTPScreen from './connectExpress/screens/Iden
|
|
|
22
22
|
import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
|
|
23
23
|
import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
|
|
24
24
|
import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
|
|
25
|
+
import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
|
|
25
26
|
import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
|
|
26
27
|
import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/AccountAlreadyCreated';
|
|
27
28
|
import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
|
|
@@ -208,6 +209,10 @@ export var connectExpressFeatureScreens = [
|
|
|
208
209
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
209
210
|
element: ConnectExpressCreateAccountLoaderScreen
|
|
210
211
|
},
|
|
212
|
+
{
|
|
213
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
214
|
+
element: ConnectExpressPreparingDataLoaderScreen
|
|
215
|
+
},
|
|
211
216
|
{
|
|
212
217
|
name: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
213
218
|
element: ConnectExpressCollectIndividualScreen
|
package/build/utils/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axiosInstance } from '../api';
|
|
2
|
-
import { ENDPOINT_PATHS,
|
|
2
|
+
import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
|
|
3
3
|
export var sleep = function (milliseconds) {
|
|
4
4
|
if (milliseconds === void 0) { milliseconds = 1000; }
|
|
5
5
|
return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
|
|
@@ -16,7 +16,7 @@ export var setBaseUrl = function (publicKey) {
|
|
|
16
16
|
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
19
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
|
|
20
20
|
};
|
|
21
21
|
export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
22
22
|
var country = countryIso2.toLowerCase();
|
|
@@ -35,7 +35,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
|
35
35
|
window.history.replaceState({}, '', newUrl);
|
|
36
36
|
};
|
|
37
37
|
export var openConnect = function (pk, countryCode) {
|
|
38
|
-
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL :
|
|
38
|
+
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
|
|
39
39
|
if (countryCode) {
|
|
40
40
|
newUrl.pathname = "/".concat(countryCode.toLowerCase());
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.45-sandbox",
|
|
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 --tag
|
|
24
|
+
"push": "npm publish --access public --tag sandbox"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|