@tap-payments/auth-jsconnect 1.0.60 → 1.0.63
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/redux.d.ts +1 -0
- package/build/api/lead.d.ts +4 -1
- package/build/assets/locales/ar.json +5 -4
- package/build/assets/locales/en.json +5 -4
- package/build/constants/app.js +1 -1
- package/build/constants/assets.d.ts +17 -7
- package/build/constants/assets.js +17 -7
- package/build/features/Landing/Landing.js +5 -8
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +6 -20
- package/build/features/app/bank/bankStore.js +4 -0
- package/build/features/app/business/businessStore.d.ts +6 -2
- package/build/features/app/business/businessStore.js +87 -60
- package/build/features/app/connect/connectStore.js +44 -23
- package/build/features/app/individual/individualStore.js +4 -0
- package/build/features/app/password/passwordStore.js +6 -0
- package/build/features/app/tax/taxStore.js +6 -0
- package/build/features/business/Business.js +3 -2
- package/build/features/business/screens/Activities/Activities.js +4 -0
- package/build/features/business/screens/Activities/ActivitiesList.js +5 -6
- package/build/features/business/screens/Activities/SalesChannels.js +4 -5
- package/build/features/business/screens/BusinessType/BusinessType.js +1 -6
- package/build/features/business/screens/BusinessType/LicenseList.js +18 -13
- package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
- package/build/features/business/screens/Customers/Customers.js +0 -1
- package/build/features/business/screens/Success/Success.js +3 -2
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +20 -20
- package/build/features/business/screens/Verify/Verify.js +1 -1
- package/build/features/password/screens/CreatePassword/CreatePassword.js +0 -1
- package/build/features/shared/Button/AbsherButton.js +1 -0
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +12 -7
- package/build/features/shared/Button/MobileButton.js +1 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +2 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +4 -0
- package/package.json +1 -1
- package/build/features/business/screens/BusinessType/CRNumber.d.ts +0 -7
- package/build/features/business/screens/BusinessType/CRNumber.js +0 -41
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +0 -11
- package/build/features/business/screens/BusinessType/CompanyLicense.js +0 -127
- package/build/features/business/screens/BusinessType/FLNumber.d.ts +0 -7
- package/build/features/business/screens/BusinessType/FLNumber.js +0 -41
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +0 -11
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +0 -127
- package/build/features/business/screens/Confirm/Confirm.d.ts +0 -5
- package/build/features/business/screens/Confirm/Confirm.js +0 -56
- package/build/features/business/screens/Confirm/index.d.ts +0 -3
- package/build/features/business/screens/Confirm/index.js +0 -2
- package/build/features/connect/screens/Mobile/BusinessCountry.d.ts +0 -8
- package/build/features/connect/screens/Mobile/BusinessCountry.js +0 -40
- package/build/features/connect/screens/Password/Password.d.ts +0 -5
- package/build/features/connect/screens/Password/Password.js +0 -60
- package/build/features/connect/screens/Password/PasswordInput.d.ts +0 -5
- package/build/features/connect/screens/Password/PasswordInput.js +0 -39
- package/build/features/connect/screens/Password/index.d.ts +0 -3
- package/build/features/connect/screens/Password/index.js +0 -2
- package/build/features/connect/screens/Password/validation.d.ts +0 -8
- package/build/features/connect/screens/Password/validation.js +0 -4
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { styled } from '@mui/material/styles';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import Text from '../../../../components/Text';
|
|
17
|
-
import Collapse from '../../../../components/Collapse';
|
|
18
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
|
-
import Icon from '../../../../components/Icon';
|
|
20
|
-
import Input from '../../../shared/Input';
|
|
21
|
-
import { useLanguage } from '../../../../hooks';
|
|
22
|
-
var CountrySpanStyled = styled(Text)(function () { return ({
|
|
23
|
-
cursor: 'pointer'
|
|
24
|
-
}); });
|
|
25
|
-
var CountryIconStyled = styled(Icon)(function (_a) {
|
|
26
|
-
var theme = _a.theme;
|
|
27
|
-
return ({
|
|
28
|
-
width: theme.spacing(2.75),
|
|
29
|
-
height: theme.spacing(2),
|
|
30
|
-
verticalAlign: 'middle'
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
var BusinessCountry = React.forwardRef(function (_a, ref) {
|
|
34
|
-
var _b, _c;
|
|
35
|
-
var country = _a.country, show = _a.show;
|
|
36
|
-
var t = useTranslation().t;
|
|
37
|
-
var isAr = useLanguage().isAr;
|
|
38
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ ref: ref, sx: { marginBottom: '25px' } }, { children: _jsx(Input, { sx: { cursor: 'auto' }, label: t('signup_select_country'), readOnly: true, disabled: true, startAdornment: _jsx(CountrySpanStyled, { children: _jsx(CountryIconStyled, { src: (country === null || country === void 0 ? void 0 : country.logo) || '' }) }), placeholder: t('ide_mobile_placeholder'), value: (isAr ? (_b = country === null || country === void 0 ? void 0 : country.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = country === null || country === void 0 ? void 0 : country.name) === null || _c === void 0 ? void 0 : _c.english) || '' }) })) })));
|
|
39
|
-
});
|
|
40
|
-
export default React.memo(BusinessCountry);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useSelector } from 'react-redux';
|
|
15
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
16
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
|
-
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
19
|
-
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
-
import { clearError, connectSelector } from '../../../app/connect/connectStore';
|
|
22
|
-
import Form from '../../../../components/Form';
|
|
23
|
-
import Button from '../../../shared/Button';
|
|
24
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import { useLanguage } from '../../../../hooks';
|
|
26
|
-
import { PasswordValidationSchema } from './validation';
|
|
27
|
-
import PasswordInput from './PasswordInput';
|
|
28
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
29
|
-
display: 'flex',
|
|
30
|
-
flexDirection: 'column',
|
|
31
|
-
justifyContent: 'space-between',
|
|
32
|
-
height: '100%'
|
|
33
|
-
}); });
|
|
34
|
-
var Password = function (_a) {
|
|
35
|
-
var dispatch = useAppDispatch();
|
|
36
|
-
var _b = useSelector(connectSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
37
|
-
var methods = useForm({
|
|
38
|
-
resolver: yupResolver(PasswordValidationSchema),
|
|
39
|
-
defaultValues: {
|
|
40
|
-
password: ''
|
|
41
|
-
},
|
|
42
|
-
mode: 'onChange'
|
|
43
|
-
});
|
|
44
|
-
var t = useTranslation().t;
|
|
45
|
-
var isAr = useLanguage().isAr;
|
|
46
|
-
var isAbsher = data.otpData.isAbsher;
|
|
47
|
-
React.useEffect(function () {
|
|
48
|
-
if (error)
|
|
49
|
-
dispatch(clearError());
|
|
50
|
-
}, [methods.formState.isValid]);
|
|
51
|
-
var onSubmit = function (formData) {
|
|
52
|
-
console.log(formData);
|
|
53
|
-
};
|
|
54
|
-
var onBack = function () {
|
|
55
|
-
dispatch(handlePrevScreenStep(isAbsher ? 'CONNECT_NID_STEP' : 'CONNECT_MOBILE_STEP'));
|
|
56
|
-
};
|
|
57
|
-
var disabled = !methods.formState.isValid || !!error;
|
|
58
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(PasswordInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
59
|
-
};
|
|
60
|
-
export default React.memo(Password);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
17
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
-
import Input from '../../../shared/Input';
|
|
19
|
-
var PasswordInput = function (_a) {
|
|
20
|
-
var _b;
|
|
21
|
-
var t = useTranslation().t;
|
|
22
|
-
var control = useFormContext().control;
|
|
23
|
-
var _c = React.useState(false), showPassword = _c[0], setShowPassword = _c[1];
|
|
24
|
-
var passwordControl = useController({ control: control, name: 'password' });
|
|
25
|
-
var handlePasswordChange = function (_a) {
|
|
26
|
-
var target = _a.target;
|
|
27
|
-
passwordControl.field.onChange(target.value);
|
|
28
|
-
};
|
|
29
|
-
var handleShowPassword = function () {
|
|
30
|
-
setShowPassword(true);
|
|
31
|
-
};
|
|
32
|
-
var handleHidePassword = function () {
|
|
33
|
-
setShowPassword(false);
|
|
34
|
-
};
|
|
35
|
-
var passwordValue = passwordControl.field.value;
|
|
36
|
-
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
37
|
-
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 5 } }, { children: _jsx(Input, { label: t('tap_js_password_description'), inputProps: { autoComplete: 'off' }, onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('tap_js_password_placeholder'), type: showPassword ? 'text' : 'password', warningType: 'alert', warningMessage: error && t(error, { length: 8 }) }) })));
|
|
38
|
-
};
|
|
39
|
-
export default React.memo(PasswordInput);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const PasswordValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
5
|
-
password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
-
password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
}>>>;
|