@tap-payments/auth-jsconnect 2.0.7 → 2.0.9
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/form.d.ts +4 -0
- package/build/@types/redux.d.ts +0 -1
- package/build/api/entity.d.ts +4 -3
- package/build/api/entity.js +8 -1
- package/build/api/index.d.ts +2 -0
- package/build/api/individual.d.ts +1 -0
- package/build/api/individual.js +9 -2
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +2 -1
- package/build/assets/locales/en.json +2 -1
- package/build/components/FileInput/DragAndDrop.js +1 -2
- package/build/constants/app.d.ts +9 -0
- package/build/constants/app.js +36 -0
- package/build/constants/validation.d.ts +2 -0
- package/build/constants/validation.js +2 -0
- package/build/features/app/bank/bankStore.d.ts +1 -1
- package/build/features/app/bank/bankStore.js +23 -42
- package/build/features/app/business/businessStore.d.ts +5 -3
- package/build/features/app/business/businessStore.js +55 -31
- package/build/features/app/connect/connectStore.d.ts +2 -1
- package/build/features/app/connect/connectStore.js +78 -47
- package/build/features/app/individual/individualStore.d.ts +9 -2
- package/build/features/app/individual/individualStore.js +80 -41
- package/build/features/app/password/passwordStore.d.ts +1 -0
- package/build/features/app/password/passwordStore.js +3 -7
- package/build/features/app/signIn/signInStore.d.ts +33 -0
- package/build/features/app/signIn/signInStore.js +389 -0
- package/build/features/app/tax/taxStore.d.ts +1 -0
- package/build/features/bank/screens/BankDetails/BankStatement.js +6 -17
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +11 -1
- 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/connect/screens/Merchant/Merchant.js +3 -2
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +22 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +19 -5
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadFile.js +13 -13
- package/build/features/signIn/SignIn.d.ts +7 -0
- package/build/features/signIn/SignIn.js +49 -0
- package/build/features/signIn/index.d.ts +1 -0
- package/build/features/signIn/index.js +1 -0
- package/build/features/signIn/screens/Email/Email.d.ts +5 -0
- package/build/features/signIn/screens/Email/Email.js +95 -0
- package/build/features/signIn/screens/Email/EmailField.d.ts +5 -0
- package/build/features/signIn/screens/Email/EmailField.js +55 -0
- package/build/features/signIn/screens/Email/index.d.ts +3 -0
- package/build/features/signIn/screens/Email/index.js +2 -0
- package/build/features/signIn/screens/Email/validation.d.ts +8 -0
- package/build/features/signIn/screens/Email/validation.js +5 -0
- package/build/features/signIn/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/signIn/screens/Mobile/Mobile.js +106 -0
- package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +11 -0
- package/build/features/signIn/screens/Mobile/MobileNumber.js +151 -0
- package/build/features/signIn/screens/Mobile/index.d.ts +3 -0
- package/build/features/signIn/screens/Mobile/index.js +2 -0
- package/build/features/signIn/screens/Mobile/validation.d.ts +8 -0
- package/build/features/signIn/screens/Mobile/validation.js +28 -0
- package/build/features/signIn/screens/OTP/OTP.d.ts +5 -0
- package/build/features/signIn/screens/OTP/OTP.js +80 -0
- package/build/features/signIn/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/signIn/screens/OTP/OTPInput.js +53 -0
- package/build/features/signIn/screens/OTP/index.d.ts +3 -0
- package/build/features/signIn/screens/OTP/index.js +2 -0
- package/build/features/signIn/screens/OTP/validation.d.ts +8 -0
- package/build/features/signIn/screens/OTP/validation.js +4 -0
- package/build/features/signIn/screens/Password/Password.d.ts +5 -0
- package/build/features/signIn/screens/Password/Password.js +54 -0
- package/build/features/signIn/screens/Password/PasswordInput.d.ts +5 -0
- package/build/features/signIn/screens/Password/PasswordInput.js +28 -0
- package/build/features/signIn/screens/Password/index.d.ts +3 -0
- package/build/features/signIn/screens/Password/index.js +2 -0
- package/build/features/signIn/screens/Password/validation.d.ts +8 -0
- package/build/features/signIn/screens/Password/validation.js +4 -0
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +5 -2
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
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 Box from '@mui/material/Box/Box';
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
17
|
+
import Text from '../../../../components/Text';
|
|
18
|
+
import { clearError, signInSelector, resetOTPScreen, verifyAuthOTP } from '../../../app/signIn/signInStore';
|
|
19
|
+
import Button from '../../../shared/Button';
|
|
20
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
23
|
+
import { useLanguage } from '../../../../hooks';
|
|
24
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
25
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
26
|
+
import Form from '../../../../components/Form';
|
|
27
|
+
import { maskPhone, maskEmail } from '../../../../utils';
|
|
28
|
+
import { OTPValidation } from './validation';
|
|
29
|
+
import OTPInput from './OTPInput';
|
|
30
|
+
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return ({
|
|
33
|
+
background: theme.palette.common.white,
|
|
34
|
+
border: '1px solid',
|
|
35
|
+
borderColor: theme.palette.divider,
|
|
36
|
+
direction: theme.direction,
|
|
37
|
+
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
38
|
+
marginBottom: theme.spacing(5.75)
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
|
|
44
|
+
});
|
|
45
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column'
|
|
48
|
+
}); });
|
|
49
|
+
var OTP = function () {
|
|
50
|
+
var _a;
|
|
51
|
+
var dispatch = useAppDispatch();
|
|
52
|
+
var _b = useAppSelector(signInSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
53
|
+
var methods = useForm({
|
|
54
|
+
resolver: yupResolver(OTPValidation),
|
|
55
|
+
defaultValues: data.otpData,
|
|
56
|
+
mode: 'onChange'
|
|
57
|
+
});
|
|
58
|
+
var t = useTranslation().t;
|
|
59
|
+
var isAr = useLanguage().isAr;
|
|
60
|
+
var isEmail = !!data.auth.email;
|
|
61
|
+
React.useEffect(function () {
|
|
62
|
+
if (error)
|
|
63
|
+
dispatch(clearError());
|
|
64
|
+
return function () {
|
|
65
|
+
dispatch(resetOTPScreen());
|
|
66
|
+
};
|
|
67
|
+
}, [methods.formState.isValid]);
|
|
68
|
+
var onSubmit = function (formData) {
|
|
69
|
+
dispatch(verifyAuthOTP(formData));
|
|
70
|
+
};
|
|
71
|
+
var onBack = function () {
|
|
72
|
+
dispatch(handlePrevScreenStep(isEmail ? 'SIGIN_EMAIL_STEP' : 'SIGIN_MOBILE_STEP'));
|
|
73
|
+
};
|
|
74
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
75
|
+
var phone = ((_a = data.auth.countryCode) === null || _a === void 0 ? void 0 : _a.idd_prefix) + (data.auth.mobile || '');
|
|
76
|
+
var email = data.auth.email || '';
|
|
77
|
+
var title = t('ide_opt_sent_title');
|
|
78
|
+
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') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: isEmail ? maskEmail(email) : maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
79
|
+
};
|
|
80
|
+
export default React.memo(OTP);
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { useController, useFormContext } from 'react-hook-form';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import Box from '@mui/material/Box/Box';
|
|
17
|
+
import { styled } from '@mui/material/styles';
|
|
18
|
+
import OTPField from '../../../shared/OTP';
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
20
|
+
import { signInSelector, resendOTPMobile, resendOTPEmail } from '../../../app/signIn/signInStore';
|
|
21
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return ({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
fontFamily: theme.typography.fontFamily
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
var OTPInput = function (_a) {
|
|
31
|
+
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
32
|
+
var t = useTranslation().t;
|
|
33
|
+
var dispatch = useAppDispatch();
|
|
34
|
+
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
+
var data = useAppSelector(signInSelector).data;
|
|
36
|
+
var isEmail = !!data.auth.email;
|
|
37
|
+
var handleOnOTPChange = function (otp) {
|
|
38
|
+
otpControl.field.onChange(otp);
|
|
39
|
+
};
|
|
40
|
+
var handleOnResendOTP = function () {
|
|
41
|
+
if (otpControl.field.value)
|
|
42
|
+
setValue('otp', '', { shouldValidate: true });
|
|
43
|
+
dispatch(resendOTPMobile());
|
|
44
|
+
};
|
|
45
|
+
var handleOnResendEmailOTP = function () {
|
|
46
|
+
if (otpControl.field.value)
|
|
47
|
+
setValue('otp', '', { shouldValidate: true });
|
|
48
|
+
dispatch(resendOTPEmail());
|
|
49
|
+
};
|
|
50
|
+
var otpValue = otpControl.field.value;
|
|
51
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: isEmail ? handleOnResendEmailOTP : handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
52
|
+
};
|
|
53
|
+
export default React.memo(OTPInput);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
+
otp: 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
|
+
otp: 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
|
+
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
+
}>>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { useForm, FormProvider } from 'react-hook-form';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import { useSelector } from 'react-redux';
|
|
17
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
+
import Box from '@mui/material/Box';
|
|
19
|
+
import { styled } from '@mui/material/styles';
|
|
20
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
21
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
22
|
+
import Form from '../../../../components/Form';
|
|
23
|
+
import { useLanguage } from '../../../../hooks';
|
|
24
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
+
import Button from '../../../shared/Button';
|
|
26
|
+
import { signInSelector, verifyAuthPassword } from '../../../app/signIn/signInStore';
|
|
27
|
+
import PasswordInput from './PasswordInput';
|
|
28
|
+
import { PasswordValidation } from './validation';
|
|
29
|
+
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return ({
|
|
32
|
+
paddingBottom: theme.spacing(7.5)
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
var Password = function (_a) {
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var isAr = useLanguage().isAr;
|
|
38
|
+
var dispatch = useAppDispatch();
|
|
39
|
+
var _b = useSelector(signInSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
40
|
+
var isEmail = !!data.auth.email;
|
|
41
|
+
var methods = useForm({
|
|
42
|
+
resolver: yupResolver(PasswordValidation),
|
|
43
|
+
defaultValues: data.passwordData,
|
|
44
|
+
mode: 'onChange'
|
|
45
|
+
});
|
|
46
|
+
var onSubmit = function (data) {
|
|
47
|
+
dispatch(verifyAuthPassword(data));
|
|
48
|
+
};
|
|
49
|
+
var onBack = function () {
|
|
50
|
+
dispatch(handlePrevScreenStep(isEmail ? 'SIGIN_EMAIL_STEP' : 'SIGIN_MOBILE_STEP'));
|
|
51
|
+
};
|
|
52
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(PasswordInput, {}) }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
53
|
+
};
|
|
54
|
+
export default React.memo(Password);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
5
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
6
|
+
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
7
|
+
import Input from '../../../shared/Input';
|
|
8
|
+
var PasswordInput = function (_a) {
|
|
9
|
+
var _b;
|
|
10
|
+
var t = useTranslation().t;
|
|
11
|
+
var control = useFormContext().control;
|
|
12
|
+
var passwordControl = useController({ control: control, name: 'password' });
|
|
13
|
+
var _c = React.useState(false), showPassword = _c[0], setShowPassword = _c[1];
|
|
14
|
+
var handleShowPassword = function () {
|
|
15
|
+
setShowPassword(true);
|
|
16
|
+
};
|
|
17
|
+
var handleHidePassword = function () {
|
|
18
|
+
setShowPassword(false);
|
|
19
|
+
};
|
|
20
|
+
var handlePasswordChange = function (_a) {
|
|
21
|
+
var target = _a.target;
|
|
22
|
+
passwordControl.field.onChange(target.value);
|
|
23
|
+
};
|
|
24
|
+
var passwordValue = passwordControl.field.value;
|
|
25
|
+
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
26
|
+
return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t('tap_js_password_description'), onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('tap_js_password_placeholder'), warningType: 'alert', type: showPassword ? 'text' : 'password', warningMessage: error && t(error) }) }));
|
|
27
|
+
};
|
|
28
|
+
export default React.memo(PasswordInput);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const PasswordValidation: 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
|
+
}>>>;
|
|
@@ -6,4 +6,5 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
|
6
6
|
tax: import("../features/app/tax/taxStore").TaxState;
|
|
7
7
|
individual: import("../features/app/individual/individualStore").IndividualState;
|
|
8
8
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
9
|
+
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
9
10
|
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
package/build/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ import { PasswordLib, renderPasswordLib, PasswordLibProps, unmountPasswordLib }
|
|
|
6
6
|
import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividualLib } from './features/individual';
|
|
7
7
|
import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from './features/bank';
|
|
8
8
|
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from './features/tax';
|
|
9
|
-
|
|
10
|
-
export {
|
|
9
|
+
import { SignInLib, renderSignInLib, SignInLibProps, unmountSignInLib } from './features/signIn';
|
|
10
|
+
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, SignInLibProps };
|
|
11
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, SignInLib, renderSignInLib, unmountSignInLib };
|
package/build/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import { PasswordLib, renderPasswordLib, unmountPasswordLib } from './features/p
|
|
|
6
6
|
import { IndividualLib, renderIndividualLib, unmountIndividualLib } from './features/individual';
|
|
7
7
|
import { BankLib, renderBankLib, unmountBankLib } from './features/bank';
|
|
8
8
|
import { TaxLib, renderTaxLib, unmountTaxLib } from './features/tax';
|
|
9
|
-
|
|
9
|
+
import { SignInLib, renderSignInLib, unmountSignInLib } from './features/signIn';
|
|
10
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, SignInLib, renderSignInLib, unmountSignInLib };
|
|
10
11
|
window['TapAuth'] = {
|
|
11
12
|
renderConnectLib: renderConnectLib,
|
|
12
13
|
unmountConnectLib: unmountConnectLib,
|
|
@@ -19,5 +20,7 @@ window['TapAuth'] = {
|
|
|
19
20
|
renderBankLib: renderBankLib,
|
|
20
21
|
unmountBankLib: unmountBankLib,
|
|
21
22
|
renderTaxLib: renderTaxLib,
|
|
22
|
-
unmountTaxLib: unmountTaxLib
|
|
23
|
+
unmountTaxLib: unmountTaxLib,
|
|
24
|
+
renderSignInLib: renderSignInLib,
|
|
25
|
+
unmountSignInLib: unmountSignInLib
|
|
23
26
|
};
|
package/build/utils/string.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DeviceInfo } from '../@types';
|
|
2
2
|
export declare const maskPhone: (str?: string) => string;
|
|
3
3
|
export declare const maskID: (str: string) => string;
|
|
4
|
+
export declare const maskEmail: (str: string) => string;
|
|
4
5
|
export declare const showLastFour: (str: string) => string;
|
|
5
6
|
export declare const getIndividualName: (name: string) => {
|
|
6
7
|
first: string;
|
package/build/utils/string.js
CHANGED
|
@@ -11,6 +11,10 @@ export var maskID = function (str) {
|
|
|
11
11
|
var lastTwo = str.substring(str.length - 2, str.length);
|
|
12
12
|
return ' ••••' + lastTwo;
|
|
13
13
|
};
|
|
14
|
+
export var maskEmail = function (str) {
|
|
15
|
+
var lastTwo = str.substring(str.length - 2, str.length);
|
|
16
|
+
return ' ••••' + lastTwo;
|
|
17
|
+
};
|
|
14
18
|
export var showLastFour = function (str) {
|
|
15
19
|
if (str && str.length >= 4) {
|
|
16
20
|
var lastFour = str.substring(str.length - 4, str.length);
|