@tap-payments/auth-jsconnect 1.0.61 → 1.0.65
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/redux.d.ts +1 -0
- package/build/api/lead.d.ts +4 -1
- package/build/assets/locales/ar.json +5 -3
- package/build/assets/locales/en.json +7 -5
- package/build/constants/assets.d.ts +19 -7
- package/build/constants/assets.js +19 -7
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +1 -1
- package/build/features/app/bank/bankStore.js +4 -0
- package/build/features/app/business/businessStore.d.ts +9 -2
- package/build/features/app/business/businessStore.js +133 -73
- package/build/features/app/connect/connectStore.js +18 -5
- package/build/features/app/individual/individualStore.js +4 -0
- package/build/features/app/password/passwordStore.js +6 -0
- package/build/features/app/tax/taxStore.js +6 -0
- package/build/features/business/Business.js +3 -2
- package/build/features/business/screens/Activities/Activities.js +4 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +5 -6
- package/build/features/business/screens/Activities/SalesChannels.js +4 -5
- package/build/features/business/screens/BusinessType/BusinessType.js +1 -6
- package/build/features/business/screens/BusinessType/LicenseList.js +17 -12
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/BusinessType/validation.d.ts +3 -3
- package/build/features/business/screens/BusinessType/validation.js +14 -7
- package/build/features/business/screens/Customers/Customers.js +0 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +0 -5
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +39 -35
- package/build/features/business/screens/Verify/Verify.js +1 -1
- package/build/features/password/screens/CreatePassword/CreatePassword.js +0 -1
- package/build/features/shared/Button/AbsherButton.js +23 -19
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -3
- package/build/features/shared/Button/FlowsButtons.js +37 -20
- package/build/features/shared/Button/MobileButton.js +14 -11
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +4 -0
- package/package.json +1 -1
|
@@ -10,17 +10,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { createElement as _createElement } from "react";
|
|
14
|
+
import React from 'react';
|
|
13
15
|
import Button from '../../../components/Button';
|
|
14
16
|
import { alpha, styled } from '@mui/material/styles';
|
|
15
17
|
import Box from '@mui/material/Box';
|
|
16
18
|
import Link from '@mui/material/Link';
|
|
17
|
-
|
|
19
|
+
import { ICONS_NAMES } from '../../../constants';
|
|
20
|
+
import CheckIcon from '@mui/icons-material/Check';
|
|
21
|
+
var Image = styled('img', { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
18
22
|
var theme = _a.theme;
|
|
19
23
|
return ({
|
|
20
24
|
width: theme.spacing(3),
|
|
21
25
|
height: theme.spacing(3),
|
|
22
26
|
fontSize: theme.spacing(3),
|
|
23
|
-
marginInlineStart: theme.spacing(1)
|
|
27
|
+
marginInlineStart: theme.spacing(1),
|
|
28
|
+
transform: theme.direction === 'rtl' ? 'scaleX(-1)' : 'scaleX(1)'
|
|
24
29
|
});
|
|
25
30
|
});
|
|
26
31
|
var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
@@ -29,29 +34,41 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
29
34
|
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
30
35
|
});
|
|
31
36
|
});
|
|
32
|
-
var ButtonStyled = styled(Button)(function (_a) {
|
|
33
|
-
var theme = _a.theme;
|
|
34
|
-
return ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
'&:disabled': {
|
|
37
|
+
var ButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'isCompleted'; } })(function (_a) {
|
|
38
|
+
var theme = _a.theme, isCompleted = _a.isCompleted;
|
|
39
|
+
return (__assign(__assign({ width: '100%', textTransform: 'none', paddingInlineStart: theme.spacing(0.75), backgroundColor: theme.palette.common.white, border: "1px solid ".concat(theme.palette.primary.main), color: theme.palette.primary.main }, (isCompleted && {
|
|
40
|
+
paddingInlineEnd: '13px',
|
|
41
|
+
color: theme.palette.success.main,
|
|
42
|
+
border: "1px solid ".concat(theme.palette.success.main)
|
|
43
|
+
})), { '&:hover': __assign({ backgroundColor: theme.palette.primary.main, color: theme.palette.common.white }, (isCompleted && {
|
|
44
|
+
backgroundColor: theme.palette.common.white,
|
|
45
|
+
border: "1px solid ".concat(theme.palette.success.main),
|
|
46
|
+
color: theme.palette.success.main,
|
|
47
|
+
cursor: 'initial'
|
|
48
|
+
})), '&:disabled': {
|
|
45
49
|
backgroundColor: theme.palette.common.white,
|
|
46
50
|
color: alpha(theme.palette.primary.main, 0.3)
|
|
47
|
-
}
|
|
51
|
+
} }));
|
|
52
|
+
});
|
|
53
|
+
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return ({
|
|
56
|
+
width: theme.spacing(2.5),
|
|
57
|
+
height: theme.spacing(2.5),
|
|
58
|
+
color: theme.palette.success.main
|
|
48
59
|
});
|
|
49
60
|
});
|
|
50
61
|
export default function FlowsButtons(_a) {
|
|
51
62
|
var buttons = _a.buttons;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
|
|
63
|
+
var _b = React.useState(), index = _b[0], setIndex = _b[1];
|
|
64
|
+
return (_jsx(ButtonBoxStyled, { children: buttons.map(function (_a, idx) {
|
|
65
|
+
var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted;
|
|
66
|
+
var isLast = idx === buttons.length - 1;
|
|
67
|
+
var linkProps = {
|
|
68
|
+
href: href,
|
|
69
|
+
target: '_blank'
|
|
70
|
+
};
|
|
71
|
+
return (_createElement(Link, __assign({}, (!isCompleted && linkProps), { underline: 'none', key: idx, onMouseEnter: function () { return !isCompleted && setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); } }),
|
|
72
|
+
_jsx(ButtonStyled, __assign({ isCompleted: isCompleted, sx: { mb: isLast ? 0 : 1.8 }, endIcon: isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon })), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title }))));
|
|
56
73
|
}) }));
|
|
57
74
|
}
|
|
@@ -21,6 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import React from 'react';
|
|
24
25
|
import Button from '../../../components/Button';
|
|
25
26
|
import Icon from '../../../components/Icon';
|
|
26
27
|
import { alpha, styled } from '@mui/material/styles';
|
|
@@ -38,23 +39,21 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
38
39
|
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
39
40
|
});
|
|
40
41
|
});
|
|
41
|
-
var ButtonStyled = styled(Button)(function (_a) {
|
|
42
|
-
var theme = _a.theme;
|
|
42
|
+
var ButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'touched'; } })(function (_a) {
|
|
43
|
+
var theme = _a.theme, touched = _a.touched;
|
|
43
44
|
return ({
|
|
44
45
|
paddingInlineStart: theme.spacing(0.75),
|
|
45
|
-
|
|
46
|
+
textTransform: 'none',
|
|
47
|
+
backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white,
|
|
46
48
|
border: "1px solid ".concat(theme.palette.primary.main),
|
|
47
|
-
color: theme.palette.primary.main,
|
|
49
|
+
color: touched ? theme.palette.common.white : theme.palette.primary.main,
|
|
48
50
|
'&:hover': {
|
|
49
|
-
backgroundColor: theme.palette.primary.main,
|
|
50
|
-
color: theme.palette.common.white,
|
|
51
|
+
backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white,
|
|
52
|
+
color: touched ? theme.palette.common.white : theme.palette.primary.main,
|
|
51
53
|
img: {
|
|
52
|
-
filter: 'brightness(0) invert(1)'
|
|
54
|
+
filter: touched ? 'brightness(0) invert(1)' : ''
|
|
53
55
|
}
|
|
54
56
|
},
|
|
55
|
-
'&:active': {
|
|
56
|
-
backgroundColor: theme.palette.common.white
|
|
57
|
-
},
|
|
58
57
|
'&:disabled': {
|
|
59
58
|
backgroundColor: theme.palette.common.white,
|
|
60
59
|
color: alpha(theme.palette.primary.main, 0.3)
|
|
@@ -63,5 +62,9 @@ var ButtonStyled = styled(Button)(function (_a) {
|
|
|
63
62
|
});
|
|
64
63
|
export default function MobileButton(_a) {
|
|
65
64
|
var children = _a.children, isAr = _a.isAr, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "isAr", "hideIcon", "disabled"]);
|
|
66
|
-
|
|
65
|
+
var _b = React.useState(false), touched = _b[0], setTouched = _b[1];
|
|
66
|
+
var handleTouch = function () {
|
|
67
|
+
setTouched(true);
|
|
68
|
+
};
|
|
69
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ onTouchStart: handleTouch, touched: touched, disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
|
|
67
70
|
}
|
|
@@ -67,6 +67,6 @@ var ThankYou = function (_a) {
|
|
|
67
67
|
var title = _a.title, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle;
|
|
68
68
|
var t = useTranslation().t;
|
|
69
69
|
var isAr = useLanguage().isAr;
|
|
70
|
-
return (_jsxs(ContainerStyled, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(IconStyled, { src: ICONS_NAMES.EMAIL_ICON, alt: 'loading...' }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('
|
|
70
|
+
return (_jsxs(ContainerStyled, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(IconStyled, { src: ICONS_NAMES.EMAIL_ICON, alt: 'loading...' }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'https://www.icloud.com/mail/' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(AbsherButton, __assign({ hideIcon: true, isAr: isAr, onClick: onSuccess }, { children: t(successTitle || 'open_mail_box') })) }))] }));
|
|
71
71
|
};
|
|
72
72
|
export default React.memo(ThankYou);
|
package/build/utils/string.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const getIndividualName: (name: string) => {
|
|
|
9
9
|
export declare const convertNumbers2English: (str: string) => string;
|
|
10
10
|
export declare const getParameterByName: (name: string) => string | null;
|
|
11
11
|
export declare const getClientEmailUrl: () => string;
|
|
12
|
+
export declare const getFlowUrl: (path: string) => string;
|
|
12
13
|
export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
|
|
13
14
|
export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
14
15
|
al: string;
|
package/build/utils/string.js
CHANGED
|
@@ -49,6 +49,10 @@ export var getClientEmailUrl = function () {
|
|
|
49
49
|
var origin = window.location.origin;
|
|
50
50
|
return origin + '/?token=';
|
|
51
51
|
};
|
|
52
|
+
export var getFlowUrl = function (path) {
|
|
53
|
+
var origin = window.location.origin;
|
|
54
|
+
return origin + path + '?token=';
|
|
55
|
+
};
|
|
52
56
|
export var capitalizeTheFirstLetterOfEachWord = function (words) {
|
|
53
57
|
var separateWord = words.toLowerCase().split(' ');
|
|
54
58
|
for (var i = 0; i < separateWord.length; i++) {
|