@tap-payments/auth-jsconnect 2.6.102-test → 2.7.1-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 +6 -11
- package/build/@types/config.d.ts +92 -0
- package/build/@types/config.js +1 -0
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/app/settings.d.ts +2 -2
- package/build/app/settings.js +27 -21
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +2 -2
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +6 -6
- package/build/features/app/auth/authStore.d.ts +9 -2
- package/build/features/app/auth/authStore.js +23 -4
- package/build/features/app/connect/connectStore.d.ts +9 -2
- package/build/features/app/connect/connectStore.js +30 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +9 -2
- package/build/features/app/connectExpress/connectExpressStore.js +41 -13
- package/build/features/auth/Auth.js +10 -9
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +2 -2
- package/build/features/bank/Bank.js +1 -1
- package/build/features/board/Board.js +1 -1
- package/build/features/brand/Brand.js +1 -1
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
- package/build/features/business/Business.js +1 -1
- 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/Connect.js +10 -8
- package/build/features/connectExpress/ConnectExpress.js +11 -9
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/entity/Entity.js +1 -1
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
- package/build/features/individual/Individual.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/password/Password.js +1 -1
- package/build/features/shared/Address/CountryList.d.ts +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +1 -1
- package/build/features/signIn/SignIn.js +1 -1
- package/build/features/tax/Tax.js +1 -1
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +2 -2
- package/build/hooks/useAppTheme.js +4 -1
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ var Password = memo(function (_a) {
|
|
|
68
68
|
if (!settingLoading && open)
|
|
69
69
|
handleVerifyToken();
|
|
70
70
|
}, [settingLoading]);
|
|
71
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
71
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, showPoweredBy: data.appConfig.showPoweredBy, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
72
72
|
var Element = _a.element, name = _a.name;
|
|
73
73
|
var isActive = activeScreen.name === name;
|
|
74
74
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -30,7 +30,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
30
30
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
31
31
|
children?: React.ReactNode;
|
|
32
32
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
33
|
-
color?: "inherit" | "disabled" | "error" | "info" | "
|
|
33
|
+
color?: "inherit" | "disabled" | "error" | "info" | "primary" | "success" | "action" | "secondary" | "warning" | undefined;
|
|
34
34
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
35
35
|
htmlColor?: string | undefined;
|
|
36
36
|
inheritViewBox?: boolean | undefined;
|
|
@@ -29,7 +29,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
29
29
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
30
30
|
children?: React.ReactNode;
|
|
31
31
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
32
|
-
color?: "inherit" | "disabled" | "error" | "info" | "
|
|
32
|
+
color?: "inherit" | "disabled" | "error" | "info" | "primary" | "success" | "action" | "secondary" | "warning" | undefined;
|
|
33
33
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
34
34
|
htmlColor?: string | undefined;
|
|
35
35
|
inheritViewBox?: boolean | undefined;
|
|
@@ -32,7 +32,7 @@ var SignIn = memo(function (props) {
|
|
|
32
32
|
useErrorListener(signInError || error);
|
|
33
33
|
useStepStartedListener();
|
|
34
34
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
35
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: settingLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: signInFeatureScreens.map(function (_a, index) {
|
|
35
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: settingLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, showPoweredBy: data.appConfig.showPoweredBy, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: signInFeatureScreens.map(function (_a, index) {
|
|
36
36
|
var Element = _a.element, name = _a.name;
|
|
37
37
|
var isActive = activeScreen.name === name;
|
|
38
38
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -59,7 +59,7 @@ var Tax = memo(function (_a) {
|
|
|
59
59
|
settingLoading: settingLoading
|
|
60
60
|
});
|
|
61
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
|
+
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, showPoweredBy: data.appConfig.showPoweredBy, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
63
63
|
var Element = _a.element, name = _a.name;
|
|
64
64
|
var isActive = activeScreen.name === name;
|
|
65
65
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConfigInfo, CountryCode, LibConfig, ScreenStepNavigation } from '../@types';
|
|
2
2
|
interface AppConfigProps extends LibConfig {
|
|
3
3
|
navigation: ScreenStepNavigation[];
|
|
4
4
|
disableCountries?: boolean;
|
|
@@ -6,7 +6,7 @@ interface AppConfigProps extends LibConfig {
|
|
|
6
6
|
disableSettingFetching?: boolean;
|
|
7
7
|
maturity?: 'full' | 'express';
|
|
8
8
|
configToken?: string;
|
|
9
|
-
onVerifyConfigTokenSuccess?: (data:
|
|
9
|
+
onVerifyConfigTokenSuccess?: (data: ConfigInfo, countries: Array<CountryCode>) => Promise<void>;
|
|
10
10
|
}
|
|
11
|
-
export declare const useAppConfig: ({ appInfo, navigation, publicKey, disableCountries, disableLocale, disableSettingFetching, maturity, boardMaturity, configToken, onVerifyConfigTokenSuccess, ...rest }: AppConfigProps) => void;
|
|
11
|
+
export declare const useAppConfig: ({ appInfo, navigation, publicKey, disableCountries, disableLocale, disableSettingFetching, maturity, boardMaturity, configToken, onVerifyConfigTokenSuccess, scope, ...rest }: AppConfigProps) => void;
|
|
12
12
|
export {};
|
|
@@ -26,12 +26,12 @@ import { useAppDispatch } from './useAppDispatch';
|
|
|
26
26
|
import { useAppSelector } from './useAppSelector';
|
|
27
27
|
import { isConnectTapDomain, removeRequestHeaders, setBaseUrl } from '../utils';
|
|
28
28
|
export var useAppConfig = function (_a) {
|
|
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"]);
|
|
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, scope = _a.scope, rest = __rest(_a, ["appInfo", "navigation", "publicKey", "disableCountries", "disableLocale", "disableSettingFetching", "maturity", "boardMaturity", "configToken", "onVerifyConfigTokenSuccess", "scope"]);
|
|
30
30
|
var dispatch = useAppDispatch();
|
|
31
31
|
var data = useAppSelector(settingsSelector).data;
|
|
32
32
|
var setAppConfig = function () {
|
|
33
33
|
if (!disableSettingFetching) {
|
|
34
|
-
dispatch(handleSetAppConfig(__assign({ appInfo: appInfo, publicKey: publicKey }, rest)));
|
|
34
|
+
dispatch(handleSetAppConfig(__assign({ appInfo: appInfo, publicKey: publicKey, scope: scope === null || scope === void 0 ? void 0 : scope.toLowerCase() }, rest)));
|
|
35
35
|
}
|
|
36
36
|
dispatch(handleActiveFlowScreens(navigation));
|
|
37
37
|
};
|
|
@@ -9,7 +9,10 @@ export var useAppTheme = function () {
|
|
|
9
9
|
var data = useAppSelector(settingsSelector).data;
|
|
10
10
|
useEffect(function () {
|
|
11
11
|
var dir = data.language === LanguageMode.AR ? DirectionMode.RTL : DirectionMode.LTR;
|
|
12
|
+
if (data.appConfig.direction && !data.language) {
|
|
13
|
+
dir = data.appConfig.direction;
|
|
14
|
+
}
|
|
12
15
|
setTheme(appTheme(data.skin, isMobile, dir));
|
|
13
|
-
}, [data.skin, data.language, isMobile]);
|
|
16
|
+
}, [data.skin, data.language, isMobile, data.appConfig.direction]);
|
|
14
17
|
return { theme: theme };
|
|
15
18
|
};
|
package/build/utils/device.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ import { GetResult } from '@fingerprintjs/fingerprintjs';
|
|
|
3
3
|
export declare const getBrowserInfo: () => DeviceDetectorResult;
|
|
4
4
|
export declare const getFingerPrint: () => Promise<GetResult>;
|
|
5
5
|
export declare const mobileOS: () => 'Windows Phone' | 'Android' | 'iOS' | 'unknown';
|
|
6
|
+
export declare function getUserLanguage(): string;
|
|
7
|
+
export declare const userTextDirection: string;
|
package/build/utils/device.js
CHANGED
|
@@ -24,3 +24,9 @@ export var mobileOS = function () {
|
|
|
24
24
|
}
|
|
25
25
|
return 'unknown';
|
|
26
26
|
};
|
|
27
|
+
export function getUserLanguage() {
|
|
28
|
+
if (!navigator.language || (navigator.language !== 'ar' && navigator.language !== 'en'))
|
|
29
|
+
return 'en';
|
|
30
|
+
return navigator.language.substring(0, 2);
|
|
31
|
+
}
|
|
32
|
+
export var userTextDirection = document.documentElement.dir;
|