@tap-payments/auth-jsconnect 2.0.8 → 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 +3 -0
- package/build/@types/redux.d.ts +0 -1
- package/build/api/entity.d.ts +1 -0
- package/build/api/entity.js +8 -1
- package/build/api/index.d.ts +1 -0
- 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 -1
- package/build/constants/app.d.ts +9 -0
- package/build/constants/app.js +34 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/bank/bankStore.d.ts +1 -0
- package/build/features/app/business/businessStore.d.ts +5 -3
- package/build/features/app/business/businessStore.js +34 -21
- package/build/features/app/connect/connectStore.d.ts +2 -1
- package/build/features/app/connect/connectStore.js +69 -38
- package/build/features/app/individual/individualStore.d.ts +1 -0
- package/build/features/app/individual/individualStore.js +1 -1
- package/build/features/app/password/passwordStore.d.ts +1 -0
- 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/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/shared/UploadFile/UploadFile.js +8 -7
- 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 +128 -128
|
@@ -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);
|
package/package.json
CHANGED
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "connect library, auth",
|
|
5
|
-
"private": false,
|
|
6
|
-
"main": "build/index.js",
|
|
7
|
-
"module": "build/index.js",
|
|
8
|
-
"types": "build/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"build",
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"husky:setup": "npx husky install",
|
|
15
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
-
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
-
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
-
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
-
"build": "rm -rf build && cross-env NODE_ENV=production webpack",
|
|
21
|
-
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
-
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [],
|
|
27
|
-
"author": {
|
|
28
|
-
"name": "Ahmed Elsharkawy",
|
|
29
|
-
"email": "a.elsharkawy@tap.company"
|
|
30
|
-
},
|
|
31
|
-
"license": "ISC",
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.18.6",
|
|
34
|
-
"@babel/preset-env": "^7.18.6",
|
|
35
|
-
"@babel/preset-react": "^7.18.6",
|
|
36
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
-
"@types/lodash-es": "^4.17.6",
|
|
38
|
-
"@types/moment-hijri": "^2.1.0",
|
|
39
|
-
"@types/react": "^18.0.15",
|
|
40
|
-
"@types/react-calendar": "~3.5.1",
|
|
41
|
-
"@types/react-dom": "^18.0.6",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
43
|
-
"@typescript-eslint/parser": "^5.30.5",
|
|
44
|
-
"babel-loader": "^8.2.5",
|
|
45
|
-
"copyfiles": "^2.4.1",
|
|
46
|
-
"cross-env": "^7.0.3",
|
|
47
|
-
"css-loader": "^6.7.1",
|
|
48
|
-
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
49
|
-
"eslint": "^8.19.0",
|
|
50
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
51
|
-
"eslint-config-prettier": "^8.5.0",
|
|
52
|
-
"eslint-plugin-import": "^2.26.0",
|
|
53
|
-
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
54
|
-
"eslint-plugin-node": "^11.1.0",
|
|
55
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
-
"eslint-plugin-react": "^7.30.1",
|
|
57
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
-
"file-loader": "^6.2.0",
|
|
59
|
-
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
60
|
-
"html-loader": "^3.1.2",
|
|
61
|
-
"html-webpack-plugin": "^5.5.0",
|
|
62
|
-
"husky": "^8.0.1",
|
|
63
|
-
"lint-staged": "^13.0.3",
|
|
64
|
-
"mini-css-extract-plugin": "^2.6.1",
|
|
65
|
-
"prettier": "^2.7.1",
|
|
66
|
-
"sass": "^1.53.0",
|
|
67
|
-
"sass-loader": "^13.0.2",
|
|
68
|
-
"style-loader": "^3.3.1",
|
|
69
|
-
"terser-webpack-plugin": "^5.3.3",
|
|
70
|
-
"tsc-alias": "^1.6.11",
|
|
71
|
-
"typescript": "^4.7.4",
|
|
72
|
-
"webpack": "^5.73.0",
|
|
73
|
-
"webpack-cli": "^4.10.0",
|
|
74
|
-
"webpack-dev-server": "^4.9.3",
|
|
75
|
-
"webpack-merge": "^5.8.0"
|
|
76
|
-
},
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"@emotion/react": "^11.9.3",
|
|
79
|
-
"@emotion/styled": "^11.9.3",
|
|
80
|
-
"@fingerprintjs/fingerprintjs": "~3.3.4",
|
|
81
|
-
"@hookform/resolvers": "^2.9.6",
|
|
82
|
-
"@mui/icons-material": "^5.8.4",
|
|
83
|
-
"@mui/material": "^5.8.7",
|
|
84
|
-
"@reduxjs/toolkit": "^1.8.3",
|
|
85
|
-
"axios": "^0.27.2",
|
|
86
|
-
"device-detector-js": "^3.0.3",
|
|
87
|
-
"i18next": "^21.8.14",
|
|
88
|
-
"i18next-browser-languagedetector": "^6.1.4",
|
|
89
|
-
"i18next-http-backend": "^1.4.1",
|
|
90
|
-
"jsencrypt": "^3.2.1",
|
|
91
|
-
"lodash-es": "^4.17.21",
|
|
92
|
-
"moment-hijri": "~2.1.2",
|
|
93
|
-
"react": "^18.2.0",
|
|
94
|
-
"react-calendar": "~3.7.0",
|
|
95
|
-
"react-device-detect": "^2.2.2",
|
|
96
|
-
"react-dom": "^18.2.0",
|
|
97
|
-
"react-dropzone": "^14.2.2",
|
|
98
|
-
"react-hook-form": "^7.33.1",
|
|
99
|
-
"react-i18next": "^11.18.1",
|
|
100
|
-
"react-otp-input": "^2.4.0",
|
|
101
|
-
"react-redux": "^8.0.2",
|
|
102
|
-
"react-spring-bottom-sheet": "^3.4.1",
|
|
103
|
-
"yup": "^0.32.11"
|
|
104
|
-
},
|
|
105
|
-
"peerDependencies": {
|
|
106
|
-
"react": "^18.2.0",
|
|
107
|
-
"react-dom": "^18.2.0"
|
|
108
|
-
},
|
|
109
|
-
"lint-staged": {
|
|
110
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
111
|
-
"yarn run prettier:fix",
|
|
112
|
-
"yarn run lint",
|
|
113
|
-
"git add ."
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
"browserslist": {
|
|
117
|
-
"production": [
|
|
118
|
-
">0.2%",
|
|
119
|
-
"not dead",
|
|
120
|
-
"not op_mini all"
|
|
121
|
-
],
|
|
122
|
-
"development": [
|
|
123
|
-
"last 1 chrome version",
|
|
124
|
-
"last 1 firefox version",
|
|
125
|
-
"last 1 safari version"
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
+
"version": "2.0.9",
|
|
4
|
+
"description": "connect library, auth",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/index.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"build",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"husky:setup": "npx husky install",
|
|
15
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\" *.json *.js",
|
|
16
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
|
|
17
|
+
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
|
+
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
|
+
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
+
"build": "rm -rf build && cross-env NODE_ENV=production webpack",
|
|
21
|
+
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
|
+
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
+
"push": "npm publish --access public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "Ahmed Elsharkawy",
|
|
29
|
+
"email": "a.elsharkawy@tap.company"
|
|
30
|
+
},
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "^7.18.6",
|
|
34
|
+
"@babel/preset-env": "^7.18.6",
|
|
35
|
+
"@babel/preset-react": "^7.18.6",
|
|
36
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
37
|
+
"@types/lodash-es": "^4.17.6",
|
|
38
|
+
"@types/moment-hijri": "^2.1.0",
|
|
39
|
+
"@types/react": "^18.0.15",
|
|
40
|
+
"@types/react-calendar": "~3.5.1",
|
|
41
|
+
"@types/react-dom": "^18.0.6",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
43
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
44
|
+
"babel-loader": "^8.2.5",
|
|
45
|
+
"copyfiles": "^2.4.1",
|
|
46
|
+
"cross-env": "^7.0.3",
|
|
47
|
+
"css-loader": "^6.7.1",
|
|
48
|
+
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
49
|
+
"eslint": "^8.19.0",
|
|
50
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
51
|
+
"eslint-config-prettier": "^8.5.0",
|
|
52
|
+
"eslint-plugin-import": "^2.26.0",
|
|
53
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
54
|
+
"eslint-plugin-node": "^11.1.0",
|
|
55
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
+
"eslint-plugin-react": "^7.30.1",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
+
"file-loader": "^6.2.0",
|
|
59
|
+
"fork-ts-checker-webpack-plugin": "^7.2.12",
|
|
60
|
+
"html-loader": "^3.1.2",
|
|
61
|
+
"html-webpack-plugin": "^5.5.0",
|
|
62
|
+
"husky": "^8.0.1",
|
|
63
|
+
"lint-staged": "^13.0.3",
|
|
64
|
+
"mini-css-extract-plugin": "^2.6.1",
|
|
65
|
+
"prettier": "^2.7.1",
|
|
66
|
+
"sass": "^1.53.0",
|
|
67
|
+
"sass-loader": "^13.0.2",
|
|
68
|
+
"style-loader": "^3.3.1",
|
|
69
|
+
"terser-webpack-plugin": "^5.3.3",
|
|
70
|
+
"tsc-alias": "^1.6.11",
|
|
71
|
+
"typescript": "^4.7.4",
|
|
72
|
+
"webpack": "^5.73.0",
|
|
73
|
+
"webpack-cli": "^4.10.0",
|
|
74
|
+
"webpack-dev-server": "^4.9.3",
|
|
75
|
+
"webpack-merge": "^5.8.0"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@emotion/react": "^11.9.3",
|
|
79
|
+
"@emotion/styled": "^11.9.3",
|
|
80
|
+
"@fingerprintjs/fingerprintjs": "~3.3.4",
|
|
81
|
+
"@hookform/resolvers": "^2.9.6",
|
|
82
|
+
"@mui/icons-material": "^5.8.4",
|
|
83
|
+
"@mui/material": "^5.8.7",
|
|
84
|
+
"@reduxjs/toolkit": "^1.8.3",
|
|
85
|
+
"axios": "^0.27.2",
|
|
86
|
+
"device-detector-js": "^3.0.3",
|
|
87
|
+
"i18next": "^21.8.14",
|
|
88
|
+
"i18next-browser-languagedetector": "^6.1.4",
|
|
89
|
+
"i18next-http-backend": "^1.4.1",
|
|
90
|
+
"jsencrypt": "^3.2.1",
|
|
91
|
+
"lodash-es": "^4.17.21",
|
|
92
|
+
"moment-hijri": "~2.1.2",
|
|
93
|
+
"react": "^18.2.0",
|
|
94
|
+
"react-calendar": "~3.7.0",
|
|
95
|
+
"react-device-detect": "^2.2.2",
|
|
96
|
+
"react-dom": "^18.2.0",
|
|
97
|
+
"react-dropzone": "^14.2.2",
|
|
98
|
+
"react-hook-form": "^7.33.1",
|
|
99
|
+
"react-i18next": "^11.18.1",
|
|
100
|
+
"react-otp-input": "^2.4.0",
|
|
101
|
+
"react-redux": "^8.0.2",
|
|
102
|
+
"react-spring-bottom-sheet": "^3.4.1",
|
|
103
|
+
"yup": "^0.32.11"
|
|
104
|
+
},
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"react": "^18.2.0",
|
|
107
|
+
"react-dom": "^18.2.0"
|
|
108
|
+
},
|
|
109
|
+
"lint-staged": {
|
|
110
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
111
|
+
"yarn run prettier:fix",
|
|
112
|
+
"yarn run lint",
|
|
113
|
+
"git add ."
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"browserslist": {
|
|
117
|
+
"production": [
|
|
118
|
+
">0.2%",
|
|
119
|
+
"not dead",
|
|
120
|
+
"not op_mini all"
|
|
121
|
+
],
|
|
122
|
+
"development": [
|
|
123
|
+
"last 1 chrome version",
|
|
124
|
+
"last 1 firefox version",
|
|
125
|
+
"last 1 safari version"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|