@tap-payments/auth-jsconnect 2.0.8 → 2.0.10

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.
Files changed (76) hide show
  1. package/build/@types/app.d.ts +2 -1
  2. package/build/@types/form.d.ts +3 -0
  3. package/build/@types/redux.d.ts +0 -1
  4. package/build/api/axios.d.ts +1 -0
  5. package/build/api/axios.js +3 -0
  6. package/build/api/entity.d.ts +1 -0
  7. package/build/api/entity.js +8 -1
  8. package/build/api/index.d.ts +3 -2
  9. package/build/api/index.js +2 -2
  10. package/build/app/rootReducer.d.ts +1 -0
  11. package/build/app/rootReducer.js +3 -1
  12. package/build/app/store.d.ts +2 -0
  13. package/build/assets/locales/ar.json +2 -1
  14. package/build/assets/locales/en.json +2 -1
  15. package/build/components/FileInput/DragAndDrop.js +1 -1
  16. package/build/constants/app.d.ts +9 -0
  17. package/build/constants/app.js +34 -0
  18. package/build/constants/validation.d.ts +1 -0
  19. package/build/constants/validation.js +1 -0
  20. package/build/features/app/bank/bankStore.d.ts +1 -0
  21. package/build/features/app/business/businessStore.d.ts +5 -3
  22. package/build/features/app/business/businessStore.js +34 -21
  23. package/build/features/app/connect/connectStore.d.ts +2 -1
  24. package/build/features/app/connect/connectStore.js +69 -38
  25. package/build/features/app/individual/individualStore.d.ts +1 -0
  26. package/build/features/app/individual/individualStore.js +1 -1
  27. package/build/features/app/password/passwordStore.d.ts +1 -0
  28. package/build/features/app/signIn/signInStore.d.ts +33 -0
  29. package/build/features/app/signIn/signInStore.js +390 -0
  30. package/build/features/app/tax/taxStore.d.ts +1 -0
  31. package/build/features/connect/screens/Merchant/validation.js +1 -1
  32. package/build/features/featuresScreens.d.ts +1 -0
  33. package/build/features/featuresScreens.js +22 -0
  34. package/build/features/shared/UploadFile/UploadFile.js +8 -7
  35. package/build/features/signIn/SignIn.d.ts +7 -0
  36. package/build/features/signIn/SignIn.js +49 -0
  37. package/build/features/signIn/index.d.ts +1 -0
  38. package/build/features/signIn/index.js +1 -0
  39. package/build/features/signIn/screens/Email/Email.d.ts +5 -0
  40. package/build/features/signIn/screens/Email/Email.js +95 -0
  41. package/build/features/signIn/screens/Email/EmailField.d.ts +5 -0
  42. package/build/features/signIn/screens/Email/EmailField.js +55 -0
  43. package/build/features/signIn/screens/Email/index.d.ts +3 -0
  44. package/build/features/signIn/screens/Email/index.js +2 -0
  45. package/build/features/signIn/screens/Email/validation.d.ts +8 -0
  46. package/build/features/signIn/screens/Email/validation.js +5 -0
  47. package/build/features/signIn/screens/Mobile/Mobile.d.ts +5 -0
  48. package/build/features/signIn/screens/Mobile/Mobile.js +106 -0
  49. package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +11 -0
  50. package/build/features/signIn/screens/Mobile/MobileNumber.js +151 -0
  51. package/build/features/signIn/screens/Mobile/index.d.ts +3 -0
  52. package/build/features/signIn/screens/Mobile/index.js +2 -0
  53. package/build/features/signIn/screens/Mobile/validation.d.ts +8 -0
  54. package/build/features/signIn/screens/Mobile/validation.js +28 -0
  55. package/build/features/signIn/screens/OTP/OTP.d.ts +5 -0
  56. package/build/features/signIn/screens/OTP/OTP.js +80 -0
  57. package/build/features/signIn/screens/OTP/OTPInput.d.ts +5 -0
  58. package/build/features/signIn/screens/OTP/OTPInput.js +53 -0
  59. package/build/features/signIn/screens/OTP/index.d.ts +3 -0
  60. package/build/features/signIn/screens/OTP/index.js +2 -0
  61. package/build/features/signIn/screens/OTP/validation.d.ts +8 -0
  62. package/build/features/signIn/screens/OTP/validation.js +4 -0
  63. package/build/features/signIn/screens/Password/Password.d.ts +5 -0
  64. package/build/features/signIn/screens/Password/Password.js +54 -0
  65. package/build/features/signIn/screens/Password/PasswordInput.d.ts +5 -0
  66. package/build/features/signIn/screens/Password/PasswordInput.js +28 -0
  67. package/build/features/signIn/screens/Password/index.d.ts +3 -0
  68. package/build/features/signIn/screens/Password/index.js +2 -0
  69. package/build/features/signIn/screens/Password/validation.d.ts +8 -0
  70. package/build/features/signIn/screens/Password/validation.js +4 -0
  71. package/build/hooks/useAppDispatch.d.ts +1 -0
  72. package/build/index.d.ts +3 -2
  73. package/build/index.js +5 -2
  74. package/build/utils/string.d.ts +1 -0
  75. package/build/utils/string.js +4 -0
  76. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import * as yup from 'yup';
2
+ export var PhoneValidationSchema = yup.object().shape({
3
+ mobile: yup
4
+ .string()
5
+ .test({
6
+ test: function (value) {
7
+ var countryCode = this.parent.countryCode;
8
+ var isSA = countryCode.iso2 === 'SA';
9
+ var digits = countryCode.digits;
10
+ var mobileValue = value || '';
11
+ var valueLen = mobileValue.length;
12
+ var isNumber = mobileValue.match(/^[0-9]/g);
13
+ if (!isNumber)
14
+ return this.createError({ message: 'enter_valid_mobile_number' });
15
+ var isStartWithZero = mobileValue.startsWith('05');
16
+ var isStartWith5 = mobileValue.startsWith('5');
17
+ var isSaudiNumber = isStartWith5 || isStartWithZero;
18
+ if (isSA) {
19
+ if (!isSaudiNumber)
20
+ return this.createError({ message: 'start_with_number' });
21
+ var requiredLen = isStartWith5 ? digits - 1 : digits;
22
+ return valueLen === requiredLen ? true : this.createError({ message: 'enter_valid_mobile_number' });
23
+ }
24
+ return valueLen === digits ? true : this.createError({ message: 'enter_valid_mobile_number' });
25
+ }
26
+ })
27
+ .required('mobile_number_error')
28
+ });
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OTPProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
5
+ export default _default;
@@ -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,5 @@
1
+ import * as React from 'react';
2
+ export interface OTPProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OTP, { OTPProps } from './OTP';
2
+ export type { OTPProps };
3
+ export default OTP;
@@ -0,0 +1,2 @@
1
+ import OTP from './OTP';
2
+ export default OTP;
@@ -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,4 @@
1
+ import * as yup from 'yup';
2
+ export var OTPValidation = yup.object().shape({
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
+ });
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface PasswordProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: PasswordProps) => JSX.Element>;
5
+ export default _default;
@@ -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,5 @@
1
+ import * as React from 'react';
2
+ interface PasswordInputProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: PasswordInputProps) => JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import Password, { PasswordProps } from './Password';
2
+ export type { PasswordProps };
3
+ export default Password;
@@ -0,0 +1,2 @@
1
+ import Password from './Password';
2
+ export default Password;
@@ -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
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var PasswordValidation = yup.object().shape({
3
+ password: yup.string().min(6, 'password_required').required('password_required')
4
+ });
@@ -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
- export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps };
10
- export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib };
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
- export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib };
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
  };
@@ -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;
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",