@tap-payments/auth-jsconnect 2.8.71-development → 2.8.73-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.
@@ -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
- storeBoardId?: (boardId: string) => void;
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;
@@ -57,7 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
57
57
  var _a;
58
58
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, dangerousMessage, getParameterByName, setBaseUrl, getUserLanguage } from '../utils';
60
- import { BUSINESS_COUNTRIES, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
60
+ import { BUSINESS_COUNTRIES, DEFAULT_COUNTRY_ISO2, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
61
61
  import i18n from '../i18n';
62
62
  import { updateLocale } from '../utils/locale';
63
63
  import API, { getAxiosHeaders, setAxiosGlobalHeaders } from '../api';
@@ -161,8 +161,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
161
161
  ipCountry = undefined;
162
162
  if (countryCode)
163
163
  businessCountry = findCountryByIso2(countries, countryCode);
164
- if (country_code)
165
- ipCountry = findCountryByIso2(countries, country_code);
164
+ ipCountry = findCountryByIso2(countries, country_code !== null && country_code !== void 0 ? country_code : DEFAULT_COUNTRY_ISO2);
166
165
  if (appConfig.onSettingFetched)
167
166
  appConfig.onSettingFetched({
168
167
  config: config,
@@ -9,6 +9,7 @@ export declare const LOCAL_STORAGE_KEYS: {
9
9
  languageMode: string;
10
10
  };
11
11
  export declare const SCOPE_AUTH = "auth";
12
+ export declare const DEFAULT_COUNTRY_ISO2 = "KW";
12
13
  export declare const EXTERNAL_LINKS: {
13
14
  TOS_EN: string;
14
15
  TOS_AR: string;
@@ -9,6 +9,7 @@ export var LOCAL_STORAGE_KEYS = {
9
9
  languageMode: 'languageMode'
10
10
  };
11
11
  export var SCOPE_AUTH = 'auth';
12
+ export var DEFAULT_COUNTRY_ISO2 = 'KW';
12
13
  export var EXTERNAL_LINKS = {
13
14
  TOS_EN: '/en/terms-conditions',
14
15
  TOS_AR: '/ar/terms-conditions',
@@ -176,7 +177,7 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
176
177
  },
177
178
  {
178
179
  name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
179
- next: '',
180
+ next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
180
181
  prev: 'CONNECT_EXPRESS_AUTHENTICATION_LIST_STEP',
181
182
  order: 4
182
183
  },
@@ -615,6 +616,12 @@ export var BOARD_SCREENS_NAVIGATION = [
615
616
  prev: '',
616
617
  order: 1
617
618
  },
619
+ {
620
+ name: 'BOARD_LOADING_DATA_STEP',
621
+ next: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
622
+ prev: '',
623
+ order: 1
624
+ },
618
625
  {
619
626
  name: 'BOARD_OPERATOR_ERROR_STEP',
620
627
  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 (_g) {
668
- switch (_g.label) {
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 || (authResponse === null || authResponse === void 0 ? void 0 : authResponse.id);
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 = _g.sent();
687
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, data);
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<void, AuthenticationListFormValues & AuthMerchantFormValues, {
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 _d, _e, _f, _g;
1039
- return __generator(this, function (_h) {
1040
- switch (_h.label) {
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, postURL = _c.postURL, redirectUrl = _c.redirectUrl;
1045
- bi = settings.data.deviceInfo.browser.browser_id;
1046
- authId = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.authData) === null || _d === void 0 ? void 0 : _d.auth) === null || _e === void 0 ? void 0 : _e.id;
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: settings.data.appConfig.data || []
1056
+ data: appConfig.data || []
1055
1057
  };
1056
1058
  return [4, API.operatorService.confirm(body)];
1057
1059
  case 1:
1058
- data = _h.sent();
1059
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, data);
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 (settings.data.appConfig.mode === 'popup') {
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, _a, merchant, brand, entity;
1078
- var _b;
1079
- return __generator(this, function (_c) {
1080
- switch (_c.label) {
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
- connectExpress = thunkApi.getState().connectExpress;
1083
- _a = ((_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.boardData) || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
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
- _c.sent();
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
- state.data.responseData = __assign({}, state.data.responseData);
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;
@@ -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,4 @@
1
+ import React from 'react';
2
+ export declare const PrepareDataLoading: () => import("react/jsx-runtime").JSX.Element;
3
+ declare const _default: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
4
+ export default _default;
@@ -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);
@@ -0,0 +1,2 @@
1
+ import PrepareDataLoading from './PrepareDataLoading';
2
+ export default PrepareDataLoading;
@@ -0,0 +1,2 @@
1
+ import PrepareDataLoading from './PrepareDataLoading';
2
+ export default 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.71-development",
3
+ "version": "2.8.73-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",