@tap-payments/auth-jsconnect 2.10.2-beta → 2.10.6-beta
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/ArabicDatePicker/style.css +93 -93
- package/build/components/DatePicker/customStyle.css +86 -86
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.js +38 -14
- package/build/features/app/business/businessStore.js +53 -29
- package/build/features/app/connect/connectStore.js +47 -35
- package/build/features/app/connectExpress/connectExpressStore.js +110 -62
- package/build/features/app/kyc/kycStore.js +49 -25
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +3 -4
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +3 -4
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +3 -4
- package/build/features/kyc/screens/Terms/Terms.js +8 -2
- package/build/features/kyc/screens/Users/Users.js +1 -1
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/package.json +1 -1
|
@@ -60,10 +60,9 @@ var CurrentMobileContainerStyled = styled(Box)(function (_a) {
|
|
|
60
60
|
});
|
|
61
61
|
var MobileNumberContainer = styled(Box)(function (_a) {
|
|
62
62
|
var theme = _a.theme;
|
|
63
|
-
return ({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
63
|
+
return (__assign({ display: 'flex', columnGap: theme.spacing(0.9), direction: 'ltr' }, (theme.direction === 'rtl' && {
|
|
64
|
+
marginLeft: 'auto'
|
|
65
|
+
})));
|
|
67
66
|
});
|
|
68
67
|
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
69
68
|
var theme = _a.theme;
|
|
@@ -61,10 +61,9 @@ var CurrentMobileContainerStyled = styled(Box)(function (_a) {
|
|
|
61
61
|
});
|
|
62
62
|
var MobileNumberContainer = styled(Box)(function (_a) {
|
|
63
63
|
var theme = _a.theme;
|
|
64
|
-
return ({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
64
|
+
return (__assign({ display: 'flex', columnGap: theme.spacing(0.9), direction: 'ltr' }, (theme.direction === 'rtl' && {
|
|
65
|
+
marginLeft: 'auto'
|
|
66
|
+
})));
|
|
68
67
|
});
|
|
69
68
|
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
70
69
|
var theme = _a.theme;
|
|
@@ -15,7 +15,7 @@ import { handleNextScreenStep, settingsSelector } from '../../../../app/settings
|
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import { useAppDispatch, useAppSelector, useLanguage, useSanitizedTranslation } from '../../../../hooks';
|
|
18
|
-
import { getWebsiteLink, isSA, maskIDNumber } from '../../../../utils';
|
|
18
|
+
import { getWebsiteLink, isOtherThanKWOrSA, isSA, maskIDNumber } from '../../../../utils';
|
|
19
19
|
import { CONNECT_FLOWS, EXTERNAL_LINKS } from '../../../../constants';
|
|
20
20
|
import Button from '../../../shared/Button';
|
|
21
21
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
@@ -55,6 +55,7 @@ export var Terms = function () {
|
|
|
55
55
|
var termsAndConditionsLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.TERMS_CONDITIONS);
|
|
56
56
|
var privacyPolicyLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.PRIVACY_POLICY);
|
|
57
57
|
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
58
|
+
var isOtherThanKWOrSACountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
58
59
|
var onNext = function () {
|
|
59
60
|
if (hasOneUserOnly) {
|
|
60
61
|
if (isSACountry) {
|
|
@@ -76,6 +77,11 @@ export var Terms = function () {
|
|
|
76
77
|
}
|
|
77
78
|
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.users));
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
+
var getNextButtonTitle = function () {
|
|
81
|
+
if (isOtherThanKWOrSACountry)
|
|
82
|
+
return st('continue');
|
|
83
|
+
return isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app');
|
|
84
|
+
};
|
|
85
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_terms_conditions') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_refund_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_dispute_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(privacyPolicyLink); }, sx: { mb: error ? 3 : 0 } }, { children: st('kyc_privacy_policy') })), _jsx(Button, __assign({ disabled: isOtherThanKWOrSACountry, sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: getNextButtonTitle() }))] }));
|
|
80
86
|
};
|
|
81
87
|
export default memo(Terms);
|
|
@@ -69,7 +69,7 @@ var Users = function () {
|
|
|
69
69
|
})
|
|
70
70
|
.catch(function () { });
|
|
71
71
|
};
|
|
72
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { pl: 2, pr: 2 } }, { children: [_jsx(DescriptionStyled, { children: st('kyc_users_description', { provider: isSACountry ? 'NAFATH' : 'PACI' }) }), userList.map(function (user, index) {
|
|
72
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { pl: 2, pr: 2, pb: 3 } }, { children: [_jsx(DescriptionStyled, { children: st('kyc_users_description', { provider: isSACountry ? 'NAFATH' : 'PACI' }) }), userList.map(function (user, index) {
|
|
73
73
|
return (_jsx(BoxStyled, __assign({ onClick: function () { return onClickUser(user); } }, { children: (activeUser === null || activeUser === void 0 ? void 0 : activeUser.id) === user.id && loading ? (_jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 8, style: { height: 20, width: 20 }, toggleAnimation: !!loading })) : (_jsxs(_Fragment, { children: [_jsx(ImgStyled, { src: ICONS_NAMES.individual_filled_icon }), maskIDNumber(user.identification.id), _jsx("span", {})] })) }), index));
|
|
74
74
|
}), error && (_jsx(Warning, __assign({ sx: { mt: 3, mb: 3 }, warningType: 'error' }, { children: error })))] })));
|
|
75
75
|
};
|
package/build/utils/error.d.ts
CHANGED
package/build/utils/error.js
CHANGED
|
@@ -4,3 +4,6 @@ export var isNetworkError = function (error) {
|
|
|
4
4
|
export var isTokenExpired = function (error) {
|
|
5
5
|
return ['token expired'].includes((error || '').trim().toLowerCase());
|
|
6
6
|
};
|
|
7
|
+
export var isTimeoutError = function (error) {
|
|
8
|
+
return (error || '').trim().toLowerCase().includes('timeout');
|
|
9
|
+
};
|