@tap-payments/auth-jsconnect 1.0.90-test → 1.0.94-test
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/README.md +58 -52
- package/build/@types/app.d.ts +9 -0
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +2 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.js +1 -1
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.d.ts +2 -0
- package/build/api/axios.js +4 -2
- package/build/api/country.js +1 -1
- package/build/api/data.js +1 -1
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/app/rootReducer.d.ts +6 -7
- package/build/app/rootReducer.js +7 -9
- package/build/app/settings.d.ts +9 -3
- package/build/app/settings.js +42 -6
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/AnimationFlow/Loader.js +1 -1
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/DatePicker/customStyle.css +86 -0
- package/build/components/Footer/Footer.d.ts +0 -2
- package/build/components/Footer/Footer.js +3 -4
- package/build/components/Input/Input.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
- package/build/constants/app.d.ts +1 -2
- package/build/constants/app.js +1 -9
- package/build/features/app/bank/bankStore.d.ts +6 -2
- package/build/features/app/bank/bankStore.js +42 -5
- package/build/features/app/business/businessStore.d.ts +8 -10
- package/build/features/app/business/businessStore.js +42 -44
- package/build/features/app/connect/connectStore.d.ts +3 -8
- package/build/features/app/connect/connectStore.js +27 -61
- package/build/features/app/individual/individualStore.d.ts +7 -8
- package/build/features/app/individual/individualStore.js +53 -48
- package/build/features/app/password/passwordStore.d.ts +6 -2
- package/build/features/app/password/passwordStore.js +41 -5
- package/build/features/app/tax/taxStore.d.ts +6 -2
- package/build/features/app/tax/taxStore.js +43 -6
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +13 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +10 -9
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +3 -2
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +8 -3
- package/build/features/bank/screens/Verify/Verify.js +12 -11
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +13 -15
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +7 -7
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -9
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +8 -3
- package/build/features/business/screens/Verify/Verify.js +12 -11
- package/build/features/connect/Connect.d.ts +1 -1
- package/build/features/connect/Connect.js +14 -16
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +9 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +12 -11
- package/build/features/connect/screens/Merchant/Merchant.js +7 -7
- package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +10 -10
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +9 -9
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
- package/build/features/featuresScreens.d.ts +1 -2
- package/build/features/featuresScreens.js +30 -37
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +13 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +11 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +8 -3
- package/build/features/individual/screens/Verify/Verify.js +12 -11
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +13 -12
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +7 -7
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/Success/Success.js +3 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +8 -3
- package/build/features/password/screens/Verify/Verify.js +12 -11
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
- package/build/features/shared/Background/Background.js +3 -2
- package/build/features/shared/Background/LogoBackground.d.ts +1 -4
- package/build/features/shared/Background/LogoBackground.js +8 -39
- package/build/features/shared/Button/AbsherButton.d.ts +2 -3
- package/build/features/shared/Button/AbsherButton.js +7 -12
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +4 -3
- package/build/features/shared/Button/FlowsButtons.d.ts +5 -2
- package/build/features/shared/Button/FlowsButtons.js +14 -9
- package/build/features/shared/Button/MobileButton.d.ts +2 -3
- package/build/features/shared/Button/MobileButton.js +7 -12
- package/build/features/shared/Button/SuccessButton.js +1 -1
- package/build/features/shared/Footer/Footer.js +5 -6
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +3 -2
- package/build/features/shared/OTP/OTP.js +13 -5
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +13 -12
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -10
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +11 -8
- package/build/features/tax/screens/TaxDetails/VATId.js +18 -7
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/tax/screens/Verify/OTPInput.js +8 -3
- package/build/features/tax/screens/Verify/Verify.js +12 -11
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +7 -4
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +5 -7
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/i18n.js +1 -1
- package/build/index.css +135 -0
- package/build/index.d.ts +8 -9
- package/build/index.js +8 -11
- package/build/theme/theme.d.ts +1 -1
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +1 -1
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +22 -3
- package/package.json +127 -127
- package/build/features/Landing/Landing.d.ts +0 -7
- package/build/features/Landing/Landing.js +0 -55
- package/build/features/Landing/index.d.ts +0 -1
- package/build/features/Landing/index.js +0 -1
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
- package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
- package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
- package/build/features/app/landing/landingStore.d.ts +0 -22
- package/build/features/app/landing/landingStore.js +0 -103
|
@@ -54,18 +54,19 @@ import axios from 'axios';
|
|
|
54
54
|
import { styled, alpha } from '@mui/material/styles';
|
|
55
55
|
import InfoIcon from '@mui/icons-material/Info';
|
|
56
56
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
57
|
-
import { ScreenContainer } from '
|
|
57
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
58
58
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
59
|
-
import Text from '
|
|
60
|
-
import Input from '
|
|
61
|
-
import ClearIcon from '
|
|
62
|
-
import Tooltip from '
|
|
63
|
-
import Collapse from '
|
|
64
|
-
import { removeAllOtherThanCharsNumbersAndSpace } from '
|
|
65
|
-
import CheckIcon from '
|
|
66
|
-
import { checkBrandNameAvailability
|
|
67
|
-
import { useAppDispatch, useAppSelector } from '
|
|
59
|
+
import Text from '../../../../components/Text';
|
|
60
|
+
import Input from '../../../shared/Input';
|
|
61
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
62
|
+
import Tooltip from '../../../../components/Tooltip';
|
|
63
|
+
import Collapse from '../../../../components/Collapse';
|
|
64
|
+
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
65
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
66
|
+
import { checkBrandNameAvailability } from '../../../app/connect/connectStore';
|
|
67
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
68
68
|
import { debounce } from 'lodash-es';
|
|
69
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
69
70
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
70
71
|
var theme = _a.theme;
|
|
71
72
|
return ({
|
|
@@ -107,7 +108,7 @@ var BrandName = function (_a) {
|
|
|
107
108
|
var brandControl = useController({ control: control, name: 'brandName' });
|
|
108
109
|
var brandNameValue = brandControl.field.value;
|
|
109
110
|
var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
110
|
-
var data = useAppSelector(
|
|
111
|
+
var data = useAppSelector(settingsSelector).data;
|
|
111
112
|
var checkBrand = debounce(function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
112
113
|
var onSuccess;
|
|
113
114
|
return __generator(this, function (_a) {
|
|
@@ -15,13 +15,13 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import Collapse from '@mui/material/Collapse';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
-
import { useAppDispatch, useAppSelector } from '
|
|
19
|
-
import { handlePrevScreenStep } from '
|
|
20
|
-
import Form from '
|
|
21
|
-
import { ScreenContainer } from '
|
|
22
|
-
import Button from '
|
|
23
|
-
import { clearError, connectSelector, updateLeadBrand } from '
|
|
24
|
-
import { useLanguage } from '
|
|
18
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
20
|
+
import Form from '../../../../components/Form';
|
|
21
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
|
+
import Button from '../../../shared/Button';
|
|
23
|
+
import { clearError, connectSelector, updateLeadBrand } from '../../../app/connect/connectStore';
|
|
24
|
+
import { useLanguage } from '../../../../hooks';
|
|
25
25
|
import { MerchantValidationSchema, ValidationOptions } from './validation';
|
|
26
26
|
import BrandName from './BrandName';
|
|
27
27
|
import SocialMedia from './SocialMedia';
|
|
@@ -15,15 +15,15 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { styled, alpha } from '@mui/material/styles';
|
|
17
17
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
18
|
-
import { SocialMediaTypes } from '
|
|
19
|
-
import Input from '
|
|
20
|
-
import Text from '
|
|
21
|
-
import Collapse from '
|
|
22
|
-
import SocialMediaGroup from '
|
|
23
|
-
import { ScreenContainer } from '
|
|
24
|
-
import CheckIcon from '
|
|
25
|
-
import { useAppSelector } from '
|
|
26
|
-
import { connectSelector } from '
|
|
18
|
+
import { SocialMediaTypes } from '../../../../@types';
|
|
19
|
+
import Input from '../../../../components/Input';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import SocialMediaGroup from '../../../../components/SocialMediaGroup';
|
|
23
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
25
|
+
import { useAppSelector } from '../../../../hooks';
|
|
26
|
+
import { connectSelector } from '../../../app/connect/connectStore';
|
|
27
27
|
var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
|
|
28
28
|
var theme = _a.theme, defaultValue = _a.defaultValue;
|
|
29
29
|
return ({
|
|
@@ -16,13 +16,13 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
18
|
import Link from '@mui/material/Link';
|
|
19
|
-
import CheckBox from '
|
|
20
|
-
import { ScreenContainer } from '
|
|
21
|
-
import Text from '
|
|
22
|
-
import Warning from '
|
|
23
|
-
import { useLanguage } from '
|
|
24
|
-
import Collapse from '
|
|
25
|
-
import { EXTERNAL_LINKS } from '
|
|
19
|
+
import CheckBox from '../../../../components/CheckBox';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
+
import Text from '../../../../components/Text';
|
|
22
|
+
import Warning from '../../../../components/Warning';
|
|
23
|
+
import { useLanguage } from '../../../../hooks';
|
|
24
|
+
import Collapse from '../../../../components/Collapse';
|
|
25
|
+
import { EXTERNAL_LINKS } from '../../../../constants';
|
|
26
26
|
var TACContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -16,16 +16,16 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import { styled, alpha } from '@mui/material/styles';
|
|
19
|
-
import Collapse from '
|
|
20
|
-
import Form from '
|
|
21
|
-
import Button, { AbsherButton } from '
|
|
22
|
-
import { useAppDispatch, useAppSelector } from '
|
|
23
|
-
import { handlePrevScreenStep, settingsSelector } from '
|
|
24
|
-
import ScreenContainer from '
|
|
25
|
-
import { clearError, connectSelector, createMobileAuth } from '
|
|
26
|
-
import { useLanguage } from '
|
|
19
|
+
import Collapse from '../../../../components/Collapse';
|
|
20
|
+
import Form from '../../../../components/Form';
|
|
21
|
+
import Button, { AbsherButton } from '../../../shared/Button';
|
|
22
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
23
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
24
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
+
import { clearError, connectSelector, createMobileAuth } from '../../../app/connect/connectStore';
|
|
26
|
+
import { useLanguage } from '../../../../hooks';
|
|
27
27
|
import Divider from '@mui/material/Divider';
|
|
28
|
-
import Text from '
|
|
28
|
+
import Text from '../../../../components/Text';
|
|
29
29
|
import MIDTitle from './Title';
|
|
30
30
|
import MobileNumber from './MobileNumber';
|
|
31
31
|
import { PhoneValidationSchema } from './validation';
|
|
@@ -107,6 +107,6 @@ var Mobile = function (_a) {
|
|
|
107
107
|
var disabled = !methods.formState.isValid || !!error;
|
|
108
108
|
var title = t('join_our_community');
|
|
109
109
|
var subTitle = t('ide_terms_and_conditions_description');
|
|
110
|
-
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }
|
|
110
|
+
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') }))] }))] })) }))] }));
|
|
111
111
|
};
|
|
112
112
|
export default React.memo(Mobile);
|
|
@@ -26,18 +26,18 @@ import Box from '@mui/material/Box';
|
|
|
26
26
|
import { useTranslation } from 'react-i18next';
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
28
|
import { styled, alpha } from '@mui/material/styles';
|
|
29
|
-
import Text from '
|
|
30
|
-
import Collapse from '
|
|
31
|
-
import ClearIcon from '
|
|
32
|
-
import CheckIcon from '
|
|
33
|
-
import ScreenContainer from '
|
|
34
|
-
import { connectSelector } from '
|
|
35
|
-
import ExpandIcon from '
|
|
36
|
-
import Input from '
|
|
37
|
-
import SimpleList from '
|
|
38
|
-
import { removeAllCharsFromNumber } from '
|
|
39
|
-
import { useLanguage, useAppSelector } from '
|
|
40
|
-
import Search from '
|
|
29
|
+
import Text from '../../../../components/Text';
|
|
30
|
+
import Collapse from '../../../../components/Collapse';
|
|
31
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
32
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
33
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
+
import { connectSelector } from '../../../app/connect/connectStore';
|
|
35
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
|
+
import Input from '../../../shared/Input';
|
|
37
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
38
|
+
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
39
|
+
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
40
|
+
import Search from '../../../shared/Search';
|
|
41
41
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
42
42
|
var theme = _a.theme;
|
|
43
43
|
return ({
|
|
@@ -12,8 +12,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { styled, alpha } from '@mui/material/styles';
|
|
15
|
-
import Collapse from '
|
|
16
|
-
import Text from '
|
|
15
|
+
import Collapse from '../../../../components/Collapse';
|
|
16
|
+
import Text from '../../../../components/Text';
|
|
17
17
|
var TitleStyled = styled(Text)(function (_a) {
|
|
18
18
|
var theme = _a.theme;
|
|
19
19
|
return (__assign(__assign({ color: theme.palette.text.primary, textAlign: 'center' }, theme.typography.body1), { fontWeight: theme.typography.fontWeightMedium, lineHeight: 1.21, padding: theme.spacing(0, 3, 0, 3) }));
|
|
@@ -12,12 +12,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
|
-
import { useAppDispatch, useAppSelector } from '
|
|
16
|
-
import { ScreenContainer } from '
|
|
17
|
-
import DatePicker from '
|
|
15
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
+
import DatePicker from '../../../../components/DatePicker';
|
|
18
18
|
import { alpha, styled } from '@mui/material/styles';
|
|
19
|
-
import { clearError, connectSelector } from '
|
|
20
|
-
import Text from '
|
|
19
|
+
import { clearError, connectSelector } from '../../../app/connect/connectStore';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
21
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
22
|
var theme = _a.theme;
|
|
23
23
|
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
@@ -15,14 +15,14 @@ import Box from '@mui/material/Box';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
|
-
import Text from '
|
|
19
|
-
import Input from '
|
|
20
|
-
import ClearIcon from '
|
|
21
|
-
import CheckIcon from '
|
|
22
|
-
import Collapse from '
|
|
23
|
-
import ScreenContainer from '
|
|
24
|
-
import { removeAllCharsFromNumber } from '
|
|
25
|
-
import { ID_NUMBER_LENGTH } from '
|
|
18
|
+
import Text from '../../../../components/Text';
|
|
19
|
+
import Input from '../../../shared/Input';
|
|
20
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
21
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
22
|
+
import Collapse from '../../../../components/Collapse';
|
|
23
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
25
|
+
import { ID_NUMBER_LENGTH } from '../../../../constants';
|
|
26
26
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -16,16 +16,16 @@ import { alpha, styled } from '@mui/material/styles';
|
|
|
16
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import { NIDValidationSchema } from './validation';
|
|
19
|
-
import { useAppDispatch, useLanguage, useAppSelector } from '
|
|
20
|
-
import { handlePrevScreenStep, settingsSelector } from '
|
|
21
|
-
import { clearError, connectSelector, createNIDAuth } from '
|
|
22
|
-
import Form from '
|
|
23
|
-
import Button, { MobileButton } from '
|
|
24
|
-
import { ScreenContainer } from '
|
|
25
|
-
import Collapse from '
|
|
19
|
+
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
20
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
21
|
+
import { clearError, connectSelector, createNIDAuth } from '../../../app/connect/connectStore';
|
|
22
|
+
import Form from '../../../../components/Form';
|
|
23
|
+
import Button, { MobileButton } from '../../../shared/Button';
|
|
24
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
+
import Collapse from '../../../../components/Collapse';
|
|
26
26
|
import Box from '@mui/material/Box';
|
|
27
27
|
import Divider from '@mui/material/Divider';
|
|
28
|
-
import Text from '
|
|
28
|
+
import Text from '../../../../components/Text';
|
|
29
29
|
import IDNumber from './IDNumber';
|
|
30
30
|
import DOB from './DOB';
|
|
31
31
|
var FormStyled = styled(Form)(function () { return ({
|
|
@@ -85,6 +85,6 @@ var NID = function (_a) {
|
|
|
85
85
|
dispatch(handlePrevScreenStep('CONNECT_MOBILE_STEP'));
|
|
86
86
|
};
|
|
87
87
|
var disabled = !methods.formState.isValid || !!error;
|
|
88
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading
|
|
88
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading }, { children: t('mobile_button_label') }))] }))] })) })) }));
|
|
89
89
|
};
|
|
90
90
|
export default React.memo(NID);
|
|
@@ -14,17 +14,17 @@ import Box from '@mui/material/Box/Box';
|
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import * as React from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import Text from '
|
|
18
|
-
import { clearError, connectSelector, resetOTPScreen, verifyAuth } from '
|
|
19
|
-
import Button from '
|
|
20
|
-
import { ScreenContainer } from '
|
|
21
|
-
import { useAppDispatch, useAppSelector } from '
|
|
22
|
-
import { handlePrevScreenStep } from '
|
|
23
|
-
import { useLanguage } from '
|
|
17
|
+
import Text from '../../../../components/Text';
|
|
18
|
+
import { clearError, connectSelector, resetOTPScreen, verifyAuth } from '../../../app/connect/connectStore';
|
|
19
|
+
import Button from '../../../shared/Button';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
23
|
+
import { useLanguage } from '../../../../hooks';
|
|
24
24
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
25
25
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
26
|
-
import Form from '
|
|
27
|
-
import { maskPhone, maskID } from '
|
|
26
|
+
import Form from '../../../../components/Form';
|
|
27
|
+
import { maskPhone, maskID } from '../../../../utils';
|
|
28
28
|
import { OTPValidation } from './validation';
|
|
29
29
|
import OTPInput from './OTPInput';
|
|
30
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -15,10 +15,10 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import Box from '@mui/material/Box/Box';
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
|
-
import OTPField from '
|
|
19
|
-
import { DEFAULT_TIMER_VALUE } from '
|
|
20
|
-
import { connectSelector, createMobileAuth, createNIDAuth } from '
|
|
21
|
-
import { useAppDispatch, useAppSelector } from '
|
|
18
|
+
import OTPField from '../../../shared/OTP';
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
20
|
+
import { connectSelector, createMobileAuth, createNIDAuth } from '../../../app/connect/connectStore';
|
|
21
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
22
|
var BoxStyled = styled(Box)(function (_a) {
|
|
23
23
|
var theme = _a.theme;
|
|
24
24
|
return ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import SuccessScreen from '
|
|
5
|
-
import { useAppDispatch } from '
|
|
6
|
-
import { updateLeadSuccess } from '
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
6
|
+
import { updateLeadSuccess } from '../../../app/connect/connectStore';
|
|
7
7
|
var ThankYou = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FeatureScreenStep } from '
|
|
1
|
+
import { FeatureScreenStep } from '../@types';
|
|
2
2
|
export declare const connectFeatureScreens: Array<FeatureScreenStep>;
|
|
3
3
|
export declare const businessFeatureScreens: Array<FeatureScreenStep>;
|
|
4
4
|
export declare const passwordFeatureScreens: Array<FeatureScreenStep>;
|
|
5
5
|
export declare const individualFeatureScreens: Array<FeatureScreenStep>;
|
|
6
6
|
export declare const bankFeatureScreens: Array<FeatureScreenStep>;
|
|
7
7
|
export declare const taxFeatureScreens: Array<FeatureScreenStep>;
|
|
8
|
-
export declare const landingFeatureScreens: Array<FeatureScreenStep>;
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import MobileScreen from '
|
|
2
|
-
import NIDScreen from '
|
|
3
|
-
import IndividualScreen from '
|
|
4
|
-
import MerchantInfoScreen from '
|
|
5
|
-
import ConnectOTPScreen from '
|
|
6
|
-
import ThankYouScreen from '
|
|
7
|
-
import CustomersPage from '
|
|
8
|
-
import IDBODPage from '
|
|
9
|
-
import BusinessVerifyPage from '
|
|
10
|
-
import BusinessOTPPage from '
|
|
11
|
-
import BusinessTypePage from '
|
|
12
|
-
import ActivitiesPage from '
|
|
13
|
-
import SuccessPage from '
|
|
14
|
-
import SuccessWithFlowButtonsPage from '
|
|
15
|
-
import PasswordVerifyPage from '
|
|
16
|
-
import CreatePasswordPage from '
|
|
17
|
-
import SuccessPasswordPage from '
|
|
18
|
-
import PasswordSuccessWithFlowPage from '
|
|
19
|
-
import IndividualVerifyPage from '
|
|
20
|
-
import AdditionalIndividualInfoPage from '
|
|
21
|
-
import SuccessOwnerPage from '
|
|
22
|
-
import IndividualSuccessWithFlowPage from '
|
|
23
|
-
import BankVerifyPage from '
|
|
24
|
-
import BankDetailsPage from '
|
|
25
|
-
import BankSuccessPage from '
|
|
26
|
-
import BankSuccessWithFlowPage from '
|
|
27
|
-
import TaxVerifyPage from '
|
|
28
|
-
import TaxDetailsPage from '
|
|
29
|
-
import TaxSuccessPage from '
|
|
30
|
-
import TaxSuccessWithFlowPage from '
|
|
31
|
-
import VerifyAndRedirectPage from '@features/Landing/screens/VerifyAndRedirect';
|
|
1
|
+
import MobileScreen from './connect/screens/Mobile';
|
|
2
|
+
import NIDScreen from './connect/screens/NID';
|
|
3
|
+
import IndividualScreen from './connect/screens/Individual';
|
|
4
|
+
import MerchantInfoScreen from './connect/screens/Merchant';
|
|
5
|
+
import ConnectOTPScreen from './connect/screens/OTP';
|
|
6
|
+
import ThankYouScreen from './connect/screens/ThankYou';
|
|
7
|
+
import CustomersPage from './business/screens/Customers';
|
|
8
|
+
import IDBODPage from './business/screens/IDBOD';
|
|
9
|
+
import BusinessVerifyPage from './business/screens/Verify';
|
|
10
|
+
import BusinessOTPPage from './business/screens/OTP';
|
|
11
|
+
import BusinessTypePage from './business/screens/BusinessType';
|
|
12
|
+
import ActivitiesPage from './business/screens/Activities';
|
|
13
|
+
import SuccessPage from './business/screens/Success';
|
|
14
|
+
import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
|
|
15
|
+
import PasswordVerifyPage from './password/screens/Verify';
|
|
16
|
+
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
17
|
+
import SuccessPasswordPage from './password/screens/Success';
|
|
18
|
+
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
19
|
+
import IndividualVerifyPage from './individual/screens/Verify';
|
|
20
|
+
import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
|
|
21
|
+
import SuccessOwnerPage from './individual/screens/Success';
|
|
22
|
+
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
23
|
+
import BankVerifyPage from './bank/screens/Verify';
|
|
24
|
+
import BankDetailsPage from './bank/screens/BankDetails';
|
|
25
|
+
import BankSuccessPage from './bank/screens/Success';
|
|
26
|
+
import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
27
|
+
import TaxVerifyPage from './tax/screens/Verify';
|
|
28
|
+
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
29
|
+
import TaxSuccessPage from './tax/screens/Success';
|
|
30
|
+
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
32
31
|
export var connectFeatureScreens = [
|
|
33
32
|
{
|
|
34
33
|
name: 'CONNECT_NID_STEP',
|
|
@@ -155,9 +154,3 @@ export var taxFeatureScreens = [
|
|
|
155
154
|
element: TaxSuccessWithFlowPage
|
|
156
155
|
}
|
|
157
156
|
];
|
|
158
|
-
export var landingFeatureScreens = [
|
|
159
|
-
{
|
|
160
|
-
name: 'LANDING_VERIFY_AND_REDIRECT_STEP',
|
|
161
|
-
element: VerifyAndRedirectPage
|
|
162
|
-
}
|
|
163
|
-
];
|
|
@@ -11,26 +11,27 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener } from '
|
|
15
|
-
import { handleLanguage, settingsSelector } from '
|
|
16
|
-
import AnimationFlow from '
|
|
17
|
-
import { store } from '
|
|
18
|
-
import { ReduxProvider, ThemeProvider } from '
|
|
19
|
-
import Collapse from '
|
|
20
|
-
import { getParameterByName, reactElement } from '
|
|
21
|
-
import { FeatureContainer } from '
|
|
22
|
-
import { INDIVIDUAL_SCREENS_NAVIGATION } from '
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
|
+
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
|
+
import { store } from '../../app/store';
|
|
18
|
+
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
|
+
import Collapse from '../../components/Collapse';
|
|
20
|
+
import { getParameterByName, reactElement } from '../../utils';
|
|
21
|
+
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
+
import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { individualFeatureScreens } from '../featuresScreens';
|
|
24
|
-
import {
|
|
24
|
+
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
25
25
|
import CustomFooter from '../shared/Footer';
|
|
26
26
|
import Background from '../shared/Background';
|
|
27
27
|
var Individual = memo(function (props) {
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var
|
|
31
|
+
var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error;
|
|
32
32
|
var loading = useAppConfig(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props)).loading;
|
|
33
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(individualError || error);
|
|
34
|
+
useStepStartedListener();
|
|
34
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
36
|
var verifyToken = function () {
|
|
36
37
|
var token = getParameterByName('token');
|
|
@@ -46,9 +47,6 @@ var Individual = memo(function (props) {
|
|
|
46
47
|
if (!loading)
|
|
47
48
|
verifyToken();
|
|
48
49
|
}, [loading]);
|
|
49
|
-
useEffect(function () {
|
|
50
|
-
dispatch(getCountries());
|
|
51
|
-
}, []);
|
|
52
50
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
|
|
53
51
|
var Element = _a.element, name = _a.name;
|
|
54
52
|
var isActive = activeScreen.name === name;
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -15,13 +15,13 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
15
15
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { useAppDispatch, useAppSelector } from '
|
|
19
|
-
import { handleCurrentActiveScreen } from '
|
|
20
|
-
import Form from '
|
|
21
|
-
import Collapse from '
|
|
22
|
-
import Button from '
|
|
23
|
-
import ScreenContainer from '
|
|
24
|
-
import { useLanguage } from '
|
|
18
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
+
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
20
|
+
import Form from '../../../../components/Form';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import Button from '../../../shared/Button';
|
|
23
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import { useLanguage } from '../../../../hooks';
|
|
25
25
|
import PEPSwitch from './PEPSwitch';
|
|
26
26
|
import { IndividualInfoValidationSchema } from './validation';
|
|
27
27
|
import InfluencerSwitch from './InfluencerSwitch';
|
|
@@ -29,7 +29,7 @@ import MonthlyIncome from './MonthlyIncome';
|
|
|
29
29
|
import EmployerName from './EmployerName';
|
|
30
30
|
import EmployerLocation from './EmployerLocation';
|
|
31
31
|
import SourceOfIncome from './SourceOfIncome';
|
|
32
|
-
import { individualSelector, updateIndividualInfo } from '
|
|
32
|
+
import { individualSelector, updateIndividualInfo } from '../../../app/individual/individualStore';
|
|
33
33
|
var ListType;
|
|
34
34
|
(function (ListType) {
|
|
35
35
|
ListType["SourceOfIncomeList"] = "SourceOfIncomeList";
|
|
@@ -41,6 +41,8 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
41
41
|
var isAr = useLanguage().isAr;
|
|
42
42
|
var dispatch = useAppDispatch();
|
|
43
43
|
var _b = useAppSelector(individualSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
44
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
45
|
+
var countries = settingsData.countries;
|
|
44
46
|
var methods = useForm({
|
|
45
47
|
resolver: yupResolver(IndividualInfoValidationSchema),
|
|
46
48
|
defaultValues: data.individualData,
|
|
@@ -73,7 +75,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
73
75
|
var isSourceOfIncomeListActive = listActive === ListType.SourceOfIncomeList;
|
|
74
76
|
var isEmployerLocationListActive = listActive === ListType.EmployerLocationList;
|
|
75
77
|
var isMonthlyIncomeListActive = listActive === ListType.MonthlyIncomeList;
|
|
76
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(SourceOfIncome, { onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: !isEmployerLocationListActive && !isMonthlyIncomeListActive }), _jsx(MonthlyIncome, { show: !isEmployerLocationListActive && !isSourceOfIncomeListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EmployerName, { show: false }), _jsx(EmployerLocation, { show: !isSourceOfIncomeListActive && employerFieldsActive && !isMonthlyIncomeListActive, countries:
|
|
78
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(SourceOfIncome, { onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: !isEmployerLocationListActive && !isMonthlyIncomeListActive }), _jsx(MonthlyIncome, { show: !isEmployerLocationListActive && !isSourceOfIncomeListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EmployerName, { show: false }), _jsx(EmployerLocation, { show: !isSourceOfIncomeListActive && employerFieldsActive && !isMonthlyIncomeListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.EmployerLocationList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(PEPSwitch, { show: !listActive }), _jsx(InfluencerSwitch, { show: !listActive })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
77
79
|
};
|
|
78
80
|
export default React.memo(AdditionalIndividualInfo);
|
|
79
81
|
AdditionalIndividualInfo.defaultProps = {};
|
|
@@ -26,15 +26,15 @@ import Box from '@mui/material/Box';
|
|
|
26
26
|
import { styled } from '@mui/material/styles';
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
import { useController, useFormContext } from 'react-hook-form';
|
|
29
|
-
import Text from '
|
|
30
|
-
import Collapse from '
|
|
31
|
-
import ExpandIcon from '
|
|
29
|
+
import Text from '../../../../components/Text';
|
|
30
|
+
import Collapse from '../../../../components/Collapse';
|
|
31
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
32
32
|
import CheckIcon from '@mui/icons-material/Check';
|
|
33
|
-
import ScreenContainer from '
|
|
34
|
-
import Input from '
|
|
35
|
-
import SimpleList from '
|
|
36
|
-
import { useLanguage } from '
|
|
37
|
-
import Search from '
|
|
33
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
+
import Input from '../../../shared/Input';
|
|
35
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
36
|
+
import { useLanguage } from '../../../../hooks';
|
|
37
|
+
import Search from '../../../shared/Search';
|
|
38
38
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
39
39
|
display: 'flex'
|
|
40
40
|
}); });
|
|
@@ -13,12 +13,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import { removeOnlyNumbers } from '
|
|
17
|
-
import { ScreenContainer } from '
|
|
18
|
-
import Input from '
|
|
19
|
-
import CheckIcon from '
|
|
20
|
-
import Collapse from '
|
|
21
|
-
import ClearIcon from '
|
|
16
|
+
import { removeOnlyNumbers } from '../../../../utils';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Input from '../../../shared/Input';
|
|
19
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
20
|
+
import Collapse from '../../../../components/Collapse';
|
|
21
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
22
22
|
import { styled } from '@mui/material/styles';
|
|
23
23
|
var InputStyled = styled(Input)(function () { return ({
|
|
24
24
|
input: {
|