@tap-payments/auth-jsconnect 1.0.9 → 1.0.13
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 +5 -0
- package/build/assets/locales/ar.json +26 -10
- package/build/assets/locales/en.json +21 -5
- package/build/components/AnimationFlow/Dialog.js +12 -1
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +5 -2
- package/build/components/Radio/Radio.d.ts +5 -0
- package/build/components/Radio/Radio.js +31 -0
- package/build/components/Radio/index.d.ts +3 -0
- package/build/components/Radio/index.js +2 -0
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -0
- package/build/components/RadioGroup/RadioGroup.js +41 -0
- package/build/components/RadioGroup/index.d.ts +3 -0
- package/build/components/RadioGroup/index.js +2 -0
- package/build/components/RadioLabel/RadioLabel.d.ts +7 -0
- package/build/components/RadioLabel/RadioLabel.js +34 -0
- package/build/components/RadioLabel/index.d.ts +3 -0
- package/build/components/RadioLabel/index.js +2 -0
- package/build/constants/app.js +5 -17
- package/build/constants/dummy.d.ts +5 -0
- package/build/constants/dummy.js +8 -0
- package/build/features/bank/Bank.js +1 -1
- package/build/features/business/Business.js +1 -1
- package/build/features/business/screens/Activities/Activities.js +14 -40
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +6 -0
- package/build/features/business/screens/Activities/OperationStartDate.js +31 -0
- package/build/features/business/screens/Activities/SalesChannels.js +3 -10
- package/build/features/business/screens/Activities/validation.d.ts +3 -0
- package/build/features/business/screens/Activities/validation.js +3 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -2
- package/build/features/business/screens/IDBOD/DOB.d.ts +2 -1
- package/build/features/business/screens/IDBOD/DOB.js +4 -1
- package/build/features/business/screens/IDBOD/ID.js +7 -48
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -41
- package/build/features/business/screens/IDBOD/validation.js +2 -2
- package/build/features/connect/Connect.js +1 -1
- package/build/features/connect/screens/MID/BusinessCountry.js +3 -3
- package/build/features/connect/screens/MID/IDNumber.js +9 -6
- package/build/features/connect/screens/MID/MID.js +2 -2
- package/build/features/connect/screens/MID/MobileNumber.js +7 -15
- package/build/features/connect/screens/MID/validation.d.ts +1 -1
- package/build/features/connect/screens/MID/validation.js +5 -3
- package/build/features/connect/screens/Merchant/BrandName.js +2 -2
- package/build/features/connect/screens/Merchant/TAC.js +1 -1
- package/build/features/connect/screens/OTP/OTP.js +1 -1
- package/build/features/featuresScreens.d.ts +1 -1
- package/build/features/featuresScreens.js +12 -7
- package/build/features/owner/Owner.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +8 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +77 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +10 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +80 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +35 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +45 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +35 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +6 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +45 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +9 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +85 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +3 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/index.js +2 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +25 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +32 -0
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
- package/build/features/password/Password.js +1 -1
- package/build/features/shared/ExpandIcon/ExpandIcon.js +1 -1
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/Input/Input.d.ts +0 -1
- package/build/features/shared/Input/Input.js +2 -5
- package/build/features/shared/Mandatory/Mandatory.d.ts +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +20 -0
- package/build/features/shared/Mandatory/index.d.ts +2 -0
- package/build/features/shared/Mandatory/index.js +2 -0
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/index.css +128 -1
- package/build/theme/typography.js +2 -2
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } 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 Input from '../../../shared/Input';
|
|
34
|
+
import ExpandIcon from '../../../shared/ExpandIcon';
|
|
35
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
36
|
+
import { useLanguage } from '../../../../hooks';
|
|
37
|
+
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
|
+
display: 'flex'
|
|
39
|
+
}); });
|
|
40
|
+
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
41
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
42
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
43
|
+
});
|
|
44
|
+
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return ({
|
|
47
|
+
color: theme.palette.success.main,
|
|
48
|
+
display: 'flex',
|
|
49
|
+
alignItems: 'flex-end'
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
var EmployerLocation = React.forwardRef(function (_a, ref) {
|
|
53
|
+
var _b, _c;
|
|
54
|
+
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
55
|
+
var locationCountries = React.useState(countries)[0];
|
|
56
|
+
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
57
|
+
var t = useTranslation().t;
|
|
58
|
+
var isAr = useLanguage().isAr;
|
|
59
|
+
var control = useFormContext().control;
|
|
60
|
+
var employerLocationControl = useController({ control: control, name: 'employerLocation' });
|
|
61
|
+
var onOpenCountrySelect = function (event) {
|
|
62
|
+
var _a;
|
|
63
|
+
setAnchorEl(event.currentTarget);
|
|
64
|
+
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
65
|
+
};
|
|
66
|
+
var onCloseCountrySelect = function () {
|
|
67
|
+
var _a;
|
|
68
|
+
setAnchorEl(null);
|
|
69
|
+
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
70
|
+
};
|
|
71
|
+
var onSelectItem = function (country) {
|
|
72
|
+
onCloseCountrySelect();
|
|
73
|
+
employerLocationControl.field.onChange(country);
|
|
74
|
+
};
|
|
75
|
+
var location = employerLocationControl.field.value;
|
|
76
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('employer_location_label'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('employer_location_placeholder'), value: (isAr ? (_b = location === null || location === void 0 ? void 0 : location.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.english) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
77
|
+
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIconStyled, {})] }));
|
|
78
|
+
} }) }))] })) })));
|
|
79
|
+
});
|
|
80
|
+
export default React.memo(EmployerLocation);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
+
import { removeOnlyNumbers } from '../../../../utils';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
19
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
20
|
+
import Collapse from '../../../../components/Collapse';
|
|
21
|
+
var EmployerName = function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var show = _a.show;
|
|
24
|
+
var t = useTranslation().t;
|
|
25
|
+
var control = useFormContext().control;
|
|
26
|
+
var employerNameControl = useController({ control: control, name: 'employerName' });
|
|
27
|
+
var handleEmployerNameChange = function (_a) {
|
|
28
|
+
var target = _a.target;
|
|
29
|
+
var value = removeOnlyNumbers(target.value);
|
|
30
|
+
employerNameControl.field.onChange(value);
|
|
31
|
+
};
|
|
32
|
+
var employerNameValue = employerNameControl.field.value;
|
|
33
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { pt: 2.5 } }, { children: _jsx(Input, { required: true, label: t('employer_name_label'), onChange: handleEmployerNameChange, value: employerNameValue, endAdornment: employerNameValue && _jsx(CheckIcon, {}), placeholder: t('employer_name_placeholder'), warningType: 'alert', warningMessage: (_b = employerNameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) })) })));
|
|
34
|
+
};
|
|
35
|
+
export default React.memo(EmployerName);
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useFormContext, useController } from 'react-hook-form';
|
|
16
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
+
import Collapse from '../../../../components/Collapse';
|
|
18
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
19
|
+
import Mandatory from '../../../shared/Mandatory';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import RadioGroup from '../../../../components/RadioGroup';
|
|
22
|
+
import RadioLabel from '../../../../components/RadioLabel';
|
|
23
|
+
var LabelTextStyled = styled(Text)(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), marginBlockEnd: theme.spacing(0.625) }));
|
|
26
|
+
});
|
|
27
|
+
var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return ({
|
|
30
|
+
marginInlineStart: theme.spacing(0.25)
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
var InfluencerSwitch = function (_a) {
|
|
34
|
+
var show = _a.show;
|
|
35
|
+
var control = useFormContext().control;
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var influencerControl = useController({ name: 'isInfluencer', control: control });
|
|
38
|
+
var handleOnChange = function (_a) {
|
|
39
|
+
var target = _a.target;
|
|
40
|
+
influencerControl.field.onChange(target.value === 'yes');
|
|
41
|
+
};
|
|
42
|
+
var influencerValue = influencerControl.field.value;
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('are_you_an_influencer'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: influencerValue != null ? (influencerValue ? 'yes' : 'no') : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
|
|
44
|
+
};
|
|
45
|
+
export default React.memo(InfluencerSwitch);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
+
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
19
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
20
|
+
import Collapse from '../../../../components/Collapse';
|
|
21
|
+
var MonthlyIncome = function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var show = _a.show;
|
|
24
|
+
var t = useTranslation().t;
|
|
25
|
+
var control = useFormContext().control;
|
|
26
|
+
var monthlyIncomeControl = useController({ control: control, name: 'monthlyIncome' });
|
|
27
|
+
var handleMonthlyIncomeChange = function (_a) {
|
|
28
|
+
var target = _a.target;
|
|
29
|
+
var value = removeAllCharsFromNumber(target.value);
|
|
30
|
+
monthlyIncomeControl.field.onChange(value);
|
|
31
|
+
};
|
|
32
|
+
var monthlyIncomeValue = monthlyIncomeControl.field.value;
|
|
33
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('monthly_income_label'), onChange: handleMonthlyIncomeChange, value: monthlyIncomeValue, endAdornment: monthlyIncomeValue && _jsx(CheckIcon, {}), placeholder: '0', warningType: 'alert', warningMessage: (_b = monthlyIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) }) })));
|
|
34
|
+
};
|
|
35
|
+
export default React.memo(MonthlyIncome);
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useFormContext, useController } from 'react-hook-form';
|
|
16
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Collapse from '../../../../components/Collapse';
|
|
19
|
+
import Mandatory from '../../../shared/Mandatory';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import RadioGroup from '../../../../components/RadioGroup';
|
|
22
|
+
import RadioLabel from '../../../../components/RadioLabel';
|
|
23
|
+
var LabelTextStyled = styled(Text)(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), marginBlockEnd: theme.spacing(0.625) }));
|
|
26
|
+
});
|
|
27
|
+
var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return ({
|
|
30
|
+
marginInlineStart: theme.spacing(0.25)
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
var PEPSwitch = function (_a) {
|
|
34
|
+
var show = _a.show;
|
|
35
|
+
var control = useFormContext().control;
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var pepControl = useController({ name: 'isPEP', control: control });
|
|
38
|
+
var handleOnChange = function (_a) {
|
|
39
|
+
var target = _a.target;
|
|
40
|
+
pepControl.field.onChange(target.value === 'yes');
|
|
41
|
+
};
|
|
42
|
+
var pepValue = pepControl.field.value;
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('is_close_relative_in_pep_label'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: pepValue != null ? (pepValue ? 'yes' : 'no') : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
|
|
44
|
+
};
|
|
45
|
+
export default React.memo(PEPSwitch);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SourceOfIncome as SourceOfIncomeType } from '../../../../@types';
|
|
3
|
+
interface SourceOfIncomeProps {
|
|
4
|
+
list: Array<SourceOfIncomeType>;
|
|
5
|
+
show: boolean;
|
|
6
|
+
onSelectSource?: (country: SourceOfIncomeType) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ list, ...rest }: SourceOfIncomeProps) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } 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 Input from '../../../shared/Input';
|
|
34
|
+
import ExpandIcon from '../../../shared/ExpandIcon';
|
|
35
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
36
|
+
import { useLanguage } from '../../../../hooks';
|
|
37
|
+
var Container = styled(Box)(function () { return ({
|
|
38
|
+
display: 'flex'
|
|
39
|
+
}); });
|
|
40
|
+
var SimpleListStyled = styled((SimpleList))(function (_a) {
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return ({
|
|
43
|
+
height: 'fit-content',
|
|
44
|
+
backgroundColor: theme.palette.common.white,
|
|
45
|
+
borderBottom: "".concat(theme.spacing(0.125), " solid ").concat(theme.palette.divider)
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
51
|
+
});
|
|
52
|
+
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
53
|
+
var theme = _a.theme;
|
|
54
|
+
return ({
|
|
55
|
+
color: theme.palette.success.main,
|
|
56
|
+
display: 'flex',
|
|
57
|
+
alignItems: 'flex-end'
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
var SourceOfIncome = function (_a) {
|
|
61
|
+
var list = _a.list, rest = __rest(_a, ["list"]);
|
|
62
|
+
var sourceList = React.useState(list)[0];
|
|
63
|
+
var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
64
|
+
var t = useTranslation().t;
|
|
65
|
+
var isAr = useLanguage().isAr;
|
|
66
|
+
var control = useFormContext().control;
|
|
67
|
+
var sourceIncomeControl = useController({ control: control, name: 'sourceIncome' });
|
|
68
|
+
var onOpenList = function (event) {
|
|
69
|
+
setAnchorEl(event.currentTarget);
|
|
70
|
+
};
|
|
71
|
+
var onCloseList = function () {
|
|
72
|
+
setAnchorEl(null);
|
|
73
|
+
};
|
|
74
|
+
var onSelectItem = function (country) {
|
|
75
|
+
var _a;
|
|
76
|
+
onCloseList();
|
|
77
|
+
(_a = rest.onSelectSource) === null || _a === void 0 ? void 0 : _a.call(rest, country);
|
|
78
|
+
sourceIncomeControl.field.onChange(country);
|
|
79
|
+
};
|
|
80
|
+
var source = sourceIncomeControl.field.value;
|
|
81
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('source_of_income_label'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('source_of_income_placeholder'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name : source === null || source === void 0 ? void 0 : source.nameEn) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'nameEn', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
82
|
+
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name : item === null || item === void 0 ? void 0 : item.nameEn })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
|
|
83
|
+
} }) }))] })) })));
|
|
84
|
+
};
|
|
85
|
+
export default React.memo(SourceOfIncome);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import { ObjectShape } from 'yup/lib/object';
|
|
3
|
+
import { CountryCode } from '../../../../@types';
|
|
4
|
+
export declare const OwnerInfoValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
5
|
+
sourceIncome: import("yup/lib/object").RequiredObjectSchema<ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<ObjectShape>>;
|
|
6
|
+
monthlyIncome: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
7
|
+
employerName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
8
|
+
employerLocation: import("yup/lib/object").OptionalObjectSchema<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>>>;
|
|
9
|
+
isPEP: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
10
|
+
isInfluencer: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
11
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
12
|
+
sourceIncome: import("yup/lib/object").RequiredObjectSchema<ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<ObjectShape>>;
|
|
13
|
+
monthlyIncome: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
14
|
+
employerName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
15
|
+
employerLocation: import("yup/lib/object").OptionalObjectSchema<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>>>;
|
|
16
|
+
isPEP: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
17
|
+
isInfluencer: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
18
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
19
|
+
sourceIncome: import("yup/lib/object").RequiredObjectSchema<ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<ObjectShape>>;
|
|
20
|
+
monthlyIncome: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
21
|
+
employerName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
22
|
+
employerLocation: import("yup/lib/object").OptionalObjectSchema<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<Partial<Record<keyof CountryCode, yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>>>>>;
|
|
23
|
+
isPEP: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
24
|
+
isInfluencer: import("yup/lib/boolean").RequiredBooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject>;
|
|
25
|
+
}>>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export var OwnerInfoValidationSchema = yup.object().shape({
|
|
3
|
+
sourceIncome: yup.object().required('Source of income is required'),
|
|
4
|
+
monthlyIncome: yup.string().optional(),
|
|
5
|
+
employerName: yup.string().when('sourceIncome', function (sourceIncomeValue) {
|
|
6
|
+
var _a;
|
|
7
|
+
if (((_a = sourceIncomeValue === null || sourceIncomeValue === void 0 ? void 0 : sourceIncomeValue.nameEn) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'salary') {
|
|
8
|
+
return yup.string().required('Employer name is required');
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return yup.string().optional();
|
|
12
|
+
}
|
|
13
|
+
}),
|
|
14
|
+
employerLocation: yup.object().when('sourceIncome', function (sourceIncome) {
|
|
15
|
+
var _a;
|
|
16
|
+
if (((_a = sourceIncome === null || sourceIncome === void 0 ? void 0 : sourceIncome.nameEn) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'salary') {
|
|
17
|
+
return yup
|
|
18
|
+
.object({
|
|
19
|
+
name: yup.object().shape({
|
|
20
|
+
arabic: yup.string().required('Employer location is required'),
|
|
21
|
+
english: yup.string().required('Employer location is required')
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
.required('Employer location is required');
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return yup.string().optional();
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
isPEP: yup.boolean().required(),
|
|
31
|
+
isInfluencer: yup.boolean().required()
|
|
32
|
+
});
|
|
@@ -17,7 +17,7 @@ import { useAppDispatch } from '../../../../hooks';
|
|
|
17
17
|
import { handleNextScreenStep } from '../../../../app/settings';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
19
|
import Collapse from '../../../../components/Collapse';
|
|
20
|
-
import Button from '
|
|
20
|
+
import Button from '../../../shared/Button';
|
|
21
21
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
22
22
|
import { useLanguage } from '../../../../hooks';
|
|
23
23
|
import Info from './info';
|
|
@@ -36,7 +36,7 @@ var Password = memo(function (props) {
|
|
|
36
36
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
|
|
37
37
|
var Element = _a.element, name = _a.name;
|
|
38
38
|
var isActive = activeScreen.name === name;
|
|
39
|
-
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter:
|
|
39
|
+
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
40
40
|
}) }) })) })));
|
|
41
41
|
});
|
|
42
42
|
export function PasswordLib(props) {
|
|
@@ -15,7 +15,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
|
15
15
|
var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
16
16
|
var _b;
|
|
17
17
|
var theme = _a.theme, anchorEl = _a.anchorEl;
|
|
18
|
-
return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', transform: !!anchorEl ? 'rotate(180deg)' : '' }, _b[theme.transitions.create(['transform'])] = {
|
|
18
|
+
return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', transform: !!anchorEl ? 'rotate(180deg)' : '' }, _b[theme.transitions.create(['transform'])] = {
|
|
19
19
|
duration: theme.transitions.duration.standard
|
|
20
20
|
}, _b)));
|
|
21
21
|
});
|
|
@@ -12,5 +12,5 @@ export default function CustomFooter() {
|
|
|
12
12
|
var language = isEn ? LanguageMode.AR : LanguageMode.EN;
|
|
13
13
|
dispatch(handleLanguage(language));
|
|
14
14
|
};
|
|
15
|
-
return _jsx(Footer, { onSwitchLanguage: handleChangeLanguage, followUsTitle: t('follow_us'), language: t('
|
|
15
|
+
return (_jsx(Footer, { onSwitchLanguage: handleChangeLanguage, followUsTitle: t('follow_us'), language: t('switch_language_label') }));
|
|
16
16
|
}
|
|
@@ -13,7 +13,6 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
13
13
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
14
14
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
15
15
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
16
|
-
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
17
16
|
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "name" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
|
|
18
17
|
placeholder?: string | undefined;
|
|
19
18
|
hide?: boolean | undefined;
|
|
@@ -25,14 +25,11 @@ import { styled, alpha } from '@mui/material/styles';
|
|
|
25
25
|
import Text from '../../../components/Text';
|
|
26
26
|
import Box from '@mui/material/Box';
|
|
27
27
|
import Input from '../../../components/Input';
|
|
28
|
+
import Mandatory from '../Mandatory';
|
|
28
29
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
29
30
|
var theme = _a.theme;
|
|
30
31
|
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
31
32
|
});
|
|
32
|
-
export var MandatoryStyled = styled('span')(function (_a) {
|
|
33
|
-
var theme = _a.theme;
|
|
34
|
-
return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
|
|
35
|
-
});
|
|
36
33
|
export var InputStyled = styled(Input)(function (_a) {
|
|
37
34
|
var theme = _a.theme, readOnly = _a.readOnly;
|
|
38
35
|
return (__assign({ direction: theme.direction, '&.MuiInputBase-adornedEnd': {
|
|
@@ -55,5 +52,5 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
55
52
|
});
|
|
56
53
|
export default function CustomInput(_a) {
|
|
57
54
|
var label = _a.label, required = _a.required, props = __rest(_a, ["label", "required"]);
|
|
58
|
-
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(
|
|
55
|
+
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props))] }));
|
|
59
56
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
14
|
+
var SpanStyled = styled('span')(function (_a) {
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
return (__assign(__assign({}, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, color: alpha(theme.palette.error.light, 0.4), lineHeight: theme.spacing(2.5), verticalAlign: 'sub' }));
|
|
17
|
+
});
|
|
18
|
+
export default function Mandatory() {
|
|
19
|
+
return _jsx(SpanStyled, { children: "*" });
|
|
20
|
+
}
|
|
@@ -31,11 +31,11 @@ var OTPStyled = styled(OTPField)(function (_a) {
|
|
|
31
31
|
var _b;
|
|
32
32
|
var theme = _a.theme, parentWidth = _a.parentWidth;
|
|
33
33
|
var isSmall = parentWidth < 300;
|
|
34
|
-
var inputWidth = isSmall ? Math.ceil(parentWidth / 6) -
|
|
34
|
+
var inputWidth = isSmall ? Math.ceil(parentWidth / 6) - 12 : Math.ceil(parentWidth / 6) - 20;
|
|
35
35
|
return {
|
|
36
36
|
marginInlineStart: 0,
|
|
37
37
|
input: (_b = {
|
|
38
|
-
width: "
|
|
38
|
+
width: "45.5px !important"
|
|
39
39
|
},
|
|
40
40
|
_b[theme.breakpoints.down('sm')] = {
|
|
41
41
|
marginInlineStart: isSmall ? theme.spacing(1) : theme.spacing(2),
|