@tap-payments/auth-jsconnect 1.0.89 → 1.0.93-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 +86 -135
- 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/availabilityServices.d.ts +2 -0
- package/build/api/axios.js +1 -2
- package/build/api/index.d.ts +2 -2
- package/build/api/index.js +2 -2
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/Button/Button.d.ts +6 -1
- package/build/components/Button/Button.js +61 -23
- package/build/components/Footer/Footer.d.ts +0 -2
- package/build/components/Footer/Footer.js +0 -1
- package/build/constants/api.d.ts +3 -1
- package/build/constants/api.js +6 -2
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -8
- package/build/features/app/bank/bankStore.d.ts +5 -1
- package/build/features/app/bank/bankStore.js +38 -1
- package/build/features/app/business/businessStore.d.ts +5 -1
- package/build/features/app/business/businessStore.js +40 -5
- package/build/features/app/connect/connectStore.d.ts +2 -1
- package/build/features/app/connect/connectStore.js +19 -8
- package/build/features/app/individual/individualStore.d.ts +5 -1
- package/build/features/app/individual/individualStore.js +36 -0
- package/build/features/app/password/passwordStore.d.ts +5 -1
- package/build/features/app/password/passwordStore.js +37 -1
- package/build/features/app/tax/taxStore.d.ts +5 -1
- package/build/features/app/tax/taxStore.js +39 -2
- package/build/features/bank/Bank.js +9 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +6 -1
- 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/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +2 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +6 -1
- package/build/features/bank/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +6 -1
- package/build/features/business/screens/Verify/Verify.js +3 -2
- package/build/features/connect/Connect.js +5 -3
- package/build/features/connect/screens/Mobile/Mobile.js +1 -1
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -7
- package/build/features/individual/Individual.js +9 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +6 -1
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/password/Password.js +9 -4
- package/build/features/password/screens/CreatePassword/CreatePassword.js +5 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +6 -1
- package/build/features/password/screens/Verify/Verify.js +3 -2
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Background/Background.js +3 -3
- package/build/features/shared/Background/LogoBackground.js +1 -4
- package/build/features/shared/Button/AbsherButton.d.ts +1 -2
- package/build/features/shared/Button/AbsherButton.js +5 -32
- package/build/features/shared/Button/EmailProvidersButtons.js +13 -48
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
- package/build/features/shared/Button/FlowsButtons.js +51 -46
- package/build/features/shared/Button/MobileButton.d.ts +1 -2
- package/build/features/shared/Button/MobileButton.js +3 -29
- package/build/features/shared/Button/SuccessButton.js +18 -16
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +10 -2
- package/build/features/tax/Tax.js +9 -4
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- 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 +9 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +13 -2
- 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 +6 -1
- package/build/features/tax/screens/Verify/Verify.js +3 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.js +11 -1
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +4 -6
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -5
- package/build/theme/theme.js +10 -0
- package/build/utils/locale.js +2 -2
- package/build/utils/string.d.ts +3 -1
- package/build/utils/string.js +35 -2
- package/package.json +127 -126
- 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
|
@@ -11,8 +11,8 @@ 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 '../../hooks';
|
|
15
|
-
import { settingsSelector } from '../../app/settings';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
16
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
17
|
import { store } from '../../app/store';
|
|
18
18
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -28,14 +28,19 @@ 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');
|
|
38
|
+
var lang = getParameterByName('lang');
|
|
37
39
|
if (!token)
|
|
38
40
|
throw new Error('Auth token is not found!');
|
|
41
|
+
if (!lang)
|
|
42
|
+
throw new Error('Language is not found!');
|
|
43
|
+
dispatch(handleLanguage(lang));
|
|
39
44
|
dispatch(verifyLeadToken(token));
|
|
40
45
|
};
|
|
41
46
|
useEffect(function () {
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -16,7 +16,7 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
-
import {
|
|
19
|
+
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
20
20
|
import Form from '../../../../components/Form';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import Button from '../../../shared/Button';
|
|
@@ -65,7 +65,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
65
65
|
dispatch(updateIndividualInfo(data));
|
|
66
66
|
};
|
|
67
67
|
var onBack = function () {
|
|
68
|
-
dispatch(
|
|
68
|
+
dispatch(handleCurrentActiveScreen('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
69
69
|
};
|
|
70
70
|
var handleMenuClick = function (flag) {
|
|
71
71
|
setListActive(flag);
|
|
@@ -73,7 +73,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
73
73
|
var isSourceOfIncomeListActive = listActive === ListType.SourceOfIncomeList;
|
|
74
74
|
var isEmployerLocationListActive = listActive === ListType.EmployerLocationList;
|
|
75
75
|
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: data.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({
|
|
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: data.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
77
|
};
|
|
78
78
|
export default React.memo(AdditionalIndividualInfo);
|
|
79
79
|
AdditionalIndividualInfo.defaultProps = {};
|
|
@@ -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
17
|
import OTPField from '../../../shared/OTP';
|
|
17
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
19
|
import { useTranslation } from 'react-i18next';
|
|
19
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);
|
|
@@ -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,8 +11,8 @@ 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 '../../hooks';
|
|
15
|
-
import { settingsSelector } from '../../app/settings';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
16
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
17
|
import { store } from '../../app/store';
|
|
18
18
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -28,14 +28,19 @@ 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');
|
|
38
|
+
var lang = getParameterByName('lang');
|
|
37
39
|
if (!token)
|
|
38
40
|
throw new Error('Auth token is not found!');
|
|
41
|
+
if (!lang)
|
|
42
|
+
throw new Error('Language is not found!');
|
|
43
|
+
dispatch(handleLanguage(lang));
|
|
39
44
|
dispatch(verifyLeadToken(token));
|
|
40
45
|
};
|
|
41
46
|
useEffect(function () {
|
|
@@ -17,6 +17,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
17
17
|
import Box from '@mui/material/Box';
|
|
18
18
|
import { styled } from '@mui/material/styles';
|
|
19
19
|
import { useAppDispatch } from '../../../../hooks';
|
|
20
|
+
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
20
21
|
import Form from '../../../../components/Form';
|
|
21
22
|
import { useLanguage } from '../../../../hooks';
|
|
22
23
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
@@ -44,6 +45,9 @@ var CreatePassword = function (_a) {
|
|
|
44
45
|
var onSubmit = function (data) {
|
|
45
46
|
dispatch(createPassword(data));
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
var onBack = function () {
|
|
49
|
+
dispatch(handleCurrentActiveScreen('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
50
|
+
};
|
|
51
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
48
52
|
};
|
|
49
53
|
export default React.memo(CreatePassword);
|
|
@@ -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
17
|
import OTPField from '../../../shared/OTP';
|
|
17
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
19
|
import { useTranslation } from 'react-i18next';
|
|
19
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);
|
|
@@ -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);
|
|
@@ -21,7 +21,7 @@ var BoxStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !
|
|
|
21
21
|
var _b;
|
|
22
22
|
var theme = _a.theme, enabled = _a.enabled, isAr = _a.isAr;
|
|
23
23
|
return (_b = {
|
|
24
|
-
backgroundColor: enabled ? alpha(theme.palette.success.main, 0.1) : alpha(theme.palette.text.primary, 0.
|
|
24
|
+
backgroundColor: enabled ? alpha(theme.palette.success.main, 0.1) : alpha(theme.palette.text.primary, 0.05),
|
|
25
25
|
color: enabled ? theme.palette.success.main : alpha(theme.palette.text.primary, 0.6),
|
|
26
26
|
borderRadius: theme.spacing(12.625),
|
|
27
27
|
padding: theme.spacing(0.6, 1, 0.7, 1),
|
|
@@ -17,13 +17,13 @@ import LogoBackground from './LogoBackground';
|
|
|
17
17
|
var BackgroundStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
|
|
18
18
|
var isTapOrigin = _a.isTapOrigin;
|
|
19
19
|
return ({
|
|
20
|
-
width: '
|
|
21
|
-
height: '
|
|
20
|
+
width: '100vw',
|
|
21
|
+
height: '100vh',
|
|
22
22
|
background: isTapOrigin ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)' : 'rgba(0, 0, 0, 0.5)'
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
var Background = function (_a) {
|
|
26
26
|
var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading;
|
|
27
|
-
return (_jsxs(BackgroundStyled, __assign({ isTapOrigin: isTapOrigin }, { children: [_jsx(LogoBackground, { hide: loading || !isTapOrigin }), children] })));
|
|
27
|
+
return (_jsxs(BackgroundStyled, __assign({ id: 'background', isTapOrigin: isTapOrigin }, { children: [_jsx(LogoBackground, { hide: loading || !isTapOrigin }), children] })));
|
|
28
28
|
};
|
|
29
29
|
export default memo(Background);
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import { styled
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Collapse from '@mui/material/Collapse';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import Icon from '../../../components/Icon';
|
|
@@ -65,9 +65,6 @@ var LogoIconStyled = styled(Icon)(function (_a) {
|
|
|
65
65
|
var LogoBackground = function (_a) {
|
|
66
66
|
var hide = _a.hide;
|
|
67
67
|
var isAr = useLanguage().isAr;
|
|
68
|
-
var theme = useTheme();
|
|
69
|
-
var style = getComputedStyle(document.body);
|
|
70
|
-
console.log(style.getPropertyValue('--rsbs-overlay-h'));
|
|
71
68
|
return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(BoxStyled, { children: [_jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO_EN_ICON }), _jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_LOGO_TEXT_AR : ICONS_NAMES.TAP_LOGO_TEXT_EN, alt: 'tap logo' }) })] }) })));
|
|
72
69
|
};
|
|
73
70
|
export default memo(LogoBackground);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '../../../components/Button';
|
|
3
3
|
interface AbsherButtonProps extends ButtonProps {
|
|
4
|
-
isAr: boolean;
|
|
5
4
|
loading?: boolean;
|
|
6
5
|
hideIcon?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function AbsherButton({ children,
|
|
7
|
+
export default function AbsherButton({ children, hideIcon, disabled, ...props }: AbsherButtonProps): JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -21,10 +21,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import React from 'react';
|
|
25
24
|
import Button from '../../../components/Button';
|
|
26
25
|
import Icon from '../../../components/Icon';
|
|
27
|
-
import {
|
|
26
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
28
27
|
import Box from '@mui/material/Box';
|
|
29
28
|
import { ICONS_NAMES } from '../../../constants';
|
|
30
29
|
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
|
|
@@ -39,35 +38,9 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
39
38
|
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
40
39
|
});
|
|
41
40
|
});
|
|
42
|
-
var ButtonStyled = styled(Button, {
|
|
43
|
-
shouldForwardProp: function (prop) { return prop !== 'hideIcon' && prop !== 'touched'; }
|
|
44
|
-
})(function (_a) {
|
|
45
|
-
var theme = _a.theme, hideIcon = _a.hideIcon, touched = _a.touched;
|
|
46
|
-
return ({
|
|
47
|
-
paddingInlineStart: theme.spacing(0.75),
|
|
48
|
-
textTransform: 'none',
|
|
49
|
-
backgroundColor: touched ? theme.palette.primary.light : theme.palette.common.white,
|
|
50
|
-
border: "1px solid ".concat(hideIcon ? theme.palette.primary.main : theme.palette.primary.light),
|
|
51
|
-
color: hideIcon ? theme.palette.primary.main : touched ? theme.palette.common.white : theme.palette.primary.light,
|
|
52
|
-
'&:hover': {
|
|
53
|
-
backgroundColor: touched ? theme.palette.primary.light : theme.palette.common.white,
|
|
54
|
-
color: hideIcon ? theme.palette.primary.main : touched ? theme.palette.common.white : theme.palette.primary.light,
|
|
55
|
-
img: {
|
|
56
|
-
filter: touched ? 'brightness(0) invert(1)' : ''
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
'&:disabled': {
|
|
60
|
-
backgroundColor: theme.palette.common.white,
|
|
61
|
-
color: alpha(hideIcon ? theme.palette.primary.main : theme.palette.primary.light, 0.3),
|
|
62
|
-
border: "1px solid ".concat(alpha(hideIcon ? theme.palette.primary.main : theme.palette.primary.light, 0.3))
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
41
|
export default function AbsherButton(_a) {
|
|
67
|
-
var children = _a.children,
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ onTouchStart: handleTouch, touched: touched, hideIcon: hideIcon, disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
|
|
42
|
+
var children = _a.children, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "disabled"]);
|
|
43
|
+
var theme = useTheme();
|
|
44
|
+
var btnColor = theme.palette.primary.light;
|
|
45
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ outLineColor: btnColor, variant: 'outlined', disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
|
|
73
46
|
}
|
|
@@ -10,9 +10,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import React from 'react';
|
|
14
13
|
import Button from '../../../components/Button';
|
|
15
|
-
import {
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
16
15
|
import Box from '@mui/material/Box';
|
|
17
16
|
import Link from '@mui/material/Link';
|
|
18
17
|
import { ICONS_NAMES } from '../../../constants';
|
|
@@ -26,72 +25,38 @@ var Image = styled('img')(function (_a) {
|
|
|
26
25
|
});
|
|
27
26
|
});
|
|
28
27
|
var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
28
|
+
var _b;
|
|
29
29
|
var theme = _a.theme;
|
|
30
|
-
return ({
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
return (_b = {
|
|
31
|
+
margin: theme.spacing(0, 2.5, 2.5, 2.5)
|
|
32
|
+
},
|
|
33
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
34
|
+
margin: theme.spacing(0, 2.5, 0.25, 2.5)
|
|
35
|
+
},
|
|
36
|
+
_b);
|
|
33
37
|
});
|
|
34
38
|
var GMailButtonStyled = styled(Button)(function (_a) {
|
|
35
39
|
var theme = _a.theme;
|
|
36
40
|
return ({
|
|
37
41
|
width: '100%',
|
|
38
|
-
|
|
39
|
-
paddingInlineStart: theme.spacing(0.75),
|
|
40
|
-
marginBottom: theme.spacing(1.875),
|
|
41
|
-
backgroundColor: theme.palette.common.white,
|
|
42
|
-
border: "1px solid ".concat(theme.palette.primary.main),
|
|
43
|
-
color: theme.palette.primary.main,
|
|
44
|
-
'&:hover': {
|
|
45
|
-
backgroundColor: theme.palette.primary.main,
|
|
46
|
-
color: theme.palette.common.white
|
|
47
|
-
},
|
|
48
|
-
'&:disabled': {
|
|
49
|
-
backgroundColor: theme.palette.common.white,
|
|
50
|
-
color: alpha(theme.palette.primary.main, 0.3)
|
|
51
|
-
}
|
|
42
|
+
marginBottom: theme.spacing(1.875)
|
|
52
43
|
});
|
|
53
44
|
});
|
|
54
45
|
var OutlookButtonStyled = styled(Button)(function (_a) {
|
|
55
46
|
var theme = _a.theme;
|
|
56
47
|
return ({
|
|
57
48
|
width: '100%',
|
|
58
|
-
|
|
59
|
-
paddingInlineStart: theme.spacing(0.75),
|
|
60
|
-
backgroundColor: theme.palette.common.white,
|
|
61
|
-
border: "1px solid ".concat(theme.palette.primary.main),
|
|
62
|
-
color: theme.palette.primary.main,
|
|
63
|
-
'&:hover': {
|
|
64
|
-
backgroundColor: theme.palette.primary.main,
|
|
65
|
-
color: theme.palette.common.white
|
|
66
|
-
},
|
|
67
|
-
'&:disabled': {
|
|
68
|
-
backgroundColor: theme.palette.common.white,
|
|
69
|
-
color: alpha(theme.palette.primary.main, 0.3)
|
|
70
|
-
}
|
|
49
|
+
marginBottom: theme.spacing(2.5)
|
|
71
50
|
});
|
|
72
51
|
});
|
|
73
52
|
var AppleButtonStyled = styled(Button)(function (_a) {
|
|
74
53
|
var theme = _a.theme;
|
|
75
54
|
return ({
|
|
76
55
|
width: '100%',
|
|
77
|
-
|
|
78
|
-
paddingInlineStart: theme.spacing(0.75),
|
|
79
|
-
backgroundColor: theme.palette.common.white,
|
|
80
|
-
border: "1px solid ".concat(theme.palette.primary.main),
|
|
81
|
-
marginBottom: theme.spacing(1.875),
|
|
82
|
-
color: theme.palette.primary.main,
|
|
83
|
-
'&:hover': {
|
|
84
|
-
backgroundColor: theme.palette.primary.main,
|
|
85
|
-
color: theme.palette.common.white
|
|
86
|
-
},
|
|
87
|
-
'&:disabled': {
|
|
88
|
-
backgroundColor: theme.palette.common.white,
|
|
89
|
-
color: alpha(theme.palette.primary.main, 0.3)
|
|
90
|
-
}
|
|
56
|
+
marginBottom: theme.spacing(1.875)
|
|
91
57
|
});
|
|
92
58
|
});
|
|
93
59
|
export default function EmailProvidersButtons(_a) {
|
|
94
60
|
var gmail = _a.gmail, outlook = _a.outlook, apple = _a.apple;
|
|
95
|
-
|
|
96
|
-
return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(0); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(GMailButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 0 ? ICONS_NAMES.GMAIL_White_ICON : ICONS_NAMES.GMAIL_Filled_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), _jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(1); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(AppleButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 1 ? ICONS_NAMES.apple_white_icon : ICONS_NAMES.Apple_Filled_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) })), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank', onMouseEnter: function () { return setIndex(2); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(OutlookButtonStyled, __assign({ startIcon: _jsx(Image, { src: index === 2 ? ICONS_NAMES.outlook_White_ICON : ICONS_NAMES.outlook_Filled_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
|
|
61
|
+
return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank' }, { children: _jsx(GMailButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.GMAIL_Filled_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), _jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank' }, { children: _jsx(AppleButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.Apple_Filled_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) })), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank' }, { children: _jsx(OutlookButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.outlook_Filled_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
|
|
97
62
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '../../../components/Button';
|
|
3
3
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
import { FlowsTypes } from '../../../@types';
|
|
4
5
|
export declare type ButtonItemProps = {
|
|
6
|
+
name: string;
|
|
5
7
|
title: string;
|
|
6
8
|
href: string;
|
|
7
9
|
src: string;
|
|
@@ -11,5 +13,6 @@ export declare type ButtonItemProps = {
|
|
|
11
13
|
};
|
|
12
14
|
export interface EmailProvidersButtonsProps extends ButtonProps {
|
|
13
15
|
buttons: ButtonItemProps[];
|
|
16
|
+
flowName: FlowsTypes;
|
|
14
17
|
}
|
|
15
|
-
export default function FlowsButtons({ buttons }: EmailProvidersButtonsProps): JSX.Element;
|
|
18
|
+
export default function FlowsButtons({ buttons, flowName }: EmailProvidersButtonsProps): JSX.Element;
|