@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.
- package/build/assets/locales/ar.json +190 -88
- package/build/assets/locales/en.json +206 -90
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/Loader/Loader.js +2 -2
- package/build/constants/app.js +28 -4
- package/build/features/bank/screens/BankDetails/BankName.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
- package/build/features/bank/screens/BankDetails/validation.js +8 -3
- package/build/features/bank/screens/Success/Success.d.ts +5 -0
- package/build/features/bank/screens/Success/Success.js +14 -0
- package/build/features/bank/screens/Success/index.d.ts +3 -0
- package/build/features/bank/screens/Success/index.js +2 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/Activities/validation.js +3 -3
- package/build/features/business/screens/BusinessType/CRNumber.js +1 -1
- package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
- package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
- package/build/features/business/screens/BusinessType/SelectType.js +1 -1
- package/build/features/business/screens/Confirm/Confirm.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +5 -41
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
- package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
- package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +10 -5
- package/build/features/business/screens/IDBOD/ID.js +1 -1
- package/build/features/business/screens/IDBOD/validation.js +6 -2
- package/build/features/business/screens/OTP/OTP.js +18 -58
- package/build/features/business/screens/OTP/OTPInput.js +8 -21
- package/build/features/business/screens/Success/Success.js +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
- package/build/features/business/screens/VerifyNumber/OTPInput.js +12 -42
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
- package/build/features/connect/screens/Individual/Email.js +7 -1
- package/build/features/connect/screens/Individual/Individual.js +0 -28
- package/build/features/connect/screens/Individual/Name.js +9 -3
- package/build/features/connect/screens/Individual/validation.js +5 -2
- package/build/features/connect/screens/MID/BusinessCountry.js +1 -1
- package/build/features/connect/screens/MID/IDNumber.js +2 -2
- package/build/features/connect/screens/MID/MID.js +1 -1
- package/build/features/connect/screens/MID/MobileNumber.js +7 -1
- package/build/features/connect/screens/MID/validation.js +7 -3
- package/build/features/connect/screens/Merchant/BrandName.js +3 -1
- package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
- package/build/features/connect/screens/Merchant/TAC.js +1 -1
- package/build/features/connect/screens/Merchant/validation.d.ts +9 -9
- package/build/features/connect/screens/Merchant/validation.js +42 -11
- package/build/features/connect/screens/OTP/OTP.js +4 -3
- package/build/features/connect/screens/OTP/OTPInput.js +1 -1
- package/build/features/connect/screens/OTP/validation.js +1 -1
- package/build/features/connect/screens/Password/PasswordInput.js +2 -1
- package/build/features/connect/screens/Password/validation.js +1 -1
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
- package/build/features/featuresScreens.js +20 -0
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +7 -2
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +1 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +6 -3
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +1 -1
- package/build/features/owner/screens/Success/Success.d.ts +5 -0
- package/build/features/owner/screens/Success/Success.js +14 -0
- package/build/features/owner/screens/Success/index.d.ts +3 -0
- package/build/features/owner/screens/Success/index.js +2 -0
- package/build/features/password/Password.js +2 -2
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -1
- package/build/features/password/screens/CreatePassword/Password.js +2 -1
- package/build/features/password/screens/CreatePassword/validation.js +3 -3
- package/build/features/password/screens/Success/Success.d.ts +5 -0
- package/build/features/password/screens/Success/Success.js +14 -0
- package/build/features/password/screens/Success/index.d.ts +3 -0
- package/build/features/password/screens/Success/index.js +2 -0
- package/build/features/shared/Button/Button.js +7 -1
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +5 -0
- package/build/features/tax/screens/Success/Success.js +14 -0
- package/build/features/tax/screens/Success/index.d.ts +3 -0
- package/build/features/tax/screens/Success/index.js +2 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
- package/build/features/tax/screens/TaxDetails/validation.js +1 -1
- package/build/utils/string.js +2 -2
- package/package.json +1 -1
- package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
- package/build/features/business/screens/OTP/OTPTimer.js +0 -20
- package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
- 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,
|
|
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,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);
|
|
@@ -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 {
|
|
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 =
|
|
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('
|
|
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;
|
package/build/utils/string.js
CHANGED
|
@@ -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
|
-
var lastTwo = str.substring(
|
|
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,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,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);
|