@tap-payments/auth-jsconnect 2.0.10 → 2.0.11
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/api/account.d.ts +1 -2
- package/build/api/account.js +7 -3
- package/build/api/board.d.ts +25 -0
- package/build/api/board.js +49 -0
- package/build/api/brand.d.ts +7 -0
- package/build/api/brand.js +40 -0
- package/build/api/entity.d.ts +0 -1
- package/build/api/entity.js +3 -10
- package/build/api/index.d.ts +19 -6
- package/build/api/index.js +7 -1
- package/build/api/individual.d.ts +25 -2
- package/build/api/individual.js +1 -5
- package/build/api/lead.d.ts +1 -5
- package/build/api/lead.js +10 -5
- package/build/api/user.d.ts +8 -0
- package/build/api/user.js +12 -0
- package/build/components/AnimationFlow/Loader.js +17 -9
- package/build/constants/api.d.ts +4 -1
- package/build/constants/api.js +14 -8
- package/build/constants/app.d.ts +1 -1
- package/build/constants/app.js +1 -1
- package/build/constants/validation.js +1 -1
- package/build/features/app/bank/bankStore.d.ts +2 -2
- package/build/features/app/bank/bankStore.js +45 -36
- package/build/features/app/business/businessStore.d.ts +2 -1
- package/build/features/app/business/businessStore.js +189 -123
- package/build/features/app/connect/connectStore.js +17 -26
- package/build/features/app/individual/individualStore.d.ts +2 -10
- package/build/features/app/individual/individualStore.js +69 -93
- package/build/features/app/password/passwordStore.d.ts +6 -5
- package/build/features/app/password/passwordStore.js +70 -54
- package/build/features/app/tax/taxStore.d.ts +1 -1
- package/build/features/app/tax/taxStore.js +44 -39
- package/build/features/bank/screens/Success/Success.js +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/connect/screens/Merchant/BrandName.js +2 -6
- package/build/features/individual/screens/Success/Success.js +2 -2
- package/build/features/password/Password.js +2 -2
- package/build/features/password/screens/Success/Success.js +2 -2
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/index.css +140 -139
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +7 -2
- package/package.json +128 -128
|
@@ -53,9 +53,10 @@ import { hasKey } from '../../../utils';
|
|
|
53
53
|
import { handleNextScreenStep, handleCurrentActiveScreen } from '../../../app/settings';
|
|
54
54
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
var payload, data,
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
var payload, data, boardData, userData, boardInfoData, steps, entity, business, hasTaxCompleted;
|
|
57
|
+
var _a, _b;
|
|
58
|
+
return __generator(this, function (_c) {
|
|
59
|
+
switch (_c.label) {
|
|
59
60
|
case 0:
|
|
60
61
|
payload = {
|
|
61
62
|
service_name: 'tap_email',
|
|
@@ -63,30 +64,38 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
|
|
|
63
64
|
};
|
|
64
65
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
65
66
|
case 1:
|
|
66
|
-
data = (
|
|
67
|
-
|
|
68
|
-
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3,
|
|
69
|
-
|
|
67
|
+
data = (_c.sent()).data;
|
|
68
|
+
boardInfoData = undefined;
|
|
69
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
|
|
70
|
+
if (!(!!data.id && !!data.board_info_id)) return [3, 3];
|
|
71
|
+
return [4, API.boardService.retrieveBoardInfo({ id: data.id, infoId: data.board_info_id })];
|
|
70
72
|
case 2:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
boardInfoData = _c.sent();
|
|
74
|
+
_c.label = 3;
|
|
75
|
+
case 3: return [4, API.boardService.retrieveBoard(data === null || data === void 0 ? void 0 : data.id)];
|
|
76
|
+
case 4:
|
|
77
|
+
boardData = _c.sent();
|
|
78
|
+
steps = boardData.steps, entity = boardData.entity, business = boardData.business;
|
|
79
|
+
return [4, API.userService.retrieveUserInfo((_a = business === null || business === void 0 ? void 0 : business.user) === null || _a === void 0 ? void 0 : _a.id)];
|
|
80
|
+
case 5:
|
|
81
|
+
userData = _c.sent();
|
|
73
82
|
hasTaxCompleted = hasKey(steps, TAX_STEP_NAMES.TAX_SUCCESS);
|
|
74
|
-
if (!(data.step_name === TAX_STEP_NAMES.PHONE_AUTH)) return [3,
|
|
83
|
+
if (!(data.step_name === TAX_STEP_NAMES.PHONE_AUTH)) return [3, 6];
|
|
75
84
|
thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
|
|
76
|
-
return [3,
|
|
77
|
-
case
|
|
78
|
-
if (!hasTaxCompleted) return [3,
|
|
79
|
-
return [4, thunkApi.dispatch(retrieveEntityInfo(
|
|
80
|
-
case
|
|
81
|
-
|
|
85
|
+
return [3, 9];
|
|
86
|
+
case 6:
|
|
87
|
+
if (!hasTaxCompleted) return [3, 8];
|
|
88
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo((_b = business === null || business === void 0 ? void 0 : business.entity) === null || _b === void 0 ? void 0 : _b.id))];
|
|
89
|
+
case 7:
|
|
90
|
+
_c.sent();
|
|
82
91
|
thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
83
|
-
return [3,
|
|
84
|
-
case
|
|
92
|
+
return [3, 9];
|
|
93
|
+
case 8:
|
|
85
94
|
if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
86
95
|
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
87
96
|
}
|
|
88
|
-
|
|
89
|
-
case
|
|
97
|
+
_c.label = 9;
|
|
98
|
+
case 9: return [2, { data: data, boardResponse: __assign(__assign(__assign({}, userData === null || userData === void 0 ? void 0 : userData.user), boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info }), token: token }];
|
|
90
99
|
}
|
|
91
100
|
});
|
|
92
101
|
}); });
|
|
@@ -178,33 +187,29 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, t
|
|
|
178
187
|
});
|
|
179
188
|
}); });
|
|
180
189
|
export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
-
var _a, settings, tax, id, payload, data;
|
|
182
|
-
var
|
|
183
|
-
return __generator(this, function (
|
|
184
|
-
switch (
|
|
190
|
+
var _a, settings, tax, _b, id, infoId, payload, data;
|
|
191
|
+
var _c, _d, _e, _f, _g;
|
|
192
|
+
return __generator(this, function (_h) {
|
|
193
|
+
switch (_h.label) {
|
|
185
194
|
case 0:
|
|
186
195
|
_a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
|
|
187
|
-
|
|
196
|
+
_b = tax.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id;
|
|
188
197
|
if (!id)
|
|
189
198
|
return [2];
|
|
190
199
|
payload = {
|
|
191
200
|
lang: settings.data.language,
|
|
192
|
-
step_name: TAX_STEP_NAMES.TAX_SUCCESS
|
|
193
|
-
id: id,
|
|
194
|
-
encryption_contract: []
|
|
201
|
+
step_name: TAX_STEP_NAMES.TAX_SUCCESS
|
|
195
202
|
};
|
|
196
|
-
return [4, API.
|
|
203
|
+
return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
|
|
197
204
|
case 1:
|
|
198
|
-
data =
|
|
199
|
-
|
|
200
|
-
return [4, thunkApi.dispatch(retrieveEntityInfo((_b = data.entity) === null || _b === void 0 ? void 0 : _b.id))];
|
|
205
|
+
data = _h.sent();
|
|
206
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo((_c = data.entity) === null || _c === void 0 ? void 0 : _c.id))];
|
|
201
207
|
case 2:
|
|
202
|
-
|
|
203
|
-
(
|
|
204
|
-
(
|
|
208
|
+
_h.sent();
|
|
209
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
210
|
+
(_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
|
|
205
211
|
thunkApi.dispatch(handleNextScreenStep());
|
|
206
|
-
|
|
207
|
-
case 3: return [2, { response: data, formData: params }];
|
|
212
|
+
return [2, { response: data, formData: params }];
|
|
208
213
|
}
|
|
209
214
|
});
|
|
210
215
|
}); });
|
|
@@ -245,13 +250,13 @@ export var taxSlice = createSlice({
|
|
|
245
250
|
var _a;
|
|
246
251
|
state.error = null;
|
|
247
252
|
state.customLoading = false;
|
|
248
|
-
var _b = action.payload, data = _b.data, token = _b.token,
|
|
253
|
+
var _b = action.payload, data = _b.data, token = _b.token, boardResponse = _b.boardResponse;
|
|
249
254
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
250
255
|
if (description) {
|
|
251
256
|
state.error = description;
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
|
-
state.data.verify.responseBody = __assign(__assign(__assign({}, data),
|
|
259
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
|
|
255
260
|
state.data.verify.token = token;
|
|
256
261
|
})
|
|
257
262
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
@@ -3,13 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
5
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
6
|
-
import { bankSelector,
|
|
6
|
+
import { bankSelector, updateBoardSuccess } from '../../../app/bank/bankStore';
|
|
7
7
|
var Success = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
10
10
|
var _b = useAppSelector(bankSelector), loading = _b.loading, error = _b.error;
|
|
11
11
|
var onSuccess = function () {
|
|
12
|
-
dispatch(
|
|
12
|
+
dispatch(updateBoardSuccess());
|
|
13
13
|
};
|
|
14
14
|
return (_jsx(SuccessScreen, { title: t('bank_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
|
|
15
15
|
};
|
|
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
20
20
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
|
|
24
24
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
25
|
htmlColor?: string | undefined;
|
|
26
26
|
inheritViewBox?: boolean | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
35
35
|
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
36
36
|
children?: React.ReactNode;
|
|
37
37
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
38
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
38
|
+
color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
|
|
39
39
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
40
40
|
htmlColor?: string | undefined;
|
|
41
41
|
inheritViewBox?: boolean | undefined;
|
|
@@ -49,7 +49,7 @@ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<
|
|
|
49
49
|
export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
|
|
50
50
|
children?: React.ReactNode;
|
|
51
51
|
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
52
|
-
color?: "inherit" | "disabled" | "error" | "
|
|
52
|
+
color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
|
|
53
53
|
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
54
54
|
htmlColor?: string | undefined;
|
|
55
55
|
inheritViewBox?: boolean | undefined;
|
|
@@ -64,9 +64,8 @@ import Collapse from '../../../../components/Collapse';
|
|
|
64
64
|
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
65
65
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
66
66
|
import { checkBrandNameAvailability } from '../../../app/connect/connectStore';
|
|
67
|
-
import { useAppDispatch
|
|
67
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
68
68
|
import { debounce } from 'lodash-es';
|
|
69
|
-
import { settingsSelector } from '../../../../app/settings';
|
|
70
69
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
71
70
|
var theme = _a.theme;
|
|
72
71
|
return ({
|
|
@@ -108,7 +107,6 @@ var BrandName = function (_a) {
|
|
|
108
107
|
var brandControl = useController({ control: control, name: 'brandName' });
|
|
109
108
|
var brandNameValue = brandControl.field.value;
|
|
110
109
|
var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
111
|
-
var data = useAppSelector(settingsSelector).data;
|
|
112
110
|
var checkBrand = debounce(function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
111
|
var onSuccess;
|
|
114
112
|
return __generator(this, function (_a) {
|
|
@@ -127,12 +125,10 @@ var BrandName = function (_a) {
|
|
|
127
125
|
brandControl.field.onChange(value);
|
|
128
126
|
};
|
|
129
127
|
React.useEffect(function () {
|
|
130
|
-
var _a;
|
|
131
128
|
var isValid = brandNameValue && !error && brandNameValue.length > 2;
|
|
132
|
-
var brandName = brandNameValue + ((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2);
|
|
133
129
|
if (isValid) {
|
|
134
130
|
fetchingBrandName(true);
|
|
135
|
-
checkBrand(
|
|
131
|
+
checkBrand(brandNameValue);
|
|
136
132
|
}
|
|
137
133
|
}, [brandNameValue, error]);
|
|
138
134
|
var clearBrandName = function () {
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
-
import { individualSelector,
|
|
5
|
+
import { individualSelector, updateBoardSuccess } from '../../../app/individual/individualStore';
|
|
6
6
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
7
|
var Success = function (_a) {
|
|
8
8
|
var t = useTranslation().t;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
10
10
|
var _b = useAppSelector(individualSelector), loading = _b.loading, error = _b.error;
|
|
11
11
|
var onSuccess = function () {
|
|
12
|
-
dispatch(
|
|
12
|
+
dispatch(updateBoardSuccess());
|
|
13
13
|
};
|
|
14
14
|
return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
|
|
15
15
|
};
|
|
@@ -37,13 +37,13 @@ var Password = memo(function (props) {
|
|
|
37
37
|
var token = getParameterByName('token');
|
|
38
38
|
var lang = getParameterByName('lang');
|
|
39
39
|
var operationType = getParameterByName('operation_type');
|
|
40
|
-
var
|
|
40
|
+
var boardId = getParameterByName('board_id') || '';
|
|
41
41
|
if (lang)
|
|
42
42
|
dispatch(handleLanguage(lang));
|
|
43
43
|
if (!token)
|
|
44
44
|
throw new Error('Auth token is not found!');
|
|
45
45
|
if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
|
|
46
|
-
dispatch(verifyOperationToken({ token: token,
|
|
46
|
+
dispatch(verifyOperationToken({ token: token, boardId: boardId }));
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
dispatch(verifyLeadToken(token));
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
-
import {
|
|
5
|
+
import { updateBoardSuccess, passwordSelector, retrieveLeadPassword } from '../../../app/password/passwordStore';
|
|
6
6
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
7
|
import { PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
8
8
|
var Success = function (_a) {
|
|
@@ -15,7 +15,7 @@ var Success = function (_a) {
|
|
|
15
15
|
dispatch(retrieveLeadPassword());
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
dispatch(
|
|
18
|
+
dispatch(updateBoardSuccess());
|
|
19
19
|
};
|
|
20
20
|
return (_jsx(SuccessScreen, { title: t('password_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
|
|
21
21
|
};
|
|
@@ -70,7 +70,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
70
70
|
.filter(function (item) { return item.name; })
|
|
71
71
|
.map(function (_a) {
|
|
72
72
|
var name = _a.name, url = _a.url, status = _a.status;
|
|
73
|
-
var type = status === 'initiated' ? 'pending' : 'completed';
|
|
73
|
+
var type = status === 'initiated' || status === 'in_progress' ? 'pending' : 'completed';
|
|
74
74
|
var title = t("".concat(name, "_flow_").concat(type), {
|
|
75
75
|
individual_name: username.toLowerCase() + maskedId,
|
|
76
76
|
business_type: brandName,
|
package/build/index.css
CHANGED
|
@@ -1,139 +1,140 @@
|
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
blockquote:
|
|
127
|
-
|
|
128
|
-
q:
|
|
129
|
-
|
|
130
|
-
content:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
border-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
+
overflow-y: hidden;
|
|
117
|
+
}
|
|
118
|
+
ol,
|
|
119
|
+
ul {
|
|
120
|
+
list-style: none;
|
|
121
|
+
}
|
|
122
|
+
blockquote,
|
|
123
|
+
q {
|
|
124
|
+
quotes: none;
|
|
125
|
+
}
|
|
126
|
+
blockquote:before,
|
|
127
|
+
blockquote:after,
|
|
128
|
+
q:before,
|
|
129
|
+
q:after {
|
|
130
|
+
content: '';
|
|
131
|
+
content: none;
|
|
132
|
+
}
|
|
133
|
+
table {
|
|
134
|
+
border-collapse: collapse;
|
|
135
|
+
border-spacing: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
* {
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
}
|
package/build/utils/string.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const convertNumbers2English: (str: string) => string;
|
|
|
12
12
|
export declare const getParameterByName: (name: string) => string | null;
|
|
13
13
|
export declare const getClientEmailUrl: () => string;
|
|
14
14
|
export declare const getFlowUrl: (path: string, lang: string) => string;
|
|
15
|
-
export declare const getResetFlowUrl: (path: string, lang: string, operationType: string,
|
|
15
|
+
export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, id: string) => string;
|
|
16
16
|
export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
|
|
17
17
|
export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
18
18
|
al: string;
|
|
@@ -40,3 +40,4 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
|
40
40
|
export declare const removeRequestHeaders: () => void;
|
|
41
41
|
export declare const getBaseUrl: () => string;
|
|
42
42
|
export declare const getScreenNameBasedOnFlow: (flow: string) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP";
|
|
43
|
+
export declare const getEighteenYearsAgo: () => string;
|
package/build/utils/string.js
CHANGED
|
@@ -2,6 +2,7 @@ import { FlowsTypes } from '../@types';
|
|
|
2
2
|
import { encryptString } from '.';
|
|
3
3
|
import { removeAxiosGlobalHeaders } from '../api';
|
|
4
4
|
import { ENDPOINT_PATHS } from '../constants';
|
|
5
|
+
import moment from 'moment';
|
|
5
6
|
export var maskPhone = function (str) {
|
|
6
7
|
if (str === void 0) { str = ''; }
|
|
7
8
|
var lastTwo = str.substring(str.length - 2, str.length);
|
|
@@ -66,9 +67,9 @@ export var getFlowUrl = function (path, lang) {
|
|
|
66
67
|
var origin = window.location.origin;
|
|
67
68
|
return origin + path + "?lang=".concat(lang, "&token=");
|
|
68
69
|
};
|
|
69
|
-
export var getResetFlowUrl = function (path, lang, operationType,
|
|
70
|
+
export var getResetFlowUrl = function (path, lang, operationType, id) {
|
|
70
71
|
var origin = window.location.origin;
|
|
71
|
-
return origin + path + "?lang=".concat(lang, "&operation_type=").concat(operationType, "&
|
|
72
|
+
return origin + path + "?lang=".concat(lang, "&operation_type=").concat(operationType, "&board_id=").concat(id, "&token=");
|
|
72
73
|
};
|
|
73
74
|
export var capitalizeTheFirstLetterOfEachWord = function (words) {
|
|
74
75
|
var separateWord = words.toLowerCase().split(' ');
|
|
@@ -162,3 +163,7 @@ export var getScreenNameBasedOnFlow = function (flow) {
|
|
|
162
163
|
}
|
|
163
164
|
return '';
|
|
164
165
|
};
|
|
166
|
+
export var getEighteenYearsAgo = function () {
|
|
167
|
+
var eighteenYearsAgo = new Date();
|
|
168
|
+
return moment(eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear() - 18)).format('YYYY-MM-DD');
|
|
169
|
+
};
|