@tap-payments/auth-jsconnect 2.9.8-development → 2.9.10-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/components/AnimationFlow/BottomSheet.js +13 -9
- package/build/components/AnimationFlow/Dialog.js +3 -1
- package/build/features/app/individual/individualStore.js +1 -4
- package/build/features/connectExpress/ConnectExpress.js +1 -1
- package/build/features/shared/Button/FlowsButtons.js +4 -1
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/package.json +1 -1
|
@@ -44,19 +44,18 @@ var LanguageFooterStyled = styled(Box)(function (_a) {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
var BottomSheetStyled = styled(BottomSheet, {
|
|
47
|
-
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'languageBarHeight', 'dialogEdgeFormat'].includes(prop.toString()); }
|
|
47
|
+
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'languageBarHeight', 'dialogEdgeFormat', 'showPoweredBy'].includes(prop.toString()); }
|
|
48
48
|
})(function (_a) {
|
|
49
|
-
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, languageBarHeight = _a.languageBarHeight, dialogEdgeFormat = _a.dialogEdgeFormat;
|
|
49
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, languageBarHeight = _a.languageBarHeight, dialogEdgeFormat = _a.dialogEdgeFormat, showPoweredBy = _a.showPoweredBy;
|
|
50
50
|
return ({
|
|
51
51
|
'[data-rsbs-header]:before': __assign({ width: '75px', height: '5px' }, (isMaturityExpress && { width: '0px', height: '0px' })),
|
|
52
52
|
'[data-rsbs-backdrop]': {
|
|
53
53
|
backgroundColor: 'transparent'
|
|
54
54
|
},
|
|
55
55
|
'[data-rsbs-header]': __assign({ position: 'absolute', width: '100vw' }, (isMaturityExpress && { display: 'none' })),
|
|
56
|
-
'[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 && {
|
|
57
|
-
marginBottom: theme.spacing(5.625)
|
|
58
|
-
|
|
59
|
-
})), (dialogEdgeFormat === DialogEdgeFormat.STRAIGHT && { borderTopLeftRadius: theme.spacing(0), borderTopRightRadius: theme.spacing(0) })),
|
|
56
|
+
'[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 && __assign(__assign({}, (showPoweredBy && {
|
|
57
|
+
marginBottom: theme.spacing(5.625)
|
|
58
|
+
})), { paddingTop: theme.spacing(5) }))), (dialogEdgeFormat === DialogEdgeFormat.STRAIGHT && { borderTopLeftRadius: theme.spacing(0), borderTopRightRadius: theme.spacing(0) })),
|
|
60
59
|
'[data-rsbs-scroll]': {
|
|
61
60
|
'&::-webkit-scrollbar': {
|
|
62
61
|
width: '0px'
|
|
@@ -95,7 +94,8 @@ var CloseBox = styled(Box)(function (_a) {
|
|
|
95
94
|
position: 'absolute',
|
|
96
95
|
right: 0,
|
|
97
96
|
left: 0,
|
|
98
|
-
zIndex: 9999
|
|
97
|
+
zIndex: 9999,
|
|
98
|
+
top: 0
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
var BottomSheetComponent = function (_a) {
|
|
@@ -113,7 +113,11 @@ var BottomSheetComponent = function (_a) {
|
|
|
113
113
|
var el = document.getElementById('main-feature-container');
|
|
114
114
|
var footer = document.getElementById('bottom-sheet-powered_by_footer');
|
|
115
115
|
var height = el ? el.clientHeight : 0;
|
|
116
|
-
var footerHeight =
|
|
116
|
+
var footerHeight = 0;
|
|
117
|
+
if (footer)
|
|
118
|
+
footerHeight = footer.clientHeight + 20;
|
|
119
|
+
else if (hidePoweredBy && isMaturityExpress)
|
|
120
|
+
footerHeight = 40;
|
|
117
121
|
return (height || maxHeight * 0.7) + footerHeight;
|
|
118
122
|
};
|
|
119
123
|
React.useEffect(function () {
|
|
@@ -127,7 +131,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
127
131
|
}, 500);
|
|
128
132
|
}
|
|
129
133
|
}, [screenId]);
|
|
130
|
-
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), dialogEdgeFormat: dialogEdgeFormat, sibling: hideFooter ? (_jsx(_Fragment, {})) : (open && (_jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) }))), isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
134
|
+
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), dialogEdgeFormat: dialogEdgeFormat, sibling: hideFooter ? (_jsx(_Fragment, {})) : (open && (_jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) }))), isMaturityExpress: isMaturityExpress, showPoweredBy: !hidePoweredBy, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
131
135
|
var maxHeight = _a.maxHeight;
|
|
132
136
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
133
137
|
} }, rest, { children: [isMaturityExpress && !hideMerchantLogo && (_jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON })), onClose && (_jsx(CloseBox, __assign({ id: 'close-container', onClick: handleOnCloseButton }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON }) }))), children, isMaturityExpress && !hidePoweredBy && (_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 }) }))] })));
|
|
@@ -124,7 +124,9 @@ var Dialog = function (_a) {
|
|
|
124
124
|
return (_jsxs(MuiDialog, __assign({ id: DIALOG_ID, PaperProps: {
|
|
125
125
|
elevation: 0
|
|
126
126
|
}, sx: __assign({ '& .MuiDialog-paper': __assign({ overflowY: 'visible' }, (dialogEdgeFormat === DialogEdgeFormat.STRAIGHT && { borderRadius: theme.spacing(0) })), '&.MuiDialog-root': {
|
|
127
|
-
marginBottom: isMaturityExpress ? '60px' : '0px'
|
|
127
|
+
marginBottom: isMaturityExpress && !hideLanguage ? '60px' : '0px'
|
|
128
|
+
}, '& .MuiDialog-container': {
|
|
129
|
+
outline: 'none !important'
|
|
128
130
|
}, pointerEvents: pointerEvents }, sx), hideBackdrop: true, PaperComponent: PaperStyled, open: open, transitionDuration: transitionDuration || 500, keepMounted: true, "aria-describedby": 'dialog-slide-description' }, rest, animation, (animationDirection && { TransitionProps: { direction: animationDirection } }), { children: [_jsx(DialogContainer, __assign({ isTapOrigin: isTapOrigin, onClose: onClose, onConfirm: onConfirm }, { children: _jsxs(DialogContentStyled, __assign({ isTapOrigin: isTapOrigin }, { children: [_jsxs(Collapse, __assign({ in: !isTapOrigin }, { children: [!hideMerchantLogo && _jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON }), !isMaturityExpress && !hideTextLogo && (_jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_AR : ICONS_NAMES.TAP_EN, alt: 'tap logo' }) }))] })), children] })) })), isMaturityExpress && !hidePoweredBy ? _jsx(PoweredByFooter, {}) : !isMaturityExpress && !hideLanguage && _jsx(CustomFooter, {}), !hideLanguage && (_jsx(LanguageFooterStyled, __assign({ showLanguage: showLanguage }, { children: _jsx(CustomFooter, {}) })))] })));
|
|
129
131
|
};
|
|
130
132
|
export default React.memo(Dialog);
|
|
@@ -71,7 +71,7 @@ import API from '../../../api';
|
|
|
71
71
|
import { FlowsTypes, IndividualGender, DocumentPurpose } from '../../../@types';
|
|
72
72
|
import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
|
|
73
73
|
import { defaultCountry, IDENTIFICATION_TYPE, INDIVIDUAl_STEP_NAMES, MONTHLY_INCOME_LIST } from '../../../constants';
|
|
74
|
-
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA,
|
|
74
|
+
import { convertNumbers2English, dateFormat, findCountryByIddPrefix, findCountryByIso2, hasNoneEditableValue, getUserNameObject, getUserName, sleep, isValidEmail, getRecentDocumentBasedOnPurpose, formatNumberAsCurrency, removeAllCharsFromNumber, mapUserList, sortUserList, getIndividualType, isOtherThanKWOrSA, isKWOrSA, sendCustomEventToGTM } from '../../../utils';
|
|
75
75
|
export var verifyToken = createAsyncThunk('individual/verifyToken', function (_a, thunkApi) {
|
|
76
76
|
var token = _a.token, isInternally = _a.isInternally, isUpdatePhoneInfo = _a.isUpdatePhoneInfo;
|
|
77
77
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -581,9 +581,6 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
|
|
|
581
581
|
if (isOtherThanKWOrSA(settings.data.businessCountry.iso2)) {
|
|
582
582
|
identification_id_type = IDENTIFICATION_TYPE.NID;
|
|
583
583
|
}
|
|
584
|
-
if (isSA(settings.data.businessCountry.iso2)) {
|
|
585
|
-
identification_id_type = IDENTIFICATION_TYPE.NAFATH;
|
|
586
|
-
}
|
|
587
584
|
isGenderNonEditable = hasNoneEditableValue(data_status, 'gender');
|
|
588
585
|
isNameENNonEditable = hasNoneEditableValue(data_status, 'name.en');
|
|
589
586
|
isNameARNonEditable = hasNoneEditableValue(data_status, 'name.ar');
|
|
@@ -156,7 +156,7 @@ var ConnectExpress = memo(function (_a) {
|
|
|
156
156
|
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
157
157
|
}, 1100);
|
|
158
158
|
};
|
|
159
|
-
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, animationDirection: animationDirection, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapOrigin, dialogEdgeFormat: appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: false, poweredBy: !isTapOrigin }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: true }, { children: connectExpressFeatureScreens.map(function (_a, index) {
|
|
159
|
+
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, animationDirection: animationDirection, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapOrigin, dialogEdgeFormat: appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: false, poweredBy: !isTapOrigin }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: true, isTapOrigin: isTapOrigin }, { children: connectExpressFeatureScreens.map(function (_a, index) {
|
|
160
160
|
var Element = _a.element, name = _a.name;
|
|
161
161
|
var isActive = activeScreen.name === name;
|
|
162
162
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -129,6 +129,9 @@ var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
|
129
129
|
color: theme.palette.success.main
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
|
+
var LinkStyled = styled(Link)(function () { return ({
|
|
133
|
+
display: 'flex'
|
|
134
|
+
}); });
|
|
132
135
|
var BrandImage = styled(Box)(function (_a) {
|
|
133
136
|
var theme = _a.theme;
|
|
134
137
|
return ({
|
|
@@ -233,7 +236,7 @@ export default function FlowsButtons(_a) {
|
|
|
233
236
|
return (_jsxs(ButtonBoxStyled, { children: [buttons.map(function (_a, idx) {
|
|
234
237
|
var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted, sx = _a.sx, name = _a.name, status = _a.status, token = _a.token;
|
|
235
238
|
var isLast = idx === buttons.length - 1;
|
|
236
|
-
return (_jsx(
|
|
239
|
+
return (_jsx(LinkStyled, __assign({ underline: 'none', onClick: function () {
|
|
237
240
|
if (isResetPassword(name, status))
|
|
238
241
|
onResetPassword();
|
|
239
242
|
else
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BoxProps } from '@mui/material/Box';
|
|
3
3
|
interface FeatureContainerProps extends BoxProps {
|
|
4
4
|
isMaturityExpress?: boolean;
|
|
5
|
+
isTapOrigin?: boolean;
|
|
5
6
|
mode?: 'popup' | 'page' | 'content';
|
|
6
7
|
}
|
|
7
8
|
declare const FeatureContainer: React.ForwardRefExoticComponent<Omit<FeatureContainerProps, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -13,9 +13,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
|
-
var Container = styled(Box, {
|
|
16
|
+
var Container = styled(Box, {
|
|
17
|
+
shouldForwardProp: function (prop) { return !['isMaturityExpress', 'mode', 'isTapOrigin'].includes(prop); }
|
|
18
|
+
})(function (_a) {
|
|
17
19
|
var _b;
|
|
18
|
-
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, mode = _a.mode;
|
|
20
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, mode = _a.mode, isTapOrigin = _a.isTapOrigin;
|
|
19
21
|
return (_b = {
|
|
20
22
|
width: '100%',
|
|
21
23
|
minHeight: theme.spacing(30),
|
|
@@ -27,7 +29,7 @@ var Container = styled(Box, { shouldForwardProp: function (prop) { return !['isM
|
|
|
27
29
|
property: 'all'
|
|
28
30
|
},
|
|
29
31
|
_b[theme.breakpoints.down('sm')] = {
|
|
30
|
-
paddingTop: isMaturityExpress || mode === 'content' ? theme.spacing(
|
|
32
|
+
paddingTop: (isMaturityExpress && !isTapOrigin) || mode === 'content' ? theme.spacing(1.25) : theme.spacing(6)
|
|
31
33
|
},
|
|
32
34
|
_b);
|
|
33
35
|
});
|