@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
|
@@ -13,13 +13,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useFormContext, useController } from 'react-hook-form';
|
|
16
|
-
import { ScreenContainer } from '
|
|
17
|
-
import Collapse from '
|
|
16
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
+
import Collapse from '../../../../components/Collapse';
|
|
18
18
|
import { styled, alpha } from '@mui/material/styles';
|
|
19
|
-
import Mandatory from '
|
|
20
|
-
import Text from '
|
|
21
|
-
import RadioGroup from '
|
|
22
|
-
import RadioLabel from '
|
|
19
|
+
import Mandatory from '../../../shared/Mandatory';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import RadioGroup from '../../../../components/RadioGroup';
|
|
22
|
+
import RadioLabel from '../../../../components/RadioLabel';
|
|
23
23
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
24
24
|
var theme = _a.theme;
|
|
25
25
|
return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), marginBlockEnd: theme.spacing(0.625) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MonthlyIncome as MonthlyIncomeType } from '
|
|
2
|
+
import { MonthlyIncome as MonthlyIncomeType } from '../../../../@types';
|
|
3
3
|
interface MonthlyIncomeProps {
|
|
4
4
|
show: boolean;
|
|
5
5
|
onSelectSource?: (country: MonthlyIncomeType) => void;
|
|
@@ -26,15 +26,15 @@ import { useTranslation } from 'react-i18next';
|
|
|
26
26
|
import { useController, useFormContext } from 'react-hook-form';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
|
-
import { ScreenContainer } from '
|
|
30
|
-
import Input from '
|
|
31
|
-
import CheckIcon from '
|
|
32
|
-
import Collapse from '
|
|
33
|
-
import { useAppSelector, useLanguage } from '
|
|
34
|
-
import { individualSelector } from '
|
|
35
|
-
import Text from '
|
|
36
|
-
import ExpandIcon from '
|
|
37
|
-
import SimpleList from '
|
|
29
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
30
|
+
import Input from '../../../shared/Input';
|
|
31
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
32
|
+
import Collapse from '../../../../components/Collapse';
|
|
33
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
34
|
+
import { individualSelector } from '../../../app/individual/individualStore';
|
|
35
|
+
import Text from '../../../../components/Text';
|
|
36
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
38
38
|
var Container = styled(Box)(function () { return ({
|
|
39
39
|
display: 'flex'
|
|
40
40
|
}); });
|
|
@@ -14,12 +14,12 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useFormContext, useController } from 'react-hook-form';
|
|
16
16
|
import { styled, alpha } from '@mui/material/styles';
|
|
17
|
-
import { ScreenContainer } from '
|
|
18
|
-
import Collapse from '
|
|
19
|
-
import Mandatory from '
|
|
20
|
-
import Text from '
|
|
21
|
-
import RadioGroup from '
|
|
22
|
-
import RadioLabel from '
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Collapse from '../../../../components/Collapse';
|
|
19
|
+
import Mandatory from '../../../shared/Mandatory';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import RadioGroup from '../../../../components/RadioGroup';
|
|
22
|
+
import RadioLabel from '../../../../components/RadioLabel';
|
|
23
23
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
24
24
|
var theme = _a.theme;
|
|
25
25
|
return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), marginBlockEnd: theme.spacing(0.625) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SourceOfIncome as SourceOfIncomeType } from '
|
|
2
|
+
import { SourceOfIncome as SourceOfIncomeType } from '../../../../@types';
|
|
3
3
|
interface SourceOfIncomeProps {
|
|
4
4
|
show: boolean;
|
|
5
5
|
onSelectSource?: (source: SourceOfIncomeType) => void;
|
|
@@ -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 { useAppSelector, useLanguage } from '
|
|
30
|
-
import { individualSelector } from '
|
|
31
|
-
import Text from '
|
|
32
|
-
import Collapse from '
|
|
29
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
30
|
+
import { individualSelector } from '../../../app/individual/individualStore';
|
|
31
|
+
import Text from '../../../../components/Text';
|
|
32
|
+
import Collapse from '../../../../components/Collapse';
|
|
33
33
|
import CheckIcon from '@mui/icons-material/Check';
|
|
34
|
-
import ScreenContainer from '
|
|
35
|
-
import Input from '
|
|
36
|
-
import ExpandIcon from '
|
|
37
|
-
import SimpleList from '
|
|
34
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
35
|
+
import Input from '../../../shared/Input';
|
|
36
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
38
38
|
var Container = styled(Box)(function () { return ({
|
|
39
39
|
display: 'flex'
|
|
40
40
|
}); });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { ObjectShape } from 'yup/lib/object';
|
|
3
|
-
import { CountryCode } from '
|
|
3
|
+
import { CountryCode } from '../../../../@types';
|
|
4
4
|
export declare const IndividualInfoValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
5
5
|
sourceIncome: import("yup/lib/object").RequiredObjectSchema<ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<ObjectShape>>;
|
|
6
6
|
monthlyIncome: import("yup/lib/object").OptionalObjectSchema<ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<ObjectShape>>;
|
|
@@ -13,13 +13,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import Box from '@mui/material/Box';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useAppDispatch } from '
|
|
17
|
-
import { handleNextScreenStep } from '
|
|
16
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
17
|
+
import { handleNextScreenStep } from '../../../../app/settings';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
|
-
import Collapse from '
|
|
20
|
-
import Button from '
|
|
21
|
-
import ScreenContainer from '
|
|
22
|
-
import { useLanguage } from '
|
|
19
|
+
import Collapse from '../../../../components/Collapse';
|
|
20
|
+
import Button from '../../../shared/Button';
|
|
21
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
22
|
+
import { useLanguage } from '../../../../hooks';
|
|
23
23
|
import Info from './info';
|
|
24
24
|
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
25
25
|
var _b;
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { styled, alpha } from '@mui/material/styles';
|
|
15
|
-
import Text from '
|
|
15
|
+
import Text from '../../../../components/Text';
|
|
16
16
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
17
17
|
var theme = _a.theme;
|
|
18
18
|
return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), paddingInlineStart: theme.spacing(2.5), marginBlockStart: theme.spacing(3.5), marginBlockEnd: theme.spacing(1.25) }));
|
|
@@ -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 { useAppDispatch, useAppSelector } from '
|
|
5
|
-
import { individualSelector, updateLeadSuccess } from '
|
|
6
|
-
import SuccessScreen from '
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
+
import { individualSelector, updateLeadSuccess } from '../../../app/individual/individualStore';
|
|
6
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
7
|
var Success = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
@@ -13,15 +13,15 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import React, { memo, useEffect, useState } from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
|
-
import { FlowsButtons } from '
|
|
17
|
-
import { ICONS_NAMES } from '
|
|
18
|
-
import { useAppSelector, useLanguage } from '
|
|
19
|
-
import { allAreTruthy, showLastFour } from '
|
|
20
|
-
import { individualSelector } from '
|
|
16
|
+
import { FlowsButtons } from '../../../shared/Button';
|
|
17
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
18
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
+
import { allAreTruthy, showLastFour } from '../../../../utils';
|
|
20
|
+
import { individualSelector } from '../../../app/individual/individualStore';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
|
-
import Text from '
|
|
23
|
-
import Container from '
|
|
24
|
-
import AcceptancePayouts from '
|
|
22
|
+
import Text from '../../../../components/Text';
|
|
23
|
+
import Container from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import AcceptancePayouts from '../../../shared/AcceptancePayouts';
|
|
25
25
|
var TitleStyled = styled(Text)(function (_a) {
|
|
26
26
|
var _b;
|
|
27
27
|
var theme = _a.theme;
|
|
@@ -60,7 +60,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
60
60
|
var reMapFlowData = function (flows) {
|
|
61
61
|
if (flows === void 0) { flows = []; }
|
|
62
62
|
var images = ICONS_NAMES;
|
|
63
|
-
var statuses = [];
|
|
64
63
|
var mappedFlows = flows.map(function (_a) {
|
|
65
64
|
var name = _a.name, url = _a.url, status = _a.status;
|
|
66
65
|
var type = status === 'initiated' ? 'pending' : 'completed';
|
|
@@ -79,6 +78,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
79
78
|
var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
|
|
80
79
|
var hoverSrc = "".concat(name, "_white_icon");
|
|
81
80
|
return {
|
|
81
|
+
name: name,
|
|
82
82
|
title: title,
|
|
83
83
|
href: url,
|
|
84
84
|
src: images[src],
|
|
@@ -96,6 +96,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
96
96
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
|
|
97
97
|
reMapFlowData(flows);
|
|
98
98
|
}, [flows, isAr]);
|
|
99
|
-
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
|
|
99
|
+
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
|
|
100
100
|
};
|
|
101
101
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
setLoading: (flag: boolean) => void;
|
|
3
5
|
}
|
|
4
|
-
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
|
|
5
7
|
export default _default;
|
|
@@ -11,12 +11,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
14
15
|
import Box from '@mui/material/Box/Box';
|
|
15
16
|
import { styled } from '@mui/material/styles';
|
|
16
|
-
import OTPField from '
|
|
17
|
+
import OTPField from '../../../shared/OTP';
|
|
17
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
19
|
import { useTranslation } from 'react-i18next';
|
|
19
|
-
import { DEFAULT_TIMER_VALUE } from '
|
|
20
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
21
|
+
import { resendOTP } from '../../../app/individual/individualStore';
|
|
20
22
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
23
|
var theme = _a.theme;
|
|
22
24
|
return ({
|
|
@@ -26,17 +28,20 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
var OTPInput = function (_a) {
|
|
31
|
+
var loading = _a.loading, setLoading = _a.setLoading;
|
|
29
32
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
30
33
|
var t = useTranslation().t;
|
|
31
34
|
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
+
var dispatch = useAppDispatch();
|
|
32
36
|
var handleOnOTPChange = function (otp) {
|
|
33
37
|
otpControl.field.onChange(otp);
|
|
34
38
|
};
|
|
35
39
|
var handleOnResendOTP = function () {
|
|
36
40
|
if (otpControl.field.value)
|
|
37
41
|
setValue('otp', '', { shouldValidate: true });
|
|
42
|
+
dispatch(resendOTP());
|
|
38
43
|
};
|
|
39
44
|
var otpValue = otpControl.field.value;
|
|
40
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
45
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
41
46
|
};
|
|
42
47
|
export default React.memo(OTPInput);
|
|
@@ -11,20 +11,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '
|
|
14
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import Box from '@mui/material/Box/Box';
|
|
19
19
|
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handlePrevScreenStep } from '
|
|
21
|
-
import { useLanguage, useAppSelector } from '
|
|
22
|
-
import { maskPhone } from '
|
|
23
|
-
import Form from '
|
|
24
|
-
import Text from '
|
|
25
|
-
import { ScreenContainer } from '
|
|
26
|
-
import { individualSelector, clearError, resetOTPScreen, verifyLeadOTP } from '
|
|
27
|
-
import Button from '
|
|
20
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
22
|
+
import { maskPhone } from '../../../../utils';
|
|
23
|
+
import Form from '../../../../components/Form';
|
|
24
|
+
import Text from '../../../../components/Text';
|
|
25
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
26
|
+
import { individualSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/individual/individualStore';
|
|
27
|
+
import Button from '../../../shared/Button';
|
|
28
28
|
import { OTPValidation } from './validation';
|
|
29
29
|
import OTPInput from './OTPInput';
|
|
30
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -57,6 +57,7 @@ var VerifyNumber = function (_a) {
|
|
|
57
57
|
});
|
|
58
58
|
var t = useTranslation().t;
|
|
59
59
|
var isAr = useLanguage().isAr;
|
|
60
|
+
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
60
61
|
React.useEffect(function () {
|
|
61
62
|
if (error)
|
|
62
63
|
dispatch(clearError());
|
|
@@ -71,7 +72,7 @@ var VerifyNumber = function (_a) {
|
|
|
71
72
|
dispatch(handlePrevScreenStep());
|
|
72
73
|
};
|
|
73
74
|
var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
|
|
74
|
-
var disabled = !methods.formState.isValid || !!error || !phone;
|
|
75
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
75
|
+
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
76
77
|
};
|
|
77
78
|
export default React.memo(VerifyNumber);
|
|
@@ -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 { FeatureContainer } from '
|
|
21
|
-
import { getParameterByName, reactElement } from '
|
|
22
|
-
import { PASSWORD_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 { FeatureContainer } from '../shared/Containers';
|
|
21
|
+
import { getParameterByName, reactElement } from '../../utils';
|
|
22
|
+
import { PASSWORD_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { passwordFeatureScreens } from '../featuresScreens';
|
|
24
|
-
import { passwordSelector, verifyLeadToken } from '
|
|
24
|
+
import { passwordSelector, verifyLeadToken } from '../app/password/passwordStore';
|
|
25
25
|
import CustomFooter from '../shared/Footer';
|
|
26
26
|
import Background from '../shared/Background';
|
|
27
27
|
var Password = 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(passwordSelector), customLoading = _b.customLoading, passwordError = _b.error;
|
|
32
32
|
var loading = useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props)).loading;
|
|
33
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(passwordError || 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');
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
|
-
import Text from '
|
|
14
|
+
import Text from '../../../../components/Text';
|
|
15
15
|
var TextStyled = styled(Text, {
|
|
16
16
|
shouldForwardProp: function (prop) { return prop !== 'active' && prop !== 'text'; }
|
|
17
17
|
})(function (_a) {
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useController, useFormContext } from 'react-hook-form';
|
|
5
|
-
import ScreenContainer from '
|
|
6
|
-
import PasswordIcon from '
|
|
7
|
-
import Input from '
|
|
5
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
6
|
+
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
7
|
+
import Input from '../../../shared/Input';
|
|
8
8
|
var ConfirmPassword = function (_a) {
|
|
9
9
|
var _b;
|
|
10
10
|
var showPassword = _a.showPassword, onShowPassword = _a.onShowPassword, onHidePassword = _a.onHidePassword;
|
|
@@ -16,15 +16,15 @@ import { useTranslation } from 'react-i18next';
|
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
17
|
import Box from '@mui/material/Box';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
|
-
import { useAppDispatch } from '
|
|
20
|
-
import { handleCurrentActiveScreen } from '
|
|
21
|
-
import Form from '
|
|
22
|
-
import { useLanguage } from '
|
|
23
|
-
import ScreenContainer from '
|
|
24
|
-
import Button from '
|
|
19
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
20
|
+
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
21
|
+
import Form from '../../../../components/Form';
|
|
22
|
+
import { useLanguage } from '../../../../hooks';
|
|
23
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import Button from '../../../shared/Button';
|
|
25
25
|
import { PasswordValidation } from './validation';
|
|
26
26
|
import Password from './Password';
|
|
27
|
-
import { createPassword, passwordSelector } from '
|
|
27
|
+
import { createPassword, passwordSelector } from '../../../app/password/passwordStore';
|
|
28
28
|
import { useSelector } from 'react-redux';
|
|
29
29
|
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
@@ -15,12 +15,12 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import Box from '@mui/material/Box';
|
|
18
|
-
import ScreenContainer from '
|
|
19
|
-
import Input from '
|
|
20
|
-
import PasswordIcon from '
|
|
21
|
-
import { PasswordMatchLength, isPasswordHasUpperLetter, isPasswordHasLowerLetter, isPasswordHasSpecialLetter } from '
|
|
22
|
-
import Collapse from '
|
|
23
|
-
import Text from '
|
|
18
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
|
+
import Input from '../../../shared/Input';
|
|
20
|
+
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
21
|
+
import { PasswordMatchLength, isPasswordHasUpperLetter, isPasswordHasLowerLetter, isPasswordHasSpecialLetter } from '../../../../utils';
|
|
22
|
+
import Collapse from '../../../../components/Collapse';
|
|
23
|
+
import Text from '../../../../components/Text';
|
|
24
24
|
import List from '@mui/material/List';
|
|
25
25
|
import PasswordBar from './PasswordBar';
|
|
26
26
|
import ConditionText from './ConditionText';
|
|
@@ -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 { useAppDispatch, useAppSelector } from '
|
|
5
|
-
import { updateLeadSuccess, passwordSelector } from '
|
|
6
|
-
import SuccessScreen from '
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
+
import { updateLeadSuccess, passwordSelector } from '../../../app/password/passwordStore';
|
|
6
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
7
|
var Success = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
@@ -13,15 +13,15 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import React, { memo, useEffect, useState } from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
|
-
import { FlowsButtons } from '
|
|
17
|
-
import { ICONS_NAMES } from '
|
|
18
|
-
import { useAppSelector, useLanguage } from '
|
|
19
|
-
import { allAreTruthy, showLastFour } from '
|
|
20
|
-
import { passwordSelector } from '
|
|
16
|
+
import { FlowsButtons } from '../../../shared/Button';
|
|
17
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
18
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
+
import { allAreTruthy, showLastFour } from '../../../../utils';
|
|
20
|
+
import { passwordSelector } from '../../../app/password/passwordStore';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
|
-
import Text from '
|
|
23
|
-
import Container from '
|
|
24
|
-
import AcceptancePayouts from '
|
|
22
|
+
import Text from '../../../../components/Text';
|
|
23
|
+
import Container from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import AcceptancePayouts from '../../../../features/shared/AcceptancePayouts';
|
|
25
25
|
var TitleStyled = styled(Text)(function (_a) {
|
|
26
26
|
var _b;
|
|
27
27
|
var theme = _a.theme;
|
|
@@ -60,7 +60,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
60
60
|
var reMapFlowData = function (flows) {
|
|
61
61
|
if (flows === void 0) { flows = []; }
|
|
62
62
|
var images = ICONS_NAMES;
|
|
63
|
-
var statuses = [];
|
|
64
63
|
var mappedFlows = flows.map(function (_a) {
|
|
65
64
|
var name = _a.name, url = _a.url, status = _a.status;
|
|
66
65
|
var type = status === 'initiated' ? 'pending' : 'completed';
|
|
@@ -79,6 +78,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
79
78
|
var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
|
|
80
79
|
var hoverSrc = "".concat(name, "_white_icon");
|
|
81
80
|
return {
|
|
81
|
+
name: name,
|
|
82
82
|
title: title,
|
|
83
83
|
href: url,
|
|
84
84
|
src: images[src],
|
|
@@ -96,6 +96,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
96
96
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
|
|
97
97
|
reMapFlowData(flows);
|
|
98
98
|
}, [flows, isAr]);
|
|
99
|
-
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
|
|
99
|
+
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
|
|
100
100
|
};
|
|
101
101
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
setLoading: (flag: boolean) => void;
|
|
3
5
|
}
|
|
4
|
-
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
|
|
5
7
|
export default _default;
|
|
@@ -11,12 +11,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
14
15
|
import Box from '@mui/material/Box/Box';
|
|
15
16
|
import { styled } from '@mui/material/styles';
|
|
16
|
-
import OTPField from '
|
|
17
|
+
import OTPField from '../../../shared/OTP';
|
|
17
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
19
|
import { useTranslation } from 'react-i18next';
|
|
19
|
-
import { DEFAULT_TIMER_VALUE } from '
|
|
20
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
21
|
+
import { resendOTP } from '../../../app/password/passwordStore';
|
|
20
22
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
23
|
var theme = _a.theme;
|
|
22
24
|
return ({
|
|
@@ -26,17 +28,20 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
var OTPInput = function (_a) {
|
|
31
|
+
var loading = _a.loading, setLoading = _a.setLoading;
|
|
29
32
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
30
33
|
var t = useTranslation().t;
|
|
31
34
|
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
+
var dispatch = useAppDispatch();
|
|
32
36
|
var handleOnOTPChange = function (otp) {
|
|
33
37
|
otpControl.field.onChange(otp);
|
|
34
38
|
};
|
|
35
39
|
var handleOnResendOTP = function () {
|
|
36
40
|
if (otpControl.field.value)
|
|
37
41
|
setValue('otp', '', { shouldValidate: true });
|
|
42
|
+
dispatch(resendOTP());
|
|
38
43
|
};
|
|
39
44
|
var otpValue = otpControl.field.value;
|
|
40
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
45
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
41
46
|
};
|
|
42
47
|
export default React.memo(OTPInput);
|
|
@@ -11,20 +11,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '
|
|
14
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import Box from '@mui/material/Box/Box';
|
|
19
19
|
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handlePrevScreenStep } from '
|
|
21
|
-
import { useLanguage, useAppSelector } from '
|
|
22
|
-
import { maskPhone } from '
|
|
23
|
-
import Form from '
|
|
24
|
-
import Text from '
|
|
25
|
-
import { ScreenContainer } from '
|
|
26
|
-
import { passwordSelector, clearError, resetOTPScreen, verifyPasswordLeadOTP } from '
|
|
27
|
-
import Button from '
|
|
20
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
22
|
+
import { maskPhone } from '../../../../utils';
|
|
23
|
+
import Form from '../../../../components/Form';
|
|
24
|
+
import Text from '../../../../components/Text';
|
|
25
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
26
|
+
import { passwordSelector, clearError, resetOTPScreen, verifyPasswordLeadOTP } from '../../../app/password/passwordStore';
|
|
27
|
+
import Button from '../../../shared/Button';
|
|
28
28
|
import { OTPValidation } from './validation';
|
|
29
29
|
import OTPInput from './OTPInput';
|
|
30
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -57,6 +57,7 @@ var VerifyNumber = function (_a) {
|
|
|
57
57
|
});
|
|
58
58
|
var t = useTranslation().t;
|
|
59
59
|
var isAr = useLanguage().isAr;
|
|
60
|
+
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
60
61
|
React.useEffect(function () {
|
|
61
62
|
if (error)
|
|
62
63
|
dispatch(clearError());
|
|
@@ -71,7 +72,7 @@ var VerifyNumber = function (_a) {
|
|
|
71
72
|
dispatch(handlePrevScreenStep());
|
|
72
73
|
};
|
|
73
74
|
var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
|
|
74
|
-
var disabled = !methods.formState.isValid || !!error || !phone;
|
|
75
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
75
|
+
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled || resendLoading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
76
77
|
};
|
|
77
78
|
export default React.memo(VerifyNumber);
|