@tap-payments/auth-jsconnect 2.9.6-development → 2.9.8-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/@types/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaymentProvider, SettingAsyncData } from './config';
|
|
2
|
+
import { PaymentProvider, SDKNotification, SettingAsyncData } from './config';
|
|
3
3
|
import { LanguageMode, DialogEdgeFormat } from './theme';
|
|
4
4
|
export interface CountryCode {
|
|
5
5
|
created: number;
|
|
@@ -210,7 +210,7 @@ interface LibCallbacks {
|
|
|
210
210
|
onBoardButtonClick?: (data: Record<string, any>) => void;
|
|
211
211
|
onCreated?: (res: Record<string, any>) => void;
|
|
212
212
|
onBoardCompleted?: () => void;
|
|
213
|
-
onMaturityChanged?: (maturity: 'full' | 'express') => void
|
|
213
|
+
onMaturityChanged?: (maturity: 'full' | 'express') => Promise<void>;
|
|
214
214
|
onSwitchToBoard?: (boardId: string, authId: string) => void;
|
|
215
215
|
}
|
|
216
216
|
export interface LibConfig extends LibCallbacks {
|
|
@@ -242,6 +242,7 @@ export interface LibConfig extends LibCallbacks {
|
|
|
242
242
|
redirectUrl?: string;
|
|
243
243
|
data?: Array<string>;
|
|
244
244
|
mode?: 'popup' | 'page' | 'content';
|
|
245
|
+
notification?: SDKNotification;
|
|
245
246
|
boardMaturity?: boolean;
|
|
246
247
|
settingData?: SettingAsyncData;
|
|
247
248
|
}
|
package/build/@types/config.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface PaymentProvider {
|
|
|
18
18
|
interface Redirect {
|
|
19
19
|
url: string;
|
|
20
20
|
}
|
|
21
|
+
export interface SDKNotification {
|
|
22
|
+
email: boolean;
|
|
23
|
+
mobile?: boolean;
|
|
24
|
+
}
|
|
21
25
|
interface Interface {
|
|
22
26
|
locale?: 'dynamic' | 'ar' | 'en';
|
|
23
27
|
edges?: 'straight' | 'curved';
|
package/build/api/account.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaymentProvider } from '../@types';
|
|
1
|
+
import { PaymentProvider, SDKNotification } from '../@types';
|
|
2
2
|
export type CreateAccountBody = {
|
|
3
3
|
lead_id: string;
|
|
4
4
|
notify: {
|
|
@@ -14,6 +14,7 @@ export type ExpressCreateAccountBody = {
|
|
|
14
14
|
lead_id: string;
|
|
15
15
|
platforms?: string[];
|
|
16
16
|
payment_provider?: PaymentProvider;
|
|
17
|
+
notification?: SDKNotification;
|
|
17
18
|
};
|
|
18
19
|
declare const accountService: {
|
|
19
20
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
package/build/app/settings.js
CHANGED
|
@@ -119,9 +119,6 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
119
119
|
if (typeof (board === null || board === void 0 ? void 0 : board.editable) === 'boolean')
|
|
120
120
|
thunkApi.dispatch(handelBoardMaturity(board.editable));
|
|
121
121
|
onVerifyConfigTokenSuccess === null || onVerifyConfigTokenSuccess === void 0 ? void 0 : onVerifyConfigTokenSuccess(config);
|
|
122
|
-
if (matureData === 'express' && maturity !== matureData && typeof configInfo.onMaturityChanged === 'function') {
|
|
123
|
-
configInfo.onMaturityChanged(matureData);
|
|
124
|
-
}
|
|
125
122
|
}
|
|
126
123
|
deviceInfo = {
|
|
127
124
|
app: {
|
|
@@ -172,7 +169,12 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
172
169
|
operator: operator,
|
|
173
170
|
locale: locale
|
|
174
171
|
});
|
|
175
|
-
|
|
172
|
+
if (!(matureData === 'express' && maturity !== matureData && typeof configInfo.onMaturityChanged === 'function')) return [3, 7];
|
|
173
|
+
return [4, configInfo.onMaturityChanged(matureData)];
|
|
174
|
+
case 6:
|
|
175
|
+
_k.sent();
|
|
176
|
+
_k.label = 7;
|
|
177
|
+
case 7: return [2, __assign({ countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, ipCountry: ipCountry, isValidOperator: isValidOperator, isMaturityExpress: matureData === 'express' }, (merchant && { merchant: merchant }))];
|
|
176
178
|
}
|
|
177
179
|
});
|
|
178
180
|
}); });
|
|
@@ -840,14 +840,14 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
840
840
|
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_a, thunkApi) {
|
|
841
841
|
var isRetry = _a.isRetry;
|
|
842
842
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
843
|
-
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
843
|
+
var _b, connectExpress, settings, responseData, _c, postURL, scope, redirectUrl, mode, showBoard, notification, platforms, payment_provider, leadId, authId, bi, leadData, accountData, data, body, data, urlQueryStart;
|
|
844
844
|
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
845
845
|
return __generator(this, function (_v) {
|
|
846
846
|
switch (_v.label) {
|
|
847
847
|
case 0:
|
|
848
848
|
_b = thunkApi.getState(), connectExpress = _b.connectExpress, settings = _b.settings;
|
|
849
849
|
responseData = connectExpress.data.responseData;
|
|
850
|
-
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard;
|
|
850
|
+
_c = settings.data.appConfig, postURL = _c.postURL, scope = _c.scope, redirectUrl = _c.redirectUrl, mode = _c.mode, showBoard = _c.showBoard, notification = _c.notification;
|
|
851
851
|
platforms = (_e = (_d = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _d === void 0 ? void 0 : _d.platforms) !== null && _e !== void 0 ? _e : settings.data.appConfig.platforms;
|
|
852
852
|
payment_provider = (_g = (_f = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _f === void 0 ? void 0 : _f.payment_provider) !== null && _g !== void 0 ? _g : settings.data.appConfig.paymentProvider;
|
|
853
853
|
leadId = (_h = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _h === void 0 ? void 0 : _h.id;
|
|
@@ -868,7 +868,8 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
868
868
|
lead_id: leadId,
|
|
869
869
|
post_url: scope === SCOPE_AUTH ? '' : postURL || '',
|
|
870
870
|
platforms: platforms,
|
|
871
|
-
payment_provider: payment_provider
|
|
871
|
+
payment_provider: payment_provider,
|
|
872
|
+
notification: notification
|
|
872
873
|
};
|
|
873
874
|
if (!!(leadData === null || leadData === void 0 ? void 0 : leadData.board_id)) return [3, 4];
|
|
874
875
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
@@ -141,7 +141,7 @@ var Connect = memo(function (props) {
|
|
|
141
141
|
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
142
142
|
}, 1100);
|
|
143
143
|
};
|
|
144
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, animationDirection: animationDirection, onClose: ((_c = appConfig.features) === null || _c === void 0 ? void 0 : _c.closeButton) ? handleDialogClose : undefined, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: false, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.tapTextLogo) && activeScreen.name !== 'CONNECT_BUSINESS_COUNTRY_STEP', poweredBy: false }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: false }, { children: connectFeatureScreens.map(function (_a, index) {
|
|
144
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading || data.isMaturityExpress }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, animationDirection: animationDirection, onClose: ((_c = appConfig.features) === null || _c === void 0 ? void 0 : _c.closeButton) ? handleDialogClose : undefined, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: false, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.tapTextLogo) && activeScreen.name !== 'CONNECT_BUSINESS_COUNTRY_STEP', poweredBy: false }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: false }, { children: connectFeatureScreens.map(function (_a, index) {
|
|
145
145
|
var Element = _a.element, name = _a.name;
|
|
146
146
|
var isActive = activeScreen.name === name;
|
|
147
147
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|