@tap-payments/auth-jsconnect 1.0.10 → 1.0.14
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 +5 -0
- package/build/assets/locales/ar.json +190 -72
- package/build/assets/locales/en.json +207 -75
- package/build/components/AnimationFlow/Dialog.js +12 -1
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +8 -5
- package/build/components/Loader/Loader.js +2 -2
- package/build/components/Radio/Radio.d.ts +5 -0
- package/build/components/Radio/Radio.js +31 -0
- package/build/components/Radio/index.d.ts +3 -0
- package/build/components/Radio/index.js +2 -0
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -0
- package/build/components/RadioGroup/RadioGroup.js +41 -0
- package/build/components/RadioGroup/index.d.ts +3 -0
- package/build/components/RadioGroup/index.js +2 -0
- package/build/components/RadioLabel/RadioLabel.d.ts +7 -0
- package/build/components/RadioLabel/RadioLabel.js +34 -0
- package/build/components/RadioLabel/index.d.ts +3 -0
- package/build/components/RadioLabel/index.js +2 -0
- package/build/constants/app.js +19 -7
- package/build/constants/dummy.d.ts +5 -0
- package/build/constants/dummy.js +8 -0
- package/build/features/bank/Bank.js +1 -1
- package/build/features/bank/screens/BankDetails/BankName.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.js +8 -3
- 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/Business.js +1 -1
- package/build/features/business/screens/Activities/Activities.js +14 -40
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +6 -0
- package/build/features/business/screens/Activities/OperationStartDate.js +31 -0
- package/build/features/business/screens/Activities/SalesChannels.js +3 -10
- package/build/features/business/screens/Activities/validation.d.ts +3 -0
- package/build/features/business/screens/Activities/validation.js +3 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -2
- package/build/features/business/screens/BusinessType/CRNumber.js +1 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
- package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
- package/build/features/business/screens/BusinessType/SelectType.js +1 -1
- package/build/features/business/screens/Confirm/Confirm.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +5 -41
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -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.d.ts +2 -1
- package/build/features/business/screens/IDBOD/DOB.js +4 -1
- package/build/features/business/screens/IDBOD/ID.js +7 -48
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -41
- package/build/features/business/screens/IDBOD/validation.js +6 -2
- package/build/features/business/screens/OTP/OTP.js +18 -58
- package/build/features/business/screens/OTP/OTPInput.js +8 -21
- 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 +12 -42
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
- package/build/features/connect/Connect.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.js +4 -4
- package/build/features/connect/screens/MID/IDNumber.js +9 -6
- package/build/features/connect/screens/MID/MID.js +2 -2
- package/build/features/connect/screens/MID/MobileNumber.js +13 -15
- package/build/features/connect/screens/MID/validation.d.ts +1 -1
- package/build/features/connect/screens/MID/validation.js +11 -5
- package/build/features/connect/screens/Merchant/BrandName.js +5 -3
- package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
- package/build/features/connect/screens/Merchant/TAC.js +2 -2
- 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 +1 -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 +32 -7
- package/build/features/owner/Owner.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +8 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +77 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +10 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +80 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +40 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +45 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +35 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +45 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +9 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +85 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +3 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/index.js +2 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +25 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +35 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +2 -2
- 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 +3 -3
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -1
- 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/ExpandIcon/ExpandIcon.js +1 -1
- package/build/features/shared/Input/Input.d.ts +0 -1
- package/build/features/shared/Input/Input.js +2 -5
- package/build/features/shared/Mandatory/Mandatory.d.ts +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +20 -0
- package/build/features/shared/Mandatory/index.d.ts +2 -0
- package/build/features/shared/Mandatory/index.js +2 -0
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -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/theme/typography.js +2 -2
- package/build/utils/string.js +2 -2
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +1 -1
- 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
|
@@ -10,82 +10,41 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Box from '@mui/material/Box/Box';
|
|
14
|
-
import { styled } from '@mui/material/styles';
|
|
15
13
|
import * as React from 'react';
|
|
16
|
-
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import Text from '../../../../components/Text';
|
|
18
|
-
import OTPTimer from './OTPTimer';
|
|
19
|
-
import Icon from '../../../../components/Icon';
|
|
20
|
-
import Button from '../../../../components/Button';
|
|
21
|
-
import Loader from '../../../../components/Loader';
|
|
22
|
-
import { ICONS_NAMES } from '../../../../constants/assets';
|
|
23
14
|
import { useAppDispatch } from '../../../../hooks';
|
|
24
|
-
import {
|
|
25
|
-
import { useLanguage } from '../../../../hooks';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
26
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
27
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
+
import Box from '@mui/material/Box/Box';
|
|
19
|
+
import { styled } from '@mui/material/styles';
|
|
20
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { useLanguage } from '../../../../hooks';
|
|
28
22
|
import Form from '../../../../components/Form';
|
|
23
|
+
import Text from '../../../../components/Text';
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
+
import Button from '../../../shared/Button';
|
|
29
26
|
import { maskID } from '../../../../utils';
|
|
30
27
|
import { OTPValidation } from './validation';
|
|
31
28
|
import OTPInput from './OTPInput';
|
|
32
|
-
var
|
|
29
|
+
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
33
30
|
var theme = _a.theme;
|
|
34
31
|
return ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
direction: theme.direction
|
|
32
|
+
background: theme.palette.common.white,
|
|
33
|
+
border: '1px solid',
|
|
34
|
+
borderColor: theme.palette.divider,
|
|
35
|
+
direction: theme.direction,
|
|
36
|
+
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
37
|
+
marginBottom: theme.spacing(5.75)
|
|
39
38
|
});
|
|
40
39
|
});
|
|
41
|
-
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
42
|
-
var _b;
|
|
43
|
-
var theme = _a.theme;
|
|
44
|
-
return (_b = {
|
|
45
|
-
background: theme.palette.common.white,
|
|
46
|
-
border: '1px solid',
|
|
47
|
-
borderColor: theme.palette.divider,
|
|
48
|
-
direction: theme.direction,
|
|
49
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25)
|
|
50
|
-
},
|
|
51
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
52
|
-
marginBottom: theme.spacing(6)
|
|
53
|
-
},
|
|
54
|
-
_b);
|
|
55
|
-
});
|
|
56
40
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
57
41
|
var theme = _a.theme;
|
|
58
|
-
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightLight, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5) }));
|
|
59
|
-
});
|
|
60
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
61
|
-
var theme = _a.theme;
|
|
62
|
-
return ({
|
|
63
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
64
|
-
'& .loader-box-container': {
|
|
65
|
-
marginInlineStart: theme.spacing(2.5)
|
|
66
|
-
}
|
|
67
|
-
});
|
|
42
|
+
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightLight, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5), lineHeight: 1.75 }));
|
|
68
43
|
});
|
|
69
44
|
var FormStyled = styled(Form)(function () { return ({
|
|
70
45
|
display: 'flex',
|
|
71
46
|
flexDirection: 'column'
|
|
72
47
|
}); });
|
|
73
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
74
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
75
|
-
return ({
|
|
76
|
-
width: theme.spacing(3),
|
|
77
|
-
height: theme.spacing(3),
|
|
78
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
79
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
80
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
84
|
-
var theme = _a.theme;
|
|
85
|
-
return ({
|
|
86
|
-
margin: theme.spacing(2.5)
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
48
|
var OTP = function (_a) {
|
|
90
49
|
var idNumber = _a.idNumber;
|
|
91
50
|
var dispatch = useAppDispatch();
|
|
@@ -104,7 +63,8 @@ var OTP = function (_a) {
|
|
|
104
63
|
return dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
105
64
|
dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
106
65
|
};
|
|
107
|
-
|
|
66
|
+
var loading = false;
|
|
67
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('opt_nid_sent_title', { provider: 'ABSHER' }), ' ', _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskID(idNumber || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: loading }, { children: t('next') }))] })) })) }));
|
|
108
68
|
};
|
|
109
69
|
OTP.defaultProps = {
|
|
110
70
|
idNumber: '1234567891'
|
|
@@ -10,42 +10,29 @@ 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 * as React from 'react';
|
|
13
14
|
import Box from '@mui/material/Box/Box';
|
|
14
15
|
import { styled } from '@mui/material/styles';
|
|
15
|
-
import OTPField from '../../../../
|
|
16
|
-
import * as React from 'react';
|
|
16
|
+
import OTPField from '../../../../features/shared/OTP';
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
|
+
import { useTranslation } from 'react-i18next';
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
18
20
|
var BoxStyled = styled(Box)(function (_a) {
|
|
19
21
|
var theme = _a.theme;
|
|
20
22
|
return ({
|
|
21
23
|
display: 'flex',
|
|
22
|
-
flexDirection: 'column'
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
marginBottom: theme.spacing(5)
|
|
23
26
|
});
|
|
24
27
|
});
|
|
25
|
-
var OTPStyled = styled(OTPField)(function (_a) {
|
|
26
|
-
var _b;
|
|
27
|
-
var theme = _a.theme;
|
|
28
|
-
return (_b = {
|
|
29
|
-
marginInlineStart: theme.spacing(2.0),
|
|
30
|
-
input: {
|
|
31
|
-
width: "".concat(theme.spacing(3.75), " !important")
|
|
32
|
-
},
|
|
33
|
-
'& :focus': {
|
|
34
|
-
borderColor: theme.palette.primary.main
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
38
|
-
marginInlineStart: theme.spacing(3)
|
|
39
|
-
},
|
|
40
|
-
_b);
|
|
41
|
-
});
|
|
42
28
|
var OTPInput = function (_a) {
|
|
43
29
|
var control = useFormContext().control;
|
|
30
|
+
var t = useTranslation().t;
|
|
44
31
|
var otpControl = useController({ name: 'otp', control: control });
|
|
45
32
|
var handleOnOTPChange = function (otp) {
|
|
46
33
|
otpControl.field.onChange(otp);
|
|
47
34
|
};
|
|
48
35
|
var otpValue = otpControl.field.value;
|
|
49
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(
|
|
36
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
50
37
|
};
|
|
51
38
|
export default React.memo(OTPInput);
|
|
@@ -8,8 +8,7 @@ var Success = function (_a) {
|
|
|
8
8
|
console.log('success');
|
|
9
9
|
alert('Account created successfully, please check your email');
|
|
10
10
|
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
-
window.location.href = '/new/business';
|
|
12
11
|
};
|
|
13
|
-
return _jsx(SuccessScreen, { title: t('
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_verified_message'), onSuccess: onSuccess });
|
|
14
13
|
};
|
|
15
14
|
export default React.memo(Success);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
-
onOTPChange?: (otp: string) => void;
|
|
4
3
|
}
|
|
5
|
-
declare const _default: React.MemoExoticComponent<({
|
|
4
|
+
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
5
|
export default _default;
|
|
@@ -10,59 +10,29 @@ 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 * as React from 'react';
|
|
13
14
|
import Box from '@mui/material/Box/Box';
|
|
14
15
|
import { styled } from '@mui/material/styles';
|
|
15
|
-
import OTPField from '../../../../
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { OTPValidation } from './validation';
|
|
16
|
+
import OTPField from '../../../../features/shared/OTP';
|
|
17
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
18
|
+
import { useTranslation } from 'react-i18next';
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
20
20
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
|
-
var _b;
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (_b = {
|
|
24
|
-
display: 'flex',
|
|
25
|
-
flexDirection: 'column',
|
|
26
|
-
direction: theme.direction
|
|
27
|
-
},
|
|
28
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
29
|
-
paddingTop: theme.spacing(2.5)
|
|
30
|
-
},
|
|
31
|
-
_b);
|
|
32
|
-
});
|
|
33
|
-
var OTPStyled = styled(OTPField)(function (_a) {
|
|
34
|
-
var _b;
|
|
35
21
|
var theme = _a.theme;
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'& :focus': {
|
|
42
|
-
borderColor: theme.palette.primary.main
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
_b[theme.breakpoints.down('sm')] = {
|
|
46
|
-
marginInlineStart: theme.spacing(3)
|
|
47
|
-
},
|
|
48
|
-
_b);
|
|
22
|
+
return ({
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
marginBottom: theme.spacing(5)
|
|
26
|
+
});
|
|
49
27
|
});
|
|
50
28
|
var OTPInput = function (_a) {
|
|
51
|
-
var onOTPChange = _a.onOTPChange;
|
|
52
|
-
var methods = useForm({
|
|
53
|
-
resolver: yupResolver(OTPValidation),
|
|
54
|
-
defaultValues: {
|
|
55
|
-
otp: ''
|
|
56
|
-
},
|
|
57
|
-
mode: 'onChange'
|
|
58
|
-
});
|
|
59
29
|
var control = useFormContext().control;
|
|
30
|
+
var t = useTranslation().t;
|
|
60
31
|
var otpControl = useController({ name: 'otp', control: control });
|
|
61
32
|
var handleOnOTPChange = function (otp) {
|
|
62
33
|
otpControl.field.onChange(otp);
|
|
63
|
-
onOTPChange === null || onOTPChange === void 0 ? void 0 : onOTPChange(otp);
|
|
64
34
|
};
|
|
65
35
|
var otpValue = otpControl.field.value;
|
|
66
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(
|
|
36
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
67
37
|
};
|
|
68
38
|
export default React.memo(OTPInput);
|
|
@@ -10,88 +10,41 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Box from '@mui/material/Box/Box';
|
|
14
|
-
import { styled } from '@mui/material/styles';
|
|
15
13
|
import * as React from 'react';
|
|
16
|
-
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import Text from '../../../../components/Text';
|
|
18
|
-
import OTPTimer from './OTPTimer';
|
|
19
|
-
import Icon from '../../../../components/Icon';
|
|
20
|
-
import Button from '../../../../components/Button';
|
|
21
|
-
import Loader from '../../../../components/Loader';
|
|
22
|
-
import { ICONS_NAMES } from '../../../../constants/assets';
|
|
23
14
|
import { useAppDispatch } from '../../../../hooks';
|
|
24
|
-
import {
|
|
25
|
-
import { useLanguage } from '../../../../hooks';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
26
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
27
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
+
import Box from '@mui/material/Box/Box';
|
|
19
|
+
import { styled } from '@mui/material/styles';
|
|
20
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { useLanguage } from '../../../../hooks';
|
|
28
22
|
import Form from '../../../../components/Form';
|
|
23
|
+
import Text from '../../../../components/Text';
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
+
import Button from '../../../shared/Button';
|
|
29
26
|
import { maskPhone } from '../../../../utils';
|
|
30
27
|
import { OTPValidation } from './validation';
|
|
31
28
|
import OTPInput from './OTPInput';
|
|
32
|
-
var
|
|
33
|
-
var theme = _a.theme;
|
|
34
|
-
return ({
|
|
35
|
-
display: 'flex',
|
|
36
|
-
flexDirection: 'column',
|
|
37
|
-
overflow: 'hidden',
|
|
38
|
-
direction: theme.direction
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
29
|
+
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
42
30
|
var theme = _a.theme;
|
|
43
31
|
return ({
|
|
44
|
-
|
|
32
|
+
background: theme.palette.common.white,
|
|
33
|
+
border: '1px solid',
|
|
34
|
+
borderColor: theme.palette.divider,
|
|
35
|
+
direction: theme.direction,
|
|
36
|
+
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
37
|
+
marginBottom: theme.spacing(5.75)
|
|
45
38
|
});
|
|
46
39
|
});
|
|
47
|
-
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
48
|
-
var _b;
|
|
49
|
-
var theme = _a.theme;
|
|
50
|
-
return (_b = {
|
|
51
|
-
background: theme.palette.common.white,
|
|
52
|
-
border: '1px solid',
|
|
53
|
-
borderColor: theme.palette.divider,
|
|
54
|
-
direction: theme.direction,
|
|
55
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25)
|
|
56
|
-
},
|
|
57
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
58
|
-
marginBottom: theme.spacing(6)
|
|
59
|
-
},
|
|
60
|
-
_b);
|
|
61
|
-
});
|
|
62
40
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
63
41
|
var theme = _a.theme;
|
|
64
|
-
return (__assign(__assign({}, theme.typography.body1), {
|
|
65
|
-
});
|
|
66
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
67
|
-
var theme = _a.theme;
|
|
68
|
-
return ({
|
|
69
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
70
|
-
'& .loader-box-container': {
|
|
71
|
-
marginInlineStart: theme.spacing(2.5)
|
|
72
|
-
}
|
|
73
|
-
});
|
|
42
|
+
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5), lineHeight: 1.75 }));
|
|
74
43
|
});
|
|
75
44
|
var FormStyled = styled(Form)(function () { return ({
|
|
76
45
|
display: 'flex',
|
|
77
46
|
flexDirection: 'column'
|
|
78
47
|
}); });
|
|
79
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
80
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
81
|
-
return ({
|
|
82
|
-
width: theme.spacing(3),
|
|
83
|
-
height: theme.spacing(3),
|
|
84
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
85
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
86
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
90
|
-
var theme = _a.theme;
|
|
91
|
-
return ({
|
|
92
|
-
margin: theme.spacing(2.5)
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
48
|
var VerifyNumber = function (_a) {
|
|
96
49
|
var phone = _a.phone, code = _a.code;
|
|
97
50
|
var dispatch = useAppDispatch();
|
|
@@ -110,10 +63,11 @@ var VerifyNumber = function (_a) {
|
|
|
110
63
|
return dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
111
64
|
dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
112
65
|
};
|
|
113
|
-
|
|
66
|
+
var loading = false;
|
|
67
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(code, " ").concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: loading }, { children: t('next') }))] })) })) }));
|
|
114
68
|
};
|
|
115
69
|
VerifyNumber.defaultProps = {
|
|
116
|
-
phone: '
|
|
117
|
-
code: '+
|
|
70
|
+
phone: '564656085',
|
|
71
|
+
code: '+996'
|
|
118
72
|
};
|
|
119
73
|
export default React.memo(VerifyNumber);
|
|
@@ -34,7 +34,7 @@ var Connect = memo(function (props) {
|
|
|
34
34
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
|
|
35
35
|
var Element = _a.element, name = _a.name;
|
|
36
36
|
var isActive = activeScreen.name === name;
|
|
37
|
-
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter:
|
|
37
|
+
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
38
38
|
}) }) })) })));
|
|
39
39
|
});
|
|
40
40
|
export function ConnectLib(props) {
|
|
@@ -16,6 +16,8 @@ import { ScreenContainer } from '../../../shared/Containers';
|
|
|
16
16
|
import Input from '../../../shared/Input';
|
|
17
17
|
import { keepEmailCharacters } from '../../../../utils';
|
|
18
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
19
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
20
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
19
21
|
var Email = function (_a) {
|
|
20
22
|
var _b;
|
|
21
23
|
var t = useTranslation().t;
|
|
@@ -26,6 +28,10 @@ var Email = function (_a) {
|
|
|
26
28
|
emailControl.field.onChange(value);
|
|
27
29
|
};
|
|
28
30
|
var emailValue = emailControl.field.value;
|
|
29
|
-
|
|
31
|
+
var error = (_b = emailControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
32
|
+
var clearNumber = function () {
|
|
33
|
+
emailControl.field.onChange('');
|
|
34
|
+
};
|
|
35
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: _jsx(Input, { label: t('signup_email_lable'), value: emailValue, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && emailValue ? _jsx(CheckIcon, {}) : emailValue && _jsx(ClearIcon, { onClick: clearNumber }) }) })));
|
|
30
36
|
};
|
|
31
37
|
export default React.memo(Email);
|
|
@@ -10,7 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Box from '@mui/material/Box/Box';
|
|
14
13
|
import { styled } from '@mui/material/styles';
|
|
15
14
|
import Email from './Email';
|
|
16
15
|
import Name from './Name';
|
|
@@ -18,44 +17,17 @@ import * as React from 'react';
|
|
|
18
17
|
import { useTranslation } from 'react-i18next';
|
|
19
18
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
20
19
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
21
|
-
import Icon from '../../../../components/Icon';
|
|
22
20
|
import { useAppDispatch } from '../../../../hooks';
|
|
23
21
|
import { handleNextScreenStep } from '../../../../app/settings';
|
|
24
22
|
import { IndividualValidation } from './validation';
|
|
25
23
|
import Form from '../../../../components/Form';
|
|
26
24
|
import Button from '../../../shared/Button';
|
|
27
25
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
28
|
-
import Loader from '../../../../components/Loader';
|
|
29
26
|
import { useLanguage } from '../../../../hooks';
|
|
30
27
|
var FormStyled = styled(Form)(function () { return ({
|
|
31
28
|
display: 'flex',
|
|
32
29
|
flexDirection: 'column'
|
|
33
30
|
}); });
|
|
34
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
35
|
-
var theme = _a.theme;
|
|
36
|
-
return ({
|
|
37
|
-
margin: theme.spacing(5, 2.5, 0, 2.5)
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
41
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
42
|
-
return ({
|
|
43
|
-
width: theme.spacing(3),
|
|
44
|
-
height: theme.spacing(3),
|
|
45
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
46
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
47
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
51
|
-
var theme = _a.theme;
|
|
52
|
-
return ({
|
|
53
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
54
|
-
'& .loader-box-container': {
|
|
55
|
-
marginInlineStart: theme.spacing(2.5)
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
31
|
var Individual = function (_a) {
|
|
60
32
|
var dispatch = useAppDispatch();
|
|
61
33
|
var methods = useForm({
|
|
@@ -14,18 +14,24 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
16
16
|
import Input from '../../../shared/Input';
|
|
17
|
-
import {
|
|
17
|
+
import { keepLettersAndSpace } from '../../../../utils';
|
|
18
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
19
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
20
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
19
21
|
var Name = function (_a) {
|
|
20
22
|
var _b;
|
|
21
23
|
var t = useTranslation().t;
|
|
22
24
|
var control = useFormContext().control;
|
|
23
25
|
var nameControl = useController({ name: 'name', control: control });
|
|
24
26
|
var handleNameChange = function (event) {
|
|
25
|
-
var value =
|
|
27
|
+
var value = keepLettersAndSpace(event.target.value);
|
|
26
28
|
nameControl.field.onChange(value);
|
|
27
29
|
};
|
|
28
30
|
var nameValue = nameControl.field.value;
|
|
29
|
-
|
|
31
|
+
var error = (_b = nameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
32
|
+
var clearNumber = function () {
|
|
33
|
+
nameControl.field.onChange('');
|
|
34
|
+
};
|
|
35
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(Input, { label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && nameValue ? _jsx(CheckIcon, {}) : nameValue && _jsx(ClearIcon, { onClick: clearNumber }) }) })));
|
|
30
36
|
};
|
|
31
37
|
export default React.memo(Name);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var IndividualValidation = yup.object().shape({
|
|
3
|
-
name: yup
|
|
4
|
-
|
|
3
|
+
name: yup
|
|
4
|
+
.string()
|
|
5
|
+
.matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g, 'please write your first and last name')
|
|
6
|
+
.required('please write your first and last name'),
|
|
7
|
+
email: yup.string().email('email_not_valid').required('email_not_valid')
|
|
5
8
|
});
|
|
@@ -29,10 +29,10 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import Collapse from '../../../../components/Collapse';
|
|
31
31
|
import CheckIcon from '@mui/icons-material/Check';
|
|
32
|
-
import ScreenContainer from '
|
|
32
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
33
33
|
import Icon from '../../../../components/Icon';
|
|
34
|
-
import Input from '
|
|
35
|
-
import ExpandIcon from '
|
|
34
|
+
import Input from '../../../shared/Input';
|
|
35
|
+
import ExpandIcon from '../../../shared/ExpandIcon';
|
|
36
36
|
import SimpleList from '../../../../components/SimpleList';
|
|
37
37
|
import { useLanguage } from '../../../../hooks';
|
|
38
38
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
@@ -85,7 +85,7 @@ var BusinessCountry = React.forwardRef(function (_a, ref) {
|
|
|
85
85
|
businessCountryControl.field.onChange(country);
|
|
86
86
|
};
|
|
87
87
|
var businessCountry = businessCountryControl.field.value;
|
|
88
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { marginBottom: '25px' } }, { children: [_jsx(Input, { label: t('
|
|
88
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { marginBottom: '25px' } }, { children: [_jsx(Input, { label: t('signup_select_country'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, startAdornment: _jsx(CountrySpanStyled, { children: _jsx(CountryIconStyled, { src: (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.logo) || '' }) }), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('ide_mobile_placeholder'), value: (isAr ? (_b = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _c === void 0 ? void 0 : _c.english) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: businessCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
89
89
|
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsx(CountryIconStyled, { src: item.logo, alt: item.iso3 }), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) && _jsx(CheckIconStyled, {})] }));
|
|
90
90
|
} }) }))] })) })));
|
|
91
91
|
});
|
|
@@ -18,8 +18,9 @@ import { styled, alpha } from '@mui/material/styles';
|
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
19
19
|
import Tooltip from '@mui/material/Tooltip';
|
|
20
20
|
import Icon from '../../../../components/Icon';
|
|
21
|
-
import Input from '
|
|
22
|
-
import ClearIcon from '
|
|
21
|
+
import Input from '../../../shared/Input';
|
|
22
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
23
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
23
24
|
import Collapse from '../../../../components/Collapse';
|
|
24
25
|
import DatePicker from '../../../../components/DatePicker';
|
|
25
26
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
@@ -46,10 +47,10 @@ var IconStyled = styled(Icon)(function (_a) {
|
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
49
|
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
49
|
-
var _b;
|
|
50
|
+
var _b, _c;
|
|
50
51
|
var onSwitchToMobileNumber = _a.onSwitchToMobileNumber, show = _a.show;
|
|
51
52
|
var t = useTranslation().t;
|
|
52
|
-
var
|
|
53
|
+
var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
|
|
53
54
|
var nidControl = useController({ control: control, name: 'nid' });
|
|
54
55
|
var dobControl = useController({ control: control, name: 'dob' });
|
|
55
56
|
React.useEffect(function () {
|
|
@@ -70,9 +71,11 @@ var IDNumber = React.forwardRef(function (_a, ref) {
|
|
|
70
71
|
dobControl.field.onChange(data);
|
|
71
72
|
};
|
|
72
73
|
var nidValue = nidControl.field.value;
|
|
73
|
-
|
|
74
|
+
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
75
|
+
var dateValue = (_c = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _c === void 0 ? void 0 : _c.value;
|
|
76
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('enter_national_id') }), _jsx(Tooltip, __assign({ title: t('switch_to_mobile') }, { children: _jsx(IconStyled, { onClick: onSwitchToMobileNumber, alt: 'switcher icon', src: ICONS_NAMES.MOBILE_IMAGE }) }))] }), _jsx(Input, { dir: 'ltr', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true }), _jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
74
77
|
var spacing = _a.spacing;
|
|
75
78
|
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
76
|
-
} } }, { children: t('
|
|
79
|
+
} } }, { children: t('enter_birth_date') })), _jsx(DatePicker, { defaultValue: dateValue ? new Date(dateValue) : new Date(), readOnly: true, dir: 'ltr', locale: 'en', onDateChange: handleBirthDateChange })] })) })));
|
|
77
80
|
});
|
|
78
81
|
export default React.memo(IDNumber);
|
|
@@ -54,7 +54,7 @@ var MID = function (_a) {
|
|
|
54
54
|
var _c = React.useState(), listType = _c[0], setListType = _c[1];
|
|
55
55
|
var dispatch = useAppDispatch();
|
|
56
56
|
var methods = useForm({
|
|
57
|
-
resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema),
|
|
57
|
+
resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema(10)),
|
|
58
58
|
defaultValues: {
|
|
59
59
|
countryCode: defaultCountry,
|
|
60
60
|
businessCountry: defaultCountry,
|
|
@@ -76,6 +76,6 @@ var MID = function (_a) {
|
|
|
76
76
|
var isBusinessListActive = listType === ListType.BusinessList;
|
|
77
77
|
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
78
78
|
var listActive = isBusinessListActive || isCountryListActive;
|
|
79
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('
|
|
79
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(BusinessCountry, { show: !isCountryListActive, countries: businessCountries, onListOpen: function () { return handleMenuListClick(ListType.BusinessList); }, onListClose: function () { return handleMenuListClick(); } }), _jsx(Collapse, __assign({ in: !isNID }, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: countriesCode, onSwitchToIdNumber: function () { return setIsNID(true); }, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsx(Collapse, __assign({ in: isNID }, { children: _jsx(IDNumber, { show: !listActive, onSwitchToMobileNumber: function () { return setIsNID(false); } }) }))] })), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') })) }))] })) }))] }));
|
|
80
80
|
};
|
|
81
81
|
export default React.memo(MID);
|