@tap-payments/auth-jsconnect 2.7.8-test → 2.7.10-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/app/settings.js +7 -8
- package/build/components/AnimationFlow/AnimationFlow.js +2 -2
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -2
- package/build/components/AnimationFlow/BottomSheet.js +7 -6
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/package.json +1 -1
package/build/app/settings.js
CHANGED
|
@@ -63,9 +63,8 @@ import { updateLocale } from '../utils/locale';
|
|
|
63
63
|
import API, { getAxiosHeaders, setAxiosGlobalHeaders } from '../api';
|
|
64
64
|
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
65
|
var settings, _a, appConfig, language, _b, client, device, os, disableLocale, maturity, disableCountries, configToken, onVerifyConfigTokenSuccess, _c, visitorId, locale, _d, configInfo, matureData, lang, initPayload, _e, country_list, ip_info, merchant, operator, config, _f, list, _g, ip, latitude, longitude, country_code, countries, _h, operator_1, scope, data, lead, board, interfaceData, redirect, post, platforms, payment_provider, _j, locale_1, edges, deviceInfo, isValidOperator, countryCode, businessCountry, ipCountry;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
switch (_l.label) {
|
|
66
|
+
return __generator(this, function (_k) {
|
|
67
|
+
switch (_k.label) {
|
|
69
68
|
case 0:
|
|
70
69
|
settings = thunkApi.getState().settings;
|
|
71
70
|
_a = settings.data, appConfig = _a.appConfig, language = _a.language;
|
|
@@ -76,8 +75,8 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
76
75
|
return [3, 3];
|
|
77
76
|
case 1: return [4, Promise.all([getFingerPrint(), API.firebaseService.getLocale(disableLocale)])];
|
|
78
77
|
case 2:
|
|
79
|
-
_d =
|
|
80
|
-
|
|
78
|
+
_d = _k.sent();
|
|
79
|
+
_k.label = 3;
|
|
81
80
|
case 3:
|
|
82
81
|
_c = _d, visitorId = _c[0].visitorId, locale = _c[1];
|
|
83
82
|
configInfo = appConfig;
|
|
@@ -95,8 +94,8 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
95
94
|
if (_f) return [3, 5];
|
|
96
95
|
return [4, API.initService.getInitialData(initPayload)];
|
|
97
96
|
case 4:
|
|
98
|
-
_f = (
|
|
99
|
-
|
|
97
|
+
_f = (_k.sent());
|
|
98
|
+
_k.label = 5;
|
|
100
99
|
case 5:
|
|
101
100
|
_e = _f, country_list = _e.country_list, ip_info = _e.ip_info, merchant = _e.merchant, operator = _e.operator, config = _e.config;
|
|
102
101
|
list = __spreadArray([], ((country_list === null || country_list === void 0 ? void 0 : country_list.list) || []), true);
|
|
@@ -174,7 +173,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
174
173
|
operator: operator,
|
|
175
174
|
locale: locale
|
|
176
175
|
});
|
|
177
|
-
return [2, __assign(
|
|
176
|
+
return [2, __assign({ countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, ipCountry: ipCountry, isValidOperator: isValidOperator, isMaturityExpress: matureData === 'express' }, (merchant && { merchant: merchant }))];
|
|
178
177
|
}
|
|
179
178
|
});
|
|
180
179
|
}); });
|
|
@@ -39,7 +39,7 @@ export default function AnimationFlow(_a) {
|
|
|
39
39
|
return (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open, isTapOrigin: isTapOrigin, animationType: animationType, merchantInfo: merchantInfo, isMaturityExpress: isMaturityExpress, showTextLogo: showTextLogo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo, animationDirection: animationDirection, dialogEdgeFormat: dialogEdgeFormat }, { children: children })));
|
|
40
40
|
}
|
|
41
41
|
if (type === 'BOTTOMSHEET') {
|
|
42
|
-
return (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo }, { children: children })));
|
|
42
|
+
return (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo, dialogEdgeFormat: dialogEdgeFormat }, { children: children })));
|
|
43
43
|
}
|
|
44
|
-
return small ? (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, screenId: screenId, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo }, { children: children }))) : (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open, isTapOrigin: isTapOrigin, animationType: animationType, merchantInfo: merchantInfo, isMaturityExpress: isMaturityExpress, showTextLogo: showTextLogo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo, animationDirection: animationDirection, dialogEdgeFormat: dialogEdgeFormat }, { children: children })));
|
|
44
|
+
return small ? (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, screenId: screenId, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo, dialogEdgeFormat: dialogEdgeFormat }, { children: children }))) : (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open, isTapOrigin: isTapOrigin, animationType: animationType, merchantInfo: merchantInfo, isMaturityExpress: isMaturityExpress, showTextLogo: showTextLogo, hideFooter: hideFooter, hideMerchantLogo: hideMerchantLogo, animationDirection: animationDirection, dialogEdgeFormat: dialogEdgeFormat }, { children: children })));
|
|
45
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BottomSheetProps as MainBottomSheetProps } from 'react-spring-bottom-sheet';
|
|
3
3
|
import 'react-spring-bottom-sheet/dist/style.css';
|
|
4
|
-
import { MerchantInfo } from '../../@types';
|
|
4
|
+
import { DialogEdgeFormat, MerchantInfo } from '../../@types';
|
|
5
5
|
export interface BottomSheetProps extends MainBottomSheetProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
open: boolean;
|
|
@@ -11,6 +11,7 @@ export interface BottomSheetProps extends MainBottomSheetProps {
|
|
|
11
11
|
merchantInfo?: MerchantInfo;
|
|
12
12
|
hideFooter?: boolean;
|
|
13
13
|
hideMerchantLogo?: boolean;
|
|
14
|
+
dialogEdgeFormat?: DialogEdgeFormat;
|
|
14
15
|
}
|
|
15
|
-
declare const _default: React.MemoExoticComponent<({ open, children, screenId, pointerEvents, isMaturityExpress, merchantInfo, hideFooter, hideMerchantLogo, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
16
|
+
declare const _default: React.MemoExoticComponent<({ open, children, screenId, pointerEvents, isMaturityExpress, merchantInfo, hideFooter, hideMerchantLogo, dialogEdgeFormat, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
16
17
|
export default _default;
|
|
@@ -28,6 +28,7 @@ import Box from '@mui/material/Box';
|
|
|
28
28
|
import 'react-spring-bottom-sheet/dist/style.css';
|
|
29
29
|
import { ICONS_NAMES } from '../../constants';
|
|
30
30
|
import { useLanguage } from '../../hooks';
|
|
31
|
+
import { DialogEdgeFormat } from '../../@types';
|
|
31
32
|
import { CustomFooter, PoweredByFooter } from '../../features/shared/Footer';
|
|
32
33
|
import LogoBadge from '../LogoBadge';
|
|
33
34
|
var LanguageFooterStyled = styled(Box)(function (_a) {
|
|
@@ -42,19 +43,19 @@ var LanguageFooterStyled = styled(Box)(function (_a) {
|
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
var BottomSheetStyled = styled(BottomSheet, {
|
|
45
|
-
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'languageBarHeight'].includes(prop.toString()); }
|
|
46
|
+
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'languageBarHeight', 'dialogEdgeFormat'].includes(prop.toString()); }
|
|
46
47
|
})(function (_a) {
|
|
47
|
-
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, languageBarHeight = _a.languageBarHeight;
|
|
48
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, languageBarHeight = _a.languageBarHeight, dialogEdgeFormat = _a.dialogEdgeFormat;
|
|
48
49
|
return ({
|
|
49
50
|
'[data-rsbs-header]:before': __assign({ width: '75px', height: '5px' }, (isMaturityExpress && { width: '0px', height: '0px' })),
|
|
50
51
|
'[data-rsbs-backdrop]': {
|
|
51
52
|
backgroundColor: 'transparent'
|
|
52
53
|
},
|
|
53
54
|
'[data-rsbs-header]': __assign({ paddingBottom: theme.spacing(6), position: 'absolute', width: '100vw' }, (isMaturityExpress && { display: 'none' })),
|
|
54
|
-
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight: "calc(100vh - ".concat(languageBarHeight, "px)") }, (isMaturityExpress && {
|
|
55
|
+
'[data-rsbs-overlay]': __assign(__assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight: "calc(100vh - ".concat(languageBarHeight, "px)"), borderTopLeftRadius: theme.spacing(1.5), borderTopRightRadius: theme.spacing(1.5) }, (isMaturityExpress && {
|
|
55
56
|
marginBottom: theme.spacing(5.625),
|
|
56
57
|
paddingTop: theme.spacing(5)
|
|
57
|
-
})),
|
|
58
|
+
})), (dialogEdgeFormat === DialogEdgeFormat.STRAIGHT && { borderTopLeftRadius: theme.spacing(0), borderTopRightRadius: theme.spacing(0) })),
|
|
58
59
|
'[data-rsbs-scroll]': {
|
|
59
60
|
'&::-webkit-scrollbar': {
|
|
60
61
|
width: '0px'
|
|
@@ -75,7 +76,7 @@ var FooterStyled = styled(Box)(function (_a) {
|
|
|
75
76
|
return (__assign(__assign({ bottom: theme.spacing(-5.625), position: 'fixed', height: theme.spacing(5.625), display: 'flex' }, theme.typography.caption), { justifyContent: 'center', alignItems: 'center', width: '100vw', background: '#E6E7E9', borderTop: '1px solid rgba(156, 160, 169, 0.3)' }));
|
|
76
77
|
});
|
|
77
78
|
var BottomSheetComponent = function (_a) {
|
|
78
|
-
var open = _a.open, children = _a.children, screenId = _a.screenId, _b = _a.pointerEvents, pointerEvents = _b === void 0 ? 'auto' : _b, isMaturityExpress = _a.isMaturityExpress, merchantInfo = _a.merchantInfo, hideFooter = _a.hideFooter, hideMerchantLogo = _a.hideMerchantLogo, rest = __rest(_a, ["open", "children", "screenId", "pointerEvents", "isMaturityExpress", "merchantInfo", "hideFooter", "hideMerchantLogo"]);
|
|
79
|
+
var open = _a.open, children = _a.children, screenId = _a.screenId, _b = _a.pointerEvents, pointerEvents = _b === void 0 ? 'auto' : _b, isMaturityExpress = _a.isMaturityExpress, merchantInfo = _a.merchantInfo, hideFooter = _a.hideFooter, hideMerchantLogo = _a.hideMerchantLogo, dialogEdgeFormat = _a.dialogEdgeFormat, rest = __rest(_a, ["open", "children", "screenId", "pointerEvents", "isMaturityExpress", "merchantInfo", "hideFooter", "hideMerchantLogo", "dialogEdgeFormat"]);
|
|
79
80
|
var sheetRef = React.useRef(null);
|
|
80
81
|
var isAr = useLanguage().isAr;
|
|
81
82
|
var logo = (merchantInfo || {}).logo;
|
|
@@ -102,7 +103,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
102
103
|
}, 500);
|
|
103
104
|
}
|
|
104
105
|
}, [screenId]);
|
|
105
|
-
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), sibling: hideFooter ? (_jsx(_Fragment, {})) : (_jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) })), isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
106
|
+
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), dialogEdgeFormat: dialogEdgeFormat, sibling: hideFooter ? (_jsx(_Fragment, {})) : (_jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) })), isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
106
107
|
var maxHeight = _a.maxHeight;
|
|
107
108
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
108
109
|
} }, rest, { children: [isMaturityExpress && !hideMerchantLogo && (_jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON })), children, isMaturityExpress && (_jsx(FooterStyled, { children: _jsx(PoweredByFooter, { id: 'bottom-sheet-powered_by_footer', sx: { margin: '0px' }, textSx: { color: 'rgba(63, 66, 77, 0.6)' }, icon: isAr ? ICONS_NAMES.LOGO_WITH_NAME_DARK_AR_ICON : ICONS_NAMES.LOGO_WITH_NAME_DARK_EN_ICON }) }))] })));
|
|
@@ -85,8 +85,8 @@ var ConnectExpress = memo(function (_a) {
|
|
|
85
85
|
dispatch(setIsLeadIdPassed(true));
|
|
86
86
|
dispatch(setLeadId(lead.id));
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
89
|
-
dispatch(setShowBoard(
|
|
88
|
+
if (showBoard === false || (board === null || board === void 0 ? void 0 : board.display) === false)
|
|
89
|
+
dispatch(setShowBoard(false));
|
|
90
90
|
return [2];
|
|
91
91
|
});
|
|
92
92
|
}); };
|
|
@@ -95,7 +95,7 @@ var ConnectExpress = memo(function (_a) {
|
|
|
95
95
|
useStepStartedListener();
|
|
96
96
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant;
|
|
97
97
|
React.useEffect(function () {
|
|
98
|
-
if (typeof showBoard === 'boolean')
|
|
98
|
+
if (typeof showBoard === 'boolean' && !configToken)
|
|
99
99
|
dispatch(setShowBoard(showBoard));
|
|
100
100
|
sendPageView({
|
|
101
101
|
title: 'Connect Express'
|