@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-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/constants/app.js +75 -3
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +98 -47
- package/build/features/auth/Auth.js +5 -1
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/bank/Bank.js +3 -1
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/board/Board.js +8 -4
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/brand/Brand.js +3 -1
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +22 -20
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- 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/entity/Entity.js +3 -1
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/featuresScreens.js +67 -7
- package/build/features/individual/Individual.js +3 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/password/Password.js +3 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/signIn/SignIn.js +12 -3
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.js +3 -1
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/hooks/useVerifyToken.d.ts +3 -1
- package/build/hooks/useVerifyToken.js +9 -4
- package/package.json +2 -2
package/build/constants/app.js
CHANGED
|
@@ -112,6 +112,12 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
112
112
|
prev: '',
|
|
113
113
|
order: 1
|
|
114
114
|
},
|
|
115
|
+
{
|
|
116
|
+
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
117
|
+
next: '',
|
|
118
|
+
prev: '',
|
|
119
|
+
order: 1
|
|
120
|
+
},
|
|
115
121
|
{
|
|
116
122
|
name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
|
|
117
123
|
next: [
|
|
@@ -196,21 +202,27 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
196
202
|
},
|
|
197
203
|
{
|
|
198
204
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
199
|
-
next: '
|
|
205
|
+
next: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
200
206
|
prev: '',
|
|
201
207
|
order: 7
|
|
202
208
|
},
|
|
209
|
+
{
|
|
210
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
211
|
+
next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
212
|
+
prev: '',
|
|
213
|
+
order: 8
|
|
214
|
+
},
|
|
203
215
|
{
|
|
204
216
|
name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
|
|
205
217
|
next: '',
|
|
206
218
|
prev: '',
|
|
207
|
-
order:
|
|
219
|
+
order: 9
|
|
208
220
|
},
|
|
209
221
|
{
|
|
210
222
|
name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
211
223
|
next: '',
|
|
212
224
|
prev: '',
|
|
213
|
-
order:
|
|
225
|
+
order: 9
|
|
214
226
|
}
|
|
215
227
|
];
|
|
216
228
|
export var AUTH_SCREENS_NAVIGATION = [
|
|
@@ -250,6 +262,12 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
250
262
|
prev: '',
|
|
251
263
|
order: 1
|
|
252
264
|
},
|
|
265
|
+
{
|
|
266
|
+
name: 'AUTH_OPERATOR_ERROR_STEP',
|
|
267
|
+
next: '',
|
|
268
|
+
prev: '',
|
|
269
|
+
order: 1
|
|
270
|
+
},
|
|
253
271
|
{
|
|
254
272
|
name: 'AUTH_OTP_STEP',
|
|
255
273
|
next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_EMAIL_SENT_STEP', 'AUTH_MIGRATING_DATA_STEP'],
|
|
@@ -333,6 +351,12 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
333
351
|
prev: '',
|
|
334
352
|
order: 1
|
|
335
353
|
},
|
|
354
|
+
{
|
|
355
|
+
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
356
|
+
next: '',
|
|
357
|
+
prev: '',
|
|
358
|
+
order: 1
|
|
359
|
+
},
|
|
336
360
|
{
|
|
337
361
|
name: 'BUSINESS_CIVIL_ID_STEP',
|
|
338
362
|
next: 'BUSINESS_VERIFY_PACI_STEP',
|
|
@@ -431,6 +455,12 @@ export var INDIVIDUAL_SCREENS_NAVIGATION = [
|
|
|
431
455
|
prev: '',
|
|
432
456
|
order: 1
|
|
433
457
|
},
|
|
458
|
+
{
|
|
459
|
+
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
460
|
+
next: '',
|
|
461
|
+
prev: '',
|
|
462
|
+
order: 1
|
|
463
|
+
},
|
|
434
464
|
{
|
|
435
465
|
name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
436
466
|
next: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
@@ -475,6 +505,12 @@ export var PASSWORD_SCREENS_NAVIGATION = [
|
|
|
475
505
|
prev: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
476
506
|
order: 1
|
|
477
507
|
},
|
|
508
|
+
{
|
|
509
|
+
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
510
|
+
next: '',
|
|
511
|
+
prev: '',
|
|
512
|
+
order: 1
|
|
513
|
+
},
|
|
478
514
|
{
|
|
479
515
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
480
516
|
next: ['PASSWORD_SUCCESS_STEP', 'PASSWORD_RESET_PASSWORD_OTP_STEP'],
|
|
@@ -519,6 +555,12 @@ export var BANK_SCREENS_NAVIGATION = [
|
|
|
519
555
|
prev: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
520
556
|
order: 1
|
|
521
557
|
},
|
|
558
|
+
{
|
|
559
|
+
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
560
|
+
next: '',
|
|
561
|
+
prev: '',
|
|
562
|
+
order: 1
|
|
563
|
+
},
|
|
522
564
|
{
|
|
523
565
|
name: 'BANK_BANK_DETAILS_STEP',
|
|
524
566
|
next: 'BANK_DETAILS_SUCCESS_STEP',
|
|
@@ -551,6 +593,12 @@ export var BOARD_SCREENS_NAVIGATION = [
|
|
|
551
593
|
prev: '',
|
|
552
594
|
order: 1
|
|
553
595
|
},
|
|
596
|
+
{
|
|
597
|
+
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
598
|
+
next: '',
|
|
599
|
+
prev: '',
|
|
600
|
+
order: 1
|
|
601
|
+
},
|
|
554
602
|
{
|
|
555
603
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
556
604
|
next: 'BOARD_RESET_PASSWORD_SUCCESS',
|
|
@@ -577,6 +625,12 @@ export var TAX_SCREENS_NAVIGATION = [
|
|
|
577
625
|
prev: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
578
626
|
order: 1
|
|
579
627
|
},
|
|
628
|
+
{
|
|
629
|
+
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
630
|
+
next: '',
|
|
631
|
+
prev: '',
|
|
632
|
+
order: 1
|
|
633
|
+
},
|
|
580
634
|
{
|
|
581
635
|
name: 'TAX_TAX_DETAILS_STEP',
|
|
582
636
|
next: 'TAX_DETAILS_SUCCESS_STEP',
|
|
@@ -615,6 +669,12 @@ export var SigIn_SCREENS_NAVIGATION = [
|
|
|
615
669
|
prev: 'SIGIN_MOBILE_STEP',
|
|
616
670
|
order: 1
|
|
617
671
|
},
|
|
672
|
+
{
|
|
673
|
+
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
674
|
+
next: '',
|
|
675
|
+
prev: '',
|
|
676
|
+
order: 1
|
|
677
|
+
},
|
|
618
678
|
{
|
|
619
679
|
name: 'SIGIN_PASSWORD_STEP',
|
|
620
680
|
next: 'SIGIN_OTP_STEP',
|
|
@@ -641,6 +701,12 @@ export var ENTITY_SCREENS_NAVIGATION = [
|
|
|
641
701
|
prev: '',
|
|
642
702
|
order: 1
|
|
643
703
|
},
|
|
704
|
+
{
|
|
705
|
+
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
706
|
+
next: '',
|
|
707
|
+
prev: '',
|
|
708
|
+
order: 1
|
|
709
|
+
},
|
|
644
710
|
{
|
|
645
711
|
name: 'ENTITY_NAME_STEP',
|
|
646
712
|
next: 'ENTITY_CAPITAL_STEP',
|
|
@@ -685,6 +751,12 @@ export var BRAND_SCREENS_NAVIGATION = [
|
|
|
685
751
|
prev: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
686
752
|
order: 1
|
|
687
753
|
},
|
|
754
|
+
{
|
|
755
|
+
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
756
|
+
next: '',
|
|
757
|
+
prev: '',
|
|
758
|
+
order: 1
|
|
759
|
+
},
|
|
688
760
|
{
|
|
689
761
|
name: 'BRAND_INFO_STEP',
|
|
690
762
|
next: 'BRAND_SEGMENT_INFO_STEP',
|
|
@@ -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;
|
|
@@ -100,8 +100,12 @@ var Auth = memo(function (_a) {
|
|
|
100
100
|
var isOtherThanKWOrSACountry = React.useMemo(function () { var _a; return isOtherThanKWOrSA((_a = settingData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [settingData.businessCountry]);
|
|
101
101
|
React.useEffect(function () {
|
|
102
102
|
var _a, _b;
|
|
103
|
-
if (settingLoading || !props.open
|
|
103
|
+
if (settingLoading || !props.open)
|
|
104
104
|
return;
|
|
105
|
+
if (!settingData.isValidOperator) {
|
|
106
|
+
dispatch(handleCurrentActiveScreen('AUTH_OPERATOR_ERROR_STEP'));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
105
109
|
if (leadId) {
|
|
106
110
|
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
107
111
|
return;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -56,7 +56,9 @@ var Bank = memo(function (_a) {
|
|
|
56
56
|
open: open,
|
|
57
57
|
mode: props.mode,
|
|
58
58
|
internalToken: verifyToken,
|
|
59
|
-
settingLoading: settingLoading
|
|
59
|
+
settingLoading: settingLoading,
|
|
60
|
+
operatorErrorScreenName: 'BANK_OPERATOR_ERROR_STEP',
|
|
61
|
+
isValidOperator: data.isValidOperator
|
|
60
62
|
});
|
|
61
63
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
64
|
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', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, loaderColor: loaderColor, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -51,11 +51,15 @@ var Board = memo(function (_a) {
|
|
|
51
51
|
});
|
|
52
52
|
}, []);
|
|
53
53
|
React.useEffect(function () {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
if (settingLoading || !props.open)
|
|
55
|
+
return;
|
|
56
|
+
if (!data.isValidOperator) {
|
|
57
|
+
dispatch(handleCurrentActiveScreen('BOARD_OPERATOR_ERROR_STEP'));
|
|
58
|
+
return;
|
|
58
59
|
}
|
|
60
|
+
dispatch(createVerifyTokenBy(boardId));
|
|
61
|
+
if (props.mode === 'content')
|
|
62
|
+
dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP'));
|
|
59
63
|
}, [data.isValidOperator, settingLoading]);
|
|
60
64
|
var initialLoading = settingLoading || customLoading;
|
|
61
65
|
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', 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 }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: !isTapDomain(props.merchantDomain) }, { children: boardFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -56,7 +56,9 @@ var Brand = memo(function (_a) {
|
|
|
56
56
|
open: open,
|
|
57
57
|
mode: props.mode,
|
|
58
58
|
internalToken: verifyToken,
|
|
59
|
-
settingLoading: settingLoading
|
|
59
|
+
settingLoading: settingLoading,
|
|
60
|
+
operatorErrorScreenName: 'BRAND_OPERATOR_ERROR_STEP',
|
|
61
|
+
isValidOperator: data.isValidOperator
|
|
60
62
|
});
|
|
61
63
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
64
|
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', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
14
|
import { createRoot } from 'react-dom/client';
|
|
15
15
|
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
16
|
-
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
|
+
import { handleCurrentActiveScreen, handleLanguage, settingsSelector } from '../../app/settings';
|
|
17
17
|
import { FeatureContainer } from '../shared/Containers';
|
|
18
18
|
import { businessSelector, verifyLeadToken } from '../app/business/businessStore';
|
|
19
19
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
@@ -46,9 +46,14 @@ var Business = memo(function (props) {
|
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
useEffect(function () {
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if (settingLoading || !open)
|
|
50
|
+
return;
|
|
51
|
+
if (!data.isValidOperator) {
|
|
52
|
+
dispatch(handleCurrentActiveScreen('BUSINESS_OPERATOR_ERROR_STEP'));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
verifyToken();
|
|
56
|
+
}, [data.isValidOperator, settingLoading]);
|
|
52
57
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: businessFeatureScreens.map(function (_a, index) {
|
|
53
58
|
var Element = _a.element, name = _a.name;
|
|
54
59
|
var isActive = activeScreen.name === name;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import GenericError from '
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
5
|
var OperatorError = function (_a) {
|
|
6
6
|
var t = useTranslation().t;
|
|
7
7
|
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|