@tap-payments/auth-jsconnect 1.0.5 → 1.0.8
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 +61 -3
- package/build/@types/app.js +5 -0
- package/build/app/settings.d.ts +3 -3
- package/build/app/settings.js +26 -11
- package/build/assets/locales/ar.json +51 -3
- package/build/assets/locales/en.json +50 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Dialog.js +7 -22
- package/build/components/Footer/Footer.js +1 -1
- package/build/components/Loader/Loader.js +12 -11
- package/build/components/OTPField/OTPField.js +3 -23
- package/build/components/OTPTimer/OTPTimer.d.ts +4 -3
- package/build/components/OTPTimer/OTPTimer.js +19 -6
- package/build/components/Providers/ThemeProvider.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +2 -5
- package/build/components/Warning/Warning.js +2 -18
- package/build/constants/app.d.ts +9 -0
- package/build/constants/app.js +112 -2
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/constants/dummy.d.ts +103 -0
- package/build/constants/dummy.js +219 -0
- package/build/constants/validation.d.ts +4 -0
- package/build/constants/validation.js +4 -0
- package/build/features/bank/Bank.d.ts +6 -0
- package/build/features/bank/Bank.js +48 -0
- package/build/features/bank/index.d.ts +1 -0
- package/build/features/bank/index.js +1 -0
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/BankDetails.js +57 -0
- package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/BankName.js +27 -0
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/Beneficiary.js +34 -0
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +5 -0
- package/build/features/bank/screens/BankDetails/IBAN.js +35 -0
- package/build/features/bank/screens/BankDetails/index.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/index.js +2 -0
- package/build/features/bank/screens/BankDetails/validation.d.ts +14 -0
- package/build/features/bank/screens/BankDetails/validation.js +9 -0
- package/build/features/business/Business.d.ts +6 -0
- package/build/features/business/Business.js +61 -0
- package/build/features/business/index.d.ts +1 -0
- package/build/features/business/index.js +1 -1
- package/build/features/business/screens/Activities/Activities.d.ts +5 -0
- package/build/features/business/screens/Activities/Activities.js +83 -0
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +70 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +136 -0
- package/build/features/business/screens/Activities/SalesChannels.d.ts +5 -0
- package/build/features/business/screens/Activities/SalesChannels.js +107 -0
- package/build/features/business/screens/Activities/index.d.ts +3 -0
- package/build/features/business/screens/Activities/index.js +2 -0
- package/build/features/business/screens/Activities/validation.d.ts +119 -0
- package/build/features/business/screens/Activities/validation.js +17 -0
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +12 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +85 -0
- package/build/features/business/screens/BusinessType/CRNumber.d.ts +6 -0
- package/build/features/business/screens/BusinessType/CRNumber.js +40 -0
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +11 -0
- package/build/features/business/screens/BusinessType/CompanyLicense.js +109 -0
- package/build/features/business/screens/BusinessType/FLNumber.d.ts +6 -0
- package/build/features/business/screens/BusinessType/FLNumber.js +40 -0
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +11 -0
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +112 -0
- package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -0
- package/build/features/business/screens/BusinessType/SelectType.js +106 -0
- package/build/features/business/screens/BusinessType/Switch.d.ts +7 -0
- package/build/features/business/screens/BusinessType/Switch.js +35 -0
- package/build/features/business/screens/BusinessType/index.d.ts +3 -0
- package/build/features/business/screens/BusinessType/index.js +2 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +15 -0
- package/build/features/business/screens/BusinessType/validation.js +14 -0
- package/build/features/business/screens/Confirm/Confirm.d.ts +5 -0
- package/build/features/business/screens/Confirm/Confirm.js +53 -0
- package/build/features/business/screens/Confirm/index.d.ts +3 -0
- package/build/features/business/screens/Confirm/index.js +2 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +92 -0
- package/build/features/business/screens/Customers/CustomerLocations.js +122 -0
- package/build/features/business/screens/Customers/Customers.d.ts +5 -0
- package/build/features/business/screens/Customers/Customers.js +92 -0
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +7 -0
- package/build/features/business/screens/Customers/ExpectedCustomers.js +78 -0
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +7 -0
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +74 -0
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +44 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +86 -0
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -0
- package/build/features/business/screens/Customers/TransactionPolicy.js +37 -0
- package/build/features/business/screens/Customers/index.d.ts +3 -0
- package/build/features/business/screens/Customers/index.js +2 -0
- package/build/features/business/screens/Customers/validation.d.ts +20 -0
- package/build/features/business/screens/Customers/validation.js +8 -0
- package/build/features/business/screens/IDBOD/DOB.js +8 -8
- package/build/features/business/screens/IDBOD/ID.js +8 -7
- package/build/features/business/screens/IDBOD/IDBOD.js +5 -6
- package/build/features/business/screens/OTP/OTP.d.ts +11 -0
- package/build/features/business/screens/OTP/OTP.js +112 -0
- package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/business/screens/OTP/OTPInput.js +51 -0
- package/build/features/{connect → business}/screens/OTP/OTPTimer.d.ts +0 -0
- package/build/features/business/screens/OTP/OTPTimer.js +20 -0
- package/build/features/business/screens/OTP/index.d.ts +3 -0
- package/build/features/business/screens/OTP/index.js +2 -0
- package/build/features/business/screens/OTP/validation.d.ts +8 -0
- package/build/features/business/screens/OTP/validation.js +4 -0
- package/build/features/business/screens/Success/Success.d.ts +5 -0
- package/build/features/business/screens/Success/Success.js +15 -0
- package/build/features/business/screens/Success/index.d.ts +3 -0
- package/build/features/business/screens/Success/index.js +2 -0
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +6 -0
- package/build/features/business/screens/VerifyNumber/OTPInput.js +68 -0
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +5 -0
- package/build/features/business/screens/VerifyNumber/OTPTimer.js +20 -0
- package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +13 -0
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +119 -0
- package/build/features/business/screens/VerifyNumber/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNumber/index.js +2 -0
- package/build/features/business/screens/VerifyNumber/validation.d.ts +8 -0
- package/build/features/business/screens/VerifyNumber/validation.js +4 -0
- package/build/features/connect/Connect.js +6 -18
- package/build/features/connect/screens/Individual/Email.d.ts +1 -1
- package/build/features/connect/screens/Individual/Email.js +6 -31
- package/build/features/connect/screens/Individual/Individual.js +7 -16
- package/build/features/connect/screens/Individual/Name.d.ts +1 -1
- package/build/features/connect/screens/Individual/Name.js +7 -34
- package/build/features/connect/screens/MID/BusinessCountry.js +5 -40
- package/build/features/connect/screens/MID/IDNumber.js +13 -28
- package/build/features/connect/screens/MID/MID.js +6 -43
- package/build/features/connect/screens/MID/MobileNumber.js +22 -41
- package/build/features/connect/screens/Merchant/BrandName.js +5 -31
- package/build/features/connect/screens/Merchant/Merchant.js +6 -50
- package/build/features/connect/screens/Merchant/SocialMedia.js +3 -11
- package/build/features/connect/screens/Merchant/TAC.js +4 -13
- package/build/features/connect/screens/OTP/OTP.js +17 -61
- package/build/features/connect/screens/OTP/OTPInput.js +8 -21
- package/build/features/connect/screens/Password/Password.js +12 -49
- package/build/features/connect/screens/Password/PasswordInput.js +16 -51
- package/build/features/connect/screens/ThankYou/ThankYou.js +4 -65
- package/build/features/featuresScreens.d.ts +5 -0
- package/build/features/featuresScreens.js +78 -7
- package/build/features/owner/Owner.d.ts +6 -0
- package/build/features/owner/Owner.js +50 -0
- package/build/features/owner/index.d.ts +1 -0
- package/build/features/owner/index.js +1 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +19 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +52 -0
- package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +3 -0
- package/build/features/owner/screens/ShowOwnerInfo/index.js +2 -0
- package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +7 -0
- package/build/features/owner/screens/ShowOwnerInfo/info.js +28 -0
- package/build/features/password/Password.d.ts +6 -0
- package/build/features/password/Password.js +50 -0
- package/build/features/password/index.d.ts +1 -0
- package/build/features/password/index.js +1 -0
- package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -0
- package/build/features/password/screens/CreatePassword/ConditionText.js +23 -0
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +27 -0
- package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/CreatePassword.js +51 -0
- package/build/features/password/screens/CreatePassword/Password.d.ts +5 -0
- package/build/features/password/screens/CreatePassword/Password.js +75 -0
- package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -0
- package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -0
- package/build/features/password/screens/CreatePassword/index.d.ts +3 -0
- package/build/features/password/screens/CreatePassword/index.js +2 -0
- package/build/features/password/screens/CreatePassword/validation.d.ts +11 -0
- package/build/features/password/screens/CreatePassword/validation.js +8 -0
- package/build/features/shared/Button/Button.d.ts +8 -0
- package/build/features/shared/Button/Button.js +47 -0
- package/build/features/shared/Button/index.d.ts +2 -0
- package/build/features/shared/Button/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.js +14 -0
- package/build/features/shared/CheckIcon/index.d.ts +2 -0
- package/build/features/shared/CheckIcon/index.js +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +26 -0
- package/build/features/shared/ClearIcon/index.d.ts +2 -0
- package/build/features/shared/ClearIcon/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -0
- package/build/features/shared/Containers/FeatureContainer.js +33 -0
- package/build/features/shared/Containers/ScreenContainer.d.ts +4 -0
- package/build/features/shared/Containers/ScreenContainer.js +28 -0
- package/build/features/shared/Containers/index.d.ts +3 -0
- package/build/features/shared/Containers/index.js +3 -0
- package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +7 -0
- package/build/features/shared/ExpandIcon/ExpandIcon.js +24 -0
- package/build/features/shared/ExpandIcon/index.d.ts +2 -0
- package/build/features/shared/ExpandIcon/index.js +2 -0
- package/build/features/shared/Footer/Footer.d.ts +2 -0
- package/build/features/shared/Footer/Footer.js +16 -0
- package/build/features/shared/Footer/index.d.ts +2 -0
- package/build/features/shared/Footer/index.js +2 -0
- package/build/features/shared/Input/Input.d.ts +27 -0
- package/build/features/shared/Input/Input.js +59 -0
- package/build/features/shared/Input/index.d.ts +2 -0
- package/build/features/shared/Input/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +9 -0
- package/build/features/shared/OTP/OTP.js +85 -0
- package/build/features/shared/OTP/index.d.ts +2 -0
- package/build/features/shared/OTP/index.js +2 -0
- package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -0
- package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -0
- package/build/features/shared/PasswordIcon/index.d.ts +2 -0
- package/build/features/shared/PasswordIcon/index.js +2 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +7 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.js +54 -0
- package/build/features/shared/SuccessScreen/index.d.ts +2 -0
- package/build/features/shared/SuccessScreen/index.js +2 -0
- package/build/features/tax/Tax.d.ts +6 -0
- package/build/features/tax/Tax.js +50 -0
- package/build/features/tax/index.d.ts +1 -0
- package/build/features/tax/index.js +1 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +45 -0
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +27 -0
- package/build/features/tax/screens/TaxDetails/index.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/validation.d.ts +8 -0
- package/build/features/tax/screens/TaxDetails/validation.js +4 -0
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useContainerDimensions.d.ts +4 -0
- package/build/hooks/useContainerDimensions.js +21 -0
- package/build/index.css +1 -1
- package/build/index.d.ts +7 -2
- package/build/index.js +17 -2
- package/build/theme/palette.js +10 -4
- package/build/theme/typography.js +2 -2
- package/build/utils/array.d.ts +3 -1
- package/build/utils/array.js +7 -3
- package/build/utils/string.d.ts +2 -0
- package/build/utils/string.js +11 -0
- package/build/utils/validation.d.ts +6 -0
- package/build/utils/validation.js +19 -1
- package/package.json +1 -1
- package/build/features/connect/Footer.d.ts +0 -4
- package/build/features/connect/Footer.js +0 -16
- package/build/features/connect/screens/OTP/OTPTimer.js +0 -35
|
@@ -17,20 +17,12 @@ import Box from '@mui/material/Box';
|
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
18
|
import InfoIcon from '@mui/icons-material/Info';
|
|
19
19
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
21
|
import Text from '../../../../components/Text';
|
|
21
|
-
import Input from '
|
|
22
|
-
import ClearIcon from '
|
|
22
|
+
import Input from '../../../shared/Input';
|
|
23
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
23
24
|
import Tooltip from '../../../../components/Tooltip';
|
|
24
25
|
import { removeAllOtherThanAlphabet } from '../../../../utils';
|
|
25
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
26
|
-
var theme = _a.theme;
|
|
27
|
-
return ({
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
padding: theme.spacing(0, 0, 3, 0),
|
|
31
|
-
direction: theme.direction
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
26
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
35
27
|
var theme = _a.theme;
|
|
36
28
|
return ({
|
|
@@ -41,25 +33,7 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
41
33
|
});
|
|
42
34
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
43
35
|
var theme = _a.theme;
|
|
44
|
-
return ({
|
|
45
|
-
color: alpha(theme.palette.text.primary, 0.4),
|
|
46
|
-
fontSize: theme.spacing(1.5)
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
50
|
-
var theme = _a.theme;
|
|
51
|
-
return ({
|
|
52
|
-
padding: theme.spacing(0, 2, 0, 0)
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
56
|
-
var theme = _a.theme;
|
|
57
|
-
return ({
|
|
58
|
-
width: theme.spacing(2),
|
|
59
|
-
height: theme.spacing(2),
|
|
60
|
-
cursor: 'pointer',
|
|
61
|
-
color: alpha(theme.palette.text.primary, 0.4)
|
|
62
|
-
});
|
|
36
|
+
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
63
37
|
});
|
|
64
38
|
var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
65
39
|
var theme = _a.theme;
|
|
@@ -94,6 +68,6 @@ var BrandName = function (_a) {
|
|
|
94
68
|
brandControl.field.onChange('');
|
|
95
69
|
};
|
|
96
70
|
var brandNameValue = brandControl.field.value;
|
|
97
|
-
return (_jsxs(
|
|
71
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_description'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, endAdornment: brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }), placeholder: t('brand_name_placeholder'), warningType: 'alert', warningMessage: (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message })] })));
|
|
98
72
|
};
|
|
99
73
|
export default React.memo(BrandName);
|
|
@@ -14,59 +14,16 @@ import * as React from 'react';
|
|
|
14
14
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
20
|
-
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
17
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
18
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
21
19
|
import Form from '../../../../components/Form';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import Button from '../../../../components/Button';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
+
import Button from '../../../shared/Button';
|
|
25
22
|
import { useLanguage } from '../../../../hooks';
|
|
26
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
27
23
|
import { MerchantValidationSchema } from './validation';
|
|
28
24
|
import BrandName from './BrandName';
|
|
29
25
|
import SocialMedia from './SocialMedia';
|
|
30
26
|
import TAC from './TAC';
|
|
31
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
32
|
-
var theme = _a.theme;
|
|
33
|
-
return ({
|
|
34
|
-
padding: theme.spacing(2.5, 0, 2.5, 0),
|
|
35
|
-
overflow: 'hidden',
|
|
36
|
-
direction: theme.direction
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
40
|
-
var theme = _a.theme;
|
|
41
|
-
return ({
|
|
42
|
-
margin: theme.spacing(0, 2.5, 0, 2.5)
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
46
|
-
var theme = _a.theme;
|
|
47
|
-
return ({
|
|
48
|
-
paddingBottom: theme.spacing(5)
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
52
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
53
|
-
return ({
|
|
54
|
-
width: theme.spacing(3),
|
|
55
|
-
height: theme.spacing(3),
|
|
56
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
57
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
58
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
62
|
-
var theme = _a.theme;
|
|
63
|
-
return ({
|
|
64
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
65
|
-
'& .loader-box-container': {
|
|
66
|
-
marginInlineStart: theme.spacing(2.5)
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
27
|
var Merchant = function (_a) {
|
|
71
28
|
var methods = useForm({
|
|
72
29
|
resolver: yupResolver(MerchantValidationSchema),
|
|
@@ -84,11 +41,10 @@ var Merchant = function (_a) {
|
|
|
84
41
|
var t = useTranslation().t;
|
|
85
42
|
var isAr = useLanguage().isAr;
|
|
86
43
|
var dispatch = useAppDispatch();
|
|
87
|
-
var settingStore = useAppSelector(settingsSelector);
|
|
88
44
|
var onSubmit = function (data) {
|
|
89
45
|
console.log('data', data);
|
|
90
|
-
dispatch(handleNextScreenStep(
|
|
46
|
+
dispatch(handleNextScreenStep());
|
|
91
47
|
};
|
|
92
|
-
return (_jsx(
|
|
48
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, {}), _jsx(SocialMedia, {}), _jsx(TAC, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, isAr: isAr }, { children: t('next') }))] })) })) }));
|
|
93
49
|
};
|
|
94
50
|
export default React.memo(Merchant);
|
|
@@ -13,7 +13,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
16
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
17
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
19
18
|
import { SocialMediaTypes } from '../../../../@types';
|
|
@@ -21,14 +20,7 @@ import Input from '../../../../components/Input';
|
|
|
21
20
|
import Text from '../../../../components/Text';
|
|
22
21
|
import Collapse from '../../../../components/Collapse';
|
|
23
22
|
import SocialMediaGroup from '../../../../components/SocialMediaGroup';
|
|
24
|
-
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return ({
|
|
27
|
-
display: 'flex',
|
|
28
|
-
flexDirection: 'column',
|
|
29
|
-
direction: theme.direction
|
|
30
|
-
});
|
|
31
|
-
});
|
|
23
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
32
24
|
var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
|
|
33
25
|
var theme = _a.theme, defaultValue = _a.defaultValue;
|
|
34
26
|
return ({
|
|
@@ -80,8 +72,8 @@ var SocialMedia = function (_a) {
|
|
|
80
72
|
var twitterValue = links.twitter || '';
|
|
81
73
|
var instagramValue = links.instagram || '';
|
|
82
74
|
var errors = linksControl.fieldState.error;
|
|
83
|
-
return (_jsxs(
|
|
75
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 3 } }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
|
|
84
76
|
setSocialMediaType(value);
|
|
85
|
-
} }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, startAdornment: _jsx(TextStyled, { children: "https://" }), endAdornment: websiteValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('website_placeholder'), warningType: 'alert', warningMessage: (_b = errors === null || errors === void 0 ? void 0 : errors.website) === null || _b === void 0 ? void 0 : _b.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: twitterValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('twitter_placeholder'), warningType: 'alert', warningMessage: (_c = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _c === void 0 ? void 0 : _c.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: instagramValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('instagram_placeholder'), warningType: 'alert', warningMessage: (_d = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _d === void 0 ? void 0 : _d.message }) }))] }));
|
|
77
|
+
} }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, startAdornment: _jsx(TextStyled, { children: "https://" }), endAdornment: websiteValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('website_placeholder'), warningType: 'alert', warningMessage: (_b = errors === null || errors === void 0 ? void 0 : errors.website) === null || _b === void 0 ? void 0 : _b.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: twitterValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('twitter_placeholder'), warningType: 'alert', warningMessage: (_c = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _c === void 0 ? void 0 : _c.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: instagramValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('instagram_placeholder'), warningType: 'alert', warningMessage: (_d = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _d === void 0 ? void 0 : _d.message }) }))] })));
|
|
86
78
|
};
|
|
87
79
|
export default React.memo(SocialMedia);
|
|
@@ -17,33 +17,24 @@ import Box from '@mui/material/Box';
|
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
18
|
import Link from '@mui/material/Link';
|
|
19
19
|
import CheckBox from '../../../../components/CheckBox';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
21
|
import Text from '../../../../components/Text';
|
|
21
22
|
import Warning from '../../../../components/Warning';
|
|
22
23
|
import { useLanguage } from '../../../../hooks';
|
|
23
24
|
import Collapse from '../../../../components/Collapse';
|
|
24
25
|
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
25
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
26
|
-
var theme = _a.theme;
|
|
27
|
-
return ({
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
padding: theme.spacing(3, 0, 0, 0),
|
|
31
|
-
alignItems: 'start',
|
|
32
|
-
width: '100%'
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
26
|
var TACContainerStyled = styled(Box)(function (_a) {
|
|
36
27
|
var theme = _a.theme;
|
|
37
28
|
return ({
|
|
38
29
|
display: 'flex',
|
|
39
30
|
flexDirection: 'row',
|
|
40
31
|
alignItems: 'center',
|
|
41
|
-
|
|
32
|
+
paddingInlineStart: theme.spacing(2.5)
|
|
42
33
|
});
|
|
43
34
|
});
|
|
44
35
|
var TextStyled = styled(Text)(function (_a) {
|
|
45
36
|
var theme = _a.theme;
|
|
46
|
-
return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre' }, theme.typography.body2));
|
|
37
|
+
return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre', height: 'fit-content' }, theme.typography.body2));
|
|
47
38
|
});
|
|
48
39
|
var LinkStyled = styled(Link)(function (_a) {
|
|
49
40
|
var theme = _a.theme;
|
|
@@ -83,6 +74,6 @@ var TAC = function (_a) {
|
|
|
83
74
|
var handleTACCheckedChange = function (event, checked) {
|
|
84
75
|
tacControl.field.onChange(checked);
|
|
85
76
|
};
|
|
86
|
-
return (_jsxs(
|
|
77
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TOS_AR : EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage })) }))] })));
|
|
87
78
|
};
|
|
88
79
|
export default React.memo(TAC);
|
|
@@ -15,85 +15,39 @@ import { styled } from '@mui/material/styles';
|
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import Text from '../../../../components/Text';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { ICONS_NAMES } from '../../../../constants/assets';
|
|
23
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
24
|
-
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
18
|
+
import Button from '../../../../features/shared/Button';
|
|
19
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
21
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
25
22
|
import { useLanguage } from '../../../../hooks';
|
|
26
23
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
27
24
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
28
25
|
import Form from '../../../../components/Form';
|
|
26
|
+
import { maskPhone } from '../../../../utils';
|
|
29
27
|
import { OTPValidation } from './validation';
|
|
30
28
|
import OTPInput from './OTPInput';
|
|
31
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
32
|
-
var theme = _a.theme;
|
|
33
|
-
return ({
|
|
34
|
-
display: 'flex',
|
|
35
|
-
flexDirection: 'column',
|
|
36
|
-
overflow: 'hidden',
|
|
37
|
-
direction: theme.direction
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
29
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
41
|
-
var _b;
|
|
42
|
-
var theme = _a.theme;
|
|
43
|
-
return (_b = {
|
|
44
|
-
background: theme.palette.common.white,
|
|
45
|
-
border: '1px solid',
|
|
46
|
-
borderColor: theme.palette.divider,
|
|
47
|
-
direction: theme.direction,
|
|
48
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25)
|
|
49
|
-
},
|
|
50
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
51
|
-
marginBottom: theme.spacing(6)
|
|
52
|
-
},
|
|
53
|
-
_b);
|
|
54
|
-
});
|
|
55
|
-
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
56
30
|
var theme = _a.theme;
|
|
57
31
|
return ({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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(4)
|
|
62
38
|
});
|
|
63
39
|
});
|
|
64
|
-
var
|
|
40
|
+
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
65
41
|
var theme = _a.theme;
|
|
66
|
-
return ({
|
|
67
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
68
|
-
'& .loader-box-container': {
|
|
69
|
-
marginInlineStart: theme.spacing(2.5)
|
|
70
|
-
}
|
|
71
|
-
});
|
|
42
|
+
return (__assign(__assign({}, theme.typography.subtitle1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5) }));
|
|
72
43
|
});
|
|
73
44
|
var FormStyled = styled(Form)(function () { return ({
|
|
74
45
|
display: 'flex',
|
|
75
46
|
flexDirection: 'column'
|
|
76
47
|
}); });
|
|
77
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
78
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
79
|
-
return ({
|
|
80
|
-
width: theme.spacing(3),
|
|
81
|
-
height: theme.spacing(3),
|
|
82
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
83
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
84
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
88
|
-
var theme = _a.theme;
|
|
89
|
-
return ({
|
|
90
|
-
margin: theme.spacing(2.5)
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
48
|
var OTP = function (_a) {
|
|
94
49
|
var phone = _a.phone;
|
|
95
50
|
var dispatch = useAppDispatch();
|
|
96
|
-
var settingStore = useAppSelector(settingsSelector);
|
|
97
51
|
var methods = useForm({
|
|
98
52
|
resolver: yupResolver(OTPValidation),
|
|
99
53
|
defaultValues: {
|
|
@@ -105,9 +59,11 @@ var OTP = function (_a) {
|
|
|
105
59
|
var isAr = useLanguage().isAr;
|
|
106
60
|
var onSubmit = function (data) {
|
|
107
61
|
console.log('data', data);
|
|
108
|
-
|
|
62
|
+
if (data.otp === '123456')
|
|
63
|
+
return dispatch(handleNextScreenStep('CONNECT_PASSWORD_STEP'));
|
|
64
|
+
dispatch(handleNextScreenStep('CONNECT_INDIVIDUAL_STEP'));
|
|
109
65
|
};
|
|
110
|
-
return (_jsx(
|
|
66
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [t('ide_opt_sent_title'), " ", _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: false }, { children: t('next') }))] })) })) }));
|
|
111
67
|
};
|
|
112
68
|
OTP.defaultProps = {
|
|
113
69
|
phone: '+996564656085'
|
|
@@ -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('resend_otp'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
50
37
|
};
|
|
51
38
|
export default React.memo(OTPInput);
|
|
@@ -14,57 +14,21 @@ import * as React from 'react';
|
|
|
14
14
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
|
-
import
|
|
17
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
|
-
import {
|
|
20
|
-
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
19
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
21
20
|
import Form from '../../../../components/Form';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import Button from '../../../../components/Button';
|
|
21
|
+
import Button from '../../../shared/Button';
|
|
22
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
23
|
import { useLanguage } from '../../../../hooks';
|
|
26
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
27
24
|
import { PasswordValidationSchema } from './validation';
|
|
28
25
|
import PasswordInput from './PasswordInput';
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
var ButtonContainer = styled(Box)(function (_a) {
|
|
38
|
-
var theme = _a.theme;
|
|
39
|
-
return ({
|
|
40
|
-
margin: theme.spacing(0, 2.5, 0, 2.5)
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
44
|
-
var theme = _a.theme;
|
|
45
|
-
return ({
|
|
46
|
-
paddingBottom: theme.spacing(5)
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
50
|
-
var theme = _a.theme, isAr = _a.isAr;
|
|
51
|
-
return ({
|
|
52
|
-
width: theme.spacing(3),
|
|
53
|
-
height: theme.spacing(3),
|
|
54
|
-
paddingInlineStart: theme.spacing(1.5),
|
|
55
|
-
paddingInlineEnd: theme.spacing(0.5),
|
|
56
|
-
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
var LoaderStyled = styled(Loader)(function (_a) {
|
|
60
|
-
var theme = _a.theme;
|
|
61
|
-
return ({
|
|
62
|
-
marginInlineStart: theme.spacing(-6.25),
|
|
63
|
-
'& .loader-box-container': {
|
|
64
|
-
marginInlineStart: theme.spacing(2.5)
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
26
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
height: '100%'
|
|
31
|
+
}); });
|
|
68
32
|
var Password = function (_a) {
|
|
69
33
|
var methods = useForm({
|
|
70
34
|
resolver: yupResolver(PasswordValidationSchema),
|
|
@@ -76,11 +40,10 @@ var Password = function (_a) {
|
|
|
76
40
|
var t = useTranslation().t;
|
|
77
41
|
var isAr = useLanguage().isAr;
|
|
78
42
|
var dispatch = useAppDispatch();
|
|
79
|
-
var settingStore = useAppSelector(settingsSelector);
|
|
80
43
|
var onSubmit = function (data) {
|
|
81
44
|
console.log('data', data);
|
|
82
|
-
dispatch(handleNextScreenStep(
|
|
45
|
+
dispatch(handleNextScreenStep());
|
|
83
46
|
};
|
|
84
|
-
return (_jsx(
|
|
47
|
+
return (_jsx(ScreenContainer, __assign({ sx: { height: 240 } }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(PasswordInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, isAr: isAr, loading: false }, { children: t('next') }))] })) })) })));
|
|
85
48
|
};
|
|
86
49
|
export default React.memo(Password);
|
|
@@ -1,56 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
|
-
import Box from '@mui/material/Box';
|
|
4
14
|
import { useTranslation } from 'react-i18next';
|
|
5
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import Text from '../../../../components/Text';
|
|
10
|
-
import Input from '../../../../components/Input';
|
|
11
|
-
var BoxStyled = styled(Box)(function () { return ({
|
|
12
|
-
display: 'flex',
|
|
13
|
-
flexDirection: 'column'
|
|
14
|
-
}); });
|
|
15
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
16
|
-
var theme = _a.theme;
|
|
17
|
-
return ({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
justifyContent: 'space-between',
|
|
20
|
-
padding: theme.spacing(0, 2.5, 1, 2.5)
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
24
|
-
var theme = _a.theme;
|
|
25
|
-
return ({
|
|
26
|
-
color: alpha(theme.palette.text.primary, 0.4),
|
|
27
|
-
fontSize: theme.spacing(1.5)
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
31
|
-
var theme = _a.theme;
|
|
32
|
-
return ({
|
|
33
|
-
padding: theme.spacing(0, 2, 0, 0)
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
var PasswordHideIconStyled = styled(VisibilityOffIcon)(function (_a) {
|
|
37
|
-
var theme = _a.theme;
|
|
38
|
-
return ({
|
|
39
|
-
width: theme.spacing(2),
|
|
40
|
-
height: theme.spacing(2),
|
|
41
|
-
cursor: 'pointer',
|
|
42
|
-
color: alpha(theme.palette.text.primary, 0.4)
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
var PasswordShowIconStyled = styled(VisibilityIcon)(function (_a) {
|
|
46
|
-
var theme = _a.theme;
|
|
47
|
-
return ({
|
|
48
|
-
width: theme.spacing(2),
|
|
49
|
-
height: theme.spacing(2),
|
|
50
|
-
cursor: 'pointer',
|
|
51
|
-
color: alpha(theme.palette.text.primary, 0.4)
|
|
52
|
-
});
|
|
53
|
-
});
|
|
16
|
+
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
54
19
|
var PasswordInput = function (_a) {
|
|
55
20
|
var _b;
|
|
56
21
|
var t = useTranslation().t;
|
|
@@ -68,6 +33,6 @@ var PasswordInput = function (_a) {
|
|
|
68
33
|
setShowPassword(false);
|
|
69
34
|
};
|
|
70
35
|
var passwordValue = passwordControl.field.value;
|
|
71
|
-
return (
|
|
36
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 5 } }, { children: _jsx(Input, { label: t('password_label'), inputProps: { autoComplete: 'off' }, onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('password_placeholder'), type: showPassword ? 'text' : 'password', warningType: 'alert', warningMessage: (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) })));
|
|
72
37
|
};
|
|
73
38
|
export default React.memo(PasswordInput);
|
|
@@ -1,76 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import Box from '@mui/material/Box/Box';
|
|
14
|
-
import { styled } from '@mui/material/styles';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
2
|
import * as React from 'react';
|
|
16
3
|
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import
|
|
18
|
-
import Button from '../../../../components/Button';
|
|
19
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
20
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
21
|
-
var theme = _a.theme;
|
|
22
|
-
return ({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
flexDirection: 'column',
|
|
25
|
-
direction: theme.direction,
|
|
26
|
-
alignItems: 'center'
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
var ButtonStyled = styled(Button)(function (_a) {
|
|
30
|
-
var theme = _a.theme;
|
|
31
|
-
return ({
|
|
32
|
-
width: theme.spacing(5),
|
|
33
|
-
height: theme.spacing(5),
|
|
34
|
-
minHeight: theme.spacing(5),
|
|
35
|
-
minWidth: theme.spacing(5),
|
|
36
|
-
background: theme.palette.primary.main,
|
|
37
|
-
margin: theme.spacing(2.5),
|
|
38
|
-
borderRadius: theme.spacing(5)
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
var TextContainerStyled = 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
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25)
|
|
49
|
-
},
|
|
50
|
-
_b[theme.breakpoints.up('sm')] = {
|
|
51
|
-
marginBottom: theme.spacing(6)
|
|
52
|
-
},
|
|
53
|
-
_b);
|
|
54
|
-
});
|
|
55
|
-
var TitleStyled = styled(Text)(function (_a) {
|
|
56
|
-
var theme = _a.theme;
|
|
57
|
-
return ({
|
|
58
|
-
fontSize: theme.typography.htmlFontSize,
|
|
59
|
-
fontWeight: theme.typography.fontWeightRegular,
|
|
60
|
-
color: theme.palette.text.primary,
|
|
61
|
-
marginBlock: theme.spacing(1.75),
|
|
62
|
-
lineHeight: 1.75,
|
|
63
|
-
padding: '0px 20px'
|
|
64
|
-
});
|
|
65
|
-
});
|
|
4
|
+
import SuccessScreen from '../../../../features/shared/SuccessScreen';
|
|
66
5
|
var ThankYou = function (_a) {
|
|
67
6
|
var t = useTranslation().t;
|
|
68
7
|
var onSuccess = function () {
|
|
69
8
|
console.log('success');
|
|
70
9
|
alert('Account created successfully, please check your email');
|
|
71
10
|
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
72
|
-
window.location.href = '/';
|
|
11
|
+
window.location.href = '/new/business';
|
|
73
12
|
};
|
|
74
|
-
return
|
|
13
|
+
return _jsx(SuccessScreen, { title: t('thankyou_message'), onSuccess: onSuccess });
|
|
75
14
|
};
|
|
76
15
|
export default React.memo(ThankYou);
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { FeatureScreenStep } from '../@types';
|
|
2
2
|
export declare const connectFeatureScreens: Array<FeatureScreenStep>;
|
|
3
|
+
export declare const businessFeatureScreens: Array<FeatureScreenStep>;
|
|
4
|
+
export declare const ownerFeatureScreens: Array<FeatureScreenStep>;
|
|
5
|
+
export declare const passwordFeatureScreens: Array<FeatureScreenStep>;
|
|
6
|
+
export declare const bankFeatureScreens: Array<FeatureScreenStep>;
|
|
7
|
+
export declare const taxFeatureScreens: Array<FeatureScreenStep>;
|