@tap-payments/auth-jsconnect 1.0.13 → 1.0.14

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 (97) hide show
  1. package/build/assets/locales/ar.json +190 -88
  2. package/build/assets/locales/en.json +206 -90
  3. package/build/components/DatePicker/DatePicker.js +3 -3
  4. package/build/components/Loader/Loader.js +2 -2
  5. package/build/constants/app.js +28 -4
  6. package/build/features/bank/screens/BankDetails/BankName.js +1 -1
  7. package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
  8. package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
  9. package/build/features/bank/screens/BankDetails/validation.js +8 -3
  10. package/build/features/bank/screens/Success/Success.d.ts +5 -0
  11. package/build/features/bank/screens/Success/Success.js +14 -0
  12. package/build/features/bank/screens/Success/index.d.ts +3 -0
  13. package/build/features/bank/screens/Success/index.js +2 -0
  14. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  15. package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
  16. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  17. package/build/features/business/screens/Activities/validation.js +3 -3
  18. package/build/features/business/screens/BusinessType/CRNumber.js +1 -1
  19. package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
  20. package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
  21. package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
  22. package/build/features/business/screens/BusinessType/SelectType.js +1 -1
  23. package/build/features/business/screens/Confirm/Confirm.js +1 -1
  24. package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
  25. package/build/features/business/screens/Customers/Customers.js +5 -41
  26. package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
  27. package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -6
  28. package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
  29. package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
  30. package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
  31. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  32. package/build/features/business/screens/Customers/validation.js +10 -5
  33. package/build/features/business/screens/IDBOD/ID.js +1 -1
  34. package/build/features/business/screens/IDBOD/validation.js +6 -2
  35. package/build/features/business/screens/OTP/OTP.js +18 -58
  36. package/build/features/business/screens/OTP/OTPInput.js +8 -21
  37. package/build/features/business/screens/Success/Success.js +1 -2
  38. package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
  39. package/build/features/business/screens/VerifyNumber/OTPInput.js +12 -42
  40. package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
  41. package/build/features/connect/screens/Individual/Email.js +7 -1
  42. package/build/features/connect/screens/Individual/Individual.js +0 -28
  43. package/build/features/connect/screens/Individual/Name.js +9 -3
  44. package/build/features/connect/screens/Individual/validation.js +5 -2
  45. package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
  46. package/build/features/connect/screens/MID/IDNumber.js +2 -2
  47. package/build/features/connect/screens/MID/MID.js +1 -1
  48. package/build/features/connect/screens/MID/MobileNumber.js +7 -1
  49. package/build/features/connect/screens/MID/validation.js +7 -3
  50. package/build/features/connect/screens/Merchant/BrandName.js +3 -1
  51. package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
  52. package/build/features/connect/screens/Merchant/TAC.js +1 -1
  53. package/build/features/connect/screens/Merchant/validation.d.ts +9 -9
  54. package/build/features/connect/screens/Merchant/validation.js +42 -11
  55. package/build/features/connect/screens/OTP/OTP.js +4 -3
  56. package/build/features/connect/screens/OTP/OTPInput.js +1 -1
  57. package/build/features/connect/screens/OTP/validation.js +1 -1
  58. package/build/features/connect/screens/Password/PasswordInput.js +2 -1
  59. package/build/features/connect/screens/Password/validation.js +1 -1
  60. package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
  61. package/build/features/featuresScreens.js +20 -0
  62. package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +1 -1
  63. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +1 -1
  64. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +7 -2
  65. package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +1 -1
  66. package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +1 -1
  67. package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +1 -1
  68. package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +1 -1
  69. package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +6 -3
  70. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
  71. package/build/features/owner/screens/Success/Success.d.ts +5 -0
  72. package/build/features/owner/screens/Success/Success.js +14 -0
  73. package/build/features/owner/screens/Success/index.d.ts +3 -0
  74. package/build/features/owner/screens/Success/index.js +2 -0
  75. package/build/features/password/Password.js +2 -2
  76. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -1
  77. package/build/features/password/screens/CreatePassword/Password.js +2 -1
  78. package/build/features/password/screens/CreatePassword/validation.js +3 -3
  79. package/build/features/password/screens/Success/Success.d.ts +5 -0
  80. package/build/features/password/screens/Success/Success.js +14 -0
  81. package/build/features/password/screens/Success/index.d.ts +3 -0
  82. package/build/features/password/screens/Success/index.js +2 -0
  83. package/build/features/shared/Button/Button.js +7 -1
  84. package/build/features/shared/Footer/Footer.js +1 -1
  85. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  86. package/build/features/tax/screens/Success/Success.d.ts +5 -0
  87. package/build/features/tax/screens/Success/Success.js +14 -0
  88. package/build/features/tax/screens/Success/index.d.ts +3 -0
  89. package/build/features/tax/screens/Success/index.js +2 -0
  90. package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
  91. package/build/features/tax/screens/TaxDetails/validation.js +1 -1
  92. package/build/utils/string.js +2 -2
  93. package/package.json +1 -1
  94. package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
  95. package/build/features/business/screens/OTP/OTPTimer.js +0 -20
  96. package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
  97. package/build/features/business/screens/VerifyNumber/OTPTimer.js +0 -20
@@ -49,6 +49,6 @@ var TitleStyled = styled(Text)(function (_a) {
49
49
  });
50
50
  var ThankYou = function (_a) {
51
51
  var onSuccess = _a.onSuccess, title = _a.title;
52
- return (_jsxs(Container, __assign({ sx: { alignItems: 'center' } }, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(ButtonStyled, __assign({ onClick: onSuccess }, { children: _jsx("img", { src: ICONS_NAMES.SUCCESS, alt: 'success Icon' }) }))] })));
52
+ return (_jsxs(Container, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(Container, __assign({ sx: { alignItems: 'center' } }, { children: _jsx(ButtonStyled, __assign({ onClick: onSuccess }, { children: _jsx("img", { src: ICONS_NAMES.SUCCESS, alt: 'success Icon' }) })) }))] }));
53
53
  };
54
54
  export default React.memo(ThankYou);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface SuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: SuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var Success = function (_a) {
6
+ var t = useTranslation().t;
7
+ var onSuccess = function () {
8
+ console.log('success');
9
+ alert('Account created successfully, please check your email');
10
+ alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
11
+ };
12
+ return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
13
+ };
14
+ export default React.memo(Success);
@@ -0,0 +1,3 @@
1
+ import Success, { SuccessProps } from './Success';
2
+ export type { SuccessProps };
3
+ export default Success;
@@ -0,0 +1,2 @@
1
+ import Success from './Success';
2
+ export default Success;
@@ -6,22 +6,21 @@ import { useController, useFormContext } from 'react-hook-form';
6
6
  import { VAT_ID_LENGTH } from '../../../../constants';
7
7
  import ClearIcon from '../../../shared/ClearIcon';
8
8
  import CheckIcon from '../../../shared/CheckIcon';
9
- import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
9
+ import { removeAllCharsFromNumber } from '../../../../utils';
10
10
  var VATId = function () {
11
11
  var _a;
12
12
  var t = useTranslation().t;
13
13
  var control = useFormContext().control;
14
14
  var vatControl = useController({ name: 'vatId', control: control });
15
15
  var handleOnChange = function (vat) {
16
- var value = removeAllOtherThanCharsAndNumber(vat);
16
+ var value = removeAllCharsFromNumber(vat);
17
17
  vatControl.field.onChange(value);
18
18
  };
19
19
  var vatValue = vatControl.field.value;
20
20
  var vatError = (_a = vatControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
21
- var hasError = !!vatError;
22
21
  var clearValue = function () {
23
22
  vatControl.field.onChange('');
24
23
  };
25
- return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('vat_id_label'), inputProps: { maxLength: VAT_ID_LENGTH }, value: vatValue, onChange: function (event) { return handleOnChange(event.target.value); }, placeholder: '00000000000', warningType: 'alert', warningMessage: vatError, required: true, endAdornment: !hasError && vatValue ? _jsx(CheckIcon, {}) : vatValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
24
+ return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('vat_id'), inputProps: { maxLength: VAT_ID_LENGTH }, value: vatValue, onChange: function (event) { return handleOnChange(event.target.value); }, placeholder: '00000000000', warningType: 'alert', warningMessage: vatError && t(vatError), required: true, endAdornment: !vatError && vatValue ? _jsx(CheckIcon, {}) : vatValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
26
25
  };
27
26
  export default VATId;
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var Validation = yup.object().shape({
3
- vatId: yup.string().min(9).max(15).required('VAT ID is required')
3
+ vatId: yup.string().min(9, 'alert_vat').max(15, 'alert_vat').required('alert_vat')
4
4
  });
@@ -1,8 +1,8 @@
1
1
  export var string = '';
2
2
  export var maskPhone = function (str) {
3
3
  if (str === void 0) { str = ''; }
4
- var first = str.substring(0, 5);
5
- var lastTwo = str.substring(11, str.length);
4
+ var first = str.substring(0, 1);
5
+ var lastTwo = str.substring(str.length - 2, str.length);
6
6
  return first + '••••' + lastTwo;
7
7
  };
8
8
  export var maskID = function (str) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface TimerProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: TimerProps) => JSX.Element>;
5
- export default _default;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import Box from '@mui/material/Box/Box';
4
- import { styled } from '@mui/material/styles';
5
- import { useTranslation } from 'react-i18next';
6
- import OTPTimer from '../../../../components/OTPTimer';
7
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
8
- var BoxStyled = styled(Box)(function (_a) {
9
- var theme = _a.theme;
10
- return ({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- padding: theme.spacing(2.5, 0, 6.5, 0)
14
- });
15
- });
16
- var Timer = function (_a) {
17
- var t = useTranslation().t;
18
- return (_jsx(BoxStyled, { children: _jsx(OTPTimer, { timeEndLabel: t('resend_otp'), timeInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { } }) }));
19
- };
20
- export default React.memo(Timer);
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface TimerProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: TimerProps) => JSX.Element>;
5
- export default _default;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import Box from '@mui/material/Box/Box';
4
- import { styled } from '@mui/material/styles';
5
- import { useTranslation } from 'react-i18next';
6
- import OTPTimer from '../../../../components/OTPTimer';
7
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
8
- var BoxStyled = styled(Box)(function (_a) {
9
- var theme = _a.theme;
10
- return ({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- padding: theme.spacing(2.5, 0, 3.75, 0)
14
- });
15
- });
16
- var Timer = function (_a) {
17
- var t = useTranslation().t;
18
- return (_jsx(BoxStyled, { children: _jsx(OTPTimer, { timeEndLabel: t('resend_otp'), timeInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { } }) }));
19
- };
20
- export default React.memo(Timer);