@tap-payments/auth-jsconnect 2.1.63-test → 2.1.65-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.
- package/build/@types/app.d.ts +4 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +0 -2
- package/build/app/store.d.ts +0 -2
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -14
- package/build/features/app/connectExpress/connectExpressStore.d.ts +5 -0
- package/build/features/app/connectExpress/connectExpressStore.js +24 -26
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +7 -4
- package/build/features/brand/Brand.d.ts +1 -1
- package/build/features/brand/Brand.js +8 -6
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +7 -4
- package/build/features/connect/Connect.d.ts +1 -2
- package/build/features/connect/Connect.js +11 -20
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.js +7 -4
- package/build/features/entity/Entity.d.ts +1 -1
- package/build/features/entity/Entity.js +7 -4
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -12
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +7 -4
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +7 -4
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/signIn/SignIn.d.ts +1 -1
- package/build/features/signIn/SignIn.js +7 -4
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +7 -4
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +12 -13
- package/build/index.js +12 -15
- package/build/utils/html.d.ts +0 -1
- package/build/utils/html.js +2 -10
- package/package.json +129 -130
- package/build/features/app/auth/authStore.d.ts +0 -46
- package/build/features/app/auth/authStore.js +0 -256
- package/build/features/auth/Auth.d.ts +0 -11
- package/build/features/auth/Auth.js +0 -79
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/auth/screens/NID/DOB.d.ts +0 -7
- package/build/features/auth/screens/NID/DOB.js +0 -47
- package/build/features/auth/screens/NID/IDNumber.d.ts +0 -3
- package/build/features/auth/screens/NID/IDNumber.js +0 -64
- package/build/features/auth/screens/NID/NID.d.ts +0 -5
- package/build/features/auth/screens/NID/NID.js +0 -68
- package/build/features/auth/screens/NID/TAC.d.ts +0 -3
- package/build/features/auth/screens/NID/TAC.js +0 -85
- package/build/features/auth/screens/NID/index.d.ts +0 -3
- package/build/features/auth/screens/NID/index.js +0 -2
- package/build/features/auth/screens/NID/validation.d.ts +0 -27
- package/build/features/auth/screens/NID/validation.js +0 -19
- package/build/features/auth/screens/OTP/OTP.d.ts +0 -5
- package/build/features/auth/screens/OTP/OTP.js +0 -76
- package/build/features/auth/screens/OTP/OTPInput.d.ts +0 -5
- package/build/features/auth/screens/OTP/OTPInput.js +0 -51
- package/build/features/auth/screens/OTP/index.d.ts +0 -3
- package/build/features/auth/screens/OTP/index.js +0 -2
- package/build/features/auth/screens/OTP/validation.d.ts +0 -8
- package/build/features/auth/screens/OTP/validation.js +0 -4
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const NIDValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
dob: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
5
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
6
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
dob: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
9
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
10
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
11
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
12
|
-
dob: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
13
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
14
|
-
}>>>;
|
|
15
|
-
export declare const NIDDOBValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
16
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
17
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
18
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
19
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
20
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
21
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
22
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
23
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
24
|
-
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
25
|
-
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
26
|
-
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
27
|
-
}>>>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export var NIDValidationSchema = yup.object().shape({
|
|
3
|
-
nid: yup
|
|
4
|
-
.string()
|
|
5
|
-
.matches(/^(1|2)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
|
|
6
|
-
.min(10, 'signup_invalid_national_id')
|
|
7
|
-
.required('signup_invalid_national_id'),
|
|
8
|
-
dob: yup.string().optional(),
|
|
9
|
-
termAndConditionChecked: yup.boolean().required().isTrue('check_terms_cond')
|
|
10
|
-
});
|
|
11
|
-
export var NIDDOBValidationSchema = yup.object().shape({
|
|
12
|
-
nid: yup
|
|
13
|
-
.string()
|
|
14
|
-
.matches(/^(1|2)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
|
|
15
|
-
.min(10, 'signup_invalid_national_id')
|
|
16
|
-
.required('signup_invalid_national_id'),
|
|
17
|
-
dob: yup.string().min(5).required('enter_valid_birth_date'),
|
|
18
|
-
termAndConditionChecked: yup.boolean().required().isTrue('check_terms_cond')
|
|
19
|
-
});
|
|
@@ -1,76 +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 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, authSelector, resetOTPScreen, verifyAuthOTP } from '../../../app/auth/authStore';
|
|
19
|
-
import Button from '../../../shared/Button';
|
|
20
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
22
|
-
import { useLanguage } from '../../../../hooks';
|
|
23
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
24
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
25
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
26
|
-
import Form from '../../../../components/Form';
|
|
27
|
-
import { maskPhone } 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 dispatch = useAppDispatch();
|
|
51
|
-
var _a = useAppSelector(authSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
52
|
-
var methods = useForm({
|
|
53
|
-
resolver: yupResolver(OTPValidation),
|
|
54
|
-
defaultValues: { otp: '' },
|
|
55
|
-
mode: 'onChange'
|
|
56
|
-
});
|
|
57
|
-
var t = useTranslation().t;
|
|
58
|
-
var isAr = useLanguage().isAr;
|
|
59
|
-
React.useEffect(function () {
|
|
60
|
-
if (error)
|
|
61
|
-
dispatch(clearError());
|
|
62
|
-
return function () {
|
|
63
|
-
dispatch(resetOTPScreen());
|
|
64
|
-
};
|
|
65
|
-
}, [methods.formState.isValid]);
|
|
66
|
-
var onSubmit = function (formData) {
|
|
67
|
-
dispatch(verifyAuthOTP(formData));
|
|
68
|
-
};
|
|
69
|
-
var onBack = function () {
|
|
70
|
-
dispatch(handlePrevScreenStep());
|
|
71
|
-
};
|
|
72
|
-
var disabled = !methods.formState.isValid || !!error;
|
|
73
|
-
var phone = data.nid;
|
|
74
|
-
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') : t('opt_nid_sent_title', { provider: 'ABSHER' }), !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: disabled, isAr: isAr, loading: loading, error: t(error || ''), onBackClicked: function () { return onBack(); } }, { children: t('confirm') }))] })) })) }));
|
|
75
|
-
};
|
|
76
|
-
export default React.memo(OTP);
|
|
@@ -1,51 +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 { 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 { authSelector, clearError, resendOTP } from '../../../app/auth/authStore';
|
|
20
|
-
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
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 _c = useAppSelector(authSelector), error = _c.error, loading = _c.loading;
|
|
36
|
-
var handleOnOTPChange = function (otp) {
|
|
37
|
-
if (!!error)
|
|
38
|
-
dispatch(clearError());
|
|
39
|
-
otpControl.field.onChange(otp);
|
|
40
|
-
};
|
|
41
|
-
var handleOnResendOTP = function () {
|
|
42
|
-
if (!!error)
|
|
43
|
-
dispatch(clearError());
|
|
44
|
-
if (otpControl.field.value)
|
|
45
|
-
setValue('otp', '', { shouldValidate: true });
|
|
46
|
-
dispatch(resendOTP());
|
|
47
|
-
};
|
|
48
|
-
var otpValue = otpControl.field.value;
|
|
49
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: loading ? undefined : handleOnResendOTP, value: otpValue, disabled: loading, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
50
|
-
};
|
|
51
|
-
export default React.memo(OTPInput);
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}>>>;
|