@tap-payments/auth-jsconnect 1.0.14 → 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.
Files changed (90) hide show
  1. package/build/assets/locales/ar.json +18 -8
  2. package/build/assets/locales/en.json +11 -1
  3. package/build/components/DatePicker/DatePicker.js +5 -16
  4. package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -0
  5. package/build/components/ExpandIcon/ExpandIcon.js +24 -0
  6. package/build/components/ExpandIcon/index.d.ts +2 -0
  7. package/build/components/ExpandIcon/index.js +2 -0
  8. package/build/components/Footer/Footer.js +1 -1
  9. package/build/components/Warning/Warning.d.ts +1 -2
  10. package/build/components/Warning/Warning.js +1 -2
  11. package/build/constants/app.d.ts +1 -1
  12. package/build/constants/app.js +8 -8
  13. package/build/constants/dummy.js +3 -3
  14. package/build/features/bank/screens/BankDetails/Beneficiary.js +2 -2
  15. package/build/features/bank/screens/BankDetails/validation.js +4 -4
  16. package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -16
  17. package/build/features/business/screens/Activities/ActivitiesList.js +3 -17
  18. package/build/features/business/screens/BusinessType/CRNumber.js +2 -1
  19. package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
  20. package/build/features/business/screens/BusinessType/FLNumber.js +2 -1
  21. package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
  22. package/build/features/business/screens/BusinessType/validation.js +2 -8
  23. package/build/features/business/screens/Customers/CustomerLocations.d.ts +0 -24
  24. package/build/features/business/screens/Customers/CustomerLocations.js +3 -17
  25. package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -2
  26. package/build/features/business/screens/Customers/ExpectedSalesRange.js +4 -2
  27. package/build/features/business/screens/Customers/validation.js +1 -1
  28. package/build/features/business/screens/IDBOD/DOB.js +3 -11
  29. package/build/features/business/screens/IDBOD/validation.js +1 -0
  30. package/build/features/business/screens/OTP/OTPInput.js +1 -0
  31. package/build/features/business/screens/OTP/validation.js +1 -1
  32. package/build/features/business/screens/VerifyNumber/OTPInput.js +1 -0
  33. package/build/features/business/screens/VerifyNumber/validation.js +1 -1
  34. package/build/features/connect/screens/Individual/Name.js +2 -2
  35. package/build/features/connect/screens/MID/BusinessCountry.d.ts +1 -0
  36. package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
  37. package/build/features/connect/screens/MID/DOB.d.ts +6 -0
  38. package/build/features/connect/screens/MID/DOB.js +38 -0
  39. package/build/features/connect/screens/MID/IDNumber.js +3 -14
  40. package/build/features/connect/screens/MID/MID.js +13 -7
  41. package/build/features/connect/screens/MID/MobileNumber.d.ts +1 -0
  42. package/build/features/connect/screens/MID/MobileNumber.js +28 -10
  43. package/build/features/connect/screens/MID/validation.d.ts +1 -1
  44. package/build/features/connect/screens/MID/validation.js +3 -2
  45. package/build/features/connect/screens/Merchant/SocialMedia.js +1 -1
  46. package/build/features/connect/screens/OTP/OTPInput.js +1 -0
  47. package/build/features/connect/screens/OTP/validation.js +1 -1
  48. package/build/features/connect/screens/Password/PasswordInput.js +1 -1
  49. package/build/features/connect/screens/Password/validation.js +1 -1
  50. package/build/features/featuresScreens.d.ts +1 -1
  51. package/build/features/featuresScreens.js +9 -9
  52. package/build/features/individual/Individual.d.ts +6 -0
  53. package/build/features/individual/Individual.js +50 -0
  54. package/build/features/individual/index.d.ts +1 -0
  55. package/build/features/individual/index.js +1 -0
  56. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +8 -0
  57. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +81 -0
  58. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +10 -0
  59. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +81 -0
  60. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +6 -0
  61. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +40 -0
  62. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +6 -0
  63. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +45 -0
  64. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +6 -0
  65. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +36 -0
  66. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -0
  67. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +45 -0
  68. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +9 -0
  69. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +87 -0
  70. package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -0
  71. package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -0
  72. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -0
  73. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +35 -0
  74. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +19 -0
  75. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +52 -0
  76. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +3 -0
  77. package/build/features/individual/screens/ShowIndividualInfo/index.js +2 -0
  78. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +7 -0
  79. package/build/features/individual/screens/ShowIndividualInfo/info.js +28 -0
  80. package/build/features/individual/screens/Success/Success.d.ts +5 -0
  81. package/build/features/individual/screens/Success/Success.js +14 -0
  82. package/build/features/individual/screens/Success/index.d.ts +3 -0
  83. package/build/features/individual/screens/Success/index.js +2 -0
  84. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +4 -1
  85. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -8
  86. package/build/features/password/screens/CreatePassword/Password.js +1 -1
  87. package/build/features/shared/SuccessScreen/SuccessScreen.js +10 -1
  88. package/build/index.d.ts +3 -3
  89. package/build/index.js +4 -4
  90. package/package.json +120 -120
@@ -30,7 +30,9 @@ import { useLanguage } from '../../../../hooks';
30
30
  import SimpleList from '../../../../components/SimpleList';
31
31
  import { EXPECTED_CUSTOMERS } from '../../../../constants';
32
32
  import Collapse from '../../../../components/Collapse';
33
- import { BoxStyled, CheckIconStyled, ExpandIcon, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
33
+ import ExpandIcon from '../../../../components/ExpandIcon';
34
+ import { ScreenContainer } from '../../../shared/Containers';
35
+ import { CheckIconStyled, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
34
36
  var ListItemContainer = styled(Box)(function (_a) {
35
37
  var theme = _a.theme;
36
38
  return ({
@@ -65,7 +67,7 @@ var ExpectedCustomers = function (_a) {
65
67
  };
66
68
  var expectedCustomersValue = expectedCustomersControl.field.value;
67
69
  var expectedCustomersSelected = expectedCustomersValue;
68
- return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.nameAR : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
70
+ return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.nameAR : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
69
71
  return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.nameAR : item.name })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
70
72
  } }) }))] }));
71
73
  };
@@ -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 { InputLabelStyled, BoxStyled, CheckIconStyled, ExpandIcon, InputStyled, NameContainer } from './CustomerLocations';
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
  }); });
@@ -66,7 +68,7 @@ var ExpectedSalesRange = function (_a) {
66
68
  };
67
69
  var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
68
70
  var expectedSalesRangeSelected = expectedSalesRangeValue;
69
- return (_jsxs(BoxStyled, { 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) {
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) {
70
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, {})] }));
71
73
  } }) }))] }));
72
74
  };
@@ -6,7 +6,7 @@ var objectElements = {
6
6
  };
7
7
  export var CustomerInfoValidation = yup.object().shape({
8
8
  customerLocations: yup.array().required('please_choose_base'),
9
- expectedCustomers: yup.object().shape(objectElements).required(''),
9
+ expectedCustomers: yup.object().shape(objectElements).required('select_expected_customers_serve'),
10
10
  expectedSalesRange: yup.object().shape(objectElements).required('select_expected_sales'),
11
11
  refundPolicy: yup.boolean().required().isTrue('refund_policy_error'),
12
12
  transactionPolicy: yup.boolean().required().isTrue('transaction_policy_error')
@@ -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
- var BoxStyled = styled(Box)(function (_a) {
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(BoxStyled, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
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('date_of_birth') })), _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 })] }));
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);
@@ -3,6 +3,7 @@ export var NIDValidationSchema = yup.object().shape({
3
3
  dob: yup.string().min(5).required('enter_valid_birth_date'),
4
4
  nid: yup
5
5
  .string()
6
+ .matches(/^(1)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
6
7
  .min(8, 'signup_invalid_national_id_format')
7
8
  .max(10, 'signup_invalid_national_id_format')
8
9
  .required('signup_invalid_national_id')
@@ -22,6 +22,7 @@ var BoxStyled = styled(Box)(function (_a) {
22
22
  return ({
23
23
  display: 'flex',
24
24
  flexDirection: 'column',
25
+ fontFamily: theme.typography.fontFamily,
25
26
  marginBottom: theme.spacing(5)
26
27
  });
27
28
  });
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var OTPValidation = yup.object().shape({
3
- otp: yup.string().min(6).required('OTP is required')
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
4
  });
@@ -22,6 +22,7 @@ var BoxStyled = styled(Box)(function (_a) {
22
22
  return ({
23
23
  display: 'flex',
24
24
  flexDirection: 'column',
25
+ fontFamily: theme.typography.fontFamily,
25
26
  marginBottom: theme.spacing(5)
26
27
  });
27
28
  });
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var OTPValidation = yup.object().shape({
3
- otp: yup.string().min(6).required('OTP is required')
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
4
  });
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { ScreenContainer } from '../../../shared/Containers';
16
16
  import Input from '../../../shared/Input';
17
- import { keepLettersAndSpace } from '../../../../utils';
17
+ import { removeOnlyNumbers } from '../../../../utils';
18
18
  import { useController, useFormContext } from 'react-hook-form';
19
19
  import ClearIcon from '../../../shared/ClearIcon';
20
20
  import CheckIcon from '../../../shared/CheckIcon';
@@ -24,7 +24,7 @@ var Name = function (_a) {
24
24
  var control = useFormContext().control;
25
25
  var nameControl = useController({ name: 'name', control: control });
26
26
  var handleNameChange = function (event) {
27
- var value = keepLettersAndSpace(event.target.value);
27
+ var value = removeOnlyNumbers(event.target.value);
28
28
  nameControl.field.onChange(value);
29
29
  };
30
30
  var nameValue = nameControl.field.value;
@@ -3,6 +3,7 @@ import { CountryCode } from '../../../../@types';
3
3
  interface BusinessCountryProps {
4
4
  countries: Array<CountryCode>;
5
5
  show: boolean;
6
+ setMobileLength?: (length: number) => void;
6
7
  onListOpen?: () => void;
7
8
  onListClose?: () => void;
8
9
  }
@@ -32,7 +32,7 @@ import CheckIcon from '@mui/icons-material/Check';
32
32
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
33
33
  import Icon from '../../../../components/Icon';
34
34
  import Input from '../../../shared/Input';
35
- import ExpandIcon from '../../../shared/ExpandIcon';
35
+ import ExpandIcon from '../../../../components/ExpandIcon';
36
36
  import SimpleList from '../../../../components/SimpleList';
37
37
  import { useLanguage } from '../../../../hooks';
38
38
  var CountryItemContainer = styled(Box)(function () { return ({
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface DOBProps {
3
+ onDateClicked?: (flag: boolean) => void;
4
+ }
5
+ declare const DOB: ({ onDateClicked }: DOBProps) => JSX.Element;
6
+ export default DOB;
@@ -0,0 +1,38 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { ScreenContainer } from '../../../shared/Containers';
14
+ import DatePicker from '../../../../components/DatePicker';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { useController, useFormContext } from 'react-hook-form';
17
+ import { alpha, styled } from '@mui/material/styles';
18
+ import Text from '../../../../components/Text';
19
+ var InputLabelStyled = styled(Text)(function (_a) {
20
+ var theme = _a.theme;
21
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
22
+ });
23
+ var DOB = function (_a) {
24
+ var _b;
25
+ var onDateClicked = _a.onDateClicked;
26
+ var t = useTranslation().t;
27
+ var control = useFormContext().control;
28
+ var dobControl = useController({ control: control, name: 'dob' });
29
+ var handleBirthDateChange = function (data) {
30
+ dobControl.field.onChange(data);
31
+ };
32
+ var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
33
+ return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
34
+ var spacing = _a.spacing;
35
+ return spacing(2.5, 2.5, 1.5, 2.5);
36
+ } } }, { children: t('enter_birth_date') })), _jsx(DatePicker, { defaultValue: dateValue ? new Date(dateValue) : new Date(), readOnly: true, dir: 'ltr', locale: 'en', onDateChange: handleBirthDateChange, onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); } })] }));
37
+ };
38
+ export default DOB;
@@ -22,7 +22,6 @@ import Input from '../../../shared/Input';
22
22
  import ClearIcon from '../../../shared/ClearIcon';
23
23
  import CheckIcon from '../../../shared/CheckIcon';
24
24
  import Collapse from '../../../../components/Collapse';
25
- import DatePicker from '../../../../components/DatePicker';
26
25
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
27
26
  import { removeAllCharsFromNumber } from '../../../../utils';
28
27
  import { ICONS_NAMES, ID_NUMBER_LENGTH } from '../../../../constants';
@@ -47,17 +46,14 @@ var IconStyled = styled(Icon)(function (_a) {
47
46
  });
48
47
  });
49
48
  var IDNumber = React.forwardRef(function (_a, ref) {
50
- var _b, _c;
49
+ var _b;
51
50
  var onSwitchToMobileNumber = _a.onSwitchToMobileNumber, show = _a.show;
52
51
  var t = useTranslation().t;
53
- var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
52
+ var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
54
53
  var nidControl = useController({ control: control, name: 'nid' });
55
- var dobControl = useController({ control: control, name: 'dob' });
56
54
  React.useEffect(function () {
57
55
  if (nidControl.field.value)
58
56
  setValue('nid', nidControl.field.value, { shouldValidate: true });
59
- if (dobControl.field.value)
60
- setValue('dob', dobControl.field.value, { shouldValidate: true });
61
57
  }, [show]);
62
58
  var handleIdChange = function (_a) {
63
59
  var target = _a.target;
@@ -67,15 +63,8 @@ var IDNumber = React.forwardRef(function (_a, ref) {
67
63
  var clearIdNumber = function () {
68
64
  nidControl.field.onChange('');
69
65
  };
70
- var handleBirthDateChange = function (data) {
71
- dobControl.field.onChange(data);
72
- };
73
66
  var nidValue = nidControl.field.value;
74
67
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
75
- var dateValue = (_c = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _c === void 0 ? void 0 : _c.value;
76
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('enter_national_id') }), _jsx(Tooltip, __assign({ title: t('switch_to_mobile') }, { children: _jsx(IconStyled, { onClick: onSwitchToMobileNumber, alt: 'switcher icon', src: ICONS_NAMES.MOBILE_IMAGE }) }))] }), _jsx(Input, { dir: 'ltr', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true }), _jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
77
- var spacing = _a.spacing;
78
- return spacing(2.5, 2.5, 1.5, 2.5);
79
- } } }, { children: t('enter_birth_date') })), _jsx(DatePicker, { defaultValue: dateValue ? new Date(dateValue) : new Date(), readOnly: true, dir: 'ltr', locale: 'en', onDateChange: handleBirthDateChange })] })) })));
68
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('enter_national_id') }), _jsx(Tooltip, __assign({ title: t('switch_to_mobile') }, { children: _jsx(IconStyled, { onClick: onSwitchToMobileNumber, alt: 'switcher icon', src: ICONS_NAMES.MOBILE_IMAGE }) }))] }), _jsx(Input, { dir: 'ltr', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
80
69
  });
81
70
  export default React.memo(IDNumber);
@@ -18,7 +18,7 @@ import { useTranslation } from 'react-i18next';
18
18
  import { styled } from '@mui/material/styles';
19
19
  import Collapse from '../../../../components/Collapse';
20
20
  import Form from '../../../../components/Form';
21
- import Button from '../../../../features/shared/Button';
21
+ import Button from '../../../shared/Button';
22
22
  import { useAppDispatch } from '../../../../hooks';
23
23
  import { handleNextScreenStep } from '../../../../app/settings';
24
24
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
@@ -29,6 +29,7 @@ import IDNumber from './IDNumber';
29
29
  import BusinessCountry from './BusinessCountry';
30
30
  import { NIDValidationSchema, PhoneValidationSchema } from './validation';
31
31
  import { countriesCode, defaultCountry, businessCountries } from '../../../../constants/dummy';
32
+ import DOB from './DOB';
32
33
  var FormStyled = styled(Form)(function () { return ({
33
34
  display: 'flex',
34
35
  flexDirection: 'column'
@@ -50,17 +51,19 @@ var ListType;
50
51
  ListType["CountryCodeList"] = "CountryCodeList";
51
52
  })(ListType || (ListType = {}));
52
53
  var MID = function (_a) {
53
- var _b = React.useState(false), isNID = _b[0], setIsNID = _b[1];
54
- var _c = React.useState(), listType = _c[0], setListType = _c[1];
54
+ var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
55
+ var _c = React.useState(false), isNID = _c[0], setIsNID = _c[1];
56
+ var _d = React.useState(10), mobileLength = _d[0], setMobileLength = _d[1];
57
+ var _e = React.useState(), listType = _e[0], setListType = _e[1];
55
58
  var dispatch = useAppDispatch();
56
59
  var methods = useForm({
57
- resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema(10)),
60
+ resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema(mobileLength)),
58
61
  defaultValues: {
59
62
  countryCode: defaultCountry,
60
63
  businessCountry: defaultCountry,
61
64
  nid: '',
62
- dob: '',
63
- mobile: ''
65
+ dob: '1998-08-22',
66
+ mobile: null
64
67
  },
65
68
  mode: 'onChange'
66
69
  });
@@ -73,9 +76,12 @@ var MID = function (_a) {
73
76
  console.log('data', data);
74
77
  dispatch(handleNextScreenStep());
75
78
  };
79
+ var handleCollapseOpenClose = function (flag) {
80
+ setCollapse(flag);
81
+ };
76
82
  var isBusinessListActive = listType === ListType.BusinessList;
77
83
  var isCountryListActive = listType === ListType.CountryCodeList;
78
84
  var listActive = isBusinessListActive || isCountryListActive;
79
- return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(BusinessCountry, { show: !isCountryListActive, countries: businessCountries, onListOpen: function () { return handleMenuListClick(ListType.BusinessList); }, onListClose: function () { return handleMenuListClick(); } }), _jsx(Collapse, __assign({ in: !isNID }, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: countriesCode, onSwitchToIdNumber: function () { return setIsNID(true); }, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsx(Collapse, __assign({ in: isNID }, { children: _jsx(IDNumber, { show: !listActive, onSwitchToMobileNumber: function () { return setIsNID(false); } }) }))] })), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') })) }))] })) }))] }));
85
+ return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(BusinessCountry, { show: !isCountryListActive, setMobileLength: setMobileLength, countries: businessCountries, onListOpen: function () { return handleMenuListClick(ListType.BusinessList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsx(Collapse, __assign({ in: !isNID }, { children: _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: countriesCode, onSwitchToIdNumber: function () { return setIsNID(true); }, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsxs(Collapse, __assign({ in: isNID }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !listActive, onSwitchToMobileNumber: function () { return setIsNID(false); } }) })), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(DOB, { onDateClicked: handleCollapseOpenClose }) }))] }))] })), _jsx(Collapse, __assign({ in: !listActive && !collapse }, { children: _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') })) }))] })) }))] }));
80
86
  };
81
87
  export default React.memo(MID);
@@ -3,6 +3,7 @@ import { CountryCode } from '../../../../@types';
3
3
  interface MobileNumberProps {
4
4
  countries: Array<CountryCode>;
5
5
  show: boolean;
6
+ setMobileLength?: (length: number) => void;
6
7
  onSwitchToIdNumber?: () => void;
7
8
  onListOpen?: () => void;
8
9
  onListClose?: () => void;
@@ -29,11 +29,11 @@ import { styled, alpha } from '@mui/material/styles';
29
29
  import Text from '../../../../components/Text';
30
30
  import Collapse from '../../../../components/Collapse';
31
31
  import Tooltip from '@mui/material/Tooltip';
32
- import ExpandIcon from '../../../shared/ExpandIcon';
33
32
  import ClearIcon from '../../../shared/ClearIcon';
34
33
  import CheckIcon from '../../../shared/CheckIcon';
35
34
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
36
35
  import Icon from '../../../../components/Icon';
36
+ import ExpandIcon from '../../../../components/ExpandIcon';
37
37
  import Input from '../../../shared/Input';
38
38
  import SimpleList from '../../../../components/SimpleList';
39
39
  import { ICONS_NAMES } from '../../../../constants';
@@ -58,9 +58,11 @@ var LabelContainerStyled = styled(Box)(function (_a) {
58
58
  var CountryItemContainer = styled(Box)(function () { return ({
59
59
  display: 'flex'
60
60
  }); });
61
- var CountryCodeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
61
+ var CountryCodeText = styled(Text, {
62
+ shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
63
+ })(function (_a) {
62
64
  var theme = _a.theme, isSelected = _a.isSelected;
63
- return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
65
+ return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
64
66
  });
65
67
  var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
66
68
  var theme = _a.theme, isSelected = _a.isSelected;
@@ -81,23 +83,35 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
81
83
  });
82
84
  });
83
85
  var MobileNumber = React.forwardRef(function (_a, ref) {
84
- var _b;
86
+ var _b, _c, _d;
85
87
  var countries = _a.countries, rest = __rest(_a, ["countries"]);
86
88
  var countriesCode = React.useState(countries)[0];
87
- var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
89
+ var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
88
90
  var t = useTranslation().t;
89
91
  var isAr = useLanguage().isAr;
90
- var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
92
+ var _f = useFormContext(), control = _f.control, setValue = _f.setValue, getValues = _f.getValues;
91
93
  var phoneControl = useController({ name: 'mobile', control: control });
92
94
  var countryCodeControl = useController({ name: 'countryCode', control: control });
95
+ var businessCountry = getValues('businessCountry');
93
96
  React.useEffect(function () {
97
+ var _a;
94
98
  if (phoneControl.field.value) {
95
99
  setValue('mobile', phoneControl.field.value, { shouldValidate: true });
96
100
  }
97
101
  if (countryCodeControl.field.value) {
98
- setValue('countryCode', countryCodeControl.field.value, { shouldValidate: true });
102
+ var country = countryCodeControl.field.value;
103
+ setValue('countryCode', country, { shouldValidate: true });
104
+ (_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, (country === null || country === void 0 ? void 0 : country.digits) || 10);
99
105
  }
100
106
  }, []);
107
+ React.useEffect(function () {
108
+ var _a;
109
+ var mobile = phoneControl.field.value;
110
+ if (mobile == null) {
111
+ setValue('countryCode', businessCountry);
112
+ (_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.digits) || 10);
113
+ }
114
+ }, [businessCountry]);
101
115
  var onPhoneNumberChange = function (_a) {
102
116
  var target = _a.target;
103
117
  var value = removeAllCharsFromNumber(target.value);
@@ -117,13 +131,17 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
117
131
  (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
118
132
  };
119
133
  var onSelectItem = function (country) {
134
+ var _a;
120
135
  onCloseCountryList();
136
+ setValue('mobile', '');
137
+ (_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, (country === null || country === void 0 ? void 0 : country.digits) || 10);
121
138
  countryCodeControl.field.onChange(country);
122
139
  };
123
- var mobileValue = phoneControl.field.value;
124
140
  var countryCodeValue = countryCodeControl.field.value;
125
- var error = (_b = phoneControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
126
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_enter_mobile') }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(Tooltip, __assign({ title: t('switch_to_id') }, { children: _jsx(IconStyled, { onClick: rest.onSwitchToIdNumber, alt: 'switcher icon', src: ICONS_NAMES.ID_IMAGE }) })) }))] }), _jsx(Input, { sx: { direction: 'ltr' }, inputProps: { maxLength: (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits) || 10 }, onChange: onPhoneNumberChange, value: mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: onOpenCountryList }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !error && mobileValue ? _jsx(CheckIcon, {}) : mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber }), placeholder: "".concat((countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.iso2) === 'SA' ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
141
+ var mobileValue = phoneControl.field.value || '';
142
+ var countryName = (isAr ? (_b = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _c === void 0 ? void 0 : _c.english) || '';
143
+ var error = (_d = phoneControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
144
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_enter_mobile') }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(Tooltip, __assign({ title: t('switch_to_id') }, { children: _jsx(IconStyled, { onClick: rest.onSwitchToIdNumber, alt: 'switcher icon', src: ICONS_NAMES.ID_IMAGE }) })) }))] }), _jsx(Input, { sx: { direction: 'ltr' }, inputProps: { maxLength: (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits) || 10 }, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: onOpenCountryList }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat((countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.iso2) === 'SA' ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
127
145
  return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, {})] }));
128
146
  } }) }))] })) })));
129
147
  });
@@ -9,7 +9,7 @@ export declare const NIDValidationSchema: yup.ObjectSchema<import("yup/lib/objec
9
9
  dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
10
10
  nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
11
  }>>>;
12
- export declare const PhoneValidationSchema: (min: number) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
12
+ export declare const PhoneValidationSchema: (length: number) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
13
13
  mobile: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
14
14
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
15
15
  mobile: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
@@ -3,12 +3,13 @@ export var NIDValidationSchema = yup.object().shape({
3
3
  dob: yup.string().min(5).required('enter_valid_birth_date'),
4
4
  nid: yup
5
5
  .string()
6
+ .matches(/^(1)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
6
7
  .min(8, 'signup_invalid_national_id_format')
7
8
  .max(10, 'signup_invalid_national_id_format')
8
9
  .required('signup_invalid_national_id')
9
10
  });
10
- export var PhoneValidationSchema = function (min) {
11
+ export var PhoneValidationSchema = function (length) {
11
12
  return yup.object().shape({
12
- mobile: yup.string().min(min, 'enter_valid_mobile_number').required('mobile_number_error')
13
+ mobile: yup.string().length(length, 'enter_valid_mobile_number').required('mobile_number_error')
13
14
  });
14
15
  };
@@ -77,7 +77,7 @@ var SocialMedia = function (_a) {
77
77
  var websiteError = (_b = errors === null || errors === void 0 ? void 0 : errors.website) === null || _b === void 0 ? void 0 : _b.message;
78
78
  var twitterError = (_c = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _c === void 0 ? void 0 : _c.message;
79
79
  var instagramError = (_d = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _d === void 0 ? void 0 : _d.message;
80
- return (_jsxs(ScreenContainer, __assign({ sx: { mb: 3 } }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
80
+ return (_jsxs(ScreenContainer, __assign({ sx: { mb: 3, direction: 'ltr' } }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
81
81
  setSocialMediaType(value);
82
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 })) }) }))] })));
83
83
  };
@@ -22,6 +22,7 @@ var BoxStyled = styled(Box)(function (_a) {
22
22
  return ({
23
23
  display: 'flex',
24
24
  flexDirection: 'column',
25
+ fontFamily: theme.typography.fontFamily,
25
26
  marginBottom: theme.spacing(5)
26
27
  });
27
28
  });
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var OTPValidation = yup.object().shape({
3
- otp: yup.string().min(6).required('')
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
4
  });
@@ -34,6 +34,6 @@ var PasswordInput = function (_a) {
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
+ 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: 8 }) }) })));
38
38
  };
39
39
  export default React.memo(PasswordInput);
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var PasswordValidationSchema = yup.object().shape({
3
- password: yup.string().min(5, 'enter_valid_password').required('password_required')
3
+ password: yup.string().min(8, 'enter_valid_password').required('password_required')
4
4
  });
@@ -2,6 +2,6 @@ import { FeatureScreenStep } from '../@types';
2
2
  export declare const connectFeatureScreens: Array<FeatureScreenStep>;
3
3
  export declare const businessFeatureScreens: Array<FeatureScreenStep>;
4
4
  export declare const passwordFeatureScreens: Array<FeatureScreenStep>;
5
- export declare const ownerFeatureScreens: Array<FeatureScreenStep>;
5
+ export declare const individualFeatureScreens: Array<FeatureScreenStep>;
6
6
  export declare const bankFeatureScreens: Array<FeatureScreenStep>;
7
7
  export declare const taxFeatureScreens: Array<FeatureScreenStep>;
@@ -14,9 +14,9 @@ import SuccessPage from './business/screens/Success';
14
14
  import ConfirmPage from './business/screens/Confirm';
15
15
  import CreatePasswordPage from './password/screens/CreatePassword';
16
16
  import SuccessPasswordPage from './password/screens/Success';
17
- import ShowOwnerInfoPage from './owner/screens/ShowOwnerInfo';
18
- import AdditionalOwnerInfoPage from './owner/screens/AdditionalOwnerInfo';
19
- import SuccessOwnerPage from './owner/screens/Success';
17
+ import ShowIndividualInfoPage from './individual/screens/ShowIndividualInfo';
18
+ import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
19
+ import SuccessOwnerPage from './individual/screens/Success';
20
20
  import BankDetailsPage from './bank/screens/BankDetails';
21
21
  import BankSuccessPage from './bank/screens/Success';
22
22
  import TaxDetailsPage from './tax/screens/TaxDetails';
@@ -88,17 +88,17 @@ export var passwordFeatureScreens = [
88
88
  element: SuccessPasswordPage
89
89
  }
90
90
  ];
91
- export var ownerFeatureScreens = [
91
+ export var individualFeatureScreens = [
92
92
  {
93
- name: 'OWNER_SHOW_OWNER_INFO_STEP',
94
- element: ShowOwnerInfoPage
93
+ name: 'INDIVIDUAL_SHOW_INDIVIDUAL_INFO_STEP',
94
+ element: ShowIndividualInfoPage
95
95
  },
96
96
  {
97
- name: 'OWNER_ADDITIONAL_OWNER_INFO_STEP',
98
- element: AdditionalOwnerInfoPage
97
+ name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
98
+ element: AdditionalIndividualInfoPage
99
99
  },
100
100
  {
101
- name: 'OWNER_SUCCESS_STEP',
101
+ name: 'INDIVIDUAL_SUCCESS_STEP',
102
102
  element: SuccessOwnerPage
103
103
  }
104
104
  ];
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface IndividualLibProps {
3
+ }
4
+ export declare function IndividualLib(props: IndividualLibProps): JSX.Element;
5
+ export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): void;
6
+ export declare function unmountIndividualLib(elementId: string): void;