@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
|
@@ -30,7 +30,9 @@ import { useLanguage } from '../../../../hooks';
|
|
|
30
30
|
import { EXPECTED_SALES_RANGE } from '../../../../constants';
|
|
31
31
|
import SimpleList from '../../../../components/SimpleList';
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
|
-
import
|
|
33
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
34
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
35
|
+
import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
|
|
34
36
|
var ListItemContainer = styled(Box)(function () { return ({
|
|
35
37
|
display: 'flex'
|
|
36
38
|
}); });
|
|
@@ -62,13 +64,12 @@ var ExpectedSalesRange = function (_a) {
|
|
|
62
64
|
};
|
|
63
65
|
var onSelectItem = function (expectedSalesRange) {
|
|
64
66
|
onCloseList();
|
|
65
|
-
|
|
66
|
-
expectedSalesRangeControl.field.onChange(remaining);
|
|
67
|
+
expectedSalesRangeControl.field.onChange(expectedSalesRange);
|
|
67
68
|
};
|
|
68
69
|
var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
|
|
69
|
-
var expectedSalesRangeSelected = expectedSalesRangeValue
|
|
70
|
-
return (_jsxs(
|
|
71
|
-
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})
|
|
70
|
+
var expectedSalesRangeSelected = expectedSalesRangeValue;
|
|
71
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.nameAR : expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedSalesRangeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
72
|
+
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})] }));
|
|
72
73
|
} }) }))] }));
|
|
73
74
|
};
|
|
74
75
|
export default ExpectedSalesRange;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const BoxStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
component?: React.ElementType<any> | undefined;
|
|
5
|
-
ref?: React.Ref<unknown> | undefined;
|
|
6
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
2
|
export declare const ContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
11
3
|
children?: React.ReactNode;
|
|
12
4
|
component?: React.ElementType<any> | undefined;
|
|
@@ -21,15 +21,7 @@ import Text from '../../../../components/Text';
|
|
|
21
21
|
import Link from '@mui/material/Link';
|
|
22
22
|
import Warning from '../../../../components/Warning';
|
|
23
23
|
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
24
|
-
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return ({
|
|
27
|
-
direction: theme.direction,
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
marginBlockStart: theme.spacing(2.75)
|
|
31
|
-
});
|
|
32
|
-
});
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
33
25
|
export var ContainerStyled = styled(Box)(function (_a) {
|
|
34
26
|
var theme = _a.theme;
|
|
35
27
|
return ({
|
|
@@ -81,6 +73,6 @@ var RefundPolicy = function () {
|
|
|
81
73
|
var handleRefundCheckedChange = function (event, checked) {
|
|
82
74
|
refundControl.field.onChange(checked);
|
|
83
75
|
};
|
|
84
|
-
return (_jsxs(
|
|
76
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.REFUND_AR : EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
|
|
85
77
|
};
|
|
86
78
|
export default RefundPolicy;
|
|
@@ -17,7 +17,8 @@ import { useLanguage } from '../../../../hooks';
|
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
18
|
import Warning from '../../../../components/Warning';
|
|
19
19
|
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
20
|
-
import {
|
|
20
|
+
import { ContainerStyled, CheckboxStyled, TextStyled, LinkStyled } from './RefundPolicy';
|
|
21
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
22
|
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
22
23
|
width: '100%'
|
|
23
24
|
}); });
|
|
@@ -32,6 +33,6 @@ var TransactionPolicy = function () {
|
|
|
32
33
|
var handleTransactionCheckedChange = function (event, checked) {
|
|
33
34
|
transactionControl.field.onChange(checked);
|
|
34
35
|
};
|
|
35
|
-
return (_jsxs(
|
|
36
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TRANSACTION_AR : EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
|
|
36
37
|
};
|
|
37
38
|
export default TransactionPolicy;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export declare const CustomerInfoValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
3
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
4
|
-
expectedCustomers:
|
|
5
|
-
expectedSalesRange:
|
|
4
|
+
expectedCustomers: any;
|
|
5
|
+
expectedSalesRange: any;
|
|
6
6
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
7
7
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
8
8
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
9
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
10
|
-
expectedCustomers:
|
|
11
|
-
expectedSalesRange:
|
|
10
|
+
expectedCustomers: any;
|
|
11
|
+
expectedSalesRange: any;
|
|
12
12
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
13
13
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
14
14
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
15
|
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
16
|
-
expectedCustomers:
|
|
17
|
-
expectedSalesRange:
|
|
16
|
+
expectedCustomers: any;
|
|
17
|
+
expectedSalesRange: any;
|
|
18
18
|
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
19
19
|
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
20
20
|
}>>>;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
+
var objectElements = {
|
|
3
|
+
id: yup.number(),
|
|
4
|
+
name: yup.string(),
|
|
5
|
+
nameAR: yup.string()
|
|
6
|
+
};
|
|
2
7
|
export var CustomerInfoValidation = yup.object().shape({
|
|
3
|
-
customerLocations: yup.array().required(''),
|
|
4
|
-
expectedCustomers: yup.
|
|
5
|
-
expectedSalesRange: yup.
|
|
6
|
-
refundPolicy: yup.boolean().required().isTrue('
|
|
7
|
-
transactionPolicy: yup.boolean().required().isTrue('
|
|
8
|
+
customerLocations: yup.array().required('please_choose_base'),
|
|
9
|
+
expectedCustomers: yup.object().shape(objectElements).required('select_expected_customers_serve'),
|
|
10
|
+
expectedSalesRange: yup.object().shape(objectElements).required('select_expected_sales'),
|
|
11
|
+
refundPolicy: yup.boolean().required().isTrue('refund_policy_error'),
|
|
12
|
+
transactionPolicy: yup.boolean().required().isTrue('transaction_policy_error')
|
|
8
13
|
});
|
|
@@ -11,20 +11,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
14
|
import { useTranslation } from 'react-i18next';
|
|
16
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
16
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
17
|
import Text from '../../../../components/Text';
|
|
19
18
|
import DatePicker from '../../../../components/DatePicker';
|
|
20
|
-
|
|
21
|
-
var theme = _a.theme;
|
|
22
|
-
return ({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
flexDirection: 'column',
|
|
25
|
-
direction: theme.direction
|
|
26
|
-
});
|
|
27
|
-
});
|
|
19
|
+
import { ScreenContainer } from '../../../../features/shared/Containers';
|
|
28
20
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
29
21
|
var theme = _a.theme;
|
|
30
22
|
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption), { cursor: 'pointer' }));
|
|
@@ -39,9 +31,9 @@ var BOD = function (_a) {
|
|
|
39
31
|
dobControl.field.onChange(data);
|
|
40
32
|
};
|
|
41
33
|
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
42
|
-
return (_jsxs(
|
|
34
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
43
35
|
var spacing = _a.spacing;
|
|
44
36
|
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
45
|
-
} } }, { children: t('
|
|
37
|
+
} } }, { children: t('enter_birth_date') })), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleBirthDateChange })] }));
|
|
46
38
|
};
|
|
47
39
|
export default React.memo(BOD);
|
|
@@ -23,6 +23,6 @@ var IDNumber = function (_a) {
|
|
|
23
23
|
};
|
|
24
24
|
var nidValue = nidControl.field.value;
|
|
25
25
|
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
26
|
-
return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t('
|
|
26
|
+
return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t('enter_national_id'), 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' }) }) }));
|
|
27
27
|
};
|
|
28
28
|
export default React.memo(IDNumber);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var NIDValidationSchema = yup.object().shape({
|
|
3
|
-
dob: yup.string().min(5).required('
|
|
4
|
-
nid: yup
|
|
3
|
+
dob: yup.string().min(5).required('enter_valid_birth_date'),
|
|
4
|
+
nid: yup
|
|
5
|
+
.string()
|
|
6
|
+
.matches(/^(1)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
|
|
7
|
+
.min(8, 'signup_invalid_national_id_format')
|
|
8
|
+
.max(10, 'signup_invalid_national_id_format')
|
|
9
|
+
.required('signup_invalid_national_id')
|
|
5
10
|
});
|
|
@@ -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,30 @@ 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
|
+
fontFamily: theme.typography.fontFamily,
|
|
26
|
+
marginBottom: theme.spacing(5)
|
|
23
27
|
});
|
|
24
28
|
});
|
|
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
29
|
var OTPInput = function (_a) {
|
|
43
30
|
var control = useFormContext().control;
|
|
31
|
+
var t = useTranslation().t;
|
|
44
32
|
var otpControl = useController({ name: 'otp', control: control });
|
|
45
33
|
var handleOnOTPChange = function (otp) {
|
|
46
34
|
otpControl.field.onChange(otp);
|
|
47
35
|
};
|
|
48
36
|
var otpValue = otpControl.field.value;
|
|
49
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(
|
|
37
|
+
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
38
|
};
|
|
51
39
|
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,30 @@ 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
|
-
|
|
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
|
+
fontFamily: theme.typography.fontFamily,
|
|
26
|
+
marginBottom: theme.spacing(5)
|
|
27
|
+
});
|
|
49
28
|
});
|
|
50
29
|
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
30
|
var control = useFormContext().control;
|
|
31
|
+
var t = useTranslation().t;
|
|
60
32
|
var otpControl = useController({ name: 'otp', control: control });
|
|
61
33
|
var handleOnOTPChange = function (otp) {
|
|
62
34
|
otpControl.field.onChange(otp);
|
|
63
|
-
onOTPChange === null || onOTPChange === void 0 ? void 0 : onOTPChange(otp);
|
|
64
35
|
};
|
|
65
36
|
var otpValue = otpControl.field.value;
|
|
66
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(
|
|
37
|
+
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
38
|
};
|
|
68
39
|
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);
|
|
@@ -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);
|