@tap-payments/auth-jsconnect 2.9.10-sandbox → 2.9.13-development
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/components/Input/Input.js +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -1
- package/build/features/app/business/businessStore.js +3 -2
- package/build/features/app/connectExpress/connectExpressStore.js +1 -1
- package/build/features/bank/Bank.d.ts +5 -1
- package/build/features/bank/Bank.js +15 -7
- package/build/features/brand/Brand.d.ts +5 -1
- package/build/features/brand/Brand.js +15 -7
- package/build/features/entity/Entity.d.ts +4 -1
- package/build/features/entity/Entity.js +15 -7
- package/build/features/individual/Individual.d.ts +4 -1
- package/build/features/individual/Individual.js +15 -7
- package/build/features/password/Password.d.ts +4 -1
- package/build/features/password/Password.js +13 -6
- package/build/features/shared/Dialog/DialogContainer.js +2 -1
- package/build/features/tax/Tax.d.ts +4 -1
- package/build/features/tax/Tax.js +15 -7
- package/build/utils/common.js +3 -3
- package/package.json +2 -2
|
@@ -57,7 +57,7 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
57
57
|
height: '100%',
|
|
58
58
|
width: '100%'
|
|
59
59
|
},
|
|
60
|
-
input: __assign(__assign({}, theme.typography.subtitle2), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), '&::placeholder': {
|
|
60
|
+
input: __assign(__assign({}, theme.typography.subtitle2), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular, background: "".concat(theme.palette.background.default, " !important"), padding: theme.spacing(1.5, 2.5, 1.5), '&::placeholder': {
|
|
61
61
|
color: alpha(theme.palette.text.primary, 0.8),
|
|
62
62
|
fontWeight: theme.typography.fontWeightLight
|
|
63
63
|
} })
|
|
@@ -33,7 +33,7 @@ var StyledTooltip = styled(function (_a) {
|
|
|
33
33
|
var _b;
|
|
34
34
|
var theme = _a.theme;
|
|
35
35
|
return (_b = {},
|
|
36
|
-
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8))
|
|
36
|
+
_b["& .".concat(tooltipClasses.tooltip)] = __assign(__assign({ color: alpha(theme.palette.text.primary, 0.5), width: 'fit-content', maxHeight: 'fit-content' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightLight, backgroundColor: theme.palette.secondary.light, border: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) }),
|
|
37
37
|
_b);
|
|
38
38
|
});
|
|
39
39
|
var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
package/build/constants/app.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ScreenStepNavigation, BusinessType } from '../@types';
|
|
2
2
|
export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
|
|
3
|
-
export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
|
|
4
3
|
export declare const CONNECT_PROD_URL = "https://connect.tap.company";
|
|
5
4
|
export declare const CLIENT_ORIGIN: string;
|
|
6
5
|
export declare const TAP_WEBSITE = "https://www.tap.company/";
|
package/build/constants/app.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BusinessType } from '../@types';
|
|
2
2
|
import { CONNECT_FLOWS } from './flows';
|
|
3
3
|
export var CONNECT_DEV_URL = 'https://connect.dev.tap.company';
|
|
4
|
-
export var CONNECT_SANDBOX_URL = 'https://connect.sandbox.tap.company';
|
|
5
4
|
export var CONNECT_PROD_URL = 'https://connect.tap.company';
|
|
6
5
|
export var CLIENT_ORIGIN = window.location.origin;
|
|
7
6
|
export var TAP_WEBSITE = 'https://www.tap.company/';
|
|
@@ -556,7 +556,7 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
|
|
|
556
556
|
});
|
|
557
557
|
}); });
|
|
558
558
|
export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
559
|
-
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, brandData, data_1, brandRes, _c, message, error, list,
|
|
559
|
+
var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
|
|
560
560
|
var _d, _e, _f;
|
|
561
561
|
return __generator(this, function (_g) {
|
|
562
562
|
switch (_g.label) {
|
|
@@ -617,6 +617,8 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
617
617
|
error = message;
|
|
618
618
|
if ((error === null || error === void 0 ? void 0 : error.toLowerCase()) === 'entity with license already exist') {
|
|
619
619
|
stepName = 'BUSINESS_VERIFY_BRAND_INFO';
|
|
620
|
+
sleep(50).then(function () { return thunkApi.dispatch(handleNextScreenStep(stepName)); });
|
|
621
|
+
return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData, isicActivityList: [] }];
|
|
620
622
|
}
|
|
621
623
|
else
|
|
622
624
|
throw new Error(error);
|
|
@@ -624,7 +626,6 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
624
626
|
case 8: return [4, API.dataService.getActivitiesIsIc()];
|
|
625
627
|
case 9:
|
|
626
628
|
list = (_g.sent()).list;
|
|
627
|
-
entityData = undefined;
|
|
628
629
|
entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
|
|
629
630
|
if (!((certificateId || []).length > 0)) return [3, 11];
|
|
630
631
|
documentBody = {
|
|
@@ -783,7 +783,7 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
|
|
|
783
783
|
case 6:
|
|
784
784
|
count++;
|
|
785
785
|
return [3, 1];
|
|
786
|
-
case 7: throw new Error('
|
|
786
|
+
case 7: throw new Error('paci_verification_failed');
|
|
787
787
|
}
|
|
788
788
|
});
|
|
789
789
|
}); });
|
|
@@ -5,7 +5,11 @@ export interface BankLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface BankLibFullProps extends BankLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function BankElement(props: BankLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderBankLib(config: BankLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
15
|
+
export {};
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
-
import { settingsSelector } from '../../app/settings';
|
|
26
|
+
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
|
|
27
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -36,11 +36,12 @@ import { bankFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Bank = memo(function (_a) {
|
|
39
|
-
var _b, _c;
|
|
39
|
+
var _b, _c, _d;
|
|
40
40
|
var verifyToken = _a.verifyToken, configToken = _a.configToken, loaderColor = _a.loaderColor, props = __rest(_a, ["verifyToken", "configToken", "loaderColor"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
|
-
var
|
|
43
|
-
var _e = useAppSelector(
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
44
|
+
var _f = useAppSelector(bankSelector), customLoading = _f.customLoading, loading = _f.loading, bankError = _f.error;
|
|
44
45
|
useAppConfig(__assign(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
|
|
45
46
|
useErrorListener(bankError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -63,8 +64,15 @@ var Bank = memo(function (_a) {
|
|
|
63
64
|
operatorErrorScreenName: 'BANK_OPERATOR_ERROR_STEP',
|
|
64
65
|
isValidOperator: data.isValidOperator
|
|
65
66
|
});
|
|
67
|
+
var handleDialogClose = function () {
|
|
68
|
+
dispatch(handleOpen(false));
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
72
|
+
}, 1100);
|
|
73
|
+
};
|
|
66
74
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
67
|
-
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, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, loaderColor: loaderColor, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
75
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, loaderColor: loaderColor, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
68
76
|
var Element = _a.element, name = _a.name;
|
|
69
77
|
var isActive = activeScreen.name === name;
|
|
70
78
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -76,7 +84,7 @@ export function BankElement(props) {
|
|
|
76
84
|
export function renderBankLib(config, elementId) {
|
|
77
85
|
var element = findOrCreateElementAndInject(elementId);
|
|
78
86
|
var root = createRoot(element);
|
|
79
|
-
root.render(_jsx(BankElement, __assign({}, config)));
|
|
80
87
|
var unmount = function () { return root.unmount(); };
|
|
88
|
+
root.render(_jsx(BankElement, __assign({}, config, { unmount: unmount })));
|
|
81
89
|
return { unmount: unmount };
|
|
82
90
|
}
|
|
@@ -5,7 +5,11 @@ export interface BrandLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface BrandLibFullProps extends BrandLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function BrandElement(props: BrandLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderBrandLib(config: BrandLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
15
|
+
export {};
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
-
import { settingsSelector } from '../../app/settings';
|
|
26
|
+
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
|
|
27
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -36,11 +36,12 @@ import { brandFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { brandSelector, verifyLeadToken } from '../app/brand/brandStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Brand = memo(function (_a) {
|
|
39
|
-
var _b, _c;
|
|
39
|
+
var _b, _c, _d;
|
|
40
40
|
var verifyToken = _a.verifyToken, configToken = _a.configToken, loaderColor = _a.loaderColor, props = __rest(_a, ["verifyToken", "configToken", "loaderColor"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
|
-
var
|
|
43
|
-
var _e = useAppSelector(
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
44
|
+
var _f = useAppSelector(brandSelector), customLoading = _f.customLoading, loading = _f.loading, brandError = _f.error;
|
|
44
45
|
useAppConfig(__assign(__assign({ navigation: BRAND_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
|
|
45
46
|
useErrorListener(brandError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -63,8 +64,15 @@ var Brand = memo(function (_a) {
|
|
|
63
64
|
operatorErrorScreenName: 'BRAND_OPERATOR_ERROR_STEP',
|
|
64
65
|
isValidOperator: data.isValidOperator
|
|
65
66
|
});
|
|
67
|
+
var handleDialogClose = function () {
|
|
68
|
+
dispatch(handleOpen(false));
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
72
|
+
}, 1100);
|
|
73
|
+
};
|
|
66
74
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
67
|
-
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, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
75
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
|
|
68
76
|
var Element = _a.element, name = _a.name;
|
|
69
77
|
var isActive = activeScreen.name === name;
|
|
70
78
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -76,7 +84,7 @@ export function BrandElement(props) {
|
|
|
76
84
|
export function renderBrandLib(config, elementId) {
|
|
77
85
|
var element = findOrCreateElementAndInject(elementId);
|
|
78
86
|
var root = createRoot(element);
|
|
79
|
-
root.render(_jsx(BrandElement, __assign({}, config)));
|
|
80
87
|
var unmount = function () { return root.unmount(); };
|
|
88
|
+
root.render(_jsx(BrandElement, __assign({}, config, { unmount: unmount })));
|
|
81
89
|
return { unmount: unmount };
|
|
82
90
|
}
|
|
@@ -5,7 +5,10 @@ export interface EntityLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface EntityLibFullProps extends EntityLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function EntityElement(props: EntityLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderEntityLib(config: EntityLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
-
import { settingsSelector } from '../../app/settings';
|
|
26
|
+
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
|
|
27
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -36,11 +36,12 @@ import { entityFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { entitySelector, verifyLeadToken } from '../app/entity/entityStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Entity = memo(function (_a) {
|
|
39
|
-
var _b, _c;
|
|
39
|
+
var _b, _c, _d;
|
|
40
40
|
var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
|
-
var
|
|
43
|
-
var _e = useAppSelector(
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
44
|
+
var _f = useAppSelector(entitySelector), customLoading = _f.customLoading, entityError = _f.error, loading = _f.loading;
|
|
44
45
|
useAppConfig(__assign(__assign({ navigation: ENTITY_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
|
|
45
46
|
useErrorListener(entityError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -63,8 +64,15 @@ var Entity = memo(function (_a) {
|
|
|
63
64
|
title: 'Entity'
|
|
64
65
|
});
|
|
65
66
|
}, []);
|
|
67
|
+
var handleDialogClose = function () {
|
|
68
|
+
dispatch(handleOpen(false));
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
72
|
+
}, 1100);
|
|
73
|
+
};
|
|
66
74
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
67
|
-
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, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
|
|
75
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
|
|
68
76
|
var Element = _a.element, name = _a.name;
|
|
69
77
|
var isActive = activeScreen.name === name;
|
|
70
78
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -76,7 +84,7 @@ export function EntityElement(props) {
|
|
|
76
84
|
export function renderEntityLib(config, elementId) {
|
|
77
85
|
var element = findOrCreateElementAndInject(elementId);
|
|
78
86
|
var root = createRoot(element);
|
|
79
|
-
root.render(_jsx(EntityElement, __assign({}, config)));
|
|
80
87
|
var unmount = function () { return root.unmount(); };
|
|
88
|
+
root.render(_jsx(EntityElement, __assign({}, config, { unmount: unmount })));
|
|
81
89
|
return { unmount: unmount };
|
|
82
90
|
}
|
|
@@ -5,7 +5,10 @@ export interface IndividualLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface IndividualLibFullProps extends IndividualLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function IndividualElement(props: IndividualLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
-
import { settingsSelector } from '../../app/settings';
|
|
26
|
+
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
|
|
27
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -36,11 +36,12 @@ import { individualFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Individual = memo(function (_a) {
|
|
39
|
-
var _b, _c;
|
|
39
|
+
var _b, _c, _d;
|
|
40
40
|
var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
|
-
var
|
|
43
|
-
var _e = useAppSelector(
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
44
|
+
var _f = useAppSelector(individualSelector), customLoading = _f.customLoading, individualError = _f.error, loading = _f.loading;
|
|
44
45
|
useAppConfig(__assign(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
|
|
45
46
|
useErrorListener(individualError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -63,8 +64,15 @@ var Individual = memo(function (_a) {
|
|
|
63
64
|
title: 'Individual'
|
|
64
65
|
});
|
|
65
66
|
}, []);
|
|
67
|
+
var handleDialogClose = function () {
|
|
68
|
+
dispatch(handleOpen(false));
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
72
|
+
}, 1100);
|
|
73
|
+
};
|
|
66
74
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
67
|
-
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, animationDirection: animationDirection, loading: initialLoading, loaderColor: loaderColor, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
75
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, loading: initialLoading, loaderColor: loaderColor, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
68
76
|
var Element = _a.element, name = _a.name;
|
|
69
77
|
var isActive = activeScreen.name === name;
|
|
70
78
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -76,7 +84,7 @@ export function IndividualElement(props) {
|
|
|
76
84
|
export function renderIndividualLib(config, elementId) {
|
|
77
85
|
var element = findOrCreateElementAndInject(elementId);
|
|
78
86
|
var root = createRoot(element);
|
|
79
|
-
root.render(_jsx(IndividualElement, __assign({}, config)));
|
|
80
87
|
var unmount = function () { return root.unmount(); };
|
|
88
|
+
root.render(_jsx(IndividualElement, __assign({}, config, { unmount: unmount })));
|
|
81
89
|
return { unmount: unmount };
|
|
82
90
|
}
|
|
@@ -5,7 +5,10 @@ export interface PasswordLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface PasswordLibFullProps extends PasswordLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function PasswordElement(props: PasswordLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
@@ -60,7 +60,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
60
60
|
import { memo } from 'react';
|
|
61
61
|
import { createRoot } from 'react-dom/client';
|
|
62
62
|
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
63
|
-
import { settingsSelector } from '../../app/settings';
|
|
63
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
64
64
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
65
65
|
import { store } from '../../app/store';
|
|
66
66
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -72,12 +72,12 @@ import { passwordFeatureScreens } from '../featuresScreens';
|
|
|
72
72
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
73
73
|
import Background from '../shared/Background';
|
|
74
74
|
var Password = memo(function (_a) {
|
|
75
|
-
var _b, _c;
|
|
75
|
+
var _b, _c, _d;
|
|
76
76
|
var configToken = _a.configToken, loaderColor = _a.loaderColor, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "loaderColor", "verifyToken"]);
|
|
77
77
|
var theme = useAppTheme().theme;
|
|
78
78
|
var dispatch = useAppDispatch();
|
|
79
|
-
var
|
|
80
|
-
var
|
|
79
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
80
|
+
var _f = useAppSelector(passwordSelector), customLoading = _f.customLoading, passwordError = _f.error, loading = _f.loading;
|
|
81
81
|
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION, disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }, props));
|
|
82
82
|
useErrorListener(passwordError || error);
|
|
83
83
|
useStepStartedListener();
|
|
@@ -117,8 +117,15 @@ var Password = memo(function (_a) {
|
|
|
117
117
|
isValidOperator: data.isValidOperator,
|
|
118
118
|
operatorErrorScreenName: 'PASSWORD_OPERATOR_ERROR_STEP'
|
|
119
119
|
});
|
|
120
|
+
var handleDialogClose = function () {
|
|
121
|
+
dispatch(handleOpen(false));
|
|
122
|
+
setTimeout(function () {
|
|
123
|
+
var _a;
|
|
124
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
125
|
+
}, 1100);
|
|
126
|
+
};
|
|
120
127
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
121
|
-
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, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
128
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
122
129
|
var Element = _a.element, name = _a.name;
|
|
123
130
|
var isActive = activeScreen.name === name;
|
|
124
131
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -130,7 +137,7 @@ export function PasswordElement(props) {
|
|
|
130
137
|
export function renderPasswordLib(config, elementId) {
|
|
131
138
|
var el = findOrCreateElementAndInject(elementId);
|
|
132
139
|
var root = createRoot(el);
|
|
133
|
-
root.render(_jsx(PasswordElement, __assign({}, config)));
|
|
134
140
|
var unmount = function () { return root.unmount(); };
|
|
141
|
+
root.render(_jsx(PasswordElement, __assign({}, config, { unmount: unmount })));
|
|
135
142
|
return { unmount: unmount };
|
|
136
143
|
}
|
|
@@ -35,7 +35,8 @@ var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !=
|
|
|
35
35
|
direction: theme.direction,
|
|
36
36
|
position: isTapOrigin ? 'initial' : 'absolute',
|
|
37
37
|
right: 0,
|
|
38
|
-
left: 0
|
|
38
|
+
left: 0,
|
|
39
|
+
zIndex: 9999
|
|
39
40
|
});
|
|
40
41
|
});
|
|
41
42
|
export default function Dialog(_a) {
|
|
@@ -5,7 +5,10 @@ export interface TaxLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface TaxLibFullProps extends TaxLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function TaxElement(props: TaxLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderTaxLib(config: TaxLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
|
-
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
-
import { settingsSelector } from '../../app/settings';
|
|
26
|
+
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
|
|
27
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
28
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -36,11 +36,12 @@ 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 _b, _c;
|
|
39
|
+
var _b, _c, _d;
|
|
40
40
|
var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
|
|
41
41
|
var theme = useAppTheme().theme;
|
|
42
|
-
var
|
|
43
|
-
var _e = useAppSelector(
|
|
42
|
+
var dispatch = useAppDispatch();
|
|
43
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
44
|
+
var _f = useAppSelector(taxSelector), customLoading = _f.customLoading, taxError = _f.error, loading = _f.loading;
|
|
44
45
|
useAppConfig(__assign(__assign({ navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
|
|
45
46
|
useErrorListener(taxError || error);
|
|
46
47
|
useStepStartedListener();
|
|
@@ -63,8 +64,15 @@ var Tax = memo(function (_a) {
|
|
|
63
64
|
operatorErrorScreenName: 'TAX_OPERATOR_ERROR_STEP',
|
|
64
65
|
isValidOperator: data.isValidOperator
|
|
65
66
|
});
|
|
67
|
+
var handleDialogClose = function () {
|
|
68
|
+
dispatch(handleOpen(false));
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
72
|
+
}, 1100);
|
|
73
|
+
};
|
|
66
74
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
67
|
-
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, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
75
|
+
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, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
68
76
|
var Element = _a.element, name = _a.name;
|
|
69
77
|
var isActive = activeScreen.name === name;
|
|
70
78
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -76,7 +84,7 @@ export function TaxElement(props) {
|
|
|
76
84
|
export function renderTaxLib(config, elementId) {
|
|
77
85
|
var element = findOrCreateElementAndInject(elementId);
|
|
78
86
|
var root = createRoot(element);
|
|
79
|
-
root.render(_jsx(TaxElement, __assign({}, config)));
|
|
80
87
|
var unmount = function () { return root.unmount(); };
|
|
88
|
+
root.render(_jsx(TaxElement, __assign({}, config, { unmount: unmount })));
|
|
81
89
|
return { unmount: unmount };
|
|
82
90
|
}
|
package/build/utils/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axiosInstance } from '../api';
|
|
2
|
-
import { ENDPOINT_PATHS,
|
|
2
|
+
import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
|
|
3
3
|
import { objectHasValues } from './object';
|
|
4
4
|
export var sleep = function (milliseconds) {
|
|
5
5
|
if (milliseconds === void 0) { milliseconds = 1000; }
|
|
@@ -17,7 +17,7 @@ export var setBaseUrl = function (publicKey) {
|
|
|
17
17
|
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
20
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
|
|
21
21
|
};
|
|
22
22
|
export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
23
23
|
var country = countryIso2.toLowerCase();
|
|
@@ -36,7 +36,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
|
36
36
|
window.history.replaceState({}, '', newUrl);
|
|
37
37
|
};
|
|
38
38
|
export var openConnect = function (pk, countryCode) {
|
|
39
|
-
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL :
|
|
39
|
+
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
|
|
40
40
|
if (countryCode) {
|
|
41
41
|
newUrl.pathname = "/".concat(countryCode.toLowerCase());
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.13-development",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
22
|
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
23
|
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public --tag
|
|
24
|
+
"push": "npm publish --access public --tag development"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|