@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.
- package/build/assets/locales/ar.json +18 -8
- package/build/assets/locales/en.json +11 -1
- package/build/components/DatePicker/DatePicker.js +5 -16
- package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -0
- package/build/components/ExpandIcon/ExpandIcon.js +24 -0
- package/build/components/ExpandIcon/index.d.ts +2 -0
- package/build/components/ExpandIcon/index.js +2 -0
- package/build/components/Footer/Footer.js +1 -1
- package/build/components/Warning/Warning.d.ts +1 -2
- package/build/components/Warning/Warning.js +1 -2
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +8 -8
- package/build/constants/dummy.js +3 -3
- package/build/features/bank/screens/BankDetails/Beneficiary.js +2 -2
- package/build/features/bank/screens/BankDetails/validation.js +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -16
- package/build/features/business/screens/Activities/ActivitiesList.js +3 -17
- package/build/features/business/screens/BusinessType/CRNumber.js +2 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
- package/build/features/business/screens/BusinessType/FLNumber.js +2 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
- package/build/features/business/screens/BusinessType/validation.js +2 -8
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +0 -24
- package/build/features/business/screens/Customers/CustomerLocations.js +3 -17
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -2
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +4 -2
- package/build/features/business/screens/Customers/validation.js +1 -1
- package/build/features/business/screens/IDBOD/DOB.js +3 -11
- package/build/features/business/screens/IDBOD/validation.js +1 -0
- package/build/features/business/screens/OTP/OTPInput.js +1 -0
- package/build/features/business/screens/OTP/validation.js +1 -1
- package/build/features/business/screens/VerifyNumber/OTPInput.js +1 -0
- package/build/features/business/screens/VerifyNumber/validation.js +1 -1
- package/build/features/connect/screens/Individual/Name.js +2 -2
- package/build/features/connect/screens/MID/BusinessCountry.d.ts +1 -0
- package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
- package/build/features/connect/screens/MID/DOB.d.ts +6 -0
- package/build/features/connect/screens/MID/DOB.js +38 -0
- package/build/features/connect/screens/MID/IDNumber.js +3 -14
- package/build/features/connect/screens/MID/MID.js +13 -7
- package/build/features/connect/screens/MID/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/MID/MobileNumber.js +28 -10
- package/build/features/connect/screens/MID/validation.d.ts +1 -1
- package/build/features/connect/screens/MID/validation.js +3 -2
- package/build/features/connect/screens/Merchant/SocialMedia.js +1 -1
- package/build/features/connect/screens/OTP/OTPInput.js +1 -0
- package/build/features/connect/screens/OTP/validation.js +1 -1
- package/build/features/connect/screens/Password/PasswordInput.js +1 -1
- package/build/features/connect/screens/Password/validation.js +1 -1
- package/build/features/featuresScreens.d.ts +1 -1
- package/build/features/featuresScreens.js +9 -9
- package/build/features/individual/Individual.d.ts +6 -0
- package/build/features/individual/Individual.js +50 -0
- package/build/features/individual/index.d.ts +1 -0
- package/build/features/individual/index.js +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +8 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +81 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +10 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +81 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +40 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +45 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +45 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +9 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +87 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +35 -0
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +19 -0
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +52 -0
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +3 -0
- package/build/features/individual/screens/ShowIndividualInfo/index.js +2 -0
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +7 -0
- package/build/features/individual/screens/ShowIndividualInfo/info.js +28 -0
- package/build/features/individual/screens/Success/Success.d.ts +5 -0
- package/build/features/individual/screens/Success/Success.js +14 -0
- package/build/features/individual/screens/Success/index.d.ts +3 -0
- package/build/features/individual/screens/Success/index.js +2 -0
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +4 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -8
- package/build/features/password/screens/CreatePassword/Password.js +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +10 -1
- package/build/index.d.ts +3 -3
- package/build/index.js +4 -4
- package/package.json +120 -120
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"password_upper": "يجب ان يحتوي على الاقل حرف واحد كبير.",
|
|
113
113
|
"physical_store": "متجر ثابت (محل)",
|
|
114
114
|
"place_of_birth": "مكان الولادة",
|
|
115
|
-
"please write your first and last name": "الرجاء كتابة اسمك واسم العائلة",
|
|
115
|
+
"please write your first and last name": " الرجاء كتابة اسمك واسم العائلة بالإنجليزية",
|
|
116
116
|
"please_agree_on_recharge": " الرجاء الموافقة على سياسة حل نزاعات العمليات ",
|
|
117
117
|
"please_agree_on_refund": "الرجاء الموافقه على سياسة الاسترداد",
|
|
118
118
|
"please_choose_are_you_influncer": "الرجاء الاجابة على السؤال",
|
|
@@ -190,11 +190,21 @@
|
|
|
190
190
|
"verification_status_cancelled": "ملغية",
|
|
191
191
|
"website": "موقع",
|
|
192
192
|
"yes": "نعم",
|
|
193
|
-
"switch_to_mobile": "
|
|
194
|
-
"switch_to_id": "
|
|
195
|
-
"enter_valid_password": "
|
|
196
|
-
"password_required": "
|
|
197
|
-
"enter_brand_name_english_chars_numbers_space": "
|
|
198
|
-
"beneficiary_name_required": "
|
|
199
|
-
"bank_name_required": "
|
|
193
|
+
"switch_to_mobile": "التسجيل برقم الجوال",
|
|
194
|
+
"switch_to_id": "التسجيل برقم الهوية",
|
|
195
|
+
"enter_valid_password": " الرجاء إدخال الرقم السري بما لا يقل طوله عن {{length}}",
|
|
196
|
+
"password_required": "الرقم السري مطلوب",
|
|
197
|
+
"enter_brand_name_english_chars_numbers_space": "فضلاً كتابة احرف انجليزية او ارقام فقط",
|
|
198
|
+
"beneficiary_name_required": "اسم المستفيد مطلوب",
|
|
199
|
+
"bank_name_required": "اسم البنك مطلوب",
|
|
200
|
+
"invalid_iban_format": "الرجاء إدخال رقم ايبان صالح",
|
|
201
|
+
"beneficiary_name_invalid": "الرجاء إدخال الاسم اسم العائلة مع مسافات",
|
|
202
|
+
"select_expected_customers_serve": "- الرجاء الإختيار - ",
|
|
203
|
+
"otp_required": "الرمز المؤقت مطلوب",
|
|
204
|
+
"otp_min_length": "الرجاء إدخال الرمز المكون من 6 أرقام",
|
|
205
|
+
"employer_name_invalid": "الرجاء إدخال الاسم واسم العائلة مع مسافات",
|
|
206
|
+
"cr_required": "السجل التجاري مطلوب",
|
|
207
|
+
"cr_max_length": "طول رقم السجل التجاري يجب أن يكون {{length}}",
|
|
208
|
+
"fl_required": "رقم رخصة العمل الحر مطلوب",
|
|
209
|
+
"fl_max_length": "طول رخصة العمل الحر يجب ان يكون{{length}}"
|
|
200
210
|
}
|
|
@@ -210,5 +210,15 @@
|
|
|
210
210
|
"password_required": "Password id required",
|
|
211
211
|
"enter_brand_name_english_chars_numbers_space": "Please write English letters and numbers only. with spaces",
|
|
212
212
|
"beneficiary_name_required": "Beneficiary name is required",
|
|
213
|
-
"bank_name_required": "Bank name is required"
|
|
213
|
+
"bank_name_required": "Bank name is required",
|
|
214
|
+
"invalid_iban_format": "Please enter valid iban number",
|
|
215
|
+
"beneficiary_name_invalid": "Please enter first name and last name with space",
|
|
216
|
+
"select_expected_customers_serve": "- Please select - ",
|
|
217
|
+
"otp_required": "OTP is required",
|
|
218
|
+
"otp_min_length": "Please enter 6 digits number",
|
|
219
|
+
"employer_name_invalid": "Please enter first name and last name with space",
|
|
220
|
+
"cr_required": "CR number is required",
|
|
221
|
+
"cr_max_length": "CR number length should be {{length}}",
|
|
222
|
+
"fl_required": "Freelance number is required",
|
|
223
|
+
"fl_max_length": "Freelance number length should be {{length}}"
|
|
214
224
|
}
|
|
@@ -28,9 +28,8 @@ import Box from '@mui/material/Box';
|
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import Divider from '@mui/material/Divider';
|
|
30
30
|
import Collapse from '../Collapse';
|
|
31
|
+
import ExpandIcon from '../ExpandIcon';
|
|
31
32
|
import CalendarTodayOutlined from '@mui/icons-material/CalendarTodayOutlined';
|
|
32
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
33
|
-
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
34
33
|
import { scrollDown, scrollUp } from '../../utils';
|
|
35
34
|
import Input from '../Input';
|
|
36
35
|
import Text from '../Text';
|
|
@@ -39,14 +38,6 @@ var ContainerIcon = styled(CalendarTodayOutlined)(function (_a) {
|
|
|
39
38
|
var theme = _a.theme;
|
|
40
39
|
return (__assign(__assign({ marginInlineStart: theme.spacing(2.5) }, theme.typography.h6), { cursor: 'pointer', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
41
40
|
});
|
|
42
|
-
var ExpandMore = styled(ExpandMoreIcon)(function (_a) {
|
|
43
|
-
var theme = _a.theme;
|
|
44
|
-
return (__assign(__assign({ marginInlineEnd: theme.spacing(2) }, theme.typography.h6), { display: 'flex', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
45
|
-
});
|
|
46
|
-
var ExpandLess = styled(ExpandLessIcon)(function (_a) {
|
|
47
|
-
var theme = _a.theme;
|
|
48
|
-
return (__assign(__assign({ marginInlineEnd: theme.spacing(2) }, theme.typography.h6), { display: 'flex', width: theme.spacing(2.5), height: theme.spacing(2.5) }));
|
|
49
|
-
});
|
|
50
41
|
var Container = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
|
|
51
42
|
var theme = _a.theme, disabled = _a.disabled;
|
|
52
43
|
return ({
|
|
@@ -65,9 +56,10 @@ var InputFieldStyled = styled(Input)(function (_a) {
|
|
|
65
56
|
});
|
|
66
57
|
});
|
|
67
58
|
var ArrowIcon = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
|
|
68
|
-
var disabled = _a.disabled;
|
|
59
|
+
var theme = _a.theme, disabled = _a.disabled;
|
|
69
60
|
return ({
|
|
70
|
-
cursor: disabled ? 'auto' : 'pointer'
|
|
61
|
+
cursor: disabled ? 'auto' : 'pointer',
|
|
62
|
+
marginInlineEnd: theme.spacing(2.5)
|
|
71
63
|
});
|
|
72
64
|
});
|
|
73
65
|
var DatePicker = function (_a) {
|
|
@@ -79,9 +71,6 @@ var DatePicker = function (_a) {
|
|
|
79
71
|
setDate(defaultValue);
|
|
80
72
|
}, [defaultValue]);
|
|
81
73
|
var calenderIcon = _jsx(ContainerIcon, {});
|
|
82
|
-
var expandMoreIcon = _jsx(ExpandMore, {});
|
|
83
|
-
var expandLessIcon = _jsx(ExpandLess, {});
|
|
84
|
-
var arrowIcon = anchor ? expandLessIcon : expandMoreIcon;
|
|
85
74
|
var defaultMax = new Date();
|
|
86
75
|
var defaultMin = new Date('1900-01-01');
|
|
87
76
|
var toggleCalender = function (event) {
|
|
@@ -104,7 +93,7 @@ var DatePicker = function (_a) {
|
|
|
104
93
|
setAnchor(null);
|
|
105
94
|
onDatePicked === null || onDatePicked === void 0 ? void 0 : onDatePicked();
|
|
106
95
|
};
|
|
107
|
-
return (_jsxs(Container, __assign({ disabled: disabled, id: 'container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: disabled ? '' :
|
|
96
|
+
return (_jsxs(Container, __assign({ disabled: disabled, id: 'container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: disabled ? '' : _jsx(ExpandIcon, { anchorEl: !!anchor }) })), value: date ? formattedDate(date) : '', placeholder: 'YYYY-MM-DD', onClick: function (e) {
|
|
108
97
|
if (!disabled)
|
|
109
98
|
toggleCalender(e);
|
|
110
99
|
}, startAdornment: calenderIcon, disabled: !disabled, readOnly: readOnly, dir: dir }), _jsxs(Collapse, __assign({ in: !!anchor }, { children: [_jsx(Calendar, __assign({}, rest, { value: date, calendarType: 'Hebrew', onChange: handleOnDateChange, locale: rest.locale, maxDate: rest.maxDate || defaultMax, minDate: rest.minDate || defaultMin })), _jsx(Divider, {})] }))] })));
|
|
@@ -0,0 +1,24 @@
|
|
|
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 } from '@mui/material/styles';
|
|
14
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
15
|
+
var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
16
|
+
var _b;
|
|
17
|
+
var theme = _a.theme, anchorEl = _a.anchorEl;
|
|
18
|
+
return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', width: theme.spacing(2.25), height: theme.spacing(2.25), transform: !!anchorEl ? 'rotate(180deg)' : '' }, _b[theme.transitions.create(['transform'])] = {
|
|
19
|
+
duration: theme.transitions.duration.standard
|
|
20
|
+
}, _b)));
|
|
21
|
+
});
|
|
22
|
+
export default function CustomExpandIcon(props) {
|
|
23
|
+
return _jsx(ExpandIcon, __assign({}, props));
|
|
24
|
+
}
|
|
@@ -34,7 +34,7 @@ import Box from '@mui/material/Box';
|
|
|
34
34
|
import { SOCIAL_MEDIA_LINKS } from '../../constants/dummy';
|
|
35
35
|
var FooterStyled = styled(Box)(function (_a) {
|
|
36
36
|
var theme = _a.theme;
|
|
37
|
-
return (__assign(__assign({ direction:
|
|
37
|
+
return (__assign(__assign({ direction: 'ltr', display: 'flex', margin: theme.spacing(1.5), color: theme.palette.background.paper }, theme.typography.caption), { alignItems: 'center', justifyContent: 'center', position: 'relative', bottom: 0, marginBottom: theme.spacing(-3.75) }));
|
|
38
38
|
});
|
|
39
39
|
var FollowUsStyled = styled(Text)(function (_a) {
|
|
40
40
|
var theme = _a.theme;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BoxProps } from '@mui/material/Box';
|
|
3
3
|
export interface WarningProps extends BoxProps {
|
|
4
|
-
children
|
|
4
|
+
children: string | undefined;
|
|
5
5
|
warningType?: 'alert' | 'error';
|
|
6
6
|
}
|
|
7
7
|
declare const _default: React.MemoExoticComponent<{
|
|
8
8
|
({ children, warningType, ...rest }: WarningProps): JSX.Element;
|
|
9
9
|
defaultProps: {
|
|
10
10
|
warningType: string;
|
|
11
|
-
children: string;
|
|
12
11
|
};
|
|
13
12
|
}>;
|
|
14
13
|
export default _default;
|
|
@@ -37,7 +37,6 @@ var WarningComponent = function (_a) {
|
|
|
37
37
|
return warningType === 'alert' ? (_jsx(AlertStyled, __assign({}, rest, { children: children }))) : (_jsx(ErrorStyled, __assign({}, rest, { children: children })));
|
|
38
38
|
};
|
|
39
39
|
WarningComponent.defaultProps = {
|
|
40
|
-
warningType: 'error'
|
|
41
|
-
children: 'default warning message'
|
|
40
|
+
warningType: 'error'
|
|
42
41
|
};
|
|
43
42
|
export default React.memo(WarningComponent);
|
package/build/constants/app.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const EXTERNAL_LINKS: {
|
|
|
13
13
|
};
|
|
14
14
|
export declare const CONNECT_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
15
15
|
export declare const BUSINESS_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const INDIVIDUAL_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
17
17
|
export declare const PASSWORD_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
18
18
|
export declare const BANK_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
|
19
19
|
export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
|
package/build/constants/app.js
CHANGED
|
@@ -98,23 +98,23 @@ export var BUSINESS_SCREENS_NAVIGATION = [
|
|
|
98
98
|
order: 6
|
|
99
99
|
}
|
|
100
100
|
];
|
|
101
|
-
export var
|
|
101
|
+
export var INDIVIDUAL_SCREENS_NAVIGATION = [
|
|
102
102
|
{
|
|
103
|
-
name: '
|
|
104
|
-
next: '
|
|
103
|
+
name: 'INDIVIDUAL_SHOW_INDIVIDUAL_INFO_STEP',
|
|
104
|
+
next: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
105
105
|
prev: '',
|
|
106
106
|
order: 1
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
|
-
name: '
|
|
110
|
-
next: '
|
|
111
|
-
prev: '
|
|
109
|
+
name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
110
|
+
next: 'INDIVIDUAL_SUCCESS_STEP',
|
|
111
|
+
prev: 'INDIVIDUAL_SHOW_INDIVIDUAL_INFO_STEP',
|
|
112
112
|
order: 2
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
name: '
|
|
115
|
+
name: 'INDIVIDUAL_SUCCESS_STEP',
|
|
116
116
|
next: '',
|
|
117
|
-
prev: '
|
|
117
|
+
prev: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
118
118
|
order: 2
|
|
119
119
|
}
|
|
120
120
|
];
|
package/build/constants/dummy.js
CHANGED
|
@@ -54,7 +54,7 @@ export var defaultCountry = {
|
|
|
54
54
|
geoNameId: '102358',
|
|
55
55
|
idd_prefix: 966,
|
|
56
56
|
logo: 'https://back-end.b-cdn.net/country/png/SA.png',
|
|
57
|
-
digits:
|
|
57
|
+
digits: 9,
|
|
58
58
|
supported_by_tap: true
|
|
59
59
|
};
|
|
60
60
|
export var businessCountries = [
|
|
@@ -107,7 +107,7 @@ export var businessCountries = [
|
|
|
107
107
|
geoNameId: '102358',
|
|
108
108
|
idd_prefix: 966,
|
|
109
109
|
logo: 'https://back-end.b-cdn.net/country/png/SA.png',
|
|
110
|
-
digits:
|
|
110
|
+
digits: 9,
|
|
111
111
|
supported_by_tap: true
|
|
112
112
|
},
|
|
113
113
|
{
|
|
@@ -367,7 +367,7 @@ export var countriesCode = [
|
|
|
367
367
|
geoNameId: '102358',
|
|
368
368
|
idd_prefix: 966,
|
|
369
369
|
logo: 'https://back-end.b-cdn.net/country/png/SA.png',
|
|
370
|
-
digits:
|
|
370
|
+
digits: 9,
|
|
371
371
|
supported_by_tap: true
|
|
372
372
|
},
|
|
373
373
|
{
|
|
@@ -3,7 +3,7 @@ import Input from '../../../shared/Input';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useController, useFormContext } from 'react-hook-form';
|
|
5
5
|
import { styled } from '@mui/material';
|
|
6
|
-
import {
|
|
6
|
+
import { removeOnlyNumbers } from '../../../../utils';
|
|
7
7
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
8
8
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
9
9
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
@@ -23,7 +23,7 @@ var Beneficiary = function () {
|
|
|
23
23
|
var error = (_b = beneficiaryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
24
24
|
var handleBeneficiaryChange = function (_a) {
|
|
25
25
|
var target = _a.target;
|
|
26
|
-
var value =
|
|
26
|
+
var value = removeOnlyNumbers(target.value);
|
|
27
27
|
beneficiaryControl.field.onChange(value);
|
|
28
28
|
};
|
|
29
29
|
var clearValue = function () {
|
|
@@ -2,13 +2,13 @@ import * as yup from 'yup';
|
|
|
2
2
|
export var BankValidation = yup.object().shape({
|
|
3
3
|
iban: yup
|
|
4
4
|
.string()
|
|
5
|
-
.matches(/^[a-zA-Z]{2}\d{14,}$/g)
|
|
6
|
-
.min(16)
|
|
7
|
-
.max(34)
|
|
5
|
+
.matches(/^[a-zA-Z]{2}\d{14,}$/g, 'invalid_iban_format')
|
|
6
|
+
.min(16, 'invalid_iban_format')
|
|
7
|
+
.max(34, 'invalid_iban_format')
|
|
8
8
|
.required('alert_iban'),
|
|
9
9
|
bankName: yup.string().required('bank_name_required'),
|
|
10
10
|
beneficiaryName: yup
|
|
11
11
|
.string()
|
|
12
|
-
.matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g)
|
|
12
|
+
.matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g, 'beneficiary_name_invalid')
|
|
13
13
|
.required('beneficiary_name_required')
|
|
14
14
|
});
|
|
@@ -17,22 +17,6 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
17
17
|
hide?: boolean | undefined;
|
|
18
18
|
warningType?: "alert" | "error" | undefined;
|
|
19
19
|
} & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
20
|
-
export declare const ExpandIcon: import("@emotion/styled").StyledComponent<{
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
|
|
24
|
-
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
|
-
htmlColor?: string | undefined;
|
|
26
|
-
inheritViewBox?: boolean | undefined;
|
|
27
|
-
shapeRendering?: string | undefined;
|
|
28
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
29
|
-
titleAccess?: string | undefined;
|
|
30
|
-
viewBox?: string | undefined;
|
|
31
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "type" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "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" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "name" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
32
|
-
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
33
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
34
|
-
anchorEl: HTMLElement | null;
|
|
35
|
-
}, {}, {}>;
|
|
36
20
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
37
21
|
children?: React.ReactNode;
|
|
38
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
@@ -35,7 +35,6 @@ import Box from '@mui/material/Box';
|
|
|
35
35
|
import { alpha, styled } from '@mui/material/styles';
|
|
36
36
|
import Text from '../../../../components/Text';
|
|
37
37
|
import Input from '../../../../components/Input';
|
|
38
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
39
38
|
import { useTranslation } from 'react-i18next';
|
|
40
39
|
import { useController, useFormContext } from 'react-hook-form';
|
|
41
40
|
import { useLanguage } from '../../../../hooks';
|
|
@@ -43,16 +42,10 @@ import { ACTIVITIES } from '../../../../constants';
|
|
|
43
42
|
import { BusinessType } from '../../../../@types';
|
|
44
43
|
import Collapse from '../../../../components/Collapse';
|
|
45
44
|
import SimpleList from '../../../../components/SimpleList';
|
|
45
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
46
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
46
47
|
import CheckIcon from '@mui/icons-material/Check';
|
|
47
48
|
import { MandatoryStyled } from './SalesChannels';
|
|
48
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
49
|
-
var theme = _a.theme;
|
|
50
|
-
return ({
|
|
51
|
-
display: 'flex',
|
|
52
|
-
flexDirection: 'column',
|
|
53
|
-
direction: theme.direction
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
49
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
57
50
|
var theme = _a.theme;
|
|
58
51
|
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
@@ -66,13 +59,6 @@ export var InputStyled = styled(Input)(function (_a) {
|
|
|
66
59
|
}
|
|
67
60
|
});
|
|
68
61
|
});
|
|
69
|
-
export var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
70
|
-
var _b;
|
|
71
|
-
var theme = _a.theme, anchorEl = _a.anchorEl;
|
|
72
|
-
return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', transform: !!anchorEl ? 'rotate(180deg)' : '', paddingInlineStart: !!anchorEl ? theme.spacing(0) : theme.spacing(1), paddingInlineEnd: !!anchorEl ? theme.spacing(1) : theme.spacing(0) }, _b[theme.transitions.create(['transform'])] = {
|
|
73
|
-
duration: theme.transitions.duration.standard
|
|
74
|
-
}, _b)));
|
|
75
|
-
});
|
|
76
62
|
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
77
63
|
height: 'fit-content'
|
|
78
64
|
}); });
|
|
@@ -129,7 +115,7 @@ var ActivitiesList = function (_a) {
|
|
|
129
115
|
var getSelectedActivityFlag = function (item) {
|
|
130
116
|
return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === (item === null || item === void 0 ? void 0 : item.id); });
|
|
131
117
|
};
|
|
132
|
-
return (_jsxs(
|
|
118
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_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: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
133
119
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.name : item === null || item === void 0 ? void 0 : item.nameEn })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
|
|
134
120
|
} }) }))] })] }));
|
|
135
121
|
};
|
|
@@ -35,6 +35,7 @@ var CRNumber = function (_a) {
|
|
|
35
35
|
crNumberControl.field.onChange('');
|
|
36
36
|
};
|
|
37
37
|
var crNumberValue = crNumberControl.field.value;
|
|
38
|
-
|
|
38
|
+
var error = (_b = crNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
39
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('enter_commercial_register_no'), onChange: handleFLNumberChange, inputProps: { maxLength: CR_NUMBER_LENGTH }, value: crNumberValue, endAdornment: (crNumberValue === null || crNumberValue === void 0 ? void 0 : crNumberValue.length) === CR_NUMBER_LENGTH ? (_jsx(CheckIcon, {})) : (crNumberValue && _jsx(ClearIcon, { onClick: clearCRNumber })), placeholder: '0123456789', warningType: 'alert', warningMessage: error && t(error, { length: CR_NUMBER_LENGTH }) }) }) })));
|
|
39
40
|
};
|
|
40
41
|
export default React.memo(CRNumber);
|
|
@@ -28,11 +28,11 @@ import Box from '@mui/material/Box';
|
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { useLanguage } from '../../../../hooks';
|
|
30
30
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
31
|
-
import ExpandIcon from '../../../shared/ExpandIcon';
|
|
32
31
|
import Input from '../../../shared/Input';
|
|
33
32
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
33
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
34
|
import Text from '../../../../components/Text';
|
|
35
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
36
|
import Collapse from '../../../../components/Collapse';
|
|
37
37
|
import { OTHER_CR_LICENSE } from '../../../../constants';
|
|
38
38
|
import CRNumber from './CRNumber';
|
|
@@ -35,6 +35,7 @@ var FLNumber = function (_a) {
|
|
|
35
35
|
flNumberControl.field.onChange('');
|
|
36
36
|
};
|
|
37
37
|
var flNumberValue = flNumberControl.field.value;
|
|
38
|
-
|
|
38
|
+
var error = (_b = flNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
39
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('enter_license_no'), onChange: handleFLNumberChange, inputProps: { maxLength: FL_NUMBER_LENGTH }, value: flNumberValue, endAdornment: (flNumberValue === null || flNumberValue === void 0 ? void 0 : flNumberValue.length) === FL_NUMBER_LENGTH ? (_jsx(CheckIcon, {})) : (flNumberValue && _jsx(ClearIcon, { onClick: clearFLNumber })), placeholder: '12345678', warningType: 'alert', warningMessage: error && t(error, { length: FL_NUMBER_LENGTH }) }) }) })));
|
|
39
40
|
};
|
|
40
41
|
export default React.memo(FLNumber);
|
|
@@ -31,7 +31,7 @@ import Collapse from '../../../../components/Collapse';
|
|
|
31
31
|
import { useLanguage } from '../../../../hooks';
|
|
32
32
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
|
-
import ExpandIcon from '
|
|
34
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
35
35
|
import Input from '../../../shared/Input';
|
|
36
36
|
import { OTHER_FL_LICENSE } from '../../../../constants';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { FL_NUMBER_LENGTH, CR_NUMBER_LENGTH } from '../../../../constants';
|
|
3
3
|
export var FLValidationSchema = yup.object().shape({
|
|
4
|
-
flNumber: yup
|
|
5
|
-
.string()
|
|
6
|
-
.min(FL_NUMBER_LENGTH, "Freelance number length should be ".concat(FL_NUMBER_LENGTH))
|
|
7
|
-
.required('Freelance number is required')
|
|
4
|
+
flNumber: yup.string().min(FL_NUMBER_LENGTH, "fl_max_length").required('fl_required')
|
|
8
5
|
});
|
|
9
6
|
export var CRValidationSchema = yup.object().shape({
|
|
10
|
-
crNumber: yup
|
|
11
|
-
.string()
|
|
12
|
-
.min(CR_NUMBER_LENGTH, "CR number length should be ".concat(CR_NUMBER_LENGTH))
|
|
13
|
-
.required('CR number is required')
|
|
7
|
+
crNumber: yup.string().min(CR_NUMBER_LENGTH, "cr_max_length").required('cr_required')
|
|
14
8
|
});
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const BoxStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
component?: React.ElementType<any> | undefined;
|
|
5
|
-
ref?: React.Ref<unknown> | undefined;
|
|
6
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
2
|
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
11
3
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
12
4
|
children?: React.ReactNode;
|
|
@@ -25,22 +17,6 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
25
17
|
hide?: boolean | undefined;
|
|
26
18
|
warningType?: "alert" | "error" | undefined;
|
|
27
19
|
} & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
28
|
-
export declare const ExpandIcon: import("@emotion/styled").StyledComponent<{
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
31
|
-
color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
|
|
32
|
-
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
33
|
-
htmlColor?: string | undefined;
|
|
34
|
-
inheritViewBox?: boolean | undefined;
|
|
35
|
-
shapeRendering?: string | undefined;
|
|
36
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
37
|
-
titleAccess?: string | undefined;
|
|
38
|
-
viewBox?: string | undefined;
|
|
39
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "type" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "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" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "name" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
40
|
-
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
41
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
42
|
-
anchorEl: HTMLElement | null;
|
|
43
|
-
}, {}, {}>;
|
|
44
20
|
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
45
21
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
46
22
|
children?: React.ReactNode;
|
|
@@ -29,19 +29,12 @@ import { styled, alpha } from '@mui/material/styles';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import Collapse from '../../../../components/Collapse';
|
|
31
31
|
import CheckIcon from '@mui/icons-material/Check';
|
|
32
|
-
import
|
|
32
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
33
33
|
import Input from '../../../../components/Input';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
35
36
|
import { useLanguage } from '../../../../hooks';
|
|
36
37
|
import { CUSTOMER_LOCATIONS } from '../../../../constants';
|
|
37
|
-
export var BoxStyled = styled(Box)(function (_a) {
|
|
38
|
-
var theme = _a.theme;
|
|
39
|
-
return ({
|
|
40
|
-
direction: theme.direction,
|
|
41
|
-
display: 'flex',
|
|
42
|
-
flexDirection: 'column'
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
38
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
46
39
|
var theme = _a.theme;
|
|
47
40
|
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
@@ -55,13 +48,6 @@ export var InputStyled = styled(Input)(function (_a) {
|
|
|
55
48
|
}
|
|
56
49
|
});
|
|
57
50
|
});
|
|
58
|
-
export var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
59
|
-
var _b;
|
|
60
|
-
var theme = _a.theme, anchorEl = _a.anchorEl;
|
|
61
|
-
return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', transform: !!anchorEl ? 'rotate(180deg)' : '', paddingInlineStart: !!anchorEl ? theme.spacing(0) : theme.spacing(1), paddingInlineEnd: !!anchorEl ? theme.spacing(1) : theme.spacing(0) }, _b[theme.transitions.create(['transform'])] = {
|
|
62
|
-
duration: theme.transitions.duration.standard
|
|
63
|
-
}, _b)));
|
|
64
|
-
});
|
|
65
51
|
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
66
52
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
67
53
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -115,7 +101,7 @@ var customerLocations = function (_a) {
|
|
|
115
101
|
};
|
|
116
102
|
var customerLocationsValue = customerLocationsControl.field.value;
|
|
117
103
|
var customerLocationSelected = customerLocationsValue[customerLocationsValue.length - 1];
|
|
118
|
-
return (_jsxs(
|
|
104
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.nameAR : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.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: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
|
|
119
105
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.nameAR : item.name })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
|
|
120
106
|
} }) }))] }));
|
|
121
107
|
};
|