@tap-payments/auth-jsconnect 1.0.36 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +4 -4
- package/build/components/AnimationFlow/BottomSheet.js +26 -2
- package/build/components/OTPTimer/OTPTimer.js +4 -2
- package/build/constants/app.js +2 -2
- package/build/constants/dummy.d.ts +2 -2
- package/build/constants/dummy.js +6 -6
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/business/businessStore.d.ts +4 -6
- package/build/features/app/business/businessStore.js +43 -30
- package/build/features/app/connect/connectStore.d.ts +1 -1
- package/build/features/app/connect/connectStore.js +23 -15
- package/build/features/business/screens/Activities/Activities.js +10 -5
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -12
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +16 -23
- package/build/features/business/screens/BusinessType/CompanyLicense.js +23 -9
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +23 -9
- package/build/features/business/screens/Confirm/Confirm.js +4 -3
- package/build/features/business/screens/Customers/Customers.js +1 -1
- package/build/features/business/screens/OTP/OTP.js +5 -2
- package/build/features/business/screens/OTP/OTPInput.js +1 -2
- package/build/features/business/screens/Verify/OTPInput.js +1 -2
- package/build/features/business/screens/Verify/Verify.js +7 -4
- package/build/features/connect/screens/Individual/Email.js +10 -1
- package/build/features/connect/screens/Individual/Individual.js +8 -10
- package/build/features/connect/screens/Individual/MobileNumber.js +3 -16
- package/build/features/connect/screens/Merchant/BrandName.js +6 -2
- package/build/features/connect/screens/Merchant/Merchant.js +11 -11
- package/build/features/connect/screens/Merchant/SocialMedia.js +2 -1
- package/build/features/connect/screens/Merchant/TAC.js +1 -1
- package/build/features/connect/screens/Merchant/validation.js +3 -2
- package/build/features/connect/screens/Mobile/BusinessCountry.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +1 -9
- package/build/features/connect/screens/Mobile/MobileNumber.js +3 -16
- package/build/features/connect/screens/NID/IDNumber.d.ts +0 -1
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +1 -6
- package/build/features/connect/screens/OTP/OTP.js +2 -4
- package/build/features/connect/screens/Password/Password.js +1 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +1 -1
- package/build/features/shared/Button/Button.js +13 -3
- package/build/features/shared/SuccessScreen/SuccessScreen.js +10 -5
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useWindowSize.d.ts +6 -0
- package/build/hooks/useWindowSize.js +19 -0
- package/package.json +126 -126
- package/build/features/app/business/midStore.d.ts +0 -10
- package/build/features/app/business/midStore.js +0 -18
- package/build/features/app/connect/midStore.d.ts +0 -10
- package/build/features/app/connect/midStore.js +0 -18
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +0 -5
- package/build/features/business/screens/VerifyNumber/OTPInput.js +0 -39
- package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +0 -13
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +0 -76
- package/build/features/business/screens/VerifyNumber/index.d.ts +0 -3
- package/build/features/business/screens/VerifyNumber/index.js +0 -2
- package/build/features/business/screens/VerifyNumber/validation.d.ts +0 -8
- package/build/features/business/screens/VerifyNumber/validation.js +0 -4
- package/build/features/connect/screens/MID/BusinessCountry.d.ts +0 -11
- package/build/features/connect/screens/MID/BusinessCountry.js +0 -92
- package/build/features/connect/screens/MID/DOB.d.ts +0 -6
- package/build/features/connect/screens/MID/DOB.js +0 -38
- package/build/features/connect/screens/MID/IDNumber.d.ts +0 -7
- package/build/features/connect/screens/MID/IDNumber.js +0 -70
- package/build/features/connect/screens/MID/MID.d.ts +0 -5
- package/build/features/connect/screens/MID/MID.js +0 -87
- package/build/features/connect/screens/MID/MIDTitle.d.ts +0 -8
- package/build/features/connect/screens/MID/MIDTitle.js +0 -29
- package/build/features/connect/screens/MID/MobileNumber.d.ts +0 -12
- package/build/features/connect/screens/MID/MobileNumber.js +0 -148
- package/build/features/connect/screens/MID/index.d.ts +0 -3
- package/build/features/connect/screens/MID/index.js +0 -2
- package/build/features/connect/screens/MID/validation.d.ts +0 -18
- package/build/features/connect/screens/MID/validation.js +0 -15
- package/build/features/owner/Owner.d.ts +0 -6
- package/build/features/owner/Owner.js +0 -50
- package/build/features/owner/index.d.ts +0 -1
- package/build/features/owner/index.js +0 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +0 -8
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +0 -77
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +0 -10
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +0 -80
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +0 -40
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +0 -45
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +0 -35
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +0 -45
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +0 -9
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +0 -85
- package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +0 -3
- package/build/features/owner/screens/AdditionalOwnerInfo/index.js +0 -2
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +0 -25
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +0 -35
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +0 -52
- package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +0 -3
- package/build/features/owner/screens/ShowOwnerInfo/index.js +0 -2
- package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +0 -7
- package/build/features/owner/screens/ShowOwnerInfo/info.js +0 -28
- package/build/features/owner/screens/Success/Success.d.ts +0 -5
- package/build/features/owner/screens/Success/Success.js +0 -14
- package/build/features/owner/screens/Success/index.d.ts +0 -3
- package/build/features/owner/screens/Success/index.js +0 -2
- package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +0 -7
- package/build/features/shared/ExpandIcon/ExpandIcon.js +0 -24
- package/build/features/shared/ExpandIcon/index.d.ts +0 -2
- package/build/features/shared/ExpandIcon/index.js +0 -2
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
5
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
}>>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CountryCode } from '../../../../@types';
|
|
3
|
-
interface BusinessCountryProps {
|
|
4
|
-
countries: Array<CountryCode>;
|
|
5
|
-
show: boolean;
|
|
6
|
-
setMobileLength?: (length: number) => void;
|
|
7
|
-
onListOpen?: () => void;
|
|
8
|
-
onListClose?: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<BusinessCountryProps & React.RefAttributes<unknown>>>;
|
|
11
|
-
export default _default;
|
|
@@ -1,92 +0,0 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import Box from '@mui/material/Box';
|
|
26
|
-
import { styled } from '@mui/material/styles';
|
|
27
|
-
import { useTranslation } from 'react-i18next';
|
|
28
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
29
|
-
import Text from '../../../../components/Text';
|
|
30
|
-
import Collapse from '../../../../components/Collapse';
|
|
31
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
32
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
33
|
-
import Icon from '../../../../components/Icon';
|
|
34
|
-
import Input from '../../../shared/Input';
|
|
35
|
-
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
37
|
-
import { useLanguage } from '../../../../hooks';
|
|
38
|
-
var CountryItemContainer = styled(Box)(function () { return ({
|
|
39
|
-
display: 'flex'
|
|
40
|
-
}); });
|
|
41
|
-
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
42
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
43
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
44
|
-
});
|
|
45
|
-
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
46
|
-
var theme = _a.theme;
|
|
47
|
-
return ({
|
|
48
|
-
color: theme.palette.success.main,
|
|
49
|
-
display: 'flex',
|
|
50
|
-
alignItems: 'flex-end'
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
var CountrySpanStyled = styled(Text)(function () { return ({
|
|
54
|
-
cursor: 'pointer'
|
|
55
|
-
}); });
|
|
56
|
-
var CountryIconStyled = styled(Icon)(function (_a) {
|
|
57
|
-
var theme = _a.theme;
|
|
58
|
-
return ({
|
|
59
|
-
width: theme.spacing(2.75),
|
|
60
|
-
height: theme.spacing(2),
|
|
61
|
-
verticalAlign: 'middle'
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
var BusinessCountry = React.forwardRef(function (_a, ref) {
|
|
65
|
-
var _b, _c;
|
|
66
|
-
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
67
|
-
var businessCountries = React.useState(countries)[0];
|
|
68
|
-
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
69
|
-
var t = useTranslation().t;
|
|
70
|
-
var isAr = useLanguage().isAr;
|
|
71
|
-
var control = useFormContext().control;
|
|
72
|
-
var businessCountryControl = useController({ control: control, name: 'businessCountry' });
|
|
73
|
-
var onOpenCountrySelect = function (event) {
|
|
74
|
-
var _a;
|
|
75
|
-
setAnchorEl(event.currentTarget);
|
|
76
|
-
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
77
|
-
};
|
|
78
|
-
var onCloseCountrySelect = function () {
|
|
79
|
-
var _a;
|
|
80
|
-
setAnchorEl(null);
|
|
81
|
-
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
82
|
-
};
|
|
83
|
-
var onSelectItem = function (country) {
|
|
84
|
-
onCloseCountrySelect();
|
|
85
|
-
businessCountryControl.field.onChange(country);
|
|
86
|
-
};
|
|
87
|
-
var businessCountry = businessCountryControl.field.value;
|
|
88
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { marginBottom: '25px' } }, { children: [_jsx(Input, { label: t('signup_select_country'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, startAdornment: _jsx(CountrySpanStyled, { children: _jsx(CountryIconStyled, { src: (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.logo) || '' }) }), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('ide_mobile_placeholder'), value: (isAr ? (_b = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _c === void 0 ? void 0 : _c.english) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: businessCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
89
|
-
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsx(CountryIconStyled, { src: item.logo, alt: item.iso3 }), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) && _jsx(CheckIconStyled, {})] }));
|
|
90
|
-
} }) }))] })) })));
|
|
91
|
-
});
|
|
92
|
-
export default React.memo(BusinessCountry);
|
|
@@ -1,38 +0,0 @@
|
|
|
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;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IDNumberProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onSwitchToMobileNumber?: () => void;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IDNumberProps & React.RefAttributes<unknown>>>;
|
|
7
|
-
export default _default;
|
|
@@ -1,70 +0,0 @@
|
|
|
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 * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
17
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
20
|
-
import Icon from '../../../../components/Icon';
|
|
21
|
-
import Input from '../../../shared/Input';
|
|
22
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
23
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
|
-
import Collapse from '../../../../components/Collapse';
|
|
25
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
26
|
-
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
27
|
-
import { ICONS_NAMES, ID_NUMBER_LENGTH } from '../../../../constants';
|
|
28
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
29
|
-
var theme = _a.theme;
|
|
30
|
-
return ({
|
|
31
|
-
display: 'flex',
|
|
32
|
-
justifyContent: 'space-between',
|
|
33
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
37
|
-
var theme = _a.theme;
|
|
38
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
39
|
-
});
|
|
40
|
-
var IconStyled = styled(Icon)(function (_a) {
|
|
41
|
-
var theme = _a.theme;
|
|
42
|
-
return ({
|
|
43
|
-
width: theme.spacing(2.75),
|
|
44
|
-
height: theme.spacing(2.125),
|
|
45
|
-
cursor: 'pointer'
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
49
|
-
var _b;
|
|
50
|
-
var onSwitchToMobileNumber = _a.onSwitchToMobileNumber, show = _a.show;
|
|
51
|
-
var t = useTranslation().t;
|
|
52
|
-
var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
53
|
-
var nidControl = useController({ control: control, name: 'nid' });
|
|
54
|
-
React.useEffect(function () {
|
|
55
|
-
if (nidControl.field.value)
|
|
56
|
-
setValue('nid', nidControl.field.value, { shouldValidate: true });
|
|
57
|
-
}, [show]);
|
|
58
|
-
var handleIdChange = function (_a) {
|
|
59
|
-
var target = _a.target;
|
|
60
|
-
var value = removeAllCharsFromNumber(target.value);
|
|
61
|
-
nidControl.field.onChange(value);
|
|
62
|
-
};
|
|
63
|
-
var clearIdNumber = function () {
|
|
64
|
-
nidControl.field.onChange('');
|
|
65
|
-
};
|
|
66
|
-
var nidValue = nidControl.field.value;
|
|
67
|
-
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
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 })] })) })));
|
|
69
|
-
});
|
|
70
|
-
export default React.memo(IDNumber);
|
|
@@ -1,87 +0,0 @@
|
|
|
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 * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
|
-
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { styled } from '@mui/material/styles';
|
|
19
|
-
import Collapse from '../../../../components/Collapse';
|
|
20
|
-
import Form from '../../../../components/Form';
|
|
21
|
-
import Button from '../../../shared/Button';
|
|
22
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
23
|
-
import { handleNextScreenStep } from '../../../../app/settings';
|
|
24
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
-
import { useLanguage } from '../../../../hooks';
|
|
26
|
-
import MIDTitle from './MIDTitle';
|
|
27
|
-
import MobileNumber from './MobileNumber';
|
|
28
|
-
import IDNumber from './IDNumber';
|
|
29
|
-
import BusinessCountry from './BusinessCountry';
|
|
30
|
-
import { NIDValidationSchema, PhoneValidationSchema } from './validation';
|
|
31
|
-
import { countriesCode, defaultCountry, businessCountries } from '../../../../constants/dummy';
|
|
32
|
-
import DOB from './DOB';
|
|
33
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
34
|
-
display: 'flex',
|
|
35
|
-
flexDirection: 'column'
|
|
36
|
-
}); });
|
|
37
|
-
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
38
|
-
var _b;
|
|
39
|
-
var theme = _a.theme, listActive = _a.listActive;
|
|
40
|
-
return (_b = {
|
|
41
|
-
paddingBottom: theme.spacing(listActive ? 0 : 5)
|
|
42
|
-
},
|
|
43
|
-
_b[theme.transitions.create(['padding-bottom'])] = {
|
|
44
|
-
duration: theme.transitions.duration.standard
|
|
45
|
-
},
|
|
46
|
-
_b);
|
|
47
|
-
});
|
|
48
|
-
var ListType;
|
|
49
|
-
(function (ListType) {
|
|
50
|
-
ListType["BusinessList"] = "BusinessList";
|
|
51
|
-
ListType["CountryCodeList"] = "CountryCodeList";
|
|
52
|
-
})(ListType || (ListType = {}));
|
|
53
|
-
var MID = function (_a) {
|
|
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];
|
|
58
|
-
var dispatch = useAppDispatch();
|
|
59
|
-
var methods = useForm({
|
|
60
|
-
resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema(mobileLength)),
|
|
61
|
-
defaultValues: {
|
|
62
|
-
countryCode: defaultCountry,
|
|
63
|
-
businessCountry: defaultCountry,
|
|
64
|
-
nid: '',
|
|
65
|
-
dob: '1998-08-22',
|
|
66
|
-
mobile: null
|
|
67
|
-
},
|
|
68
|
-
mode: 'onChange'
|
|
69
|
-
});
|
|
70
|
-
var t = useTranslation().t;
|
|
71
|
-
var isAr = useLanguage().isAr;
|
|
72
|
-
var handleMenuListClick = function (flag) {
|
|
73
|
-
setListType(flag);
|
|
74
|
-
};
|
|
75
|
-
var onSubmit = function (data) {
|
|
76
|
-
console.log('data', data);
|
|
77
|
-
dispatch(handleNextScreenStep());
|
|
78
|
-
};
|
|
79
|
-
var handleCollapseOpenClose = function (flag) {
|
|
80
|
-
setCollapse(flag);
|
|
81
|
-
};
|
|
82
|
-
var isBusinessListActive = listType === ListType.BusinessList;
|
|
83
|
-
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
84
|
-
var listActive = isBusinessListActive || isCountryListActive;
|
|
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') })) }))] })) }))] }));
|
|
86
|
-
};
|
|
87
|
-
export default React.memo(MID);
|
|
@@ -1,29 +0,0 @@
|
|
|
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 * as React from 'react';
|
|
14
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
15
|
-
import Collapse from '../../../../components/Collapse';
|
|
16
|
-
import Text from '../../../../components/Text';
|
|
17
|
-
var TitleStyled = styled(Text)(function (_a) {
|
|
18
|
-
var theme = _a.theme;
|
|
19
|
-
return (__assign(__assign({ color: theme.palette.text.primary, textAlign: 'center' }, theme.typography.body1), { fontWeight: theme.typography.fontWeightMedium, lineHeight: 1.21, padding: theme.spacing(0, 3, 0, 3) }));
|
|
20
|
-
});
|
|
21
|
-
var DescriptionStyled = styled(Text)(function (_a) {
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption), { fontWeight: theme.typography.fontWeightRegular, lineHeight: 1.6, padding: theme.spacing(2, 3, 3, 3) }));
|
|
24
|
-
});
|
|
25
|
-
var MIDTitle = function (_a) {
|
|
26
|
-
var description = _a.description, show = _a.show, title = _a.title;
|
|
27
|
-
return (_jsxs(Collapse, __assign({ in: show }, { children: [_jsx(TitleStyled, { children: title }), _jsx(DescriptionStyled, { children: description })] })));
|
|
28
|
-
};
|
|
29
|
-
export default React.memo(MIDTitle);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CountryCode } from '../../../../@types';
|
|
3
|
-
interface MobileNumberProps {
|
|
4
|
-
countries: Array<CountryCode>;
|
|
5
|
-
show: boolean;
|
|
6
|
-
setMobileLength?: (length: number) => void;
|
|
7
|
-
onSwitchToIdNumber?: () => void;
|
|
8
|
-
onListOpen?: () => void;
|
|
9
|
-
onListClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MobileNumberProps & React.RefAttributes<unknown>>>;
|
|
12
|
-
export default _default;
|
|
@@ -1,148 +0,0 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import Box from '@mui/material/Box';
|
|
26
|
-
import { useTranslation } from 'react-i18next';
|
|
27
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
28
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
29
|
-
import Text from '../../../../components/Text';
|
|
30
|
-
import Collapse from '../../../../components/Collapse';
|
|
31
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
32
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
33
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
35
|
-
import Icon from '../../../../components/Icon';
|
|
36
|
-
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
|
-
import Input from '../../../shared/Input';
|
|
38
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
39
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
40
|
-
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
41
|
-
import { useLanguage } from '../../../../hooks';
|
|
42
|
-
var IconStyled = styled(Icon)(function (_a) {
|
|
43
|
-
var theme = _a.theme;
|
|
44
|
-
return ({
|
|
45
|
-
width: theme.spacing(2.75),
|
|
46
|
-
height: theme.spacing(2.125),
|
|
47
|
-
cursor: 'pointer'
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
51
|
-
var theme = _a.theme;
|
|
52
|
-
return ({
|
|
53
|
-
display: 'flex',
|
|
54
|
-
justifyContent: 'space-between',
|
|
55
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
var CountryItemContainer = styled(Box)(function () { return ({
|
|
59
|
-
display: 'flex'
|
|
60
|
-
}); });
|
|
61
|
-
var CountryCodeText = styled(Text, {
|
|
62
|
-
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
63
|
-
})(function (_a) {
|
|
64
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
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 }));
|
|
66
|
-
});
|
|
67
|
-
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
68
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
69
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
70
|
-
});
|
|
71
|
-
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
72
|
-
var theme = _a.theme;
|
|
73
|
-
return (__assign(__assign({ cursor: 'pointer' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
74
|
-
});
|
|
75
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
76
|
-
var theme = _a.theme;
|
|
77
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
78
|
-
});
|
|
79
|
-
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
80
|
-
var theme = _a.theme;
|
|
81
|
-
return ({
|
|
82
|
-
marginInlineStart: theme.spacing(1)
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
86
|
-
var _b, _c, _d;
|
|
87
|
-
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
88
|
-
var countriesCode = React.useState(countries)[0];
|
|
89
|
-
var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
|
|
90
|
-
var t = useTranslation().t;
|
|
91
|
-
var isAr = useLanguage().isAr;
|
|
92
|
-
var _f = useFormContext(), control = _f.control, setValue = _f.setValue, getValues = _f.getValues;
|
|
93
|
-
var phoneControl = useController({ name: 'mobile', control: control });
|
|
94
|
-
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
95
|
-
var businessCountry = getValues('businessCountry');
|
|
96
|
-
React.useEffect(function () {
|
|
97
|
-
var _a;
|
|
98
|
-
if (phoneControl.field.value) {
|
|
99
|
-
setValue('mobile', phoneControl.field.value, { shouldValidate: true });
|
|
100
|
-
}
|
|
101
|
-
if (countryCodeControl.field.value) {
|
|
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);
|
|
105
|
-
}
|
|
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]);
|
|
115
|
-
var onPhoneNumberChange = function (_a) {
|
|
116
|
-
var target = _a.target;
|
|
117
|
-
var value = removeAllCharsFromNumber(target.value);
|
|
118
|
-
phoneControl.field.onChange(value);
|
|
119
|
-
};
|
|
120
|
-
var clearMobileNumber = function () {
|
|
121
|
-
phoneControl.field.onChange('');
|
|
122
|
-
};
|
|
123
|
-
var onOpenCountryList = function (event) {
|
|
124
|
-
var _a;
|
|
125
|
-
setAnchorEl(event.currentTarget);
|
|
126
|
-
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
127
|
-
};
|
|
128
|
-
var onCloseCountryList = function () {
|
|
129
|
-
var _a;
|
|
130
|
-
setAnchorEl(null);
|
|
131
|
-
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
132
|
-
};
|
|
133
|
-
var onSelectItem = function (country) {
|
|
134
|
-
var _a;
|
|
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);
|
|
138
|
-
countryCodeControl.field.onChange(country);
|
|
139
|
-
};
|
|
140
|
-
var countryCodeValue = countryCodeControl.field.value;
|
|
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) {
|
|
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, {})] }));
|
|
146
|
-
} }) }))] })) })));
|
|
147
|
-
});
|
|
148
|
-
export default React.memo(MobileNumber);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const NIDValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
5
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
6
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
7
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
10
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
11
|
-
}>>>;
|
|
12
|
-
export declare const PhoneValidationSchema: (length: number) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
13
|
-
mobile: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
14
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
|
-
mobile: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
16
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
17
|
-
mobile: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
18
|
-
}>>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export var NIDValidationSchema = yup.object().shape({
|
|
3
|
-
dob: yup.string().min(5).required('enter_valid_birth_date'),
|
|
4
|
-
nid: yup
|
|
5
|
-
.string()
|
|
6
|
-
.matches(/^(1)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
|
|
7
|
-
.min(8, 'signup_invalid_national_id_format')
|
|
8
|
-
.max(10, 'signup_invalid_national_id_format')
|
|
9
|
-
.required('signup_invalid_national_id')
|
|
10
|
-
});
|
|
11
|
-
export var PhoneValidationSchema = function (length) {
|
|
12
|
-
return yup.object().shape({
|
|
13
|
-
mobile: yup.string().length(length, 'enter_valid_mobile_number').required('mobile_number_error')
|
|
14
|
-
});
|
|
15
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface OwnerLibProps {
|
|
3
|
-
}
|
|
4
|
-
export declare function OwnerLib(props: OwnerLibProps): JSX.Element;
|
|
5
|
-
export declare function renderOwnerLib(config: OwnerLibProps, elementId: string): void;
|
|
6
|
-
export declare function unmountOwnerLib(elementId: string): void;
|