@tap-payments/auth-jsconnect 1.0.41 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +9 -33
- package/build/api/data.d.ts +1 -0
- package/build/api/data.js +5 -1
- package/build/api/entity.d.ts +3 -4
- package/build/api/index.d.ts +2 -2
- package/build/api/lead.d.ts +1 -2
- package/build/api/lead.js +3 -7
- package/build/components/AnimationFlow/BottomSheet.js +3 -23
- package/build/components/Footer/Footer.d.ts +3 -1
- package/build/components/Footer/Footer.js +11 -47
- package/build/constants/api.d.ts +2 -2
- package/build/constants/api.js +5 -5
- package/build/constants/dummy.d.ts +14 -36
- package/build/constants/dummy.js +29 -53
- package/build/features/app/business/businessStore.d.ts +9 -7
- package/build/features/app/business/businessStore.js +81 -51
- package/build/features/app/connect/connectStore.js +1 -1
- package/build/features/business/screens/Activities/Activities.js +6 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +2 -2
- package/build/features/business/screens/BusinessType/CompanyLicense.js +9 -6
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +2 -2
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +9 -9
- package/build/features/business/screens/Customers/CustomerLocations.js +14 -4
- package/build/features/business/screens/Customers/Customers.js +17 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.js +14 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -4
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +1 -2
- package/build/features/connect/screens/NID/NID.js +1 -2
- package/build/features/shared/Containers/FeatureContainer.js +1 -1
- package/build/features/shared/Containers/ScreenContainer.js +1 -1
- package/build/features/shared/Footer/Footer.js +7 -1
- package/build/hooks/useElementSizeById.d.ts +6 -0
- package/build/hooks/useElementSizeById.js +12 -0
- package/package.json +1 -1
|
@@ -86,6 +86,6 @@ var BrandName = function (_a) {
|
|
|
86
86
|
var clearBrandName = function () {
|
|
87
87
|
brandControl.field.onChange('');
|
|
88
88
|
};
|
|
89
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
|
|
89
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
|
|
90
90
|
};
|
|
91
91
|
export default React.memo(BrandName);
|
|
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import MIDTitle from './Title';
|
|
31
31
|
import MobileNumber from './MobileNumber';
|
|
32
|
-
import BusinessCountry from './BusinessCountry';
|
|
33
32
|
import { PhoneValidationSchema } from './validation';
|
|
34
33
|
var FormStyled = styled(Form)(function () { return ({
|
|
35
34
|
display: 'flex',
|
|
@@ -108,6 +107,6 @@ var Mobile = function (_a) {
|
|
|
108
107
|
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
109
108
|
var listActive = isBusinessListActive || isCountryListActive;
|
|
110
109
|
var disabled = !methods.formState.isValid || !!error;
|
|
111
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [
|
|
110
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }, isAr: isAr }, { children: t('absher_button_label') }))] }))] })) }))] }));
|
|
112
111
|
};
|
|
113
112
|
export default React.memo(Mobile);
|
|
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import IDNumber from './IDNumber';
|
|
31
31
|
import DOB from './DOB';
|
|
32
|
-
import BusinessCountry from '../Mobile/BusinessCountry';
|
|
33
32
|
var FormStyled = styled(Form)(function () { return ({
|
|
34
33
|
display: 'flex',
|
|
35
34
|
flexDirection: 'column'
|
|
@@ -87,6 +86,6 @@ var NID = function (_a) {
|
|
|
87
86
|
dispatch(handlePrevScreenStep('CONNECT_MOBILE_STEP'));
|
|
88
87
|
};
|
|
89
88
|
var disabled = !methods.formState.isValid || !!error;
|
|
90
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(
|
|
89
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading, hideIcon: true, isAr: isAr }, { children: t('mobile_button_label') }))] }))] })) })) }));
|
|
91
90
|
};
|
|
92
91
|
export default React.memo(NID);
|
|
@@ -28,6 +28,6 @@ var Container = styled(Box)(function (_a) {
|
|
|
28
28
|
_b);
|
|
29
29
|
});
|
|
30
30
|
var FeatureContainer = React.forwardRef(function (props, ref) {
|
|
31
|
-
return _jsx(Container, __assign({}, props, { ref: ref, id: 'feature-container' }));
|
|
31
|
+
return _jsx(Container, __assign({}, props, { ref: ref, id: 'main-feature-container' }));
|
|
32
32
|
});
|
|
33
33
|
export default FeatureContainer;
|
|
@@ -24,6 +24,6 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
var ScreenContainer = React.forwardRef(function (props, ref) {
|
|
27
|
-
return _jsx(BoxStyled, __assign({}, props, { ref: ref }));
|
|
27
|
+
return _jsx(BoxStyled, __assign({}, props, { ref: ref, id: 'main-screen-containers' }));
|
|
28
28
|
});
|
|
29
29
|
export default ScreenContainer;
|
|
@@ -4,13 +4,19 @@ import { useAppDispatch, useLanguage } from '../../../hooks';
|
|
|
4
4
|
import { handleLanguage } from '../../../app/settings';
|
|
5
5
|
import Footer from '../../../components/Footer';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
|
+
import { connectSelector } from '../../app/connect/connectStore';
|
|
7
9
|
export default function CustomFooter() {
|
|
8
10
|
var isEn = useLanguage().isEn;
|
|
9
11
|
var t = useTranslation().t;
|
|
10
12
|
var dispatch = useAppDispatch();
|
|
13
|
+
var _a = useSelector(connectSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
11
14
|
var handleChangeLanguage = function () {
|
|
12
15
|
var language = isEn ? LanguageMode.AR : LanguageMode.EN;
|
|
13
16
|
dispatch(handleLanguage(language));
|
|
14
17
|
};
|
|
15
|
-
|
|
18
|
+
var country = data.businessCountry;
|
|
19
|
+
var countryName = isEn ? country.name.english : country.name.arabic;
|
|
20
|
+
var countryFlag = country.logo;
|
|
21
|
+
return (_jsx(Footer, { onSwitchLanguage: handleChangeLanguage, language: t('language'), countryName: countryName, countryFlag: countryFlag }));
|
|
16
22
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export var useElementSizeById = function (id) {
|
|
3
|
+
var _a = useState({ width: 0, height: 0 }), size = _a[0], setSize = _a[1];
|
|
4
|
+
var element = document.getElementById(id);
|
|
5
|
+
useEffect(function () {
|
|
6
|
+
if (element) {
|
|
7
|
+
var _a = element.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
8
|
+
setSize({ width: width, height: height });
|
|
9
|
+
}
|
|
10
|
+
}, [element]);
|
|
11
|
+
return size;
|
|
12
|
+
};
|