@tap-payments/auth-jsconnect 2.0.59-test → 2.0.60-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.
|
@@ -58,6 +58,7 @@ export var ICONS_NAMES = {
|
|
|
58
58
|
DOC_ICON: 'https://dash.b-cdn.net/icons/menu/document-icon.svg',
|
|
59
59
|
DROP_FILE_ICON: 'https://dash.b-cdn.net/icons/menu/upload-file-sample.svg',
|
|
60
60
|
CLOSE_ICON: 'https://dash.b-cdn.net/icons/menu/close-btn.svg',
|
|
61
|
+
PACI_ICON: 'https://dash.b-cdn.net/icons/menu/PACI-filled.svg',
|
|
61
62
|
GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
|
|
62
63
|
GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
|
|
63
64
|
outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
|
|
@@ -18,7 +18,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
18
18
|
import { styled, alpha } from '@mui/material/styles';
|
|
19
19
|
import Collapse from '../../../../components/Collapse';
|
|
20
20
|
import Form from '../../../../components/Form';
|
|
21
|
-
import Button, { AbsherButton } from '../../../shared/Button';
|
|
21
|
+
import Button, { AbsherButton, MobileButton } from '../../../shared/Button';
|
|
22
22
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
23
23
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
24
24
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
@@ -30,6 +30,7 @@ import Text from '../../../../components/Text';
|
|
|
30
30
|
import MIDTitle from './Title';
|
|
31
31
|
import MobileNumber from './MobileNumber';
|
|
32
32
|
import { PhoneValidationSchema } from './validation';
|
|
33
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
33
34
|
var FormStyled = styled(Form)(function () { return ({
|
|
34
35
|
display: 'flex',
|
|
35
36
|
flexDirection: 'column'
|
|
@@ -112,6 +113,6 @@ var Mobile = function (_a) {
|
|
|
112
113
|
var disabled = !methods.formState.isValid || !!error;
|
|
113
114
|
var title = t('join_our_community');
|
|
114
115
|
var subTitle = t('ide_terms_and_conditions_description');
|
|
115
|
-
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(
|
|
116
|
+
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), isKWCountry ? (_jsx(MobileButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (_jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') })))] }))] }))] })) }))] }));
|
|
116
117
|
};
|
|
117
118
|
export default React.memo(Mobile);
|
|
@@ -3,6 +3,7 @@ import { ButtonProps } from '../../../components/Button';
|
|
|
3
3
|
interface MobileButtonProps extends ButtonProps {
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
hideIcon?: boolean;
|
|
6
|
+
icon?: string;
|
|
6
7
|
}
|
|
7
|
-
export default function MobileButton({ children, hideIcon, disabled, ...props }: MobileButtonProps): JSX.Element;
|
|
8
|
+
export default function MobileButton({ children, hideIcon, icon, disabled, ...props }: MobileButtonProps): JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -39,6 +39,6 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
export default function MobileButton(_a) {
|
|
42
|
-
var children = _a.children, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "disabled"]);
|
|
43
|
-
return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ disabled: disabled, type: 'button', variant: 'outlined', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
|
|
42
|
+
var children = _a.children, hideIcon = _a.hideIcon, icon = _a.icon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "icon", "disabled"]);
|
|
43
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ disabled: disabled, type: 'button', variant: 'outlined', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: !!icon ? icon : ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
|
|
44
44
|
}
|