@tap-payments/auth-jsconnect 2.4.51-test → 2.4.53-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.
|
@@ -41,15 +41,20 @@ var LanguageFooterStyled = styled(Box)(function (_a) {
|
|
|
41
41
|
zIndex: 99999
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
|
-
var BottomSheetStyled = styled(BottomSheet, {
|
|
45
|
-
|
|
44
|
+
var BottomSheetStyled = styled(BottomSheet, {
|
|
45
|
+
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'languageBarHeight'].includes(prop.toString()); }
|
|
46
|
+
})(function (_a) {
|
|
47
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, languageBarHeight = _a.languageBarHeight;
|
|
46
48
|
return ({
|
|
47
49
|
'[data-rsbs-header]:before': __assign({ width: '75px', height: '5px' }, (isMaturityExpress && { width: '0px', height: '0px' })),
|
|
48
50
|
'[data-rsbs-backdrop]': {
|
|
49
51
|
backgroundColor: 'transparent'
|
|
50
52
|
},
|
|
51
53
|
'[data-rsbs-header]': __assign({ paddingBottom: theme.spacing(6), position: 'absolute', width: '100vw' }, (isMaturityExpress && { display: 'none' })),
|
|
52
|
-
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight:
|
|
54
|
+
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight: "calc(100vh - ".concat(languageBarHeight, "px)") }, (isMaturityExpress && {
|
|
55
|
+
marginBottom: theme.spacing(5.625),
|
|
56
|
+
paddingTop: theme.spacing(5)
|
|
57
|
+
})),
|
|
53
58
|
'[data-rsbs-scroll]': {
|
|
54
59
|
'&::-webkit-scrollbar': {
|
|
55
60
|
width: '0px'
|
|
@@ -74,6 +79,11 @@ var BottomSheetComponent = function (_a) {
|
|
|
74
79
|
var sheetRef = React.useRef(null);
|
|
75
80
|
var isAr = useLanguage().isAr;
|
|
76
81
|
var logo = (merchantInfo || {}).logo;
|
|
82
|
+
var getLanguageBarHeight = function () {
|
|
83
|
+
var viewportHeight = window.innerHeight;
|
|
84
|
+
var documentHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);
|
|
85
|
+
return documentHeight - viewportHeight + (isMaturityExpress ? 150 : 70);
|
|
86
|
+
};
|
|
77
87
|
var getMinHeight = function (maxHeight) {
|
|
78
88
|
var el = document.getElementById('main-feature-container');
|
|
79
89
|
var footer = document.getElementById('bottom-sheet-powered_by_footer');
|
|
@@ -92,7 +102,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
92
102
|
}, 500);
|
|
93
103
|
}
|
|
94
104
|
}, [screenId]);
|
|
95
|
-
return (_jsxs(BottomSheetStyled, __assign({ sibling: _jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) }), isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
105
|
+
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), sibling: _jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) }), isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
96
106
|
var maxHeight = _a.maxHeight;
|
|
97
107
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
98
108
|
} }, rest, { children: [isMaturityExpress && _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 }) }))] })));
|
|
@@ -4,6 +4,7 @@ export interface ConnectExpressLibProps extends LibConfig {
|
|
|
4
4
|
leadId?: string;
|
|
5
5
|
postURL: string;
|
|
6
6
|
showBoard?: boolean;
|
|
7
|
+
verifyToken?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare function ConnectExpressElement(props: ConnectExpressLibProps): JSX.Element;
|
|
9
10
|
export declare function renderConnectExpressLib(config: ConnectExpressLibProps, elementId: string): {
|
|
@@ -36,11 +36,12 @@ import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
|
|
|
36
36
|
import { connectExpressFeatureScreens } from '../featuresScreens';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var ConnectExpress = memo(function (_a) {
|
|
39
|
-
var leadId = _a.leadId, postURL = _a.postURL, showBoard = _a.showBoard, props = __rest(_a, ["leadId", "postURL", "showBoard"]);
|
|
39
|
+
var leadId = _a.leadId, postURL = _a.postURL, showBoard = _a.showBoard, verifyToken = _a.verifyToken, props = __rest(_a, ["leadId", "postURL", "showBoard", "verifyToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
41
|
var dispatch = useAppDispatch();
|
|
42
42
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
43
43
|
var _c = useAppSelector(connectExpressSelector), connectExpressError = _c.error, loading = _c.loading, customLoading = _c.customLoading;
|
|
44
|
+
var token = getParameterByName('token');
|
|
44
45
|
useAppConfig(__assign({ navigation: CONNECT_EXPRESS_SCREENS_NAVIGATION, maturity: 'express' }, props));
|
|
45
46
|
useErrorListener(connectExpressError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -49,17 +50,18 @@ var ConnectExpress = memo(function (_a) {
|
|
|
49
50
|
if (!postURL)
|
|
50
51
|
throw new Error('postURL is required and you ave to pass it in the lib configuration!');
|
|
51
52
|
dispatch(setPostUrl(postURL));
|
|
53
|
+
if (token)
|
|
54
|
+
dispatch(setShowBoard(true));
|
|
52
55
|
if (typeof showBoard === 'boolean')
|
|
53
56
|
dispatch(setShowBoard(showBoard));
|
|
54
57
|
}, []);
|
|
55
58
|
React.useEffect(function () {
|
|
56
59
|
if (data.isValidOperator && props.open && !settingLoading) {
|
|
57
|
-
|
|
58
|
-
if (token) {
|
|
60
|
+
if (verifyToken) {
|
|
59
61
|
var lang = getParameterByName('lang');
|
|
60
62
|
if (lang)
|
|
61
63
|
dispatch(handleLanguage(lang));
|
|
62
|
-
dispatch(verifyLeadToken({ token:
|
|
64
|
+
dispatch(verifyLeadToken({ token: verifyToken }));
|
|
63
65
|
return;
|
|
64
66
|
}
|
|
65
67
|
if (leadId) {
|
|
@@ -6,7 +6,7 @@ export var useVerifyToken = function (_a) {
|
|
|
6
6
|
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var verifyTokenFun = function () {
|
|
9
|
-
var token = getParameterByName('token')
|
|
9
|
+
var token = internalToken ? internalToken : getParameterByName('token');
|
|
10
10
|
var lang = getParameterByName('lang');
|
|
11
11
|
if (lang)
|
|
12
12
|
dispatch(handleLanguage(lang));
|