@tap-payments/auth-jsconnect 2.6.3-test → 2.6.4-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/@types/app.d.ts +4 -0
- package/build/app/settings.d.ts +5 -1
- package/build/app/settings.js +43 -4
- package/build/features/app/bank/bankStore.d.ts +1 -0
- package/build/features/app/bank/bankStore.js +28 -1
- package/build/features/app/brand/brandStore.d.ts +1 -0
- package/build/features/app/brand/brandStore.js +28 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +1 -7
- package/build/features/app/connectExpress/connectExpressStore.js +44 -71
- package/build/features/app/entity/entityStore.d.ts +1 -0
- package/build/features/app/entity/entityStore.js +28 -1
- package/build/features/app/individual/individualStore.d.ts +1 -0
- package/build/features/app/individual/individualStore.js +28 -1
- package/build/features/app/password/passwordStore.d.ts +1 -0
- package/build/features/app/password/passwordStore.js +28 -1
- package/build/features/app/tax/taxStore.d.ts +1 -0
- package/build/features/app/tax/taxStore.js +28 -1
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +4 -4
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/connectExpress/ConnectExpress.d.ts +0 -1
- package/build/features/connectExpress/ConnectExpress.js +6 -13
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +4 -4
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +16 -4
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +4 -4
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/hooks/useAppConfig.js +4 -3
- package/package.json +1 -1
|
@@ -119,6 +119,7 @@ export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
119
119
|
formData: void;
|
|
120
120
|
individualData: any;
|
|
121
121
|
} | undefined, void, {}>;
|
|
122
|
+
export declare const onCloseCompleteIndividual: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
122
123
|
declare type VerifyData = {
|
|
123
124
|
token: string;
|
|
124
125
|
};
|
|
@@ -69,7 +69,7 @@ var _a;
|
|
|
69
69
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
70
|
import API from '../../../api';
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
|
-
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
72
|
+
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
73
73
|
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES } from '../../../constants';
|
|
74
74
|
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType } from '../../../utils';
|
|
75
75
|
export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
|
|
@@ -820,6 +820,21 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
|
|
|
820
820
|
}
|
|
821
821
|
});
|
|
822
822
|
}); });
|
|
823
|
+
export var onCloseCompleteIndividual = createAsyncThunk('individual/onCloseCompleteIndividual', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
824
|
+
var individual, id;
|
|
825
|
+
var _a;
|
|
826
|
+
return __generator(this, function (_b) {
|
|
827
|
+
switch (_b.label) {
|
|
828
|
+
case 0:
|
|
829
|
+
individual = thunkApi.getState().individual;
|
|
830
|
+
id = (((_a = individual.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.merchant) || {}).id;
|
|
831
|
+
return [4, thunkApi.dispatch(onCloseComplete(id))];
|
|
832
|
+
case 1:
|
|
833
|
+
_b.sent();
|
|
834
|
+
return [2];
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
}); });
|
|
823
838
|
var initialState = {
|
|
824
839
|
error: null,
|
|
825
840
|
loading: false,
|
|
@@ -1306,6 +1321,18 @@ export var individualSlice = createSlice({
|
|
|
1306
1321
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
1307
1322
|
state.loading = false;
|
|
1308
1323
|
state.error = action.error.message;
|
|
1324
|
+
})
|
|
1325
|
+
.addCase(onCloseCompleteIndividual.pending, function (state) {
|
|
1326
|
+
state.loading = true;
|
|
1327
|
+
state.error = null;
|
|
1328
|
+
})
|
|
1329
|
+
.addCase(onCloseCompleteIndividual.fulfilled, function (state) {
|
|
1330
|
+
state.loading = false;
|
|
1331
|
+
state.error = null;
|
|
1332
|
+
})
|
|
1333
|
+
.addCase(onCloseCompleteIndividual.rejected, function (state, action) {
|
|
1334
|
+
state.loading = false;
|
|
1335
|
+
state.error = action.error.message;
|
|
1309
1336
|
});
|
|
1310
1337
|
}
|
|
1311
1338
|
});
|
|
@@ -59,6 +59,7 @@ export declare const retrieveBoardResetPasswordSuccess: import("@reduxjs/toolkit
|
|
|
59
59
|
flows: any;
|
|
60
60
|
};
|
|
61
61
|
}, void, {}>;
|
|
62
|
+
export declare const onCloseCompletePassword: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
62
63
|
declare type VerifyData = {
|
|
63
64
|
token: string;
|
|
64
65
|
operationType?: string;
|
|
@@ -49,7 +49,7 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleCurrentActiveScreen, handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
|
|
52
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { retrieveIndividualData } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -356,6 +356,21 @@ export var retrieveBoardResetPasswordSuccess = createAsyncThunk('retrieveBoardRe
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
}); });
|
|
359
|
+
export var onCloseCompletePassword = createAsyncThunk('password/onCloseCompletePassword', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
360
|
+
var password, id;
|
|
361
|
+
var _a;
|
|
362
|
+
return __generator(this, function (_b) {
|
|
363
|
+
switch (_b.label) {
|
|
364
|
+
case 0:
|
|
365
|
+
password = thunkApi.getState().password;
|
|
366
|
+
id = (((_a = password.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.merchant) || {}).id;
|
|
367
|
+
return [4, thunkApi.dispatch(onCloseComplete(id))];
|
|
368
|
+
case 1:
|
|
369
|
+
_b.sent();
|
|
370
|
+
return [2];
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
}); });
|
|
359
374
|
var initialState = {
|
|
360
375
|
error: null,
|
|
361
376
|
loading: false,
|
|
@@ -586,6 +601,18 @@ export var passwordSlice = createSlice({
|
|
|
586
601
|
.addCase(retrieveBoardResetPasswordSuccess.rejected, function (state, action) {
|
|
587
602
|
state.loading = false;
|
|
588
603
|
state.error = action.error.message;
|
|
604
|
+
})
|
|
605
|
+
.addCase(onCloseCompletePassword.pending, function (state) {
|
|
606
|
+
state.loading = true;
|
|
607
|
+
state.error = null;
|
|
608
|
+
})
|
|
609
|
+
.addCase(onCloseCompletePassword.fulfilled, function (state) {
|
|
610
|
+
state.loading = false;
|
|
611
|
+
state.error = null;
|
|
612
|
+
})
|
|
613
|
+
.addCase(onCloseCompletePassword.rejected, function (state, action) {
|
|
614
|
+
state.loading = false;
|
|
615
|
+
state.error = action.error.message;
|
|
589
616
|
});
|
|
590
617
|
}
|
|
591
618
|
});
|
|
@@ -31,6 +31,7 @@ export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
31
31
|
response: any;
|
|
32
32
|
formData: void;
|
|
33
33
|
} | undefined, void, {}>;
|
|
34
|
+
export declare const onCloseCompleteTax: import("@reduxjs/toolkit").AsyncThunk<void, void, {}>;
|
|
34
35
|
declare type VerifyData = {
|
|
35
36
|
token: string;
|
|
36
37
|
};
|
|
@@ -49,7 +49,7 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep, handlePublicKey } from '../../../app/settings';
|
|
52
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep, handlePublicKey, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
54
54
|
import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, retrieveIndividualData, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
@@ -278,6 +278,21 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
}); });
|
|
281
|
+
export var onCloseCompleteTax = createAsyncThunk('password/onCloseCompleteTax', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
+
var tax, id;
|
|
283
|
+
var _a;
|
|
284
|
+
return __generator(this, function (_b) {
|
|
285
|
+
switch (_b.label) {
|
|
286
|
+
case 0:
|
|
287
|
+
tax = thunkApi.getState().tax;
|
|
288
|
+
id = (((_a = tax.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.merchant) || {}).id;
|
|
289
|
+
return [4, thunkApi.dispatch(onCloseComplete(id))];
|
|
290
|
+
case 1:
|
|
291
|
+
_b.sent();
|
|
292
|
+
return [2];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}); });
|
|
281
296
|
var initialState = {
|
|
282
297
|
error: null,
|
|
283
298
|
loading: false,
|
|
@@ -441,6 +456,18 @@ export var taxSlice = createSlice({
|
|
|
441
456
|
state.loading = false;
|
|
442
457
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
|
|
443
458
|
state.error = action.error.message;
|
|
459
|
+
})
|
|
460
|
+
.addCase(onCloseCompleteTax.pending, function (state) {
|
|
461
|
+
state.loading = true;
|
|
462
|
+
state.error = null;
|
|
463
|
+
})
|
|
464
|
+
.addCase(onCloseCompleteTax.fulfilled, function (state) {
|
|
465
|
+
state.loading = false;
|
|
466
|
+
state.error = null;
|
|
467
|
+
})
|
|
468
|
+
.addCase(onCloseCompleteTax.rejected, function (state, action) {
|
|
469
|
+
state.loading = false;
|
|
470
|
+
state.error = action.error.message;
|
|
444
471
|
});
|
|
445
472
|
}
|
|
446
473
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface BankLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function BankElement(props: BankLibProps): JSX.Element;
|
|
7
8
|
export declare function renderBankLib(config: BankLibProps, elementId: string): {
|
|
@@ -36,11 +36,11 @@ import { bankFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Bank = memo(function (_a) {
|
|
39
|
-
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
39
|
+
var verifyToken = _a.verifyToken, configToken = _a.configToken, props = __rest(_a, ["verifyToken", "configToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
|
-
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(bankSelector), customLoading = _c.customLoading, loading = _c.loading, bankError = _c.error;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(bankError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -55,7 +55,7 @@ var Bank = memo(function (_a) {
|
|
|
55
55
|
navigation: featureScreensNavigation,
|
|
56
56
|
open: open,
|
|
57
57
|
internalToken: verifyToken,
|
|
58
|
-
settingLoading: settingLoading
|
|
58
|
+
settingLoading: configToken ? internalLoading : settingLoading
|
|
59
59
|
});
|
|
60
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
61
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
@@ -11,12 +11,21 @@ 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 {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { bankSelector, onCloseCompleteBank } from '../../../app/bank/bankStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(bankSelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
25
|
+
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;
|
|
26
|
+
var onClose = function () {
|
|
27
|
+
dispatch(onCloseCompleteBank());
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication && redirectUrl ? onClose : undefined }));
|
|
21
30
|
};
|
|
22
31
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface BrandLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function BrandElement(props: BrandLibProps): JSX.Element;
|
|
7
8
|
export declare function renderBrandLib(config: BrandLibProps, elementId: string): {
|
|
@@ -36,11 +36,11 @@ import { brandFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { brandSelector, verifyLeadToken } from '../app/brand/brandStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Brand = memo(function (_a) {
|
|
39
|
-
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
39
|
+
var verifyToken = _a.verifyToken, configToken = _a.configToken, props = __rest(_a, ["verifyToken", "configToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
|
-
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(brandSelector), customLoading = _c.customLoading, loading = _c.loading, brandError = _c.error;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: BRAND_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: BRAND_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(brandError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -55,7 +55,7 @@ var Brand = memo(function (_a) {
|
|
|
55
55
|
navigation: featureScreensNavigation,
|
|
56
56
|
open: open,
|
|
57
57
|
internalToken: verifyToken,
|
|
58
|
-
settingLoading: settingLoading
|
|
58
|
+
settingLoading: configToken ? internalLoading : settingLoading
|
|
59
59
|
});
|
|
60
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
61
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
@@ -11,12 +11,21 @@ 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 {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { brandSelector, onCloseCompleteBrand } from '../../../app/brand/brandStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(brandSelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
25
|
+
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;
|
|
26
|
+
var onClose = function () {
|
|
27
|
+
dispatch(onCloseCompleteBrand());
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication && redirectUrl ? onClose : undefined }));
|
|
21
30
|
};
|
|
22
31
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -64,7 +64,7 @@ import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepSta
|
|
|
64
64
|
import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
|
|
65
65
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
66
66
|
import { store } from '../../app/store';
|
|
67
|
-
import { connectExpressSelector, setIsLeadIdPassed,
|
|
67
|
+
import { connectExpressSelector, setIsLeadIdPassed, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard } from '../app/connectExpress/connectExpressStore';
|
|
68
68
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
69
69
|
import Collapse from '../../components/Collapse';
|
|
70
70
|
import { isKW, findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
@@ -78,15 +78,9 @@ var ConnectExpress = memo(function (_a) {
|
|
|
78
78
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
79
79
|
var _c = useAppSelector(connectExpressSelector), connectExpressError = _c.error, loading = _c.loading, customLoading = _c.customLoading, connectData = _c.data;
|
|
80
80
|
var onVerifyConfigTokenSuccess = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
|
-
var _a,
|
|
81
|
+
var _a, lead_id, board;
|
|
82
82
|
return __generator(this, function (_b) {
|
|
83
|
-
_a = data || {},
|
|
84
|
-
if (post === null || post === void 0 ? void 0 : post.url)
|
|
85
|
-
dispatch(setPostUrl(post.url));
|
|
86
|
-
if (platform_redirect_url)
|
|
87
|
-
dispatch(setRedirectUrl(platform_redirect_url));
|
|
88
|
-
if (authData)
|
|
89
|
-
dispatch(setAuthData(authData));
|
|
83
|
+
_a = data || {}, lead_id = _a.lead_id, board = _a.board;
|
|
90
84
|
if (lead_id) {
|
|
91
85
|
dispatch(setIsLeadIdPassed(true));
|
|
92
86
|
dispatch(setLeadId(lead_id));
|
|
@@ -96,14 +90,13 @@ var ConnectExpress = memo(function (_a) {
|
|
|
96
90
|
return [2];
|
|
97
91
|
});
|
|
98
92
|
}); };
|
|
99
|
-
useAppConfig(__assign(__assign(__assign({ navigation: CONNECT_EXPRESS_SCREENS_NAVIGATION, maturity: 'express' }, props), { configToken: configToken }), (configToken && { onVerifyConfigTokenSuccess: onVerifyConfigTokenSuccess })));
|
|
93
|
+
useAppConfig(__assign(__assign(__assign({ navigation: CONNECT_EXPRESS_SCREENS_NAVIGATION, maturity: 'express' }, props), { postURL: postURL, configToken: configToken }), (configToken && { onVerifyConfigTokenSuccess: onVerifyConfigTokenSuccess })));
|
|
100
94
|
useErrorListener(connectExpressError || error);
|
|
101
95
|
useStepStartedListener();
|
|
102
96
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant;
|
|
103
97
|
React.useEffect(function () {
|
|
104
98
|
if (!postURL)
|
|
105
|
-
throw new Error('postURL is required and you
|
|
106
|
-
dispatch(setPostUrl(postURL));
|
|
99
|
+
throw new Error('postURL is required and you have to pass it in the lib configuration!');
|
|
107
100
|
if (typeof showBoard === 'boolean')
|
|
108
101
|
dispatch(setShowBoard(showBoard));
|
|
109
102
|
sendPageView({
|
|
@@ -117,7 +110,7 @@ var ConnectExpress = memo(function (_a) {
|
|
|
117
110
|
dispatch(retrieveLeadIdentityByIdAsync(connectData.leadId));
|
|
118
111
|
return;
|
|
119
112
|
}
|
|
120
|
-
if (leadId) {
|
|
113
|
+
if (leadId && props.scope !== 'auth') {
|
|
121
114
|
dispatch(setIsLeadIdPassed(true));
|
|
122
115
|
dispatch(setLeadId(leadId));
|
|
123
116
|
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
@@ -80,6 +80,8 @@ var AuthenticationList = function (_a) {
|
|
|
80
80
|
}, [methods.formState.isValid]);
|
|
81
81
|
var disabled = !methods.formState.isValid || !!error || merchantLoading || terminalLoading;
|
|
82
82
|
var handleMenuClick = function (flag) {
|
|
83
|
+
if (error)
|
|
84
|
+
dispatch(clearError());
|
|
83
85
|
setListActive(flag);
|
|
84
86
|
};
|
|
85
87
|
var isBrandList = listActive === ListType.BrandList;
|
package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js
CHANGED
|
@@ -22,7 +22,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
22
22
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
23
|
var _a = useAppSelector(connectExpressSelector), data = _a.data, loading = _a.loading;
|
|
24
24
|
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
25
|
-
var redirectUrl =
|
|
25
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
26
26
|
var onClose = function () {
|
|
27
27
|
dispatch(onCloseCompleteAsync());
|
|
28
28
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface EntityLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function EntityElement(props: EntityLibProps): JSX.Element;
|
|
7
8
|
export declare function renderEntityLib(config: EntityLibProps, elementId: string): {
|
|
@@ -36,11 +36,11 @@ import { entityFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { entitySelector, verifyLeadToken } from '../app/entity/entityStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Entity = memo(function (_a) {
|
|
39
|
-
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
|
-
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(entitySelector), customLoading = _c.customLoading, entityError = _c.error, loading = _c.loading;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: ENTITY_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: ENTITY_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(entityError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -50,7 +50,7 @@ var Entity = memo(function (_a) {
|
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
52
|
internalToken: verifyToken,
|
|
53
|
-
settingLoading: settingLoading
|
|
53
|
+
settingLoading: configToken ? internalLoading : settingLoading
|
|
54
54
|
});
|
|
55
55
|
React.useEffect(function () {
|
|
56
56
|
sendPageView({
|
|
@@ -11,12 +11,21 @@ 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 {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { entitySelector, onCloseCompleteEntity } from '../../../app/entity/entityStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(entitySelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
25
|
+
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;
|
|
26
|
+
var onClose = function () {
|
|
27
|
+
dispatch(onCloseCompleteEntity());
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], onClose: isScopeAuthentication && redirectUrl ? onClose : undefined }));
|
|
21
30
|
};
|
|
22
31
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface IndividualLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function IndividualElement(props: IndividualLibProps): JSX.Element;
|
|
7
8
|
export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): {
|
|
@@ -36,11 +36,11 @@ import { individualFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Individual = memo(function (_a) {
|
|
39
|
-
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
|
-
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(individualSelector), customLoading = _c.customLoading, individualError = _c.error, loading = _c.loading;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(individualError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -50,7 +50,7 @@ var Individual = memo(function (_a) {
|
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
52
|
internalToken: verifyToken,
|
|
53
|
-
settingLoading: settingLoading
|
|
53
|
+
settingLoading: configToken ? internalLoading : settingLoading
|
|
54
54
|
});
|
|
55
55
|
React.useEffect(function () {
|
|
56
56
|
sendPageView({
|
|
@@ -11,12 +11,21 @@ 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 {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { individualSelector, onCloseCompleteIndividual } from '../../../app/individual/individualStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(individualSelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
25
|
+
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;
|
|
26
|
+
var onClose = function () {
|
|
27
|
+
dispatch(onCloseCompleteIndividual());
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication && redirectUrl ? onClose : undefined }));
|
|
21
30
|
};
|
|
22
31
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface PasswordLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function PasswordElement(props: PasswordLibProps): JSX.Element;
|
|
7
8
|
export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
24
|
import { memo, useEffect } from 'react';
|
|
14
25
|
import { createRoot } from 'react-dom/client';
|
|
@@ -24,12 +35,13 @@ import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../cons
|
|
|
24
35
|
import { passwordFeatureScreens } from '../featuresScreens';
|
|
25
36
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
26
37
|
import Background from '../shared/Background';
|
|
27
|
-
var Password = memo(function (
|
|
38
|
+
var Password = memo(function (_a) {
|
|
39
|
+
var configToken = _a.configToken, props = __rest(_a, ["configToken"]);
|
|
28
40
|
var theme = useAppTheme().theme;
|
|
29
41
|
var dispatch = useAppDispatch();
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
42
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
43
|
+
var _c = useAppSelector(passwordSelector), customLoading = _c.customLoading, passwordError = _c.error, loading = _c.loading;
|
|
44
|
+
useAppConfig(__assign({ configToken: configToken, navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
33
45
|
useErrorListener(passwordError || error);
|
|
34
46
|
useStepStartedListener();
|
|
35
47
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -11,12 +11,21 @@ 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 {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { onCloseCompletePassword, passwordSelector } from '../../../app/password/passwordStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(passwordSelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var redirectUrl = settingsData.appConfig.redirectUrl;
|
|
25
|
+
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;
|
|
26
|
+
var onClose = function () {
|
|
27
|
+
dispatch(onCloseCompletePassword());
|
|
28
|
+
};
|
|
29
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication && redirectUrl ? onClose : undefined }));
|
|
21
30
|
};
|
|
22
31
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface TaxLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function TaxElement(props: TaxLibProps): JSX.Element;
|
|
7
8
|
export declare function renderTaxLib(config: TaxLibProps, elementId: string): {
|