@tap-payments/auth-jsconnect 2.9.7-development → 2.9.9-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/@types/app.d.ts +2 -1
- package/build/@types/config.d.ts +4 -0
- package/build/api/account.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +13 -9
- package/build/components/AnimationFlow/Dialog.js +3 -1
- package/build/features/app/connectExpress/connectExpressStore.js +4 -3
- 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
package/build/@types/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaymentProvider, SettingAsyncData } from './config';
|
|
2
|
+
import { PaymentProvider, SDKNotification, SettingAsyncData } from './config';
|
|
3
3
|
import { LanguageMode, DialogEdgeFormat } from './theme';
|
|
4
4
|
export interface CountryCode {
|
|
5
5
|
created: number;
|
|
@@ -242,6 +242,7 @@ export interface LibConfig extends LibCallbacks {
|
|
|
242
242
|
redirectUrl?: string;
|
|
243
243
|
data?: Array<string>;
|
|
244
244
|
mode?: 'popup' | 'page' | 'content';
|
|
245
|
+
notification?: SDKNotification;
|
|
245
246
|
boardMaturity?: boolean;
|
|
246
247
|
settingData?: SettingAsyncData;
|
|
247
248
|
}
|
package/build/@types/config.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface PaymentProvider {
|
|
|
18
18
|
interface Redirect {
|
|
19
19
|
url: string;
|
|
20
20
|
}
|
|
21
|
+
export interface SDKNotification {
|
|
22
|
+
email: boolean;
|
|
23
|
+
mobile?: boolean;
|
|
24
|
+
}
|
|
21
25
|
interface Interface {
|
|
22
26
|
locale?: 'dynamic' | 'ar' | 'en';
|
|
23
27
|
edges?: 'straight' | 'curved';
|
package/build/api/account.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentProvider } from '../@types';
|
|
1
|
+
import { PaymentProvider, SDKNotification } from '../@types';
|
|
2
2
|
export type CreateAccountBody = {
|
|
3
3
|
lead_id: string;
|
|
4
4
|
notify: {
|
|
@@ -14,6 +14,7 @@ export type ExpressCreateAccountBody = {
|
|
|
14
14
|
lead_id: string;
|
|
15
15
|
platforms?: string[];
|
|
16
16
|
payment_provider?: PaymentProvider;
|
|
17
|
+
notification?: SDKNotification;
|
|
17
18
|
};
|
|
18
19
|
declare const accountService: {
|
|
19
20
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
|
@@ -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);
|
|
@@ -840,14 +840,14 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
840
840
|
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
841
841
|
var isRetry = _a.isRetry;
|
|
842
842
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
843
|
-
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
843
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, notification, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
844
844
|
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
845
845
|
return __generator(this, function (_v) {
|
|
846
846
|
switch (_v.label) {
|
|
847
847
|
case 0:
|
|
848
848
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
849
849
|
responseData = connectExpress.data.responseData;
|
|
850
|
-
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard;
|
|
850
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard, notification = _c.notification;
|
|
851
851
|
platforms = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
852
852
|
payment_provider = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _f === void 0 ? void 0 : _f.payment_provider) !== null && _g !== void 0 ? _g : settings.data.appConfig.paymentProvider;
|
|
853
853
|
leadId = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _h === void 0 ? void 0 : _h.id;
|
|
@@ -868,7 +868,8 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
868
868
|
lead_id: leadId,
|
|
869
869
|
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
870
870
|
platforms: platforms,
|
|
871
|
-
payment_provider: payment_provider
|
|
871
|
+
payment_provider: payment_provider,
|
|
872
|
+
notification: notification
|
|
872
873
|
};
|
|
873
874
|
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
874
875
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
@@ -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
|
});
|