@tap-payments/auth-jsconnect 2.8.70-development → 2.8.72-development
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/@types/app.d.ts +3 -1
- package/build/constants/app.js +7 -1
- package/build/features/app/auth/authStore.js +13 -8
- package/build/features/app/connectExpress/connectExpressStore.d.ts +5 -1
- package/build/features/app/connectExpress/connectExpressStore.js +55 -20
- package/build/features/app/individual/individualStore.js +7 -1
- package/build/features/app/password/passwordStore.js +7 -1
- package/build/features/board/Board.d.ts +2 -0
- package/build/features/board/Board.js +8 -4
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -2
- package/build/features/featuresScreens.js +5 -0
- package/build/features/shared/Button/FlowsButtons.js +3 -1
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -211,7 +211,7 @@ interface LibCallbacks {
|
|
|
211
211
|
onCreated?: (res: Record<string, any>) => void;
|
|
212
212
|
onBoardCompleted?: () => void;
|
|
213
213
|
onMaturityChanged?: (maturity: 'full' | 'express') => void;
|
|
214
|
-
|
|
214
|
+
onSwitchToBoard?: (boardId: string, authId: string) => void;
|
|
215
215
|
}
|
|
216
216
|
export interface LibConfig extends LibCallbacks {
|
|
217
217
|
publicKey: string;
|
|
@@ -709,6 +709,8 @@ export interface AuthMerchantInfo {
|
|
|
709
709
|
terminal_id: string;
|
|
710
710
|
acceptance_status: string;
|
|
711
711
|
payout_status: string;
|
|
712
|
+
board_id: string;
|
|
713
|
+
board_info_id: string;
|
|
712
714
|
}
|
|
713
715
|
export interface AuthTerminalInfo {
|
|
714
716
|
id: string;
|
package/build/constants/app.js
CHANGED
|
@@ -176,7 +176,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
|
|
179
|
-
next: '',
|
|
179
|
+
next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
180
180
|
prev: 'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP',
|
|
181
181
|
order: 4
|
|
182
182
|
},
|
|
@@ -615,6 +615,12 @@ export var BOARD_SCREENS_NAVIGATION = [
|
|
|
615
615
|
prev: '',
|
|
616
616
|
order: 1
|
|
617
617
|
},
|
|
618
|
+
{
|
|
619
|
+
name: 'BOARD_LOADING_DATA_STEP',
|
|
620
|
+
next: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
621
|
+
prev: '',
|
|
622
|
+
order: 1
|
|
623
|
+
},
|
|
618
624
|
{
|
|
619
625
|
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
620
626
|
next: '',
|
|
@@ -662,16 +662,16 @@ export var createEntity = createAsyncThunk('auth/createEntity', function (params
|
|
|
662
662
|
export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thunkApi) {
|
|
663
663
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo, authId = _a.authId;
|
|
664
664
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
665
|
-
var _b, auth, settings, authResponse, _c, postURL, redirectUrl, bi, authenticationId, body, data, urlQueryStart;
|
|
666
|
-
var _d, _e, _f;
|
|
667
|
-
return __generator(this, function (
|
|
668
|
-
switch (
|
|
665
|
+
var _b, auth, settings, authResponse, _c, postURL, redirectUrl, showBoard, bi, authenticationId, body, data, urlQueryStart;
|
|
666
|
+
var _d, _e, _f, _g, _h, _j;
|
|
667
|
+
return __generator(this, function (_k) {
|
|
668
|
+
switch (_k.label) {
|
|
669
669
|
case 0:
|
|
670
670
|
_b = thunkApi.getState(), auth = _b.auth, settings = _b.settings;
|
|
671
671
|
authResponse = ((_d = auth.data.responseData) !== null && _d !== void 0 ? _d : {}).authResponse;
|
|
672
|
-
_c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl;
|
|
672
|
+
_c = settings.data.appConfig, postURL = _c.postURL, redirectUrl = _c.redirectUrl, showBoard = _c.showBoard;
|
|
673
673
|
bi = settings.data.deviceInfo.browser.browser_id;
|
|
674
|
-
authenticationId = authId
|
|
674
|
+
authenticationId = (_e = authId !== null && authId !== void 0 ? authId : authResponse === null || authResponse === void 0 ? void 0 : authResponse.id) !== null && _e !== void 0 ? _e : '';
|
|
675
675
|
body = {
|
|
676
676
|
post_url: postURL || '',
|
|
677
677
|
authentication_id: authenticationId,
|
|
@@ -683,8 +683,13 @@ export var confirmInfo = createAsyncThunk('auth/confirmInfo', function (_a, thun
|
|
|
683
683
|
};
|
|
684
684
|
return [4, API.operatorService.confirm(body)];
|
|
685
685
|
case 1:
|
|
686
|
-
data =
|
|
687
|
-
(
|
|
686
|
+
data = _k.sent();
|
|
687
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, data);
|
|
688
|
+
if (showBoard && (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.board_id)) {
|
|
689
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authenticationId, bi: bi });
|
|
690
|
+
(_j = (_h = settings.data.appConfig).onSwitchToBoard) === null || _j === void 0 ? void 0 : _j.call(_h, (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.board_id) || '', authenticationId);
|
|
691
|
+
return [2];
|
|
692
|
+
}
|
|
688
693
|
if (authenticationId) {
|
|
689
694
|
if (settings.data.appConfig.mode === 'popup') {
|
|
690
695
|
settings.data.appConfig.onFlowCompleted({ auth_id: authenticationId, bi: bi });
|
|
@@ -323,7 +323,11 @@ export declare const updateLeadBusinessDataAsync: import("@reduxjs/toolkit").Asy
|
|
|
323
323
|
fulfilledMeta?: unknown;
|
|
324
324
|
rejectedMeta?: unknown;
|
|
325
325
|
}>;
|
|
326
|
-
export declare const confirmInfo: import("@reduxjs/toolkit").AsyncThunk<
|
|
326
|
+
export declare const confirmInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
327
|
+
boardInfo: any;
|
|
328
|
+
boardData: any;
|
|
329
|
+
confirmData: any;
|
|
330
|
+
} | undefined, AuthenticationListFormValues & AuthMerchantFormValues, {
|
|
327
331
|
state?: unknown;
|
|
328
332
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
329
333
|
extra?: unknown;
|
|
@@ -1034,16 +1034,18 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
1034
1034
|
export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function (_a, thunkApi) {
|
|
1035
1035
|
var brandInfo = _a.brandInfo, entityInfo = _a.entityInfo, merchantInfo = _a.merchantInfo;
|
|
1036
1036
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1037
|
-
var _b, connectExpress, settings, responseData, _c, postURL, redirectUrl, bi, authId, body, data, urlQueryStart;
|
|
1038
|
-
var
|
|
1039
|
-
return __generator(this, function (
|
|
1040
|
-
switch (
|
|
1037
|
+
var _b, connectExpress, settings, responseData, _c, appConfig, deviceInfo, activeScreen, postURL, redirectUrl, showBoard, bi, authId, leadId, body, data, _d, board_id, board_info_id, _e, boardInfo, boardData, urlQueryStart;
|
|
1038
|
+
var _f, _g, _h, _j, _k;
|
|
1039
|
+
return __generator(this, function (_l) {
|
|
1040
|
+
switch (_l.label) {
|
|
1041
1041
|
case 0:
|
|
1042
1042
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
1043
1043
|
responseData = connectExpress.data.responseData;
|
|
1044
|
-
_c = settings.data.appConfig,
|
|
1045
|
-
|
|
1046
|
-
|
|
1044
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1045
|
+
postURL = appConfig.postURL, redirectUrl = appConfig.redirectUrl, showBoard = appConfig.showBoard;
|
|
1046
|
+
bi = deviceInfo.browser.browser_id;
|
|
1047
|
+
authId = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _f === void 0 ? void 0 : _f.auth) === null || _g === void 0 ? void 0 : _g.id;
|
|
1048
|
+
leadId = (_j = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _h === void 0 ? void 0 : _h.lead) === null || _j === void 0 ? void 0 : _j.id;
|
|
1047
1049
|
body = {
|
|
1048
1050
|
post_url: postURL || '',
|
|
1049
1051
|
authentication_id: authId,
|
|
@@ -1051,14 +1053,28 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1051
1053
|
brand_id: (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) || '',
|
|
1052
1054
|
merchant_id: (merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.id) || '',
|
|
1053
1055
|
entity_id: (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) || '',
|
|
1054
|
-
data:
|
|
1056
|
+
data: appConfig.data || []
|
|
1055
1057
|
};
|
|
1056
1058
|
return [4, API.operatorService.confirm(body)];
|
|
1057
1059
|
case 1:
|
|
1058
|
-
data =
|
|
1059
|
-
(
|
|
1060
|
+
data = _l.sent();
|
|
1061
|
+
(_k = appConfig.onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(appConfig, activeScreen.name, data);
|
|
1062
|
+
_d = merchantInfo || {}, board_id = _d.board_id, board_info_id = _d.board_info_id;
|
|
1063
|
+
if (!(showBoard && board_id && board_info_id)) return [3, 4];
|
|
1064
|
+
return [4, Promise.all([
|
|
1065
|
+
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
1066
|
+
API.boardService.retrieveBoardDetails(board_id)
|
|
1067
|
+
])];
|
|
1068
|
+
case 2:
|
|
1069
|
+
_e = _l.sent(), boardInfo = _e[0], boardData = _e[1];
|
|
1070
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(leadId))];
|
|
1071
|
+
case 3:
|
|
1072
|
+
_l.sent();
|
|
1073
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
1074
|
+
return [2, { boardInfo: boardInfo, boardData: boardData, confirmData: data }];
|
|
1075
|
+
case 4:
|
|
1060
1076
|
if (authId) {
|
|
1061
|
-
if (
|
|
1077
|
+
if (appConfig.mode === 'popup') {
|
|
1062
1078
|
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1063
1079
|
thunkApi.dispatch(handleOpen(false));
|
|
1064
1080
|
return [2];
|
|
@@ -1074,16 +1090,34 @@ export var confirmInfo = createAsyncThunk('connectExpress/confirmInfo', function
|
|
|
1074
1090
|
});
|
|
1075
1091
|
});
|
|
1076
1092
|
export var onCloseCompleteAsync = createAsyncThunk('connectExpress/onCloseCompleteAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1077
|
-
var connectExpress,
|
|
1078
|
-
var
|
|
1079
|
-
return __generator(this, function (
|
|
1080
|
-
switch (
|
|
1093
|
+
var _a, connectExpress, settings, _b, boardData, authData, confirmData, _c, appConfig, deviceInfo, activeScreen, _d, merchant, brand, entity, authId, redirectUrl, bi, urlQueryStart;
|
|
1094
|
+
var _e, _f, _g;
|
|
1095
|
+
return __generator(this, function (_h) {
|
|
1096
|
+
switch (_h.label) {
|
|
1081
1097
|
case 0:
|
|
1082
|
-
|
|
1083
|
-
|
|
1098
|
+
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
1099
|
+
_b = connectExpress.data.responseData || {}, boardData = _b.boardData, authData = _b.authData, confirmData = _b.confirmData;
|
|
1100
|
+
_c = settings.data, appConfig = _c.appConfig, deviceInfo = _c.deviceInfo, activeScreen = _c.activeScreen;
|
|
1101
|
+
_d = boardData || {}, merchant = _d.merchant, brand = _d.brand, entity = _d.entity;
|
|
1102
|
+
authId = (_e = authData === null || authData === void 0 ? void 0 : authData.auth) === null || _e === void 0 ? void 0 : _e.id;
|
|
1103
|
+
redirectUrl = appConfig.redirectUrl;
|
|
1104
|
+
bi = deviceInfo.browser.browser_id;
|
|
1105
|
+
if (confirmData && authId) {
|
|
1106
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, activeScreen.name, confirmData);
|
|
1107
|
+
if (settings.data.appConfig.mode === 'popup') {
|
|
1108
|
+
settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
|
|
1109
|
+
thunkApi.dispatch(handleOpen(false));
|
|
1110
|
+
return [2];
|
|
1111
|
+
}
|
|
1112
|
+
if (redirectUrl) {
|
|
1113
|
+
urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
|
|
1114
|
+
window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
|
|
1115
|
+
}
|
|
1116
|
+
return [2];
|
|
1117
|
+
}
|
|
1084
1118
|
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
1085
1119
|
case 1:
|
|
1086
|
-
|
|
1120
|
+
_h.sent();
|
|
1087
1121
|
return [2];
|
|
1088
1122
|
}
|
|
1089
1123
|
});
|
|
@@ -1577,10 +1611,11 @@ export var connectSlice = createSlice({
|
|
|
1577
1611
|
state.loading = true;
|
|
1578
1612
|
state.error = null;
|
|
1579
1613
|
})
|
|
1580
|
-
.addCase(confirmInfo.fulfilled, function (state) {
|
|
1614
|
+
.addCase(confirmInfo.fulfilled, function (state, action) {
|
|
1581
1615
|
state.loading = false;
|
|
1582
1616
|
state.error = null;
|
|
1583
|
-
|
|
1617
|
+
var _a = action.payload || {}, boardInfo = _a.boardInfo, boardData = _a.boardData, confirmData = _a.confirmData;
|
|
1618
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { boardInfo: boardInfo, boardData: boardData, confirmData: confirmData });
|
|
1584
1619
|
})
|
|
1585
1620
|
.addCase(confirmInfo.rejected, function (state, action) {
|
|
1586
1621
|
state.loading = false;
|
|
@@ -71,7 +71,7 @@ import API from '../../../api';
|
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
72
|
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
73
73
|
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES, MONTHLY_INCOME_LIST } from '../../../constants';
|
|
74
|
-
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA, isSA } from '../../../utils';
|
|
74
|
+
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA, isSA, sendCustomEventToGTM } from '../../../utils';
|
|
75
75
|
export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
|
|
76
76
|
var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
|
|
77
77
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -836,6 +836,12 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
|
|
|
836
836
|
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
837
837
|
case 1:
|
|
838
838
|
data = _p.sent();
|
|
839
|
+
sendCustomEventToGTM({
|
|
840
|
+
event: 'Send Event',
|
|
841
|
+
event_category: 'Board Flows - Individual',
|
|
842
|
+
event_action: 'Individual Update Success Page',
|
|
843
|
+
event_label: settings.data.businessCountry.iso2
|
|
844
|
+
});
|
|
839
845
|
if (!showBoard && mode === 'content') {
|
|
840
846
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
841
847
|
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
@@ -51,7 +51,7 @@ import API from '../../../api';
|
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
52
|
import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { retrieveIndividualData, sleep } from '../../../utils';
|
|
54
|
+
import { retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -248,6 +248,12 @@ export var updateBoardSuccess = createAsyncThunk('passwordUpdateBoardSuccess', f
|
|
|
248
248
|
return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
|
|
249
249
|
case 1:
|
|
250
250
|
data = _p.sent();
|
|
251
|
+
sendCustomEventToGTM({
|
|
252
|
+
event: 'Send Event',
|
|
253
|
+
event_category: 'Board Flows - Password',
|
|
254
|
+
event_action: 'Password Update Success Page',
|
|
255
|
+
event_label: settings.data.businessCountry.iso2
|
|
256
|
+
});
|
|
251
257
|
if (!showBoard && mode === 'content') {
|
|
252
258
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
253
259
|
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
|
|
@@ -3,6 +3,8 @@ export interface BoardLibProps extends LibConfig {
|
|
|
3
3
|
configToken: string;
|
|
4
4
|
boardId: string;
|
|
5
5
|
loaderColor?: string;
|
|
6
|
+
disableSettingFetching?: boolean;
|
|
7
|
+
authId?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare function BoardElement(props: BoardLibProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export declare function renderBoardLib(config: BoardLibProps, elementId: string): {
|
|
@@ -24,7 +24,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useAppDispatch } from '../../hooks';
|
|
27
|
-
import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
|
|
27
|
+
import { handleCurrentActiveScreen, settingsSelector, storeAuthId } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -37,11 +37,11 @@ import { createVerifyTokenBy, boardSelector } from '../../features/app/board/boa
|
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Board = memo(function (_a) {
|
|
39
39
|
var _b, _c;
|
|
40
|
-
var configToken = _a.configToken, boardId = _a.boardId, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "boardId", "loaderColor"]);
|
|
40
|
+
var configToken = _a.configToken, boardId = _a.boardId, loaderColor = _a.loaderColor, disableSettingFetching = _a.disableSettingFetching, authId = _a.authId, props = __rest(_a, ["configToken", "boardId", "loaderColor", "disableSettingFetching", "authId"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
42
|
var _d = useAppSelector(settingsSelector), data = _d.data, error = _d.error, settingLoading = _d.loading;
|
|
43
43
|
var _e = useAppSelector(boardSelector), customLoading = _e.customLoading, loading = _e.loading, bankError = _e.error;
|
|
44
|
-
useAppConfig(__assign(__assign({ navigation: BOARD_SCREENS_NAVIGATION }, props), { configToken: configToken }));
|
|
44
|
+
useAppConfig(__assign(__assign({ navigation: BOARD_SCREENS_NAVIGATION, disableSettingFetching: disableSettingFetching }, props), { configToken: configToken }));
|
|
45
45
|
useErrorListener(bankError || error);
|
|
46
46
|
useStepStartedListener();
|
|
47
47
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, appConfig = data.appConfig;
|
|
@@ -52,6 +52,10 @@ var Board = memo(function (_a) {
|
|
|
52
52
|
sendPageView({
|
|
53
53
|
title: 'Board'
|
|
54
54
|
});
|
|
55
|
+
if (disableSettingFetching)
|
|
56
|
+
dispatch(handleCurrentActiveScreen('BOARD_LOADING_DATA_STEP'));
|
|
57
|
+
if (authId)
|
|
58
|
+
dispatch(storeAuthId(authId));
|
|
55
59
|
}, []);
|
|
56
60
|
React.useEffect(function () {
|
|
57
61
|
if (settingLoading || !props.open)
|
|
@@ -64,7 +68,7 @@ var Board = memo(function (_a) {
|
|
|
64
68
|
if (props.mode === 'content')
|
|
65
69
|
dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP'));
|
|
66
70
|
}, [data.isValidOperator, settingLoading]);
|
|
67
|
-
var initialLoading = settingLoading || customLoading;
|
|
71
|
+
var initialLoading = disableSettingFetching ? settingLoading : settingLoading || customLoading;
|
|
68
72
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', animationDirection: animationDirection, isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapDomain(props.merchantDomain), loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: !isTapDomain(props.merchantDomain) }, { children: boardFeatureScreens.map(function (_a, index) {
|
|
69
73
|
var Element = _a.element, name = _a.name;
|
|
70
74
|
var isActive = activeScreen.name === name;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { useAppSelector } from '../../../../hooks';
|
|
4
|
+
import DataLoading from '../../../shared/DataLoading';
|
|
5
|
+
import { boardSelector } from '../../../app/board/boardStore';
|
|
6
|
+
export var PrepareDataLoading = function () {
|
|
7
|
+
var error = useAppSelector(boardSelector).error;
|
|
8
|
+
return _jsx(DataLoading, { error: error });
|
|
9
|
+
};
|
|
10
|
+
export default memo(PrepareDataLoading);
|
|
@@ -11,20 +11,30 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
-
import { useAppSelector } from '../../../../hooks';
|
|
14
|
+
import { handleOpen, settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
16
|
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
17
|
import { boardSelector } from '../../../app/board/boardStore';
|
|
18
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
19
19
|
var SuccessWithFlowButtons = function () {
|
|
20
20
|
var _a = useAppSelector(boardSelector), data = _a.data, loading = _a.loading;
|
|
21
21
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
22
|
+
var dispatch = useAppDispatch();
|
|
22
23
|
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
23
24
|
var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals, recipient = _b.recipient, board_status = _b.board_status;
|
|
24
25
|
var onClose = function () {
|
|
26
|
+
if (settingsData.appConfig.mode === 'popup') {
|
|
27
|
+
dispatch(handleOpen(false));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
25
30
|
var url = settingsData.appConfig.redirectUrl;
|
|
26
31
|
if (!url)
|
|
27
32
|
return;
|
|
33
|
+
if (settingsData.authId) {
|
|
34
|
+
var urlQueryStart = url.includes('?') ? '&' : '?';
|
|
35
|
+
window.open("".concat(url).concat(urlQueryStart, "authentication_id=").concat(settingsData.authId, "&bi=").concat(settingsData.deviceInfo.browser.browser_id), '_self');
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
28
38
|
var newUrl = new URL(url);
|
|
29
39
|
newUrl.searchParams.append('action', 'close');
|
|
30
40
|
window.open("".concat(newUrl), '_self', '_blank');
|
|
@@ -120,6 +120,7 @@ import BrandOperatorError from './brand/screens/OperatorError';
|
|
|
120
120
|
import BoardVerifyPage from './board/screens/Verify';
|
|
121
121
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
122
122
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
123
|
+
import BoardDataLoadingPage from './board/screens/PrepareDataLoading';
|
|
123
124
|
import BoardOperatorError from './board/screens/OperatorError';
|
|
124
125
|
export var connectFeatureScreens = [
|
|
125
126
|
{
|
|
@@ -602,6 +603,10 @@ export var boardFeatureScreens = [
|
|
|
602
603
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
603
604
|
element: BoardSuccessWithFlowPage
|
|
604
605
|
},
|
|
606
|
+
{
|
|
607
|
+
name: 'BOARD_LOADING_DATA_STEP',
|
|
608
|
+
element: BoardDataLoadingPage
|
|
609
|
+
},
|
|
605
610
|
{
|
|
606
611
|
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
607
612
|
element: BoardOperatorError
|
|
@@ -162,7 +162,9 @@ export default function FlowsButtons(_a) {
|
|
|
162
162
|
var onRedirect = function (item) {
|
|
163
163
|
if (!item.href)
|
|
164
164
|
return;
|
|
165
|
-
var name =
|
|
165
|
+
var name = item.name === FlowsTypes.BANK ? 'Wallet' : capitalize(item.name);
|
|
166
|
+
if (item.name === FlowsTypes.PASSWORD)
|
|
167
|
+
name = 'Set Password';
|
|
166
168
|
sendCustomEventToGTM({
|
|
167
169
|
event: 'Send Event',
|
|
168
170
|
event_category: "Board Flows - ".concat(name),
|