@tap-payments/auth-jsconnect 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/locales/ar.json +190 -88
- package/build/assets/locales/en.json +206 -90
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/Loader/Loader.js +2 -2
- package/build/constants/app.js +28 -4
- package/build/features/bank/screens/BankDetails/BankName.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.js +8 -3
- package/build/features/bank/screens/Success/Success.d.ts +5 -0
- package/build/features/bank/screens/Success/Success.js +14 -0
- package/build/features/bank/screens/Success/index.d.ts +3 -0
- package/build/features/bank/screens/Success/index.js +2 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- 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 +1 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
- package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
- package/build/features/business/screens/BusinessType/SelectType.js +1 -1
- package/build/features/business/screens/Confirm/Confirm.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +5 -41
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
- package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
- package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +10 -5
- package/build/features/business/screens/IDBOD/ID.js +1 -1
- package/build/features/business/screens/IDBOD/validation.js +6 -2
- package/build/features/business/screens/OTP/OTP.js +18 -58
- package/build/features/business/screens/OTP/OTPInput.js +8 -21
- package/build/features/business/screens/Success/Success.js +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.js +12 -42
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
- package/build/features/connect/screens/Individual/Email.js +7 -1
- package/build/features/connect/screens/Individual/Individual.js +0 -28
- package/build/features/connect/screens/Individual/Name.js +9 -3
- package/build/features/connect/screens/Individual/validation.js +5 -2
- package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
- package/build/features/connect/screens/MID/IDNumber.js +2 -2
- package/build/features/connect/screens/MID/MID.js +1 -1
- package/build/features/connect/screens/MID/MobileNumber.js +7 -1
- package/build/features/connect/screens/MID/validation.js +7 -3
- package/build/features/connect/screens/Merchant/BrandName.js +3 -1
- package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
- 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 +1 -1
- package/build/features/connect/screens/OTP/validation.js +1 -1
- package/build/features/connect/screens/Password/PasswordInput.js +2 -1
- package/build/features/connect/screens/Password/validation.js +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
- package/build/features/featuresScreens.js +20 -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.js +2 -1
- package/build/features/password/screens/CreatePassword/Password.js +2 -1
- package/build/features/password/screens/CreatePassword/validation.js +3 -3
- package/build/features/password/screens/Success/Success.d.ts +5 -0
- package/build/features/password/screens/Success/Success.js +14 -0
- package/build/features/password/screens/Success/index.d.ts +3 -0
- package/build/features/password/screens/Success/index.js +2 -0
- package/build/features/shared/Button/Button.js +7 -1
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +5 -0
- package/build/features/tax/screens/Success/Success.js +14 -0
- package/build/features/tax/screens/Success/index.d.ts +3 -0
- package/build/features/tax/screens/Success/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/features/tax/screens/TaxDetails/validation.js +1 -1
- package/build/utils/string.js +2 -2
- package/package.json +1 -1
- package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPTimer.js +0 -20
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/VerifyNumber/OTPTimer.js +0 -20
|
@@ -23,6 +23,7 @@ import Input from '../../../shared/Input';
|
|
|
23
23
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
24
24
|
import Tooltip from '../../../../components/Tooltip';
|
|
25
25
|
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
26
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
27
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
27
28
|
var theme = _a.theme;
|
|
28
29
|
return ({
|
|
@@ -68,6 +69,7 @@ var BrandName = function (_a) {
|
|
|
68
69
|
brandControl.field.onChange('');
|
|
69
70
|
};
|
|
70
71
|
var brandNameValue = brandControl.field.value;
|
|
71
|
-
|
|
72
|
+
var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
73
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
|
|
72
74
|
};
|
|
73
75
|
export default React.memo(BrandName);
|
|
@@ -21,6 +21,7 @@ import Text from '../../../../components/Text';
|
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import SocialMediaGroup from '../../../../components/SocialMediaGroup';
|
|
23
23
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
25
|
var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
|
|
25
26
|
var theme = _a.theme, defaultValue = _a.defaultValue;
|
|
26
27
|
return ({
|
|
@@ -32,6 +33,7 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
32
33
|
var theme = _a.theme;
|
|
33
34
|
return ({
|
|
34
35
|
padding: theme.spacing(0, 2, 0, 0),
|
|
36
|
+
paddingInlineEnd: theme.spacing(2),
|
|
35
37
|
input: {
|
|
36
38
|
paddingInlineStart: theme.spacing(0)
|
|
37
39
|
}
|
|
@@ -72,8 +74,11 @@ var SocialMedia = function (_a) {
|
|
|
72
74
|
var twitterValue = links.twitter || '';
|
|
73
75
|
var instagramValue = links.instagram || '';
|
|
74
76
|
var errors = linksControl.fieldState.error;
|
|
77
|
+
var websiteError = (_b = errors === null || errors === void 0 ? void 0 : errors.website) === null || _b === void 0 ? void 0 : _b.message;
|
|
78
|
+
var twitterError = (_c = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _c === void 0 ? void 0 : _c.message;
|
|
79
|
+
var instagramError = (_d = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _d === void 0 ? void 0 : _d.message;
|
|
75
80
|
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 3 } }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
|
|
76
81
|
setSocialMediaType(value);
|
|
77
|
-
} }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, startAdornment: _jsx(TextStyled, { children: "https://" }),
|
|
82
|
+
} }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, startAdornment: _jsx(TextStyled, { children: "https://" }), placeholder: t('signup_website_placeholder'), warningType: 'alert', warningMessage: websiteError && t(websiteError), endAdornment: !websiteError && websiteValue ? _jsx(CheckIcon, {}) : websiteValue && _jsx(ClearIconStyled, { onClick: handleClear }) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, { children: "@" }), placeholder: t('signup_twitter_placeholder'), warningType: 'alert', warningMessage: twitterError && t(twitterError), endAdornment: !twitterError && twitterValue ? _jsx(CheckIcon, {}) : twitterValue && _jsx(ClearIconStyled, { onClick: handleClear }) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, { children: "@" }), placeholder: t('signup_instagram_placeholder'), warningType: 'alert', warningMessage: instagramError && t(instagramError), endAdornment: !instagramError && instagramValue ? (_jsx(CheckIcon, {})) : (instagramValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) }))] })));
|
|
78
83
|
};
|
|
79
84
|
export default React.memo(SocialMedia);
|
|
@@ -74,6 +74,6 @@ var TAC = function (_a) {
|
|
|
74
74
|
var handleTACCheckedChange = function (event, checked) {
|
|
75
75
|
tacControl.field.onChange(checked);
|
|
76
76
|
};
|
|
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 })) }))] })));
|
|
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 && t(warningMessage) })) }))] })));
|
|
78
78
|
};
|
|
79
79
|
export default React.memo(TAC);
|
|
@@ -3,15 +3,15 @@ export declare const MerchantValidationSchema: yup.ObjectSchema<import("yup/lib/
|
|
|
3
3
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
4
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
5
5
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
6
|
-
website:
|
|
6
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
7
7
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
8
8
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
9
9
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
10
|
-
website:
|
|
10
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
11
11
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
12
12
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
13
13
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
14
|
-
website:
|
|
14
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
15
15
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
16
16
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
17
17
|
}>>>;
|
|
@@ -19,15 +19,15 @@ export declare const MerchantValidationSchema: yup.ObjectSchema<import("yup/lib/
|
|
|
19
19
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
20
20
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
21
21
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
22
|
-
website:
|
|
22
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
23
23
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
24
24
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
25
25
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
26
|
-
website:
|
|
26
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
27
27
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
28
28
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
29
29
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
30
|
-
website:
|
|
30
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
31
31
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
32
32
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
33
33
|
}>>>;
|
|
@@ -35,15 +35,15 @@ export declare const MerchantValidationSchema: yup.ObjectSchema<import("yup/lib/
|
|
|
35
35
|
brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
36
36
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
37
37
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
38
|
-
website:
|
|
38
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
39
39
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
40
40
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
41
41
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
42
|
-
website:
|
|
42
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
43
43
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
44
44
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
45
45
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
46
|
-
website:
|
|
46
|
+
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
47
47
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
48
48
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
49
49
|
}>>>;
|
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var MerchantValidationSchema = yup.object().shape({
|
|
3
|
-
brandName: yup.string().min(3, '
|
|
4
|
-
termAndConditionChecked: yup.boolean().required().isTrue('
|
|
3
|
+
brandName: yup.string().min(3, 'enter_brand_name_english_chars_numbers_space').required('enter_valid_brand_name'),
|
|
4
|
+
termAndConditionChecked: yup.boolean().required().isTrue('check_terms_cond'),
|
|
5
5
|
links: yup.object().shape({
|
|
6
|
-
website: yup
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
website: yup.string().when(['instagram', 'twitter'], function (instagram, twitter) {
|
|
7
|
+
if (!instagram && !twitter) {
|
|
8
|
+
return yup
|
|
9
|
+
.string()
|
|
10
|
+
.matches(/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/, 'ide_not_valid_url')
|
|
11
|
+
.transform(function (value) { return (!!value ? value : null); })
|
|
12
|
+
.nullable()
|
|
13
|
+
.required('enter_at_least_one');
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return yup
|
|
17
|
+
.string()
|
|
18
|
+
.matches(/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/, 'ide_not_valid_url')
|
|
19
|
+
.transform(function (value) { return (!!value ? value : null); })
|
|
20
|
+
.nullable()
|
|
21
|
+
.optional();
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
10
24
|
instagram: yup
|
|
11
25
|
.string()
|
|
12
|
-
.notRequired()
|
|
13
26
|
.nullable()
|
|
14
27
|
.transform(function (value) { return (!!value ? value : null); })
|
|
15
|
-
.
|
|
28
|
+
.when(['twitter', 'website'], function (twitter, website) {
|
|
29
|
+
if (!website && !twitter) {
|
|
30
|
+
return yup.string().min(2, 'enter_at_least_one').required('enter_at_least_one');
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return yup.string().optional();
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
16
36
|
twitter: yup
|
|
17
37
|
.string()
|
|
18
|
-
.notRequired()
|
|
19
38
|
.nullable()
|
|
20
39
|
.transform(function (value) { return (!!value ? value : null); })
|
|
21
|
-
.min(2, '
|
|
22
|
-
|
|
40
|
+
.min(2, 'enter_at_least_one')
|
|
41
|
+
.when(['website', 'instagram'], function (website, instagram) {
|
|
42
|
+
if (!website && !instagram) {
|
|
43
|
+
return yup.string().min(2, 'enter_at_least_one').required('enter_at_least_one');
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return yup.string().optional();
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}, [
|
|
50
|
+
['instagram', 'website'],
|
|
51
|
+
['twitter', 'website'],
|
|
52
|
+
['instagram', 'twitter']
|
|
53
|
+
])
|
|
23
54
|
});
|
|
@@ -34,12 +34,12 @@ var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
|
34
34
|
borderColor: theme.palette.divider,
|
|
35
35
|
direction: theme.direction,
|
|
36
36
|
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
37
|
-
marginBottom: theme.spacing(
|
|
37
|
+
marginBottom: theme.spacing(5.75)
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
41
|
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({}, theme.typography.
|
|
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 }));
|
|
43
43
|
});
|
|
44
44
|
var FormStyled = styled(Form)(function () { return ({
|
|
45
45
|
display: 'flex',
|
|
@@ -63,7 +63,8 @@ var OTP = function (_a) {
|
|
|
63
63
|
return dispatch(handleNextScreenStep('CONNECT_PASSWORD_STEP'));
|
|
64
64
|
dispatch(handleNextScreenStep('CONNECT_INDIVIDUAL_STEP'));
|
|
65
65
|
};
|
|
66
|
-
|
|
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: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: loading }, { children: t('next') }))] })) })) }));
|
|
67
68
|
};
|
|
68
69
|
OTP.defaultProps = {
|
|
69
70
|
phone: '+996564656085'
|
|
@@ -33,6 +33,6 @@ var OTPInput = function (_a) {
|
|
|
33
33
|
otpControl.field.onChange(otp);
|
|
34
34
|
};
|
|
35
35
|
var otpValue = otpControl.field.value;
|
|
36
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('
|
|
36
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
37
37
|
};
|
|
38
38
|
export default React.memo(OTPInput);
|
|
@@ -33,6 +33,7 @@ var PasswordInput = function (_a) {
|
|
|
33
33
|
setShowPassword(false);
|
|
34
34
|
};
|
|
35
35
|
var passwordValue = passwordControl.field.value;
|
|
36
|
-
|
|
36
|
+
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
37
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 5 } }, { children: _jsx(Input, { label: t('tap_js_password_description'), inputProps: { autoComplete: 'off' }, onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('tap_js_password_placeholder'), type: showPassword ? 'text' : 'password', warningType: 'alert', warningMessage: error && t(error, { length: 5 }) }) })));
|
|
37
38
|
};
|
|
38
39
|
export default React.memo(PasswordInput);
|
|
@@ -8,8 +8,7 @@ var ThankYou = 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(ThankYou);
|
|
@@ -13,10 +13,14 @@ import ActivitiesPage from './business/screens/Activities';
|
|
|
13
13
|
import SuccessPage from './business/screens/Success';
|
|
14
14
|
import ConfirmPage from './business/screens/Confirm';
|
|
15
15
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
16
|
+
import SuccessPasswordPage from './password/screens/Success';
|
|
16
17
|
import ShowOwnerInfoPage from './owner/screens/ShowOwnerInfo';
|
|
17
18
|
import AdditionalOwnerInfoPage from './owner/screens/AdditionalOwnerInfo';
|
|
19
|
+
import SuccessOwnerPage from './owner/screens/Success';
|
|
18
20
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
21
|
+
import BankSuccessPage from './bank/screens/Success';
|
|
19
22
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
23
|
+
import TaxSuccessPage from './tax/screens/Success';
|
|
20
24
|
export var connectFeatureScreens = [
|
|
21
25
|
{
|
|
22
26
|
name: 'CONNECT_MID_STEP',
|
|
@@ -78,6 +82,10 @@ export var passwordFeatureScreens = [
|
|
|
78
82
|
{
|
|
79
83
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
80
84
|
element: CreatePasswordPage
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'PASSWORD_SUCCESS_STEP',
|
|
88
|
+
element: SuccessPasswordPage
|
|
81
89
|
}
|
|
82
90
|
];
|
|
83
91
|
export var ownerFeatureScreens = [
|
|
@@ -88,17 +96,29 @@ export var ownerFeatureScreens = [
|
|
|
88
96
|
{
|
|
89
97
|
name: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
|
|
90
98
|
element: AdditionalOwnerInfoPage
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'OWNER_SUCCESS_STEP',
|
|
102
|
+
element: SuccessOwnerPage
|
|
91
103
|
}
|
|
92
104
|
];
|
|
93
105
|
export var bankFeatureScreens = [
|
|
94
106
|
{
|
|
95
107
|
name: 'BANK_BANK_DETAILS_STEP',
|
|
96
108
|
element: BankDetailsPage
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'BANK_DETAILS_SUCCESS_STEP',
|
|
112
|
+
element: BankSuccessPage
|
|
97
113
|
}
|
|
98
114
|
];
|
|
99
115
|
export var taxFeatureScreens = [
|
|
100
116
|
{
|
|
101
117
|
name: 'TAX_TAX_DETAILS_STEP',
|
|
102
118
|
element: TaxDetailsPage
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'TAX_DETAILS_SUCCESS_STEP',
|
|
122
|
+
element: TaxSuccessPage
|
|
103
123
|
}
|
|
104
124
|
];
|
|
@@ -36,7 +36,7 @@ var InputsContainerStyled = styled(Box)(function (_a) {
|
|
|
36
36
|
var theme = _a.theme, listActive = _a.listActive;
|
|
37
37
|
return (_b = {
|
|
38
38
|
paddingBottom: theme.spacing(listActive ? 0 : 5),
|
|
39
|
-
overflow: '
|
|
39
|
+
overflow: 'hidden',
|
|
40
40
|
maxHeight: 'calc(100vh - 250px)'
|
|
41
41
|
},
|
|
42
42
|
_b[theme.transitions.create(['padding-bottom'])] = {
|
|
@@ -73,7 +73,7 @@ var EmployerLocation = React.forwardRef(function (_a, ref) {
|
|
|
73
73
|
employerLocationControl.field.onChange(country);
|
|
74
74
|
};
|
|
75
75
|
var location = employerLocationControl.field.value;
|
|
76
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('
|
|
76
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_employer_address_city'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_employee_location'), value: (isAr ? (_b = location === null || location === void 0 ? void 0 : location.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.english) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
77
77
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIconStyled, {})] }));
|
|
78
78
|
} }) }))] })) })));
|
|
79
79
|
});
|
|
@@ -18,8 +18,9 @@ import { ScreenContainer } from '../../../shared/Containers';
|
|
|
18
18
|
import Input from '../../../shared/Input';
|
|
19
19
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
20
20
|
import Collapse from '../../../../components/Collapse';
|
|
21
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
21
22
|
var EmployerName = function (_a) {
|
|
22
|
-
var _b;
|
|
23
|
+
var _b, _c;
|
|
23
24
|
var show = _a.show;
|
|
24
25
|
var t = useTranslation().t;
|
|
25
26
|
var control = useFormContext().control;
|
|
@@ -30,6 +31,10 @@ var EmployerName = function (_a) {
|
|
|
30
31
|
employerNameControl.field.onChange(value);
|
|
31
32
|
};
|
|
32
33
|
var employerNameValue = employerNameControl.field.value;
|
|
33
|
-
|
|
34
|
+
var error = (_b = employerNameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
35
|
+
var clearValue = function () {
|
|
36
|
+
employerNameControl.field.onChange('');
|
|
37
|
+
};
|
|
38
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { pt: 2.5 } }, { children: _jsx(Input, { required: true, label: t('tap_js_employer_name'), onChange: handleEmployerNameChange, value: employerNameValue, endAdornment: !error && employerNameValue ? _jsx(CheckIcon, {}) : employerNameValue && _jsx(ClearIcon, { onClick: clearValue }), placeholder: t('tap_js_enter_employer_name'), warningType: 'alert', warningMessage: (_c = employerNameControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message }) })) })));
|
|
34
39
|
};
|
|
35
40
|
export default React.memo(EmployerName);
|
|
@@ -40,6 +40,6 @@ var InfluencerSwitch = function (_a) {
|
|
|
40
40
|
influencerControl.field.onChange(target.value === 'yes');
|
|
41
41
|
};
|
|
42
42
|
var influencerValue = influencerControl.field.value;
|
|
43
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_are_you_an_influencer'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: influencerValue != null ? (influencerValue ? 'yes' : 'no') : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
|
|
44
44
|
};
|
|
45
45
|
export default React.memo(InfluencerSwitch);
|
|
@@ -30,6 +30,6 @@ var MonthlyIncome = function (_a) {
|
|
|
30
30
|
monthlyIncomeControl.field.onChange(value);
|
|
31
31
|
};
|
|
32
32
|
var monthlyIncomeValue = monthlyIncomeControl.field.value;
|
|
33
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('
|
|
33
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('please_enter_actual_income'), onChange: handleMonthlyIncomeChange, value: monthlyIncomeValue, endAdornment: monthlyIncomeValue && _jsx(CheckIcon, {}), placeholder: '0', warningType: 'alert', warningMessage: (_b = monthlyIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) }) })));
|
|
34
34
|
};
|
|
35
35
|
export default React.memo(MonthlyIncome);
|
|
@@ -40,6 +40,6 @@ var PEPSwitch = function (_a) {
|
|
|
40
40
|
pepControl.field.onChange(target.value === 'yes');
|
|
41
41
|
};
|
|
42
42
|
var pepValue = pepControl.field.value;
|
|
43
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_is_close_relative_in_pep'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: pepValue != null ? (pepValue ? 'yes' : 'no') : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
|
|
44
44
|
};
|
|
45
45
|
export default React.memo(PEPSwitch);
|
|
@@ -78,7 +78,7 @@ var SourceOfIncome = function (_a) {
|
|
|
78
78
|
sourceIncomeControl.field.onChange(country);
|
|
79
79
|
};
|
|
80
80
|
var source = sourceIncomeControl.field.value;
|
|
81
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('
|
|
81
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name : source === null || source === void 0 ? void 0 : source.nameEn) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'nameEn', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
82
82
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name : item === null || item === void 0 ? void 0 : item.nameEn })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
|
|
83
83
|
} }) }))] })) })));
|
|
84
84
|
};
|
|
@@ -5,7 +5,10 @@ export var OwnerInfoValidationSchema = yup.object().shape({
|
|
|
5
5
|
employerName: yup.string().when('sourceIncome', function (sourceIncomeValue) {
|
|
6
6
|
var _a;
|
|
7
7
|
if (((_a = sourceIncomeValue === null || sourceIncomeValue === void 0 ? void 0 : sourceIncomeValue.nameEn) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'salary') {
|
|
8
|
-
return yup
|
|
8
|
+
return yup
|
|
9
|
+
.string()
|
|
10
|
+
.matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g, 'Employer name is required')
|
|
11
|
+
.required('Employer name is required');
|
|
9
12
|
}
|
|
10
13
|
else {
|
|
11
14
|
return yup.string().optional();
|
|
@@ -27,6 +30,6 @@ export var OwnerInfoValidationSchema = yup.object().shape({
|
|
|
27
30
|
return yup.string().optional();
|
|
28
31
|
}
|
|
29
32
|
}),
|
|
30
|
-
isPEP: yup.boolean().required(),
|
|
31
|
-
isInfluencer: yup.boolean().required()
|
|
33
|
+
isPEP: yup.boolean().required('please_choose_relative_pep'),
|
|
34
|
+
isInfluencer: yup.boolean().required('please_choose_are_you_influncer')
|
|
32
35
|
});
|
|
@@ -40,7 +40,7 @@ var ShowOwnerInfo = function (_a) {
|
|
|
40
40
|
var handleClickNext = function () {
|
|
41
41
|
dispatch(handleNextScreenStep());
|
|
42
42
|
};
|
|
43
|
-
return (_jsxs(ScreenContainer, { children: [_jsxs(InputsContainerStyled, { children: [_jsx(Collapse, __assign({ in: !!citizenship }, { children: _jsx(Info, { label: 'citizenship', value: citizenship }) })), _jsx(Collapse, __assign({ in: !!nationalAddr }, { children: _jsx(Info, { label: 'national_address', value: nationalAddr }) })), _jsx(Info, { label: '
|
|
43
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputsContainerStyled, { children: [_jsx(Collapse, __assign({ in: !!citizenship }, { children: _jsx(Info, { label: 'citizenship', value: citizenship }) })), _jsx(Collapse, __assign({ in: !!nationalAddr }, { children: _jsx(Info, { label: 'national_address', value: nationalAddr }) })), _jsx(Info, { label: t('birthdate'), value: birthDate }), _jsx(Info, { label: 'place_of_birth', value: placeOfBirth }), _jsx(Collapse, __assign({ in: !!maritalStatus }, { children: _jsx(Info, { label: 'marital_status', value: maritalStatus }) }))] }), _jsx(Button, __assign({ isAr: isAr, disabled: false, loading: false, onClick: handleClickNext }, { children: t('next') }))] }));
|
|
44
44
|
};
|
|
45
45
|
export default React.memo(ShowOwnerInfo);
|
|
46
46
|
ShowOwnerInfo.defaultProps = {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
var Success = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
var onSuccess = function () {
|
|
8
|
+
console.log('success');
|
|
9
|
+
alert('Account created successfully, please check your email');
|
|
10
|
+
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
+
};
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
|
|
13
|
+
};
|
|
14
|
+
export default React.memo(Success);
|
|
@@ -20,7 +20,7 @@ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
|
20
20
|
import Collapse from '../../components/Collapse';
|
|
21
21
|
import { reactElement } from '../../utils';
|
|
22
22
|
import { PASSWORD_SCREENS_NAVIGATION } from '../../constants';
|
|
23
|
-
import {
|
|
23
|
+
import { passwordFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import CustomFooter from '../shared/Footer';
|
|
25
25
|
import { FeatureContainer } from '../shared/Containers';
|
|
26
26
|
var Password = memo(function (props) {
|
|
@@ -33,7 +33,7 @@ var Password = memo(function (props) {
|
|
|
33
33
|
useEffect(function () {
|
|
34
34
|
dispatch(handleActiveFlowScreens(PASSWORD_SCREENS_NAVIGATION));
|
|
35
35
|
}, []);
|
|
36
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children:
|
|
36
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
37
37
|
var Element = _a.element, name = _a.name;
|
|
38
38
|
var isActive = activeScreen.name === name;
|
|
39
39
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -22,6 +22,7 @@ var ConfirmPassword = function (_a) {
|
|
|
22
22
|
setShowPassword(false);
|
|
23
23
|
};
|
|
24
24
|
var passwordValue = passwordControl.field.value;
|
|
25
|
-
|
|
25
|
+
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
26
|
+
return (_jsx(ScreenContainer, { children: _jsx(Input, { onChange: handlePasswordChange, value: passwordValue, autoComplete: 'confirm-password', endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('tap_js_confirm_password_description'), warningType: 'alert', type: showPassword ? 'text' : 'password', warningMessage: error && t(error) }) }));
|
|
26
27
|
};
|
|
27
28
|
export default React.memo(ConfirmPassword);
|
|
@@ -70,6 +70,7 @@ var Password = function (_a) {
|
|
|
70
70
|
isPasswordHasLowerLetter(passwordValue),
|
|
71
71
|
isPasswordHasSpecialLetter(passwordValue)
|
|
72
72
|
];
|
|
73
|
-
|
|
73
|
+
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
74
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Input, { label: t('tap_js_password_description'), onChange: handlePasswordChange, value: passwordValue, autoComplete: 'new-password', endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('tap_js_password_placeholder'), warningType: 'alert', type: showPassword ? 'text' : 'password', warningMessage: error && t(error) }), _jsxs(BarBoxStyled, { children: [_jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 1 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 2 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 3 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 4, sx: { marginInlineEnd: 0 } })] }), _jsx(Collapse, __assign({ in: !(passwordConditions.filter(Boolean).length >= 4), timeout: { enter: 1000, exit: 800 } }, { children: _jsxs(ListStyled, { children: [_jsx(ConditionText, { active: isPasswordMatchLength, text: '- ' + t('password_length') }), _jsx(ConditionText, { active: isPasswordHasUpper, text: '- ' + t('password_upper') }), _jsx(ConditionText, { active: isPasswordHasLower, text: '- ' + t('password_lower') }), _jsx(ConditionText, { active: isPasswordHasSpecial, text: '- ' + t('password_special') })] }) })), _jsxs(Collapse, __assign({ in: passwordConditions.filter(Boolean).length === 4, timeout: { enter: 800, exit: 1000 } }, { children: [_jsx(TextStyled, { children: t('notify_strong_password') }), _jsx(ConfirmPassword, {})] }))] }));
|
|
74
75
|
};
|
|
75
76
|
export default React.memo(Password);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
export var PasswordValidation = yup.object().shape({
|
|
3
|
-
password: yup.string().required('
|
|
3
|
+
password: yup.string().required('password_required'),
|
|
4
4
|
confirmPassword: yup
|
|
5
5
|
.string()
|
|
6
|
-
.oneOf([yup.ref('password'), '
|
|
7
|
-
.required('
|
|
6
|
+
.oneOf([yup.ref('password'), 'confirmPassword'], 'password_not_match')
|
|
7
|
+
.required('password_not_match')
|
|
8
8
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
var Success = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
var onSuccess = function () {
|
|
8
|
+
console.log('success');
|
|
9
|
+
alert('Account created successfully, please check your email');
|
|
10
|
+
alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
|
|
11
|
+
};
|
|
12
|
+
return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
|
|
13
|
+
};
|
|
14
|
+
export default React.memo(Success);
|
|
@@ -41,7 +41,13 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
41
41
|
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
|
+
var ButtonStyled = styled(Button)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return ({
|
|
47
|
+
paddingInlineStart: theme.spacing(0.75)
|
|
48
|
+
});
|
|
49
|
+
});
|
|
44
50
|
export default function CustomButton(_a) {
|
|
45
51
|
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, props = __rest(_a, ["children", "disabled", "isAr", "loading"]);
|
|
46
|
-
return (_jsx(ButtonBoxStyled, { children: _jsx(
|
|
52
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ disabled: disabled, type: 'submit', startIcon: _jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 30, toggleAnimation: !!loading }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { children: children })) }));
|
|
47
53
|
}
|
|
@@ -12,5 +12,5 @@ export default function CustomFooter() {
|
|
|
12
12
|
var language = isEn ? LanguageMode.AR : LanguageMode.EN;
|
|
13
13
|
dispatch(handleLanguage(language));
|
|
14
14
|
};
|
|
15
|
-
return
|
|
15
|
+
return _jsx(Footer, { onSwitchLanguage: handleChangeLanguage, followUsTitle: t('follow_us'), language: t('language') });
|
|
16
16
|
}
|