@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.
Files changed (82) hide show
  1. package/build/@types/app.d.ts +5 -0
  2. package/build/assets/locales/ar.json +26 -10
  3. package/build/assets/locales/en.json +21 -5
  4. package/build/components/AnimationFlow/Dialog.js +12 -1
  5. package/build/components/DatePicker/DatePicker.d.ts +3 -1
  6. package/build/components/DatePicker/DatePicker.js +5 -2
  7. package/build/components/Radio/Radio.d.ts +5 -0
  8. package/build/components/Radio/Radio.js +31 -0
  9. package/build/components/Radio/index.d.ts +3 -0
  10. package/build/components/Radio/index.js +2 -0
  11. package/build/components/RadioGroup/RadioGroup.d.ts +5 -0
  12. package/build/components/RadioGroup/RadioGroup.js +41 -0
  13. package/build/components/RadioGroup/index.d.ts +3 -0
  14. package/build/components/RadioGroup/index.js +2 -0
  15. package/build/components/RadioLabel/RadioLabel.d.ts +7 -0
  16. package/build/components/RadioLabel/RadioLabel.js +34 -0
  17. package/build/components/RadioLabel/index.d.ts +3 -0
  18. package/build/components/RadioLabel/index.js +2 -0
  19. package/build/constants/app.js +5 -17
  20. package/build/constants/dummy.d.ts +5 -0
  21. package/build/constants/dummy.js +8 -0
  22. package/build/features/bank/Bank.js +1 -1
  23. package/build/features/business/Business.js +1 -1
  24. package/build/features/business/screens/Activities/Activities.js +14 -40
  25. package/build/features/business/screens/Activities/OperationStartDate.d.ts +6 -0
  26. package/build/features/business/screens/Activities/OperationStartDate.js +31 -0
  27. package/build/features/business/screens/Activities/SalesChannels.js +3 -10
  28. package/build/features/business/screens/Activities/validation.d.ts +3 -0
  29. package/build/features/business/screens/Activities/validation.js +3 -2
  30. package/build/features/business/screens/BusinessType/BusinessType.js +2 -2
  31. package/build/features/business/screens/IDBOD/DOB.d.ts +2 -1
  32. package/build/features/business/screens/IDBOD/DOB.js +4 -1
  33. package/build/features/business/screens/IDBOD/ID.js +7 -48
  34. package/build/features/business/screens/IDBOD/IDBOD.js +9 -41
  35. package/build/features/business/screens/IDBOD/validation.js +2 -2
  36. package/build/features/connect/Connect.js +1 -1
  37. package/build/features/connect/screens/MID/BusinessCountry.js +3 -3
  38. package/build/features/connect/screens/MID/IDNumber.js +9 -6
  39. package/build/features/connect/screens/MID/MID.js +2 -2
  40. package/build/features/connect/screens/MID/MobileNumber.js +7 -15
  41. package/build/features/connect/screens/MID/validation.d.ts +1 -1
  42. package/build/features/connect/screens/MID/validation.js +5 -3
  43. package/build/features/connect/screens/Merchant/BrandName.js +2 -2
  44. package/build/features/connect/screens/Merchant/TAC.js +1 -1
  45. package/build/features/connect/screens/OTP/OTP.js +1 -1
  46. package/build/features/featuresScreens.d.ts +1 -1
  47. package/build/features/featuresScreens.js +12 -7
  48. package/build/features/owner/Owner.js +1 -1
  49. package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +8 -0
  50. package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +77 -0
  51. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +10 -0
  52. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +80 -0
  53. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +6 -0
  54. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +35 -0
  55. package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +6 -0
  56. package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +45 -0
  57. package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +6 -0
  58. package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +35 -0
  59. package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +6 -0
  60. package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +45 -0
  61. package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +9 -0
  62. package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +85 -0
  63. package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +3 -0
  64. package/build/features/owner/screens/AdditionalOwnerInfo/index.js +2 -0
  65. package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +25 -0
  66. package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +32 -0
  67. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
  68. package/build/features/password/Password.js +1 -1
  69. package/build/features/shared/ExpandIcon/ExpandIcon.js +1 -1
  70. package/build/features/shared/Footer/Footer.js +1 -1
  71. package/build/features/shared/Input/Input.d.ts +0 -1
  72. package/build/features/shared/Input/Input.js +2 -5
  73. package/build/features/shared/Mandatory/Mandatory.d.ts +2 -0
  74. package/build/features/shared/Mandatory/Mandatory.js +20 -0
  75. package/build/features/shared/Mandatory/index.d.ts +2 -0
  76. package/build/features/shared/Mandatory/index.js +2 -0
  77. package/build/features/shared/OTP/OTP.js +2 -2
  78. package/build/index.css +128 -1
  79. package/build/theme/typography.js +2 -2
  80. package/build/utils/validation.d.ts +2 -0
  81. package/build/utils/validation.js +6 -0
  82. package/package.json +1 -1
@@ -97,4 +97,9 @@ export interface SalesChannel {
97
97
  name: string;
98
98
  nameEn: string;
99
99
  }
100
+ export interface SourceOfIncome {
101
+ id: number;
102
+ name: string;
103
+ nameEn: string;
104
+ }
100
105
  export {};
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "language": "العربية",
3
3
  "locale": "ar",
4
- "follow_us": "Follow us",
5
- "business_country_label": "Business Country",
6
- "business_country_placeholder": "Select Business Country",
4
+ "follow_us": "تابعنا",
5
+ "switch_language_label": "English",
6
+ "business_country_label": "بلد التجارة",
7
+ "business_country_placeholder": "الرجاء تحديد مقر تجارتك",
7
8
  "id_number_label": "رقم الهوية",
8
- "switch_to_mobile": "Switch to mobile number",
9
- "mobile_id_title": "Welcome to Tap Payments",
10
- "mobile_id_description": "Help us to get your information to start collecting online payments",
11
- "mobile_number_label": "Mobile number",
9
+ "id_number_label_error": "الرجاء التحقق من رقم الهوية الذي تم إدخاله",
10
+ "switch_to_mobile": "التحويل إلى رقم الهاتف",
11
+ "mobile_id_title": "اهلاً بك في تاب للمدفوعات",
12
+ "mobile_id_description": "ساعدنا في الحصول على معلوماتك لبدء تحصيل المدفوعات عبر الإنترنت",
13
+ "mobile_number_label": "رقم الجوال",
14
+ "mobile_number_error": "يرجى التحقق من الرقم المُدخل.",
12
15
  "switch_to_id": "Switch to ID number",
13
16
  "date_of_birth": "تاريخ الميلاد",
14
- "ide_opt_sent_title": "تم إرسال رقم التحقق إلى ",
17
+ "otp_sent_title": "تم إرسال رقم التحقق إلى ",
15
18
  "signup_merchant_name_label": "الاسم بالكامل",
16
19
  "signup_enter_email": "البريد الإلكتروني",
17
20
  "signin_email_placeholder": "بريدك الالكتروني",
@@ -52,7 +55,9 @@
52
55
  "activities": "الانشطة",
53
56
  "activities_selected": "انشطة مختارة",
54
57
  "category": "الفئة",
55
- "channel_of_service": "قنوات الخدمة",
58
+ "channel_of_service_label": "ما هي قنوات البيع الخاصة بك؟",
59
+ "channel_of_service_error": "الرجاء تحديد قناة واحدة على الأقل.",
60
+ "operation_start_date": "تاريخ بدء العمل",
56
61
  "vat_id_label": "الرقم الضريبي",
57
62
  "success_message": "تم إنشاء حسابك بنجاح! ",
58
63
  "iban": "ايبان",
@@ -78,5 +83,16 @@
78
83
  "password_lower": "يجب ان يحتوي على الاقل حرف واحد صغير.",
79
84
  "password_special": "يجب على الاقل ان يحتوي على رمز مميز.",
80
85
  "notify_strong_password": "رائع لديك كلمة سر قوية!",
81
- "bank_name_label": "اسم البنك"
86
+ "bank_name_label": "اسم البنك",
87
+ "yes": "نعم",
88
+ "no": "لا",
89
+ "is_close_relative_in_pep_label": "هل أنت أو أحد أقاربك شخص معرض سياسيا؟",
90
+ "are_you_an_influencer": "هل أنت شخص مؤثر؟",
91
+ "monthly_income_label": "الدخل الشهري (ريال سعودي)",
92
+ "employer_name_label": "اسم الشركة الموظِفة",
93
+ "employer_name_placeholder": "Name",
94
+ "employer_location_label": "دولة الشركة الموظِفة",
95
+ "employer_location_placeholder": "- Please select -",
96
+ "source_of_income_label": "مصدر الدخل",
97
+ "source_of_income_placeholder": "What is the source for your income?"
82
98
  }
@@ -1,17 +1,20 @@
1
1
  {
2
- "language": "English",
2
+ "language": "english",
3
3
  "locale": "en",
4
4
  "follow_us": "Follow us",
5
+ "switch_language_label": "العربية",
5
6
  "business_country_label": "Business Country",
6
7
  "business_country_placeholder": "Select Business Country",
7
8
  "id_number_label": "ID number",
9
+ "id_number_label_error": "May you please verify the entered identification number.",
8
10
  "switch_to_mobile": "Switch to mobile number",
9
11
  "mobile_id_title": "Welcome to Tap Payments",
10
12
  "mobile_id_description": "Help us to get your information to start collecting online payments",
11
13
  "mobile_number_label": "Mobile Number",
14
+ "mobile_number_error": "May you please verify the entered mobile.",
12
15
  "switch_to_id": "Switch to ID number",
13
16
  "date_of_birth": "Date of Birth",
14
- "ide_opt_sent_title": "OTP has been sent to ",
17
+ "otp_sent_title": "OTP has been sent to ",
15
18
  "signup_merchant_name_label": "Full Name",
16
19
  "signup_enter_email": "Enter Email",
17
20
  "signin_email_placeholder": "Your E-mail",
@@ -49,10 +52,12 @@
49
52
  "freelance_license_placeholder": "Choose License",
50
53
  "company_license_label": "Commercial Registration",
51
54
  "company_license_placeholder": "Choose License",
52
- "activities": "Activities",
55
+ "activities": "Business activities",
53
56
  "activities_selected": "Activities selected",
54
57
  "category": "category",
55
- "channel_of_service": "Channel of Service",
58
+ "channel_of_service_label": "What are your sales channels?",
59
+ "channel_of_service_error": "Please select at least a channel.",
60
+ "operation_start_date": "When did you start your business?",
56
61
  "vat_id_label": "Tax Identification Number (TIN)",
57
62
  "success_message": "Your account has been created successfully! ",
58
63
  "iban": "Please Enter the IBAN",
@@ -78,5 +83,16 @@
78
83
  "password_lower": "Includes at least 1 lowercase character.",
79
84
  "password_special": "Includes at least 1 special character. (!@#%)",
80
85
  "notify_strong_password": "Awesome! You have a secure password.",
81
- "bank_name_label": "Bank Name"
86
+ "bank_name_label": "Bank Name",
87
+ "yes": "Yes",
88
+ "no": "No",
89
+ "is_close_relative_in_pep_label": "Are You Or Any Of Your Relatives Politically Exposed Persons?",
90
+ "are_you_an_influencer": "Are You A Person Who Is Considered An Influencer?",
91
+ "monthly_income_label": "What Is Your Monthly Income?",
92
+ "employer_name_label": "Employer Name",
93
+ "employer_name_placeholder": "Name",
94
+ "employer_location_label": "What Is The Location Of Your Employer?",
95
+ "employer_location_placeholder": "- Please select -",
96
+ "source_of_income_label": "Source Of Income",
97
+ "source_of_income_placeholder": "What is the source for your income?"
82
98
  }
@@ -52,7 +52,18 @@ var DialogContentStyled = styled(DialogContent)(function (_a) {
52
52
  var theme = _a.theme;
53
53
  return ({
54
54
  padding: theme.spacing(0),
55
- width: '100%'
55
+ width: '100%',
56
+ '&::-webkit-scrollbar': {
57
+ width: '0px'
58
+ },
59
+ '&::-webkit-scrollbar-track': {
60
+ boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',
61
+ webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)'
62
+ },
63
+ '&::-webkit-scrollbar-thumb': {
64
+ backgroundColor: 'rgba(0,0,0,.1)',
65
+ outline: '1px solid slategrey'
66
+ }
56
67
  });
57
68
  });
58
69
  var LogoIconBoxStyled = styled(Box)(function (_a) {
@@ -4,9 +4,11 @@ import 'react-calendar/dist/Calendar.css';
4
4
  import './customStyle.css';
5
5
  export interface DatePickerProps extends CalendarProps {
6
6
  onDateChange?: (date: string) => void;
7
+ onClick?: () => void;
8
+ onDatePicked?: () => void;
7
9
  disabled?: boolean;
8
10
  readOnly?: boolean;
9
11
  dir?: string;
10
12
  }
11
- declare const _default: React.MemoExoticComponent<({ onDateChange, disabled, readOnly, dir, defaultValue, ...rest }: DatePickerProps) => JSX.Element>;
13
+ declare const _default: React.MemoExoticComponent<({ onDateChange, disabled, readOnly, onClick, onDatePicked, dir, defaultValue, ...rest }: DatePickerProps) => JSX.Element>;
12
14
  export default _default;
@@ -33,8 +33,8 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
33
33
  import ExpandLessIcon from '@mui/icons-material/ExpandLess';
34
34
  import { scrollDown, scrollUp } from '../../utils';
35
35
  import Input from '../Input';
36
- import './customStyle.css';
37
36
  import Text from '../Text';
37
+ import './customStyle.css';
38
38
  var ContainerIcon = styled(CalendarTodayOutlined)(function (_a) {
39
39
  var theme = _a.theme;
40
40
  return (__assign(__assign({ paddingInlineStart: theme.spacing(2.5) }, theme.typography.h6), { cursor: 'pointer' }));
@@ -71,7 +71,7 @@ var ArrowIcon = styled(Text, { shouldForwardProp: function (prop) { return prop
71
71
  });
72
72
  });
73
73
  var DatePicker = function (_a) {
74
- var onDateChange = _a.onDateChange, disabled = _a.disabled, readOnly = _a.readOnly, dir = _a.dir, defaultValue = _a.defaultValue, rest = __rest(_a, ["onDateChange", "disabled", "readOnly", "dir", "defaultValue"]);
74
+ var onDateChange = _a.onDateChange, disabled = _a.disabled, readOnly = _a.readOnly, onClick = _a.onClick, onDatePicked = _a.onDatePicked, dir = _a.dir, defaultValue = _a.defaultValue, rest = __rest(_a, ["onDateChange", "disabled", "readOnly", "onClick", "onDatePicked", "dir", "defaultValue"]);
75
75
  var _b = useState(), date = _b[0], setDate = _b[1];
76
76
  var _c = React.useState(null), anchor = _c[0], setAnchor = _c[1];
77
77
  useEffect(function () {
@@ -87,11 +87,13 @@ var DatePicker = function (_a) {
87
87
  var toggleCalender = function (event) {
88
88
  var elementId = 'animation-flow-template-content';
89
89
  if (anchor) {
90
+ onDatePicked === null || onDatePicked === void 0 ? void 0 : onDatePicked();
90
91
  setTimeout(function () { return scrollDown(elementId); }, 500);
91
92
  return setAnchor(null);
92
93
  }
93
94
  setAnchor(event.currentTarget);
94
95
  setTimeout(function () { return scrollUp(elementId); }, 550);
96
+ onClick === null || onClick === void 0 ? void 0 : onClick();
95
97
  };
96
98
  var formattedDate = function (date) {
97
99
  return new Date(date).toLocaleDateString('en-CA');
@@ -100,6 +102,7 @@ var DatePicker = function (_a) {
100
102
  setDate(date);
101
103
  onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(formattedDate(date));
102
104
  setAnchor(null);
105
+ onDatePicked === null || onDatePicked === void 0 ? void 0 : onDatePicked();
103
106
  };
104
107
  return (_jsxs(Container, __assign({ disabled: disabled, id: 'container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: disabled ? '' : arrowIcon })), value: date ? formattedDate(date) : '', placeholder: 'YYYY-MM-DD', onClick: function (e) {
105
108
  if (!disabled)
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import { RadioProps } from '@mui/material/Radio';
3
+ export type { RadioProps };
4
+ declare const _default: React.MemoExoticComponent<(props: RadioProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,31 @@
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 { styled } from '@mui/material/styles';
15
+ import Radio from '@mui/material/Radio';
16
+ var RadioStyled = styled(Radio)(function (_a) {
17
+ var theme = _a.theme;
18
+ return (__assign(__assign({ padding: theme.spacing(0), height: theme.spacing(4.375), width: theme.spacing(4.375) }, theme.typography.caption), { fontWeight: theme.typography.fontWeightMedium, fontStretch: 'normal', fontStyle: 'normal', letterSpacing: 'normal', color: theme.palette.secondary.dark, '& .MuiSvgIcon-root': {
19
+ fontSize: theme.spacing(3),
20
+ width: theme.spacing(3),
21
+ height: theme.spacing(3)
22
+ }, '&.MuiRadio-colorPrimary': {
23
+ '&.Mui-checked': {
24
+ color: theme.palette.success.dark
25
+ }
26
+ } }));
27
+ });
28
+ var RadioComponent = function (props) {
29
+ return (_jsx(RadioStyled, __assign({ color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }, props)));
30
+ };
31
+ export default React.memo(RadioComponent);
@@ -0,0 +1,3 @@
1
+ import Radio, { RadioProps } from './Radio';
2
+ export type { RadioProps };
3
+ export default Radio;
@@ -0,0 +1,2 @@
1
+ import Radio from './Radio';
2
+ export default Radio;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import { RadioGroupProps } from '@mui/material/RadioGroup';
3
+ export type { RadioGroupProps };
4
+ declare const _default: React.MemoExoticComponent<({ children, ...props }: RadioGroupProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,41 @@
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 } from "react/jsx-runtime";
24
+ import * as React from 'react';
25
+ import { styled } from '@mui/material/styles';
26
+ import RadioGroup from '@mui/material/RadioGroup';
27
+ var RadioGroupStyled = styled(RadioGroup)(function (_a) {
28
+ var theme = _a.theme;
29
+ return ({
30
+ width: '100%',
31
+ flexDirection: 'row',
32
+ display: 'flex',
33
+ direction: theme.direction,
34
+ marginInlineStart: theme.spacing(0.25)
35
+ });
36
+ });
37
+ var RadioGroupComponent = function (_a) {
38
+ var children = _a.children, props = __rest(_a, ["children"]);
39
+ return _jsx(RadioGroupStyled, __assign({}, props, { children: children }));
40
+ };
41
+ export default React.memo(RadioGroupComponent);
@@ -0,0 +1,3 @@
1
+ import RadioGroup, { RadioGroupProps } from './RadioGroup';
2
+ export type { RadioGroupProps };
3
+ export default RadioGroup;
@@ -0,0 +1,2 @@
1
+ import RadioGroup from './RadioGroup';
2
+ export default RadioGroup;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface RadioLabelProps {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ declare const _default: React.MemoExoticComponent<({ label, value }: RadioLabelProps) => JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,34 @@
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 { styled, alpha } from '@mui/material/styles';
16
+ import FormControlLabel from '@mui/material/FormControlLabel';
17
+ import Radio from '../Radio';
18
+ var RadioLabelStyled = styled(FormControlLabel)(function (_a) {
19
+ var theme = _a.theme;
20
+ return ({
21
+ width: 'unset',
22
+ direction: theme.direction,
23
+ paddingInlineEnd: theme.spacing(0.625),
24
+ marginLeft: theme.direction === 'rtl' ? theme.spacing(2) : theme.spacing(-1.375),
25
+ marginRight: theme.direction === 'rtl' ? theme.spacing(-1.375) : theme.spacing(2),
26
+ '& .MuiFormControlLabel-label': __assign({ color: alpha(theme.palette.text.primary, 0.8) }, theme.typography.body2)
27
+ });
28
+ });
29
+ var RadioLabel = function (_a) {
30
+ var label = _a.label, value = _a.value;
31
+ var t = useTranslation().t;
32
+ return (_jsx(RadioLabelStyled, { value: value, control: _jsx(Radio, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }), label: t(label) }));
33
+ };
34
+ export default React.memo(RadioLabel);
@@ -0,0 +1,3 @@
1
+ import RadioLabel, { RadioLabelProps } from './RadioLabel';
2
+ export type { RadioLabelProps };
3
+ export default RadioLabel;
@@ -0,0 +1,2 @@
1
+ import RadioLabel from './RadioLabel';
2
+ export default RadioLabel;
@@ -114,7 +114,7 @@ export var OWNER_SCREENS_NAVIGATION = [
114
114
  ];
115
115
  export var PASSWORD_SCREENS_NAVIGATION = [
116
116
  {
117
- name: 'PASSWORD_NEW_PASSWORD_STEP',
117
+ name: 'PASSWORD_CREATE_PASSWORD_STEP',
118
118
  next: '',
119
119
  prev: '',
120
120
  order: 1
@@ -122,29 +122,17 @@ export var PASSWORD_SCREENS_NAVIGATION = [
122
122
  ];
123
123
  export var BANK_SCREENS_NAVIGATION = [
124
124
  {
125
- name: 'BANK_DETAILS_STEP',
126
- next: 'BANK_DETAILS_SUCCESS_STEP',
125
+ name: 'BANK_BANK_DETAILS_STEP',
126
+ next: '',
127
127
  prev: '',
128
128
  order: 1
129
- },
130
- {
131
- name: 'BANK_DETAILS_SUCCESS_STEP',
132
- next: '',
133
- prev: 'BANK_DETAILS_STEP',
134
- order: 2
135
129
  }
136
130
  ];
137
131
  export var TAX_SCREENS_NAVIGATION = [
138
132
  {
139
- name: 'TAX_DETAILS_STEP',
140
- next: 'TAX_DETAILS_SUCCESS_STEP',
133
+ name: 'TAX_TAX_DETAILS_STEP',
134
+ next: '',
141
135
  prev: '',
142
136
  order: 1
143
- },
144
- {
145
- name: 'TAX_DETAILS_SUCCESS_STEP',
146
- next: '',
147
- prev: 'TAX_DETAILS_STEP',
148
- order: 2
149
137
  }
150
138
  ];
@@ -336,3 +336,8 @@ export declare const SALES_CHANNELS: {
336
336
  nameEn: string;
337
337
  name: string;
338
338
  }[];
339
+ export declare const SOURCE_OF_INCOME: {
340
+ id: number;
341
+ name: string;
342
+ nameEn: string;
343
+ }[];
@@ -6424,3 +6424,11 @@ export var SALES_CHANNELS = [
6424
6424
  { id: 4, nameEn: 'Social Media', name: 'مواقع تواصل اجتماعي' },
6425
6425
  { id: 5, nameEn: 'Call Center', name: 'مركز اتصال' }
6426
6426
  ];
6427
+ export var SOURCE_OF_INCOME = [
6428
+ { id: 1, name: 'راتب', nameEn: 'Salary' },
6429
+ { id: 2, name: 'تمويل', nameEn: 'Investment' },
6430
+ { id: 3, name: 'ورث', nameEn: 'Inheritance / inherit' },
6431
+ { id: 4, name: 'اسهم', nameEn: 'Stocks' },
6432
+ { id: 5, name: 'تجارة', nameEn: 'Trading' },
6433
+ { id: 6, name: 'غير ذلك', nameEn: 'Other' }
6434
+ ];
@@ -34,7 +34,7 @@ var Bank = memo(function (props) {
34
34
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
35
35
  var Element = _a.element, name = _a.name;
36
36
  var isActive = activeScreen.name === name;
37
- return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
37
+ return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
38
38
  }) }) })) })));
39
39
  });
40
40
  export function BankLib(props) {
@@ -47,7 +47,7 @@ var Business = memo(function (props) {
47
47
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(Container, { children: businessFeatureScreens.map(function (_a, index) {
48
48
  var Element = _a.element, name = _a.name;
49
49
  var isActive = activeScreen.name === name;
50
- return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
50
+ return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
51
51
  }) }) })) })));
52
52
  });
53
53
  export function BusinessLib(props) {
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import Box from '@mui/material/Box';
13
+ import * as React from 'react';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import ActivitiesList from './ActivitiesList';
16
16
  import { useForm, FormProvider } from 'react-hook-form';
@@ -20,49 +20,18 @@ import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { useTranslation } from 'react-i18next';
21
21
  import { ActivitiesValidationSchema } from './validation';
22
22
  import { handleNextScreenStep } from '../../../../app/settings';
23
- import { ACTIVITIES, ICONS_NAMES, SALES_CHANNELS } from '../../../../constants';
24
- import Button from '../../../../components/Button';
25
- import Loader from '../../../../components/Loader';
26
- import Icon from '../../../../components/Icon';
23
+ import { ACTIVITIES, SALES_CHANNELS } from '../../../../constants';
24
+ import Button from '../../../shared/Button';
27
25
  import SalesChannels from './SalesChannels';
28
- var BoxStyled = styled(Box)(function (_a) {
29
- var theme = _a.theme;
30
- return ({
31
- display: 'flex',
32
- flexDirection: 'column',
33
- direction: theme.direction
34
- });
35
- });
26
+ import { ScreenContainer } from '../../../shared/Containers';
27
+ import Collapse from '../../../../components/Collapse';
28
+ import OperationStartDate from './OperationStartDate';
36
29
  var FormStyled = styled(Form)(function () { return ({
37
30
  display: 'flex',
38
31
  flexDirection: 'column'
39
32
  }); });
40
- var ButtonContainer = styled(Box)(function (_a) {
41
- var theme = _a.theme;
42
- return ({
43
- margin: theme.spacing(5, 2.5, 2.5, 2.5)
44
- });
45
- });
46
- var LoaderStyled = styled(Loader)(function (_a) {
47
- var theme = _a.theme;
48
- return ({
49
- marginInlineStart: theme.spacing(-6.25),
50
- '& .loader-box-container': {
51
- marginInlineStart: theme.spacing(2.5)
52
- }
53
- });
54
- });
55
- var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
56
- var theme = _a.theme, isAr = _a.isAr;
57
- return ({
58
- width: theme.spacing(3),
59
- height: theme.spacing(3),
60
- paddingInlineStart: theme.spacing(1.5),
61
- paddingInlineEnd: theme.spacing(0.5),
62
- transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
63
- });
64
- });
65
33
  var Activities = function () {
34
+ var _a = React.useState(false), collapse = _a[0], setCollapse = _a[1];
66
35
  var dispatch = useAppDispatch();
67
36
  var isAr = useLanguage().isAr;
68
37
  var t = useTranslation().t;
@@ -70,7 +39,8 @@ var Activities = function () {
70
39
  resolver: yupResolver(ActivitiesValidationSchema),
71
40
  defaultValues: {
72
41
  activities: [ACTIVITIES[0]],
73
- salesChannels: [SALES_CHANNELS[0]]
42
+ salesChannels: [SALES_CHANNELS[0]],
43
+ operationStartDate: '2000-01-01'
74
44
  },
75
45
  mode: 'onChange'
76
46
  });
@@ -78,6 +48,10 @@ var Activities = function () {
78
48
  console.log('data', data);
79
49
  dispatch(handleNextScreenStep());
80
50
  };
81
- return (_jsx(BoxStyled, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [!!ACTIVITIES && _jsx(ActivitiesList, {}), _jsx(SalesChannels, {}), _jsx(ButtonContainer, { children: _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', startIcon: _jsx(LoaderStyled, { innerColor: 'white', outerColor: 'white', size: 30 }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, { children: t('next') })) })] })) })) }));
51
+ var handleCollapseOpenClose = function (flag) {
52
+ console.log('flag', flag);
53
+ setCollapse(flag);
54
+ };
55
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse }, { children: [!!ACTIVITIES && _jsx(ActivitiesList, {}), _jsx(SalesChannels, {})] })), _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid }, { children: t('next') })) }))] })) })) }));
82
56
  };
83
57
  export default Activities;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface OperationStartDateProps {
3
+ onDateClicked?: (flag: boolean) => void;
4
+ }
5
+ declare const OperationStartDate: ({ onDateClicked }: OperationStartDateProps) => JSX.Element;
6
+ export default OperationStartDate;
@@ -0,0 +1,31 @@
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 { InputLabelStyled } from './ActivitiesList';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import DatePicker from '../../../../components/DatePicker';
17
+ import { ScreenContainer } from '../../../../features/shared/Containers';
18
+ import { MandatoryStyled } from './SalesChannels';
19
+ var OperationStartDate = function (_a) {
20
+ var _b;
21
+ var onDateClicked = _a.onDateClicked;
22
+ var t = useTranslation().t;
23
+ var control = useFormContext().control;
24
+ var oDateControl = useController({ control: control, name: 'operationStartDate' });
25
+ var handleOperationStartDateChange = function (data) {
26
+ oDateControl.field.onChange(data);
27
+ };
28
+ var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
29
+ return (_jsxs(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: [_jsxs(InputLabelStyled, { children: [t('operation_start_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] })));
30
+ };
31
+ export default OperationStartDate;
@@ -30,14 +30,7 @@ import { SALES_CHANNELS } from '../../../../constants';
30
30
  import CheckBox from '../../../../components/CheckBox';
31
31
  import Warning from '../../../../components/Warning';
32
32
  import Collapse from '../../../../components/Collapse';
33
- var BoxStyled = styled(Box)(function (_a) {
34
- var theme = _a.theme;
35
- return ({
36
- display: 'flex',
37
- flexDirection: 'column',
38
- direction: theme.direction
39
- });
40
- });
33
+ import { ScreenContainer } from '../../../shared/Containers';
41
34
  var InputLabelStyled = styled(Text)(function (_a) {
42
35
  var theme = _a.theme;
43
36
  return (__assign({ margin: theme.spacing(2.5, 2.5, 0.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
@@ -76,7 +69,7 @@ export var MandatoryStyled = styled('span')(function (_a) {
76
69
  export var CollapseStyled = styled(Collapse)(function (_a) {
77
70
  var theme = _a.theme;
78
71
  return ({
79
- marginBlockStart: theme.spacing(1)
72
+ marginBlockStart: theme.spacing(2)
80
73
  });
81
74
  });
82
75
  var SalesChannels = function () {
@@ -102,6 +95,6 @@ var SalesChannels = function () {
102
95
  if (channelsChecked)
103
96
  return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
104
97
  };
105
- return (_jsxs(BoxStyled, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id.toString(), disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name : channel.nameEn, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage })) }))] }));
98
+ return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service_label'), " ", _jsx(MandatoryStyled, { children: "*" })] }), channelsMenuList.map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id.toString(), disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name : channel.nameEn, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
106
99
  };
107
100
  export default SalesChannels;
@@ -38,6 +38,7 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
38
38
  name: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
39
39
  nameEn: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
40
40
  }>>[] | undefined>;
41
+ operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
41
42
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
42
43
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
43
44
  id: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
@@ -77,6 +78,7 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
77
78
  name: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
78
79
  nameEn: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
79
80
  }>>[] | undefined>;
81
+ operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
80
82
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
81
83
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
82
84
  id: yup.NumberSchema<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
@@ -116,4 +118,5 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
116
118
  name: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
117
119
  nameEn: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
118
120
  }>>[] | undefined>;
121
+ operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
119
122
  }>>>;