@tap-payments/auth-jsconnect 1.0.11 → 1.0.16
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/assets/locales/ar.json +200 -88
- package/build/assets/locales/en.json +216 -90
- package/build/components/DatePicker/DatePicker.js +6 -17
- package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -0
- package/build/components/ExpandIcon/ExpandIcon.js +24 -0
- package/build/components/ExpandIcon/index.d.ts +2 -0
- package/build/components/ExpandIcon/index.js +2 -0
- package/build/components/Footer/Footer.js +1 -1
- package/build/components/Loader/Loader.js +2 -2
- package/build/components/Warning/Warning.d.ts +1 -2
- package/build/components/Warning/Warning.js +1 -2
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +32 -8
- package/build/constants/dummy.js +3 -3
- package/build/features/bank/screens/BankDetails/BankName.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +5 -5
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.js +9 -4
- package/build/features/bank/screens/Success/Success.d.ts +5 -0
- package/build/features/bank/screens/Success/Success.js +14 -0
- package/build/features/bank/screens/Success/index.d.ts +3 -0
- package/build/features/bank/screens/Success/index.js +2 -0
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -16
- package/build/features/business/screens/Activities/ActivitiesList.js +3 -17
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/Activities/validation.js +3 -3
- package/build/features/business/screens/BusinessType/CRNumber.js +2 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +2 -2
- package/build/features/business/screens/BusinessType/FLNumber.js +2 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +2 -2
- package/build/features/business/screens/BusinessType/SelectType.js +1 -1
- package/build/features/business/screens/BusinessType/validation.js +2 -8
- package/build/features/business/screens/Confirm/Confirm.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +0 -24
- package/build/features/business/screens/Customers/CustomerLocations.js +3 -17
- package/build/features/business/screens/Customers/Customers.js +5 -41
- package/build/features/business/screens/Customers/ExpectedCustomers.js +7 -11
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
- package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
- package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +10 -5
- package/build/features/business/screens/IDBOD/DOB.js +3 -11
- package/build/features/business/screens/IDBOD/ID.js +1 -1
- package/build/features/business/screens/IDBOD/validation.js +7 -2
- package/build/features/business/screens/OTP/OTP.js +18 -58
- package/build/features/business/screens/OTP/OTPInput.js +9 -21
- package/build/features/business/screens/OTP/validation.js +1 -1
- package/build/features/business/screens/Success/Success.js +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.js +13 -42
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
- package/build/features/business/screens/VerifyNumber/validation.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +7 -1
- package/build/features/connect/screens/Individual/Individual.js +0 -28
- package/build/features/connect/screens/Individual/Name.js +9 -3
- package/build/features/connect/screens/Individual/validation.js +5 -2
- package/build/features/connect/screens/MID/BusinessCountry.d.ts +1 -0
- package/build/features/connect/screens/MID/BusinessCountry.js +2 -2
- package/build/features/connect/screens/MID/DOB.d.ts +6 -0
- package/build/features/connect/screens/MID/DOB.js +38 -0
- package/build/features/connect/screens/MID/IDNumber.js +3 -14
- package/build/features/connect/screens/MID/MID.js +13 -7
- package/build/features/connect/screens/MID/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/MID/MobileNumber.js +34 -10
- package/build/features/connect/screens/MID/validation.d.ts +1 -1
- package/build/features/connect/screens/MID/validation.js +9 -4
- package/build/features/connect/screens/Merchant/BrandName.js +3 -1
- package/build/features/connect/screens/Merchant/SocialMedia.js +7 -2
- package/build/features/connect/screens/Merchant/TAC.js +1 -1
- package/build/features/connect/screens/Merchant/validation.d.ts +9 -9
- package/build/features/connect/screens/Merchant/validation.js +42 -11
- package/build/features/connect/screens/OTP/OTP.js +4 -3
- package/build/features/connect/screens/OTP/OTPInput.js +2 -1
- package/build/features/connect/screens/OTP/validation.js +1 -1
- package/build/features/connect/screens/Password/PasswordInput.js +2 -1
- package/build/features/connect/screens/Password/validation.js +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
- package/build/features/featuresScreens.d.ts +1 -1
- package/build/features/featuresScreens.js +27 -7
- package/build/features/individual/Individual.d.ts +6 -0
- package/build/features/individual/Individual.js +50 -0
- package/build/features/individual/index.d.ts +1 -0
- package/build/features/individual/index.js +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +8 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +81 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +10 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +81 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +40 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +45 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +45 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +9 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +87 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +35 -0
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +19 -0
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +52 -0
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +3 -0
- package/build/features/individual/screens/ShowIndividualInfo/index.js +2 -0
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +7 -0
- package/build/features/individual/screens/ShowIndividualInfo/info.js +28 -0
- package/build/features/individual/screens/Success/Success.d.ts +5 -0
- package/build/features/individual/screens/Success/Success.js +14 -0
- package/build/features/individual/screens/Success/index.d.ts +3 -0
- package/build/features/individual/screens/Success/index.js +2 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +7 -2
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +6 -3
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
- package/build/features/owner/screens/Success/Success.d.ts +5 -0
- package/build/features/owner/screens/Success/Success.js +14 -0
- package/build/features/owner/screens/Success/index.d.ts +3 -0
- package/build/features/owner/screens/Success/index.js +2 -0
- package/build/features/password/Password.js +2 -2
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +4 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -8
- package/build/features/password/screens/CreatePassword/Password.js +2 -1
- package/build/features/password/screens/CreatePassword/validation.js +3 -3
- package/build/features/password/screens/Success/Success.d.ts +5 -0
- package/build/features/password/screens/Success/Success.js +14 -0
- package/build/features/password/screens/Success/index.d.ts +3 -0
- package/build/features/password/screens/Success/index.js +2 -0
- package/build/features/shared/Button/Button.js +7 -1
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +10 -1
- package/build/features/tax/screens/Success/Success.d.ts +5 -0
- package/build/features/tax/screens/Success/Success.js +14 -0
- package/build/features/tax/screens/Success/index.d.ts +3 -0
- package/build/features/tax/screens/Success/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/features/tax/screens/TaxDetails/validation.js +1 -1
- package/build/index.css +105 -3
- package/build/index.d.ts +3 -3
- package/build/index.js +4 -4
- package/build/theme/typography.js +2 -2
- package/build/utils/string.js +2 -2
- package/package.json +120 -120
- package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPTimer.js +0 -20
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/VerifyNumber/OTPTimer.js +0 -20
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var PasswordValidation = yup.object().shape({
|
|
3
|
-
password: yup.string().required('
|
|
3
|
+
password: yup.string().required('password_required'),
|
|
4
4
|
confirmPassword: yup
|
|
5
5
|
.string()
|
|
6
|
-
.oneOf([yup.ref('password'), '
|
|
7
|
-
.required('
|
|
6
|
+
.oneOf([yup.ref('password'), 'confirmPassword'], 'password_not_match')
|
|
7
|
+
.required('password_not_match')
|
|
8
8
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
var Success = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
var onSuccess = function () {
|
|
8
|
+
console.log('success');
|
|
9
|
+
alert('Account created successfully, please check your email');
|
|
10
|
+
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
+
};
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
|
|
13
|
+
};
|
|
14
|
+
export default React.memo(Success);
|
|
@@ -41,7 +41,13 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
41
41
|
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
|
+
var ButtonStyled = styled(Button)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return ({
|
|
47
|
+
paddingInlineStart: theme.spacing(0.75)
|
|
48
|
+
});
|
|
49
|
+
});
|
|
44
50
|
export default function CustomButton(_a) {
|
|
45
51
|
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, props = __rest(_a, ["children", "disabled", "isAr", "loading"]);
|
|
46
|
-
return (_jsx(ButtonBoxStyled, { children: _jsx(
|
|
52
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ disabled: disabled, type: 'submit', startIcon: _jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 30, toggleAnimation: !!loading }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { children: children })) }));
|
|
47
53
|
}
|
|
@@ -12,5 +12,5 @@ export default function CustomFooter() {
|
|
|
12
12
|
var language = isEn ? LanguageMode.AR : LanguageMode.EN;
|
|
13
13
|
dispatch(handleLanguage(language));
|
|
14
14
|
};
|
|
15
|
-
return
|
|
15
|
+
return _jsx(Footer, { onSwitchLanguage: handleChangeLanguage, followUsTitle: t('follow_us'), language: t('language') });
|
|
16
16
|
}
|
|
@@ -35,6 +35,7 @@ var TextContainerStyled = styled(Box)(function (_a) {
|
|
|
35
35
|
return (_b = {
|
|
36
36
|
background: theme.palette.common.white,
|
|
37
37
|
border: '1px solid',
|
|
38
|
+
width: '100%',
|
|
38
39
|
borderColor: theme.palette.divider,
|
|
39
40
|
borderRadius: theme.spacing(0, 0, 1.25, 1.25)
|
|
40
41
|
},
|
|
@@ -47,8 +48,16 @@ var TitleStyled = styled(Text)(function (_a) {
|
|
|
47
48
|
var theme = _a.theme;
|
|
48
49
|
return (__assign({ fontWeight: theme.typography.fontWeightRegular, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), lineHeight: 1.75, padding: '0px 20px' }, theme.typography.subtitle2));
|
|
49
50
|
});
|
|
51
|
+
var ContainerStyled = styled(Container)(function (_a) {
|
|
52
|
+
var theme = _a.theme;
|
|
53
|
+
return ({
|
|
54
|
+
justifyContent: 'space-between',
|
|
55
|
+
minHeight: theme.spacing(30),
|
|
56
|
+
alignItems: 'center'
|
|
57
|
+
});
|
|
58
|
+
});
|
|
50
59
|
var ThankYou = function (_a) {
|
|
51
60
|
var onSuccess = _a.onSuccess, title = _a.title;
|
|
52
|
-
return (_jsxs(
|
|
61
|
+
return (_jsxs(ContainerStyled, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(ButtonStyled, __assign({ onClick: onSuccess }, { children: _jsx("img", { src: ICONS_NAMES.SUCCESS, alt: 'success Icon' }) }))] }));
|
|
53
62
|
};
|
|
54
63
|
export default React.memo(ThankYou);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
var Success = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
var onSuccess = function () {
|
|
8
|
+
console.log('success');
|
|
9
|
+
alert('Account created successfully, please check your email');
|
|
10
|
+
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
+
};
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
|
|
13
|
+
};
|
|
14
|
+
export default React.memo(Success);
|
|
@@ -6,22 +6,21 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
6
6
|
import { VAT_ID_LENGTH } from '../../../../constants';
|
|
7
7
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
8
8
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
9
|
-
import {
|
|
9
|
+
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
10
10
|
var VATId = function () {
|
|
11
11
|
var _a;
|
|
12
12
|
var t = useTranslation().t;
|
|
13
13
|
var control = useFormContext().control;
|
|
14
14
|
var vatControl = useController({ name: 'vatId', control: control });
|
|
15
15
|
var handleOnChange = function (vat) {
|
|
16
|
-
var value =
|
|
16
|
+
var value = removeAllCharsFromNumber(vat);
|
|
17
17
|
vatControl.field.onChange(value);
|
|
18
18
|
};
|
|
19
19
|
var vatValue = vatControl.field.value;
|
|
20
20
|
var vatError = (_a = vatControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
21
|
-
var hasError = !!vatError;
|
|
22
21
|
var clearValue = function () {
|
|
23
22
|
vatControl.field.onChange('');
|
|
24
23
|
};
|
|
25
|
-
return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('
|
|
24
|
+
return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('vat_id'), inputProps: { maxLength: VAT_ID_LENGTH }, value: vatValue, onChange: function (event) { return handleOnChange(event.target.value); }, placeholder: '00000000000', warningType: 'alert', warningMessage: vatError && t(vatError), required: true, endAdornment: !vatError && vatValue ? _jsx(CheckIcon, {}) : vatValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
|
|
26
25
|
};
|
|
27
26
|
export default VATId;
|
package/build/index.css
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
|
|
2
2
|
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
|
|
3
3
|
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
|
|
4
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
|
|
5
|
+
@import url('https://fonts.googleapis.com/css?family=Tajawal&display=swap');
|
|
6
|
+
|
|
7
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
8
|
+
v2.0 | 20110126
|
|
9
|
+
License: none (public domain)
|
|
10
|
+
*/
|
|
4
11
|
|
|
5
|
-
/* reset all html elements */
|
|
6
12
|
html,
|
|
7
13
|
body,
|
|
8
14
|
div,
|
|
@@ -10,7 +16,6 @@ span,
|
|
|
10
16
|
applet,
|
|
11
17
|
object,
|
|
12
18
|
iframe,
|
|
13
|
-
form,
|
|
14
19
|
h1,
|
|
15
20
|
h2,
|
|
16
21
|
h3,
|
|
@@ -27,7 +32,104 @@ address,
|
|
|
27
32
|
big,
|
|
28
33
|
cite,
|
|
29
34
|
code,
|
|
30
|
-
|
|
35
|
+
del,
|
|
36
|
+
dfn,
|
|
37
|
+
em,
|
|
38
|
+
img,
|
|
39
|
+
ins,
|
|
40
|
+
kbd,
|
|
41
|
+
q,
|
|
42
|
+
s,
|
|
43
|
+
samp,
|
|
44
|
+
small,
|
|
45
|
+
strike,
|
|
46
|
+
strong,
|
|
47
|
+
sub,
|
|
48
|
+
sup,
|
|
49
|
+
tt,
|
|
50
|
+
var,
|
|
51
|
+
b,
|
|
52
|
+
u,
|
|
53
|
+
i,
|
|
54
|
+
center,
|
|
55
|
+
dl,
|
|
56
|
+
dt,
|
|
57
|
+
dd,
|
|
58
|
+
ol,
|
|
59
|
+
ul,
|
|
60
|
+
li,
|
|
61
|
+
fieldset,
|
|
62
|
+
form,
|
|
63
|
+
label,
|
|
64
|
+
legend,
|
|
65
|
+
table,
|
|
66
|
+
caption,
|
|
67
|
+
tbody,
|
|
68
|
+
tfoot,
|
|
69
|
+
thead,
|
|
70
|
+
tr,
|
|
71
|
+
th,
|
|
72
|
+
td,
|
|
73
|
+
article,
|
|
74
|
+
aside,
|
|
75
|
+
canvas,
|
|
76
|
+
details,
|
|
77
|
+
embed,
|
|
78
|
+
figure,
|
|
79
|
+
figcaption,
|
|
80
|
+
footer,
|
|
81
|
+
header,
|
|
82
|
+
hgroup,
|
|
83
|
+
menu,
|
|
84
|
+
nav,
|
|
85
|
+
output,
|
|
86
|
+
ruby,
|
|
87
|
+
section,
|
|
88
|
+
summary,
|
|
89
|
+
time,
|
|
90
|
+
mark,
|
|
91
|
+
audio,
|
|
92
|
+
video {
|
|
31
93
|
margin: 0;
|
|
32
94
|
padding: 0;
|
|
95
|
+
border: 0;
|
|
96
|
+
font-size: 100%;
|
|
97
|
+
font: inherit;
|
|
98
|
+
vertical-align: baseline;
|
|
99
|
+
}
|
|
100
|
+
/* HTML5 display-role reset for older browsers */
|
|
101
|
+
article,
|
|
102
|
+
aside,
|
|
103
|
+
details,
|
|
104
|
+
figcaption,
|
|
105
|
+
figure,
|
|
106
|
+
footer,
|
|
107
|
+
header,
|
|
108
|
+
hgroup,
|
|
109
|
+
menu,
|
|
110
|
+
nav,
|
|
111
|
+
section {
|
|
112
|
+
display: block;
|
|
113
|
+
}
|
|
114
|
+
body {
|
|
115
|
+
line-height: 1;
|
|
116
|
+
}
|
|
117
|
+
ol,
|
|
118
|
+
ul {
|
|
119
|
+
list-style: none;
|
|
120
|
+
}
|
|
121
|
+
blockquote,
|
|
122
|
+
q {
|
|
123
|
+
quotes: none;
|
|
124
|
+
}
|
|
125
|
+
blockquote:before,
|
|
126
|
+
blockquote:after,
|
|
127
|
+
q:before,
|
|
128
|
+
q:after {
|
|
129
|
+
content: '';
|
|
130
|
+
content: none;
|
|
131
|
+
}
|
|
132
|
+
table {
|
|
133
|
+
border-collapse: collapse;
|
|
134
|
+
border-spacing: 0;
|
|
33
135
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import './i18n';
|
|
|
3
3
|
import { ConnectLib, renderConnectLib, ConnectLibProps, unmountConnectLib } from './features/connect';
|
|
4
4
|
import { BusinessLib, renderBusinessLib, BusinessLibProps, unmountBusinessLib } from './features/business';
|
|
5
5
|
import { PasswordLib, renderPasswordLib, PasswordLibProps, unmountPasswordLib } from './features/password';
|
|
6
|
-
import {
|
|
6
|
+
import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividualLib } from './features/individual';
|
|
7
7
|
import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from './features/bank';
|
|
8
8
|
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from './features/tax';
|
|
9
|
-
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps,
|
|
10
|
-
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib,
|
|
9
|
+
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps };
|
|
10
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib };
|
package/build/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import './i18n';
|
|
|
3
3
|
import { ConnectLib, renderConnectLib, unmountConnectLib } from './features/connect';
|
|
4
4
|
import { BusinessLib, renderBusinessLib, unmountBusinessLib } from './features/business';
|
|
5
5
|
import { PasswordLib, renderPasswordLib, unmountPasswordLib } from './features/password';
|
|
6
|
-
import {
|
|
6
|
+
import { IndividualLib, renderIndividualLib, unmountIndividualLib } from './features/individual';
|
|
7
7
|
import { BankLib, renderBankLib, unmountBankLib } from './features/bank';
|
|
8
8
|
import { TaxLib, renderTaxLib, unmountTaxLib } from './features/tax';
|
|
9
|
-
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib,
|
|
9
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib };
|
|
10
10
|
window['TapAuth'] = {
|
|
11
11
|
renderConnectLib: renderConnectLib,
|
|
12
12
|
unmountConnectLib: unmountConnectLib,
|
|
@@ -14,8 +14,8 @@ window['TapAuth'] = {
|
|
|
14
14
|
unmountBusinessLib: unmountBusinessLib,
|
|
15
15
|
renderPasswordLib: renderPasswordLib,
|
|
16
16
|
unmountPasswordLib: unmountPasswordLib,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
renderIndividualLib: renderIndividualLib,
|
|
18
|
+
unmountIndividualLib: unmountIndividualLib,
|
|
19
19
|
renderBankLib: renderBankLib,
|
|
20
20
|
unmountBankLib: unmountBankLib,
|
|
21
21
|
renderTaxLib: renderTaxLib,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export var typography = {
|
|
2
2
|
htmlFontSize: 16,
|
|
3
|
-
fontFamily: '"Lato", "
|
|
3
|
+
fontFamily: '"Lato", "Tajawal", "Roboto"',
|
|
4
4
|
fontSize: 14,
|
|
5
5
|
fontWeightLight: 300,
|
|
6
6
|
fontWeightRegular: 400,
|
|
7
7
|
fontWeightMedium: 500,
|
|
8
8
|
fontWeightBold: 700,
|
|
9
9
|
allVariants: {
|
|
10
|
-
fontFamily: '"Lato", "
|
|
10
|
+
fontFamily: '"Lato", "Tajawal", "Roboto"',
|
|
11
11
|
fontSize: '0.875rem',
|
|
12
12
|
lineHeight: 'normal',
|
|
13
13
|
fontStyle: 'normal',
|
package/build/utils/string.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export var string = '';
|
|
2
2
|
export var maskPhone = function (str) {
|
|
3
3
|
if (str === void 0) { str = ''; }
|
|
4
|
-
var first = str.substring(0,
|
|
5
|
-
var lastTwo = str.substring(
|
|
4
|
+
var first = str.substring(0, 1);
|
|
5
|
+
var lastTwo = str.substring(str.length - 2, str.length);
|
|
6
6
|
return first + '••••' + lastTwo;
|
|
7
7
|
};
|
|
8
8
|
export var maskID = function (str) {
|
package/package.json
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "connect library, auth",
|
|
5
|
-
"private": false,
|
|
6
|
-
"main": "build/index.js",
|
|
7
|
-
"module": "build/index.js",
|
|
8
|
-
"types": "build/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"build",
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"husky:setup": "npx husky install",
|
|
15
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
-
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
-
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
-
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
-
"build": "cross-env NODE_ENV=production webpack",
|
|
21
|
-
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
-
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
-
"ts:build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [],
|
|
27
|
-
"author": {
|
|
28
|
-
"name": "Ahmed Elsharkawy",
|
|
29
|
-
"email": "a.elsharkawy@tap.company"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC",
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.18.6",
|
|
34
|
-
"@babel/preset-env": "^7.18.6",
|
|
35
|
-
"@babel/preset-react": "^7.18.6",
|
|
36
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
-
"@types/lodash-es": "^4.17.6",
|
|
38
|
-
"@types/react": "^18.0.15",
|
|
39
|
-
"@types/react-calendar": "~3.5.1",
|
|
40
|
-
"@types/react-dom": "^18.0.6",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
42
|
-
"@typescript-eslint/parser": "^5.30.5",
|
|
43
|
-
"babel-loader": "^8.2.5",
|
|
44
|
-
"copyfiles": "^2.4.1",
|
|
45
|
-
"cross-env": "^7.0.3",
|
|
46
|
-
"css-loader": "^6.7.1",
|
|
47
|
-
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
48
|
-
"eslint": "^8.19.0",
|
|
49
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
50
|
-
"eslint-config-prettier": "^8.5.0",
|
|
51
|
-
"eslint-plugin-import": "^2.26.0",
|
|
52
|
-
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
53
|
-
"eslint-plugin-node": "^11.1.0",
|
|
54
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
55
|
-
"eslint-plugin-react": "^7.30.1",
|
|
56
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
|
-
"file-loader": "^6.2.0",
|
|
58
|
-
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
59
|
-
"html-loader": "^3.1.2",
|
|
60
|
-
"html-webpack-plugin": "^5.5.0",
|
|
61
|
-
"husky": "^8.0.1",
|
|
62
|
-
"lint-staged": "^13.0.3",
|
|
63
|
-
"mini-css-extract-plugin": "^2.6.1",
|
|
64
|
-
"prettier": "^2.7.1",
|
|
65
|
-
"sass": "^1.53.0",
|
|
66
|
-
"sass-loader": "^13.0.2",
|
|
67
|
-
"style-loader": "^3.3.1",
|
|
68
|
-
"terser-webpack-plugin": "^5.3.3",
|
|
69
|
-
"tsc-alias": "^1.6.11",
|
|
70
|
-
"typescript": "^4.7.4",
|
|
71
|
-
"webpack": "^5.73.0",
|
|
72
|
-
"webpack-cli": "^4.10.0",
|
|
73
|
-
"webpack-dev-server": "^4.9.3",
|
|
74
|
-
"webpack-merge": "^5.8.0"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@emotion/react": "^11.9.3",
|
|
78
|
-
"@emotion/styled": "^11.9.3",
|
|
79
|
-
"@hookform/resolvers": "^2.9.6",
|
|
80
|
-
"@mui/icons-material": "^5.8.4",
|
|
81
|
-
"@mui/material": "^5.8.7",
|
|
82
|
-
"@reduxjs/toolkit": "^1.8.3",
|
|
83
|
-
"i18next": "^21.8.14",
|
|
84
|
-
"i18next-browser-languagedetector": "^6.1.4",
|
|
85
|
-
"i18next-http-backend": "^1.4.1",
|
|
86
|
-
"lodash-es": "^4.17.21",
|
|
87
|
-
"react": "^18.2.0",
|
|
88
|
-
"react-calendar": "~3.7.0",
|
|
89
|
-
"react-dom": "^18.2.0",
|
|
90
|
-
"react-hook-form": "^7.33.1",
|
|
91
|
-
"react-i18next": "^11.18.1",
|
|
92
|
-
"react-otp-input": "^2.4.0",
|
|
93
|
-
"react-redux": "^8.0.2",
|
|
94
|
-
"react-spring-bottom-sheet": "^3.4.1",
|
|
95
|
-
"yup": "^0.32.11"
|
|
96
|
-
},
|
|
97
|
-
"peerDependencies": {
|
|
98
|
-
"react": "^18.2.0",
|
|
99
|
-
"react-dom": "^18.2.0"
|
|
100
|
-
},
|
|
101
|
-
"lint-staged": {
|
|
102
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
103
|
-
"yarn run prettier:fix",
|
|
104
|
-
"yarn run lint",
|
|
105
|
-
"git add ."
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
"browserslist": {
|
|
109
|
-
"production": [
|
|
110
|
-
">0.2%",
|
|
111
|
-
"not dead",
|
|
112
|
-
"not op_mini all"
|
|
113
|
-
],
|
|
114
|
-
"development": [
|
|
115
|
-
"last 1 chrome version",
|
|
116
|
-
"last 1 firefox version",
|
|
117
|
-
"last 1 safari version"
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
+
"version": "1.0.16",
|
|
4
|
+
"description": "connect library, auth",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/index.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"build",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"husky:setup": "npx husky install",
|
|
15
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
+
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
+
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
+
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
+
"build": "cross-env NODE_ENV=production webpack",
|
|
21
|
+
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
+
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
+
"ts:build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
+
"push": "npm publish --access public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Ahmed Elsharkawy",
|
|
29
|
+
"email": "a.elsharkawy@tap.company"
|
|
30
|
+
},
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "^7.18.6",
|
|
34
|
+
"@babel/preset-env": "^7.18.6",
|
|
35
|
+
"@babel/preset-react": "^7.18.6",
|
|
36
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
+
"@types/lodash-es": "^4.17.6",
|
|
38
|
+
"@types/react": "^18.0.15",
|
|
39
|
+
"@types/react-calendar": "~3.5.1",
|
|
40
|
+
"@types/react-dom": "^18.0.6",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
42
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
43
|
+
"babel-loader": "^8.2.5",
|
|
44
|
+
"copyfiles": "^2.4.1",
|
|
45
|
+
"cross-env": "^7.0.3",
|
|
46
|
+
"css-loader": "^6.7.1",
|
|
47
|
+
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
48
|
+
"eslint": "^8.19.0",
|
|
49
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
50
|
+
"eslint-config-prettier": "^8.5.0",
|
|
51
|
+
"eslint-plugin-import": "^2.26.0",
|
|
52
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
53
|
+
"eslint-plugin-node": "^11.1.0",
|
|
54
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
55
|
+
"eslint-plugin-react": "^7.30.1",
|
|
56
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
|
+
"file-loader": "^6.2.0",
|
|
58
|
+
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
59
|
+
"html-loader": "^3.1.2",
|
|
60
|
+
"html-webpack-plugin": "^5.5.0",
|
|
61
|
+
"husky": "^8.0.1",
|
|
62
|
+
"lint-staged": "^13.0.3",
|
|
63
|
+
"mini-css-extract-plugin": "^2.6.1",
|
|
64
|
+
"prettier": "^2.7.1",
|
|
65
|
+
"sass": "^1.53.0",
|
|
66
|
+
"sass-loader": "^13.0.2",
|
|
67
|
+
"style-loader": "^3.3.1",
|
|
68
|
+
"terser-webpack-plugin": "^5.3.3",
|
|
69
|
+
"tsc-alias": "^1.6.11",
|
|
70
|
+
"typescript": "^4.7.4",
|
|
71
|
+
"webpack": "^5.73.0",
|
|
72
|
+
"webpack-cli": "^4.10.0",
|
|
73
|
+
"webpack-dev-server": "^4.9.3",
|
|
74
|
+
"webpack-merge": "^5.8.0"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@emotion/react": "^11.9.3",
|
|
78
|
+
"@emotion/styled": "^11.9.3",
|
|
79
|
+
"@hookform/resolvers": "^2.9.6",
|
|
80
|
+
"@mui/icons-material": "^5.8.4",
|
|
81
|
+
"@mui/material": "^5.8.7",
|
|
82
|
+
"@reduxjs/toolkit": "^1.8.3",
|
|
83
|
+
"i18next": "^21.8.14",
|
|
84
|
+
"i18next-browser-languagedetector": "^6.1.4",
|
|
85
|
+
"i18next-http-backend": "^1.4.1",
|
|
86
|
+
"lodash-es": "^4.17.21",
|
|
87
|
+
"react": "^18.2.0",
|
|
88
|
+
"react-calendar": "~3.7.0",
|
|
89
|
+
"react-dom": "^18.2.0",
|
|
90
|
+
"react-hook-form": "^7.33.1",
|
|
91
|
+
"react-i18next": "^11.18.1",
|
|
92
|
+
"react-otp-input": "^2.4.0",
|
|
93
|
+
"react-redux": "^8.0.2",
|
|
94
|
+
"react-spring-bottom-sheet": "^3.4.1",
|
|
95
|
+
"yup": "^0.32.11"
|
|
96
|
+
},
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"react": "^18.2.0",
|
|
99
|
+
"react-dom": "^18.2.0"
|
|
100
|
+
},
|
|
101
|
+
"lint-staged": {
|
|
102
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
103
|
+
"yarn run prettier:fix",
|
|
104
|
+
"yarn run lint",
|
|
105
|
+
"git add ."
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"browserslist": {
|
|
109
|
+
"production": [
|
|
110
|
+
">0.2%",
|
|
111
|
+
"not dead",
|
|
112
|
+
"not op_mini all"
|
|
113
|
+
],
|
|
114
|
+
"development": [
|
|
115
|
+
"last 1 chrome version",
|
|
116
|
+
"last 1 firefox version",
|
|
117
|
+
"last 1 safari version"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import Box from '@mui/material/Box/Box';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import OTPTimer from '../../../../components/OTPTimer';
|
|
7
|
-
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
8
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
9
|
-
var theme = _a.theme;
|
|
10
|
-
return ({
|
|
11
|
-
display: 'flex',
|
|
12
|
-
flexDirection: 'column',
|
|
13
|
-
padding: theme.spacing(2.5, 0, 6.5, 0)
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
var Timer = function (_a) {
|
|
17
|
-
var t = useTranslation().t;
|
|
18
|
-
return (_jsx(BoxStyled, { children: _jsx(OTPTimer, { timeEndLabel: t('resend_otp'), timeInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { } }) }));
|
|
19
|
-
};
|
|
20
|
-
export default React.memo(Timer);
|