@tap-payments/auth-jsconnect 2.6.3-test → 2.6.5-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
|
@@ -36,11 +36,11 @@ import { taxFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Tax = 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(taxSelector), customLoading = _c.customLoading, taxError = _c.error, loading = _c.loading;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(taxError || 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 Tax = 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, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.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 { onCloseCompleteTax, taxSelector } from '../../../app/tax/taxStore';
|
|
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(taxSelector), 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(onCloseCompleteTax());
|
|
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);
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { useEffect } from 'react';
|
|
24
|
-
import { handleActiveFlowScreens, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin, fetchAppSettingsSync, handelBoardMaturity, settingsSelector } from '../app/settings';
|
|
24
|
+
import { handleActiveFlowScreens, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin, fetchAppSettingsSync, handelBoardMaturity, settingsSelector, updateInternalLoading } from '../app/settings';
|
|
25
25
|
import { useAppDispatch } from './useAppDispatch';
|
|
26
26
|
import { useAppSelector } from './useAppSelector';
|
|
27
27
|
import { isTapDomain, removeRequestHeaders, setBaseUrl } from '../utils';
|
|
@@ -43,8 +43,9 @@ export var useAppConfig = function (_a) {
|
|
|
43
43
|
useEffect(function () {
|
|
44
44
|
if (rest.open === false)
|
|
45
45
|
return;
|
|
46
|
-
if (!disableSettingFetching)
|
|
46
|
+
if (!disableSettingFetching && !configToken)
|
|
47
47
|
removeRequestHeaders();
|
|
48
|
+
dispatch(updateInternalLoading(true));
|
|
48
49
|
checkDomain();
|
|
49
50
|
setBaseUrl(publicKey);
|
|
50
51
|
setAppConfig();
|
|
@@ -52,7 +53,7 @@ export var useAppConfig = function (_a) {
|
|
|
52
53
|
dispatch(handelBoardMaturity(boardMaturity));
|
|
53
54
|
if (!data.isMaturityExpress)
|
|
54
55
|
dispatch(handleLanguage(rest.language));
|
|
55
|
-
if (!disableSettingFetching)
|
|
56
|
+
if (!disableSettingFetching || configToken)
|
|
56
57
|
dispatch(fetchAppSettingsSync({
|
|
57
58
|
disableCountries: disableCountries,
|
|
58
59
|
disableLocale: disableLocale,
|