@tap-payments/auth-jsconnect 1.0.89 → 1.0.90-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/README.md +77 -132
- package/build/api/account.js +1 -1
- package/build/api/auth.js +1 -1
- package/build/api/availabilityServices.d.ts +2 -0
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.js +2 -3
- package/build/api/country.js +1 -1
- package/build/api/data.js +1 -1
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/index.d.ts +2 -2
- package/build/api/index.js +2 -2
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/app/rootReducer.d.ts +7 -7
- package/build/app/rootReducer.js +7 -7
- package/build/app/settings.d.ts +3 -3
- package/build/app/settings.js +5 -5
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/Button/Button.d.ts +6 -1
- package/build/components/Button/Button.js +61 -23
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/Footer/Footer.js +3 -3
- package/build/components/Input/Input.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +2 -2
- package/build/constants/api.d.ts +3 -1
- package/build/constants/api.js +6 -2
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +1 -1
- package/build/features/Landing/Landing.d.ts +1 -1
- package/build/features/Landing/Landing.js +8 -8
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +6 -6
- package/build/features/app/bank/bankStore.d.ts +2 -2
- package/build/features/app/bank/bankStore.js +4 -4
- package/build/features/app/business/businessStore.d.ts +4 -4
- package/build/features/app/business/businessStore.js +9 -9
- package/build/features/app/connect/connectStore.d.ts +2 -2
- package/build/features/app/connect/connectStore.js +10 -8
- package/build/features/app/individual/individualStore.d.ts +2 -2
- package/build/features/app/individual/individualStore.js +4 -4
- package/build/features/app/landing/landingStore.d.ts +2 -2
- package/build/features/app/landing/landingStore.js +1 -1
- package/build/features/app/password/passwordStore.d.ts +2 -2
- package/build/features/app/password/passwordStore.js +4 -4
- package/build/features/app/tax/taxStore.d.ts +2 -2
- package/build/features/app/tax/taxStore.js +4 -4
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +14 -10
- package/build/features/bank/screens/BankDetails/BankDetails.js +11 -7
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +1 -1
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/bank/screens/Verify/OTPInput.js +2 -2
- package/build/features/bank/screens/Verify/Verify.js +9 -9
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +14 -10
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +7 -7
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.js +8 -8
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/business/screens/Verify/OTPInput.js +2 -2
- package/build/features/business/screens/Verify/Verify.js +9 -9
- package/build/features/connect/Connect.d.ts +1 -1
- package/build/features/connect/Connect.js +10 -10
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +9 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +10 -10
- package/build/features/connect/screens/Merchant/Merchant.js +7 -7
- package/build/features/connect/screens/Merchant/SocialMedia.js +9 -9
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +9 -9
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +8 -8
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +3 -3
- package/build/features/featuresScreens.d.ts +1 -1
- package/build/features/featuresScreens.js +31 -31
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +14 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +10 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/individual/screens/Verify/OTPInput.js +2 -2
- package/build/features/individual/screens/Verify/Verify.js +9 -9
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +14 -10
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +11 -7
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/Success/Success.js +3 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/password/screens/Verify/OTPInput.js +2 -2
- package/build/features/password/screens/Verify/Verify.js +9 -9
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +5 -5
- package/build/features/shared/Background/Background.js +3 -3
- package/build/features/shared/Background/LogoBackground.js +3 -3
- package/build/features/shared/Button/AbsherButton.d.ts +1 -1
- package/build/features/shared/Button/AbsherButton.js +14 -36
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +15 -51
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -1
- package/build/features/shared/Button/FlowsButtons.js +45 -45
- package/build/features/shared/Button/MobileButton.d.ts +1 -1
- package/build/features/shared/Button/MobileButton.js +12 -33
- package/build/features/shared/Button/SuccessButton.js +17 -15
- package/build/features/shared/Footer/Footer.js +6 -6
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/OTP/OTP.js +3 -3
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +14 -10
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +8 -8
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
- package/build/features/tax/screens/TaxDetails/VATId.js +6 -6
- package/build/features/tax/screens/Verify/OTPInput.js +2 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +13 -3
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.js +2 -2
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/i18n.js +1 -1
- package/build/index.d.ts +7 -7
- package/build/index.js +7 -7
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +10 -0
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +3 -3
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +3 -2
- package/build/utils/string.js +18 -4
- package/package.json +4 -3
- package/build/components/DatePicker/customStyle.css +0 -86
- package/build/index.css +0 -135
|
@@ -13,10 +13,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import Box from '@mui/material/Box/Box';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
|
-
import OTPField from '
|
|
16
|
+
import OTPField from '@features/shared/OTP';
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
18
|
import { useTranslation } from 'react-i18next';
|
|
19
|
-
import { DEFAULT_TIMER_VALUE } from '
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '@constants';
|
|
20
20
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
21
|
var theme = _a.theme;
|
|
22
22
|
return ({
|
|
@@ -11,20 +11,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '
|
|
14
|
+
import { useAppDispatch } from '@hooks';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import Box from '@mui/material/Box/Box';
|
|
19
19
|
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handlePrevScreenStep } from '
|
|
21
|
-
import { useLanguage, useAppSelector } from '
|
|
22
|
-
import { maskPhone } from '
|
|
23
|
-
import Form from '
|
|
24
|
-
import Text from '
|
|
25
|
-
import { ScreenContainer } from '
|
|
26
|
-
import { taxSelector, clearError, resetOTPScreen, verifyTaxLeadOTP } from '
|
|
27
|
-
import Button from '
|
|
20
|
+
import { handlePrevScreenStep } from '@app/settings';
|
|
21
|
+
import { useLanguage, useAppSelector } from '@hooks';
|
|
22
|
+
import { maskPhone } from '@utils';
|
|
23
|
+
import Form from '@components/Form';
|
|
24
|
+
import Text from '@components/Text';
|
|
25
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
26
|
+
import { taxSelector, clearError, resetOTPScreen, verifyTaxLeadOTP } from '@features/app/tax/taxStore';
|
|
27
|
+
import Button from '@features/shared/Button';
|
|
28
28
|
import { OTPValidation } from './validation';
|
|
29
29
|
import OTPInput from './OTPInput';
|
|
30
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -57,11 +57,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
57
57
|
return t;
|
|
58
58
|
};
|
|
59
59
|
import { useEffect, useState } from 'react';
|
|
60
|
-
import { handleActiveFlowScreens, settingsSelector, getClientIp, getLocale, getBrowserFingerPrint, getOperator, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin } from '
|
|
60
|
+
import { handleActiveFlowScreens, settingsSelector, getClientIp, getLocale, getBrowserFingerPrint, getOperator, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin } from '@app/settings';
|
|
61
61
|
import { useAppDispatch } from './useAppDispatch';
|
|
62
62
|
import { useAppSelector } from './useAppSelector';
|
|
63
|
-
import { setAxiosGlobalHeaders } from '
|
|
64
|
-
import { getRequestHeaders, encryptString, isTapDomain } from '
|
|
63
|
+
import { setAxiosGlobalHeaders, axiosInstance } from '@api';
|
|
64
|
+
import { getRequestHeaders, encryptString, isTapDomain } from '@utils';
|
|
65
|
+
import { ENDPOINT_PATHS } from '@constants';
|
|
65
66
|
export var useAppConfig = function (_a) {
|
|
66
67
|
var appInfo = _a.appInfo, navigation = _a.navigation, publicKey = _a.publicKey, rest = __rest(_a, ["appInfo", "navigation", "publicKey"]);
|
|
67
68
|
var _b = useState(true), loading = _b[0], setLoading = _b[1];
|
|
@@ -69,12 +70,21 @@ export var useAppConfig = function (_a) {
|
|
|
69
70
|
var _c = useAppSelector(settingsSelector), data = _c.data, error = _c.error;
|
|
70
71
|
var deviceInfo = data.deviceInfo, language = data.language, appConfig = data.appConfig;
|
|
71
72
|
var device = deviceInfo.device, browser = deviceInfo.browser, connection = deviceInfo.connection;
|
|
73
|
+
var setBaseUrl = function () {
|
|
74
|
+
var isProd = publicKey.includes('pk_live');
|
|
75
|
+
if (isProd) {
|
|
76
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
|
|
80
|
+
};
|
|
72
81
|
var addAxiosHeader = function () {
|
|
73
82
|
setAxiosGlobalHeaders(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(publicKey), mdn: encryptString(window.location.origin) }));
|
|
74
83
|
};
|
|
75
84
|
var handleAppConfig = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
85
|
return __generator(this, function (_a) {
|
|
77
86
|
dispatch(handleSetAppConfig(__assign({ appInfo: appInfo, publicKey: publicKey }, rest)));
|
|
87
|
+
setBaseUrl();
|
|
78
88
|
dispatch(handleActiveFlowScreens(navigation));
|
|
79
89
|
return [2];
|
|
80
90
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { LanguageMode, DirectionMode } from '
|
|
3
|
-
import { settingsSelector } from '
|
|
2
|
+
import { LanguageMode, DirectionMode } from '@types';
|
|
3
|
+
import { settingsSelector } from '@app/settings';
|
|
4
4
|
import { useAppSelector } from './useAppSelector';
|
|
5
|
-
import { appTheme } from '
|
|
5
|
+
import { appTheme } from '@theme';
|
|
6
6
|
export var useAppTheme = function () {
|
|
7
7
|
var _a = useState(), theme = _a[0], setTheme = _a[1];
|
|
8
8
|
var data = useAppSelector(settingsSelector).data;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { settingsSelector } from '
|
|
2
|
+
import { settingsSelector } from '@app/settings';
|
|
3
3
|
import { useAppSelector } from './useAppSelector';
|
|
4
|
-
import { connectSelector } from '
|
|
4
|
+
import { connectSelector } from '@features/app/connect/connectStore';
|
|
5
5
|
export var useErrorListener = function () {
|
|
6
6
|
var settings = useAppSelector(settingsSelector);
|
|
7
7
|
var connect = useAppSelector(connectSelector);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { decodeObjectBase64, getParameterByName } from '
|
|
1
|
+
import { decodeObjectBase64, getParameterByName } from '@utils';
|
|
2
2
|
export var useRedirectionData = function (dataKey) {
|
|
3
3
|
if (dataKey === void 0) { dataKey = 'data'; }
|
|
4
4
|
var dataToken = getParameterByName(dataKey);
|
package/build/i18n.js
CHANGED
|
@@ -2,7 +2,7 @@ import i18n from 'i18next';
|
|
|
2
2
|
import { initReactI18next } from 'react-i18next';
|
|
3
3
|
import Backend from 'i18next-http-backend';
|
|
4
4
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
5
|
-
import { LOCAL_STORAGE_KEYS } from '
|
|
5
|
+
import { LOCAL_STORAGE_KEYS } from '@constants';
|
|
6
6
|
import translationEN from './assets/locales/en.json';
|
|
7
7
|
import translationAR from './assets/locales/ar.json';
|
|
8
8
|
var resources = {
|
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import './i18n';
|
|
3
|
-
import { ConnectLib, renderConnectLib, ConnectLibProps, unmountConnectLib } from '
|
|
4
|
-
import { BusinessLib, renderBusinessLib, BusinessLibProps, unmountBusinessLib } from '
|
|
5
|
-
import { PasswordLib, renderPasswordLib, PasswordLibProps, unmountPasswordLib } from '
|
|
6
|
-
import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividualLib } from '
|
|
7
|
-
import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from '
|
|
8
|
-
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from '
|
|
9
|
-
import { LandingLib, LandingProps, renderLandingLib, unmountLandingLib } from '
|
|
3
|
+
import { ConnectLib, renderConnectLib, ConnectLibProps, unmountConnectLib } from '@features/connect';
|
|
4
|
+
import { BusinessLib, renderBusinessLib, BusinessLibProps, unmountBusinessLib } from '@features/business';
|
|
5
|
+
import { PasswordLib, renderPasswordLib, PasswordLibProps, unmountPasswordLib } from '@features/password';
|
|
6
|
+
import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividualLib } from '@features/individual';
|
|
7
|
+
import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from '@features/bank';
|
|
8
|
+
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from '@features/tax';
|
|
9
|
+
import { LandingLib, LandingProps, renderLandingLib, unmountLandingLib } from '@features/Landing';
|
|
10
10
|
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, LandingProps };
|
|
11
11
|
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, LandingLib, renderLandingLib, unmountLandingLib };
|
package/build/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import './i18n';
|
|
3
|
-
import { ConnectLib, renderConnectLib, unmountConnectLib } from '
|
|
4
|
-
import { BusinessLib, renderBusinessLib, unmountBusinessLib } from '
|
|
5
|
-
import { PasswordLib, renderPasswordLib, unmountPasswordLib } from '
|
|
6
|
-
import { IndividualLib, renderIndividualLib, unmountIndividualLib } from '
|
|
7
|
-
import { BankLib, renderBankLib, unmountBankLib } from '
|
|
8
|
-
import { TaxLib, renderTaxLib, unmountTaxLib } from '
|
|
9
|
-
import { LandingLib, renderLandingLib, unmountLandingLib } from '
|
|
3
|
+
import { ConnectLib, renderConnectLib, unmountConnectLib } from '@features/connect';
|
|
4
|
+
import { BusinessLib, renderBusinessLib, unmountBusinessLib } from '@features/business';
|
|
5
|
+
import { PasswordLib, renderPasswordLib, unmountPasswordLib } from '@features/password';
|
|
6
|
+
import { IndividualLib, renderIndividualLib, unmountIndividualLib } from '@features/individual';
|
|
7
|
+
import { BankLib, renderBankLib, unmountBankLib } from '@features/bank';
|
|
8
|
+
import { TaxLib, renderTaxLib, unmountTaxLib } from '@features/tax';
|
|
9
|
+
import { LandingLib, renderLandingLib, unmountLandingLib } from '@features/Landing';
|
|
10
10
|
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, LandingLib, renderLandingLib, unmountLandingLib };
|
|
11
11
|
window['TapAuth'] = {
|
|
12
12
|
renderConnectLib: renderConnectLib,
|
package/build/theme/theme.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DirectionMode, ThemeMode } from '
|
|
1
|
+
import { DirectionMode, ThemeMode } from '@types';
|
|
2
2
|
export declare const appTheme: (mode: ThemeMode, dir: DirectionMode) => import("@mui/material/styles").Theme;
|
package/build/theme/theme.js
CHANGED
|
@@ -3,11 +3,21 @@ import { typography } from './typography';
|
|
|
3
3
|
import { darkPalette, lightPalette } from './palette';
|
|
4
4
|
import { components } from './components';
|
|
5
5
|
import { shadows } from './shadows';
|
|
6
|
+
import { isMobile } from 'react-device-detect';
|
|
6
7
|
export var appTheme = function (mode, dir) {
|
|
7
8
|
return createTheme({
|
|
8
9
|
palette: mode === 'dark' ? darkPalette : lightPalette,
|
|
9
10
|
direction: dir,
|
|
10
11
|
typography: typography,
|
|
12
|
+
breakpoints: {
|
|
13
|
+
values: {
|
|
14
|
+
xs: 0,
|
|
15
|
+
sm: isMobile ? 1536 : 600,
|
|
16
|
+
md: 900,
|
|
17
|
+
lg: 1200,
|
|
18
|
+
xl: 1536
|
|
19
|
+
}
|
|
20
|
+
},
|
|
11
21
|
components: components,
|
|
12
22
|
shape: {
|
|
13
23
|
borderRadius: 5
|
package/build/utils/locale.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LocalProps } from '
|
|
1
|
+
import { LocalProps } from '@types';
|
|
2
2
|
export declare const updateLocale: (locale: LocalProps, country: string) => void;
|
package/build/utils/locale.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { initReactI18next } from 'react-i18next';
|
|
2
|
-
import i18n from '
|
|
2
|
+
import i18n from '@src/i18n';
|
|
3
3
|
export var updateLocale = function (locale, country) {
|
|
4
|
-
var data = locale[country] || locale['default'];
|
|
4
|
+
var data = locale[country.toUpperCase()] || locale['default'];
|
|
5
5
|
if (i18n.isInitialized) {
|
|
6
6
|
i18n.removeResourceBundle('*', 'translation');
|
|
7
7
|
i18n.addResourceBundle('en', 'translation', data.en.translation);
|
|
@@ -9,7 +9,7 @@ export var updateLocale = function (locale, country) {
|
|
|
9
9
|
}
|
|
10
10
|
else {
|
|
11
11
|
i18n.use(initReactI18next).init({
|
|
12
|
-
resources:
|
|
12
|
+
resources: data,
|
|
13
13
|
fallbackLng: 'en',
|
|
14
14
|
initImmediate: false,
|
|
15
15
|
preload: ['ar', 'en'],
|
package/build/utils/rsa.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSEncrypt } from 'jsencrypt';
|
|
2
|
-
import { RSA_FRONTEND_MW_PUBLIC_KEY } from '
|
|
2
|
+
import { RSA_FRONTEND_MW_PUBLIC_KEY } from '@constants';
|
|
3
3
|
var rsa = new JSEncrypt();
|
|
4
4
|
rsa.setPublicKey(RSA_FRONTEND_MW_PUBLIC_KEY);
|
|
5
5
|
export var encryptObject = function (data) {
|
package/build/utils/string.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceInfo } from '
|
|
1
|
+
import { DeviceInfo } from '@types';
|
|
2
2
|
export declare const maskPhone: (str?: string) => string;
|
|
3
3
|
export declare const maskID: (str: string) => string;
|
|
4
4
|
export declare const showLastFour: (str: string) => string;
|
|
@@ -10,7 +10,7 @@ export declare const getIndividualName: (name: string) => {
|
|
|
10
10
|
export declare const convertNumbers2English: (str: string) => string;
|
|
11
11
|
export declare const getParameterByName: (name: string) => string | null;
|
|
12
12
|
export declare const getClientEmailUrl: () => string;
|
|
13
|
-
export declare const getFlowUrl: (path: string) => string;
|
|
13
|
+
export declare const getFlowUrl: (path: string, lang: string) => string;
|
|
14
14
|
export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
|
|
15
15
|
export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
16
16
|
al: string;
|
|
@@ -36,3 +36,4 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
|
36
36
|
l: string;
|
|
37
37
|
};
|
|
38
38
|
export declare const removeRequestHeaders: () => void;
|
|
39
|
+
export declare const getBaseUrl: () => string;
|
package/build/utils/string.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { encryptString } from '
|
|
2
|
-
import { removeAxiosGlobalHeaders } from '
|
|
1
|
+
import { encryptString } from '@utils';
|
|
2
|
+
import { removeAxiosGlobalHeaders } from '@api';
|
|
3
|
+
import { ENDPOINT_PATHS } from '@constants';
|
|
3
4
|
export var maskPhone = function (str) {
|
|
4
5
|
if (str === void 0) { str = ''; }
|
|
5
6
|
var lastTwo = str.substring(str.length - 2, str.length);
|
|
@@ -56,9 +57,9 @@ export var getClientEmailUrl = function () {
|
|
|
56
57
|
var origin = window.location.origin;
|
|
57
58
|
return origin + '/?token=';
|
|
58
59
|
};
|
|
59
|
-
export var getFlowUrl = function (path) {
|
|
60
|
+
export var getFlowUrl = function (path, lang) {
|
|
60
61
|
var origin = window.location.origin;
|
|
61
|
-
return origin + path +
|
|
62
|
+
return origin + path + "?lang=".concat(lang, "&token=");
|
|
62
63
|
};
|
|
63
64
|
export var capitalizeTheFirstLetterOfEachWord = function (words) {
|
|
64
65
|
var separateWord = words.toLowerCase().split(' ');
|
|
@@ -120,3 +121,16 @@ export var removeRequestHeaders = function () {
|
|
|
120
121
|
'authorization'
|
|
121
122
|
]);
|
|
122
123
|
};
|
|
124
|
+
export var getBaseUrl = function () {
|
|
125
|
+
var origin = window.location.origin;
|
|
126
|
+
if (origin.includes('localhost')) {
|
|
127
|
+
return ENDPOINT_PATHS.DEV_BASE_URL;
|
|
128
|
+
}
|
|
129
|
+
if (origin.includes('dev')) {
|
|
130
|
+
return ENDPOINT_PATHS.DEV_BASE_URL;
|
|
131
|
+
}
|
|
132
|
+
if (origin.includes('sandbox')) {
|
|
133
|
+
return ENDPOINT_PATHS.SANDBOX_BASE_URL;
|
|
134
|
+
}
|
|
135
|
+
return ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
136
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.90-test",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
|
|
18
18
|
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
|
|
19
19
|
"start": "cross-env NODE_ENV=development webpack serve",
|
|
20
|
-
"build": "cross-env NODE_ENV=production webpack",
|
|
20
|
+
"build": "rm -rf build && cross-env NODE_ENV=production webpack",
|
|
21
21
|
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
22
|
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
|
-
"ts:build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
23
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
24
|
"push": "npm publish --access public"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"moment-hijri": "~2.1.2",
|
|
93
93
|
"react": "^18.2.0",
|
|
94
94
|
"react-calendar": "~3.7.0",
|
|
95
|
+
"react-device-detect": "^2.2.2",
|
|
95
96
|
"react-dom": "^18.2.0",
|
|
96
97
|
"react-hook-form": "^7.33.1",
|
|
97
98
|
"react-i18next": "^11.18.1",
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
.date_picker_input {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.react-calendar {
|
|
6
|
-
width: 100%;
|
|
7
|
-
border: none;
|
|
8
|
-
padding: 15px 0px 15px 0px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.react-calendar__navigation {
|
|
12
|
-
display: flex;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
.react-calendar__navigation__label__labelText {
|
|
16
|
-
font-family: 'Lato', 'Roboto';
|
|
17
|
-
}
|
|
18
|
-
.react-calendar__navigation button:enabled:hover,
|
|
19
|
-
.react-calendar__navigation button:enabled:focus {
|
|
20
|
-
background-color: #ffffff;
|
|
21
|
-
}
|
|
22
|
-
.react-calendar__navigation__prev-button {
|
|
23
|
-
top: 20px;
|
|
24
|
-
left: 86px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.react-calendar__navigation__next-button {
|
|
28
|
-
top: 0px;
|
|
29
|
-
left: 86px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.react-calendar__navigation__prev2-button {
|
|
33
|
-
top: 20px;
|
|
34
|
-
right: 13px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.react-calendar__navigation__next2-button {
|
|
38
|
-
top: 0px;
|
|
39
|
-
right: 13px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.react-calendar__navigation__arrow {
|
|
43
|
-
background-color: transparent !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
abbr[title] {
|
|
47
|
-
text-decoration: none;
|
|
48
|
-
font-weight: 400;
|
|
49
|
-
color: #abaeb6;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.react-calendar__tile {
|
|
53
|
-
transition: all 0.5s ease;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.react-calendar__tile:enabled:hover,
|
|
57
|
-
.react-calendar__tile:enabled:focus {
|
|
58
|
-
background-color: transparent;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.react-calendar__tile:enabled:hover {
|
|
62
|
-
background: radial-gradient(circle closest-side, #fafafa 0%, #fafafa 98%, rgba(0, 0, 0, 0) 100%);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.react-calendar__month-view__days__day--weekend,
|
|
66
|
-
.react-calendar__tile {
|
|
67
|
-
color: #3a4154;
|
|
68
|
-
}
|
|
69
|
-
.react-calendar__tile--hasActive {
|
|
70
|
-
background: radial-gradient(circle closest-side, #fafafa 0%, #fafafa 98%, rgba(0, 0, 0, 0) 100%);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.react-calendar__tile--active,
|
|
74
|
-
.react-calendar__tile--active:enabled:hover,
|
|
75
|
-
.react-calendar__tile--active:enabled:focus {
|
|
76
|
-
background-color: transparent;
|
|
77
|
-
background: radial-gradient(circle closest-side, #3a4154 0%, #3a4154 98%, rgba(0, 0, 0, 0) 100%);
|
|
78
|
-
color: #ffffff;
|
|
79
|
-
}
|
|
80
|
-
.react-calendar__tile--now {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
}
|
|
83
|
-
.react-calendar__navigation button:disabled {
|
|
84
|
-
background-color: #ffffff;
|
|
85
|
-
color: #3a4154;
|
|
86
|
-
}
|
package/build/index.css
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
|
|
2
|
-
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
|
|
3
|
-
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
|
|
4
|
-
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
|
|
5
|
-
@import url('https://fonts.googleapis.com/css?family=Tajawal&display=swap');
|
|
6
|
-
|
|
7
|
-
/* http://meyerweb.com/eric/tools/css/reset/
|
|
8
|
-
v2.0 | 20110126
|
|
9
|
-
License: none (public domain)
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
html,
|
|
13
|
-
body,
|
|
14
|
-
div,
|
|
15
|
-
span,
|
|
16
|
-
applet,
|
|
17
|
-
object,
|
|
18
|
-
iframe,
|
|
19
|
-
h1,
|
|
20
|
-
h2,
|
|
21
|
-
h3,
|
|
22
|
-
h4,
|
|
23
|
-
h5,
|
|
24
|
-
h6,
|
|
25
|
-
p,
|
|
26
|
-
blockquote,
|
|
27
|
-
pre,
|
|
28
|
-
a,
|
|
29
|
-
abbr,
|
|
30
|
-
acronym,
|
|
31
|
-
address,
|
|
32
|
-
big,
|
|
33
|
-
cite,
|
|
34
|
-
code,
|
|
35
|
-
del,
|
|
36
|
-
dfn,
|
|
37
|
-
em,
|
|
38
|
-
img,
|
|
39
|
-
ins,
|
|
40
|
-
kbd,
|
|
41
|
-
q,
|
|
42
|
-
s,
|
|
43
|
-
samp,
|
|
44
|
-
small,
|
|
45
|
-
strike,
|
|
46
|
-
strong,
|
|
47
|
-
sub,
|
|
48
|
-
sup,
|
|
49
|
-
tt,
|
|
50
|
-
var,
|
|
51
|
-
b,
|
|
52
|
-
u,
|
|
53
|
-
i,
|
|
54
|
-
center,
|
|
55
|
-
dl,
|
|
56
|
-
dt,
|
|
57
|
-
dd,
|
|
58
|
-
ol,
|
|
59
|
-
ul,
|
|
60
|
-
li,
|
|
61
|
-
fieldset,
|
|
62
|
-
form,
|
|
63
|
-
label,
|
|
64
|
-
legend,
|
|
65
|
-
table,
|
|
66
|
-
caption,
|
|
67
|
-
tbody,
|
|
68
|
-
tfoot,
|
|
69
|
-
thead,
|
|
70
|
-
tr,
|
|
71
|
-
th,
|
|
72
|
-
td,
|
|
73
|
-
article,
|
|
74
|
-
aside,
|
|
75
|
-
canvas,
|
|
76
|
-
details,
|
|
77
|
-
embed,
|
|
78
|
-
figure,
|
|
79
|
-
figcaption,
|
|
80
|
-
footer,
|
|
81
|
-
header,
|
|
82
|
-
hgroup,
|
|
83
|
-
menu,
|
|
84
|
-
nav,
|
|
85
|
-
output,
|
|
86
|
-
ruby,
|
|
87
|
-
section,
|
|
88
|
-
summary,
|
|
89
|
-
time,
|
|
90
|
-
mark,
|
|
91
|
-
audio,
|
|
92
|
-
video {
|
|
93
|
-
margin: 0;
|
|
94
|
-
padding: 0;
|
|
95
|
-
border: 0;
|
|
96
|
-
font-size: 100%;
|
|
97
|
-
font: inherit;
|
|
98
|
-
vertical-align: baseline;
|
|
99
|
-
}
|
|
100
|
-
/* HTML5 display-role reset for older browsers */
|
|
101
|
-
article,
|
|
102
|
-
aside,
|
|
103
|
-
details,
|
|
104
|
-
figcaption,
|
|
105
|
-
figure,
|
|
106
|
-
footer,
|
|
107
|
-
header,
|
|
108
|
-
hgroup,
|
|
109
|
-
menu,
|
|
110
|
-
nav,
|
|
111
|
-
section {
|
|
112
|
-
display: block;
|
|
113
|
-
}
|
|
114
|
-
body {
|
|
115
|
-
line-height: 1;
|
|
116
|
-
}
|
|
117
|
-
ol,
|
|
118
|
-
ul {
|
|
119
|
-
list-style: none;
|
|
120
|
-
}
|
|
121
|
-
blockquote,
|
|
122
|
-
q {
|
|
123
|
-
quotes: none;
|
|
124
|
-
}
|
|
125
|
-
blockquote:before,
|
|
126
|
-
blockquote:after,
|
|
127
|
-
q:before,
|
|
128
|
-
q:after {
|
|
129
|
-
content: '';
|
|
130
|
-
content: none;
|
|
131
|
-
}
|
|
132
|
-
table {
|
|
133
|
-
border-collapse: collapse;
|
|
134
|
-
border-spacing: 0;
|
|
135
|
-
}
|