@tap-payments/auth-jsconnect 2.6.61-test → 2.6.83-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 +2 -1
- package/build/api/auth.d.ts +19 -0
- package/build/api/auth.js +9 -1
- package/build/api/entity.d.ts +6 -1
- package/build/api/entity.js +2 -5
- package/build/api/index.d.ts +6 -5
- package/build/api/lead.d.ts +8 -1
- package/build/api/lead.js +2 -5
- package/build/app/settings.js +3 -3
- package/build/assets/locales/ar.json +5 -1
- package/build/assets/locales/en.json +5 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +7 -2
- package/build/components/AnimationFlow/AnimationFlow.js +16 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -4
- package/build/components/AnimationFlow/Dialog.d.ts +7 -1
- package/build/components/AnimationFlow/Dialog.js +5 -9
- package/build/components/AnimationFlow/Loader.d.ts +6 -1
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +14 -3
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +2 -1
- package/build/features/app/auth/authStore.d.ts +6 -13
- package/build/features/app/auth/authStore.js +168 -111
- package/build/features/app/board/boardStore.js +8 -2
- package/build/features/app/connectExpress/connectExpressStore.js +18 -5
- package/build/features/auth/Auth.d.ts +5 -0
- package/build/features/auth/Auth.js +56 -7
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +74 -0
- package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
- package/build/features/auth/screens/AccountNotFound/index.js +2 -0
- package/build/features/auth/screens/OTP/OTP.js +2 -3
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +41 -0
- package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
- package/build/features/auth/screens/PreparingData/index.js +2 -0
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +5 -4
- package/build/features/board/Board.d.ts +1 -0
- package/build/features/board/Board.js +7 -5
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +5 -4
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/connect/screens/Individual/Email.js +3 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -1
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +5 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
- package/build/features/featuresScreens.js +10 -0
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +5 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/Email.js +3 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +4 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +5 -5
- package/build/features/shared/Address/CountryList.d.ts +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +1 -1
- package/build/features/shared/Background/Background.d.ts +2 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/DataLoading/DataLoading.d.ts +2 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +5 -4
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useVerifyToken.d.ts +2 -1
- package/build/hooks/useVerifyToken.js +2 -2
- package/build/theme/palette.js +2 -1
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +8 -2
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
|
-
var Container = styled(Box, { shouldForwardProp: function (prop) { return
|
|
16
|
+
var Container = styled(Box, { shouldForwardProp: function (prop) { return !['isMaturityExpress', 'mode'].includes(prop); } })(function (_a) {
|
|
17
17
|
var _b;
|
|
18
|
-
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress;
|
|
18
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, mode = _a.mode;
|
|
19
19
|
return (_b = {
|
|
20
20
|
width: '100%',
|
|
21
21
|
minHeight: theme.spacing(30),
|
|
@@ -27,7 +27,7 @@ var Container = styled(Box, { shouldForwardProp: function (prop) { return prop !
|
|
|
27
27
|
property: 'all'
|
|
28
28
|
},
|
|
29
29
|
_b[theme.breakpoints.down('sm')] = {
|
|
30
|
-
paddingTop: isMaturityExpress ? theme.spacing(
|
|
30
|
+
paddingTop: isMaturityExpress || mode === 'content' ? theme.spacing(0.625) : theme.spacing(6)
|
|
31
31
|
},
|
|
32
32
|
_b);
|
|
33
33
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface DataLoadingProps {
|
|
3
3
|
error?: string | null;
|
|
4
|
+
children?: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
declare const _default: React.MemoExoticComponent<({ error }: DataLoadingProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ error, children }: DataLoadingProps) => JSX.Element>;
|
|
6
7
|
export default _default;
|
|
@@ -51,8 +51,8 @@ var SubTitleStyled = styled(Text)(function (_a) {
|
|
|
51
51
|
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium, lineHeight: '16.8px', textAlign: 'center' }));
|
|
52
52
|
});
|
|
53
53
|
var DataLoading = function (_a) {
|
|
54
|
-
var error = _a.error;
|
|
54
|
+
var error = _a.error, children = _a.children;
|
|
55
55
|
var t = useTranslation().t;
|
|
56
|
-
return (
|
|
56
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 2.5 } }, { children: [_jsxs(TitleContainerStyled, { children: [_jsx(Collapse, __assign({ in: !!error }, { children: _jsx(GenericError, { error: error || '', errorTitle: 'oops' }) })), _jsxs(Collapse, __assign({ in: !error }, { children: [_jsx(Container, { children: _jsx(LottieFile, { file: LottieAnimationFiles.account_creation, loop: true, height: '375px' }) }), _jsxs(_Fragment, { children: [_jsx(TitleStyled, { children: t('prepare_data_title') }), _jsx(SubTitleStyled, { children: t('prepare_data_description') })] })] }))] }), children] })));
|
|
57
57
|
};
|
|
58
58
|
export default React.memo(DataLoading);
|
|
@@ -3,6 +3,7 @@ import { LibConfig } from '../../@types';
|
|
|
3
3
|
export interface TaxLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
5
|
configToken?: string;
|
|
6
|
+
loaderColor?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare function TaxElement(props: TaxLibProps): JSX.Element;
|
|
8
9
|
export declare function renderTaxLib(config: TaxLibProps, elementId: string): {
|
|
@@ -36,11 +36,11 @@ import { taxFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Tax = memo(function (_a) {
|
|
39
|
-
var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
41
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(taxSelector), customLoading = _c.customLoading, taxError = _c.error, loading = _c.loading;
|
|
43
|
-
useAppConfig(__assign(__assign({ configToken: configToken, navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken }));
|
|
44
44
|
useErrorListener(taxError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -54,11 +54,12 @@ var Tax = memo(function (_a) {
|
|
|
54
54
|
loadingScreenName: 'TAX_LOADING_DATA_STEP',
|
|
55
55
|
navigation: featureScreensNavigation,
|
|
56
56
|
open: open,
|
|
57
|
+
mode: props.mode,
|
|
57
58
|
internalToken: verifyToken,
|
|
58
59
|
settingLoading: configToken ? internalLoading : settingLoading
|
|
59
60
|
});
|
|
60
|
-
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
61
|
+
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
62
63
|
var Element = _a.element, name = _a.name;
|
|
63
64
|
var isActive = activeScreen.name === name;
|
|
64
65
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -24,7 +24,7 @@ import { useEffect } from 'react';
|
|
|
24
24
|
import { handleActiveFlowScreens, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin, fetchAppSettingsSync, handelBoardMaturity, settingsSelector, updateInternalLoading } from '../app/settings';
|
|
25
25
|
import { useAppDispatch } from './useAppDispatch';
|
|
26
26
|
import { useAppSelector } from './useAppSelector';
|
|
27
|
-
import {
|
|
27
|
+
import { isConnectTapDomain, removeRequestHeaders, setBaseUrl } from '../utils';
|
|
28
28
|
export var useAppConfig = function (_a) {
|
|
29
29
|
var appInfo = _a.appInfo, navigation = _a.navigation, publicKey = _a.publicKey, disableCountries = _a.disableCountries, disableLocale = _a.disableLocale, disableSettingFetching = _a.disableSettingFetching, maturity = _a.maturity, boardMaturity = _a.boardMaturity, configToken = _a.configToken, onVerifyConfigTokenSuccess = _a.onVerifyConfigTokenSuccess, rest = __rest(_a, ["appInfo", "navigation", "publicKey", "disableCountries", "disableLocale", "disableSettingFetching", "maturity", "boardMaturity", "configToken", "onVerifyConfigTokenSuccess"]);
|
|
30
30
|
var dispatch = useAppDispatch();
|
|
@@ -36,7 +36,7 @@ export var useAppConfig = function (_a) {
|
|
|
36
36
|
dispatch(handleActiveFlowScreens(navigation));
|
|
37
37
|
};
|
|
38
38
|
var checkDomain = function () {
|
|
39
|
-
var isTap =
|
|
39
|
+
var isTap = isConnectTapDomain(rest.merchantDomain);
|
|
40
40
|
dispatch(handleIsTapOrigin(isTap));
|
|
41
41
|
};
|
|
42
42
|
useEffect(function () {
|
|
@@ -10,6 +10,7 @@ interface IVerifyToken {
|
|
|
10
10
|
settingLoading: boolean;
|
|
11
11
|
navigation: ScreenStepNavigation[];
|
|
12
12
|
loadingScreenName: string;
|
|
13
|
+
mode?: 'popup' | 'page' | 'content';
|
|
13
14
|
}
|
|
14
|
-
export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName }: IVerifyToken) => void;
|
|
15
|
+
export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName, mode }: IVerifyToken) => void;
|
|
15
16
|
export {};
|
|
@@ -3,7 +3,7 @@ import { getParameterByName } from '../utils';
|
|
|
3
3
|
import { useAppDispatch } from './useAppDispatch';
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
export var useVerifyToken = function (_a) {
|
|
6
|
-
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName;
|
|
6
|
+
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName, mode = _a.mode;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var verifyTokenFun = function () {
|
|
9
9
|
var token = internalToken ? internalToken : getParameterByName('token');
|
|
@@ -19,7 +19,7 @@ export var useVerifyToken = function (_a) {
|
|
|
19
19
|
verifyTokenFun();
|
|
20
20
|
}, [settingLoading, open]);
|
|
21
21
|
useEffect(function () {
|
|
22
|
-
if (internalToken && open)
|
|
22
|
+
if (internalToken && open && mode !== 'content')
|
|
23
23
|
dispatch(handleCurrentActiveScreen(loadingScreenName));
|
|
24
24
|
}, [navigation]);
|
|
25
25
|
};
|
package/build/theme/palette.js
CHANGED
|
@@ -6,12 +6,14 @@ export declare const removeAllOtherThanAlphabetAndSpace: (str: string) => string
|
|
|
6
6
|
export declare const removeAllNumberFromChars: (str: string) => string;
|
|
7
7
|
export declare const keepEmailCharacters: (str: string) => string;
|
|
8
8
|
export declare const removeAllOtherThanCharsAndNumber: (str: string) => string;
|
|
9
|
+
export declare const removeAllOtherThanCharsNumbersAtAndDot: (str: string) => string;
|
|
9
10
|
export declare const removeAllOtherThanCharsNumbersAndSpace: (str: string) => string;
|
|
10
11
|
export declare function PasswordMatchLength(password: string): boolean;
|
|
11
12
|
export declare function isPasswordHasUpperLetter(password: string): boolean;
|
|
12
13
|
export declare function isPasswordHasLowerLetter(password: string): boolean;
|
|
13
14
|
export declare function isPasswordHasSpecialLetter(password: string): boolean;
|
|
14
15
|
export declare const keepLettersAndSpace: (str: string) => string;
|
|
16
|
+
export declare const isConnectTapDomain: (domain: string) => boolean;
|
|
15
17
|
export declare const isTapDomain: (domain: string) => boolean;
|
|
16
18
|
export declare const removeArabicWords: (str: string) => string;
|
|
17
19
|
export declare const removeAllOtherThanArabicWords: (str: string) => string;
|
|
@@ -22,6 +22,9 @@ export var keepEmailCharacters = function (str) {
|
|
|
22
22
|
export var removeAllOtherThanCharsAndNumber = function (str) {
|
|
23
23
|
return str.replace(/[^A-Za-z0-9]/g, '');
|
|
24
24
|
};
|
|
25
|
+
export var removeAllOtherThanCharsNumbersAtAndDot = function (str) {
|
|
26
|
+
return str.replace(/[^A-Za-z0-9@.]/g, '');
|
|
27
|
+
};
|
|
25
28
|
export var removeAllOtherThanCharsNumbersAndSpace = function (str) {
|
|
26
29
|
return str.replace(/[^A-Za-z0-9 ]/g, '');
|
|
27
30
|
};
|
|
@@ -40,10 +43,13 @@ export function isPasswordHasSpecialLetter(password) {
|
|
|
40
43
|
export var keepLettersAndSpace = function (str) {
|
|
41
44
|
return str.replace(/[^a-zA-Z] /g, '');
|
|
42
45
|
};
|
|
43
|
-
export var
|
|
44
|
-
var regex = /^(connect(
|
|
46
|
+
export var isConnectTapDomain = function (domain) {
|
|
47
|
+
var regex = /^(https:\/\/)?connect(\.\w+)?\.tap\.company\//;
|
|
45
48
|
return regex.test(domain);
|
|
46
49
|
};
|
|
50
|
+
export var isTapDomain = function (domain) {
|
|
51
|
+
return domain.includes('tap.company');
|
|
52
|
+
};
|
|
47
53
|
export var removeArabicWords = function (str) {
|
|
48
54
|
return str.replace(/[\u0600-\u06FF]/g, '').trim();
|
|
49
55
|
};
|