@tap-payments/auth-jsconnect 2.13.10-beta → 2.14.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +2 -1
- package/build/@types/app.js +1 -0
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/terminal.d.ts +104 -0
- package/build/@types/terminal.js +1 -0
- package/build/api/auth.d.ts +15 -1
- package/build/api/index.d.ts +7 -1
- package/build/api/index.js +3 -1
- package/build/api/terminal.d.ts +25 -0
- package/build/api/terminal.js +55 -0
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/en.json +0 -1
- package/build/components/DeviceCard/DeviceCard.d.ts +19 -0
- package/build/components/DeviceCard/DeviceCard.js +102 -0
- package/build/components/DeviceCard/index.d.ts +3 -0
- package/build/components/DeviceCard/index.js +2 -0
- package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
- package/build/components/OTPTimer/OTPTimer.js +4 -4
- package/build/components/TruncatedTooltipText/TruncatedTooltipText.d.ts +7 -0
- package/build/components/TruncatedTooltipText/TruncatedTooltipText.js +33 -0
- package/build/components/TruncatedTooltipText/index.d.ts +2 -0
- package/build/components/TruncatedTooltipText/index.js +2 -0
- package/build/constants/app.d.ts +12 -1
- package/build/constants/app.js +133 -0
- package/build/constants/flows.d.ts +16 -0
- package/build/constants/flows.js +16 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/terminal/terminalStore.d.ts +110 -0
- package/build/features/app/terminal/terminalStore.js +703 -0
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +72 -0
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
- package/build/features/shared/Button/FlowsButtons.js +2 -2
- package/build/features/shared/PushNotification/PushNotification.d.ts +11 -0
- package/build/features/shared/PushNotification/PushNotification.js +34 -0
- package/build/features/shared/PushNotification/index.d.ts +2 -0
- package/build/features/shared/PushNotification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +5 -4
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/features/terminal/Terminal.d.ts +14 -0
- package/build/features/terminal/Terminal.js +95 -0
- package/build/features/terminal/index.d.ts +1 -0
- package/build/features/terminal/index.js +1 -0
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +3 -0
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +68 -0
- package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkNewTerminal/index.js +2 -0
- package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +10 -0
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +28 -0
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +3 -0
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +50 -0
- package/build/features/terminal/screens/LinkedSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkedSuccess/index.js +2 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +3 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +55 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +2 -0
- package/build/features/terminal/screens/LinkedTerminalInfo/index.js +2 -0
- package/build/features/terminal/screens/Loading/Loading.d.ts +4 -0
- package/build/features/terminal/screens/Loading/Loading.js +10 -0
- package/build/features/terminal/screens/Loading/index.d.ts +2 -0
- package/build/features/terminal/screens/Loading/index.js +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +3 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +103 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +2 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +36 -0
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +34 -0
- package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/terminal/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/terminal/screens/OperatorError/index.d.ts +2 -0
- package/build/features/terminal/screens/OperatorError/index.js +2 -0
- package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.d.ts +3 -0
- package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.js +50 -0
- package/build/features/terminal/screens/POSDeviceListPage/index.d.ts +2 -0
- package/build/features/terminal/screens/POSDeviceListPage/index.js +2 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +3 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +9 -0
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +20 -0
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +3 -0
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +153 -0
- package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/index.js +2 -0
- package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +9 -0
- package/build/features/terminal/screens/TerminalDeviceList/styles.js +13 -0
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +3 -0
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +51 -0
- package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +2 -0
- package/build/features/terminal/screens/UnlinkedSuccess/index.js +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +3 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +99 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +2 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +26 -0
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +30 -0
- package/build/features/terminal/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/terminal/screens/Verify/OTPInput.js +51 -0
- package/build/features/terminal/screens/Verify/Verify.d.ts +5 -0
- package/build/features/terminal/screens/Verify/Verify.js +89 -0
- package/build/features/terminal/screens/Verify/index.d.ts +2 -0
- package/build/features/terminal/screens/Verify/index.js +2 -0
- package/build/features/terminal/screens/Verify/validation.d.ts +8 -0
- package/build/features/terminal/screens/Verify/validation.js +4 -0
- package/build/features/terminal/screens/shared/Header.d.ts +10 -0
- package/build/features/terminal/screens/shared/Header.js +30 -0
- package/build/features/terminal/screens/shared/POSDeviceList.d.ts +11 -0
- package/build/features/terminal/screens/shared/POSDeviceList.js +30 -0
- package/build/features/terminal/screens/shared/index.d.ts +5 -0
- package/build/features/terminal/screens/shared/index.js +5 -0
- package/build/features/terminal/screens/shared/styles.d.ts +196 -0
- package/build/features/terminal/screens/shared/styles.js +155 -0
- package/build/features/terminal/screens/shared/utils.d.ts +7 -0
- package/build/features/terminal/screens/shared/utils.js +24 -0
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/palette.js +12 -0
- package/build/theme/typography.js +4 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +11 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -13,7 +13,8 @@ import { EntityElement, renderEntityLib } from './features/entity';
|
|
|
13
13
|
import { BrandElement, renderBrandLib } from './features/brand';
|
|
14
14
|
import { BoardElement, renderBoardLib } from './features/board';
|
|
15
15
|
import { KYCElement, renderKYCLib } from './features/kyc';
|
|
16
|
-
|
|
16
|
+
import { TerminalElement, renderTerminalLib } from './features/terminal';
|
|
17
|
+
export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement, TerminalElement };
|
|
17
18
|
window['TapAuth'] = {
|
|
18
19
|
renderConnectLib: renderConnectLib,
|
|
19
20
|
renderConnectExpressLib: renderConnectExpressLib,
|
|
@@ -27,6 +28,7 @@ window['TapAuth'] = {
|
|
|
27
28
|
renderBrandLib: renderBrandLib,
|
|
28
29
|
renderSignInLib: renderSignInLib,
|
|
29
30
|
renderBoardLib: renderBoardLib,
|
|
30
|
-
renderKYCLib: renderKYCLib
|
|
31
|
+
renderKYCLib: renderKYCLib,
|
|
32
|
+
renderTerminalLib: renderTerminalLib
|
|
31
33
|
};
|
|
32
34
|
console.log("TapAuth version: ".concat(require('../package.json').version));
|
package/build/theme/palette.js
CHANGED
|
@@ -48,6 +48,18 @@ export var lightPalette = {
|
|
|
48
48
|
main: '#808592',
|
|
49
49
|
light: '#EAECEF',
|
|
50
50
|
dark: '#3B4152'
|
|
51
|
+
},
|
|
52
|
+
components: {
|
|
53
|
+
deviceCard: {
|
|
54
|
+
title: '#20232B',
|
|
55
|
+
statusText: '#1F222A80',
|
|
56
|
+
statusBackground: ' #F0F0F0',
|
|
57
|
+
deviceInfoBackground: 'linear-gradient(127.37deg, rgba(255, 255, 255, 0.6) 59.07%, rgba(255, 255, 255, 0.444) 100.12%);',
|
|
58
|
+
border: '#e8ecf2'
|
|
59
|
+
},
|
|
60
|
+
toastDeviceSelectorDropdown: {
|
|
61
|
+
border: '#f2f2f2'
|
|
62
|
+
}
|
|
51
63
|
}
|
|
52
64
|
};
|
|
53
65
|
export var darkPalette = {
|
|
@@ -5,6 +5,7 @@ export var typography = {
|
|
|
5
5
|
fontWeightLight: 300,
|
|
6
6
|
fontWeightRegular: 400,
|
|
7
7
|
fontWeightMedium: 500,
|
|
8
|
+
fontWeightSemiBold: 600,
|
|
8
9
|
fontWeightBold: 700,
|
|
9
10
|
allVariants: {
|
|
10
11
|
fontFamily: '"Lato", "Tajawal", "Roboto"',
|
|
@@ -19,6 +20,7 @@ export var typography = {
|
|
|
19
20
|
h2: { fontSize: '3rem' },
|
|
20
21
|
h3: { fontSize: '2.5rem' },
|
|
21
22
|
h4: { fontSize: '2rem' },
|
|
23
|
+
h4_small: { fontSize: '1.625rem' },
|
|
22
24
|
h5: { fontSize: '1.5rem' },
|
|
23
25
|
h6: { fontSize: '1.25rem' },
|
|
24
26
|
subtitle1: { fontSize: '1.125rem' },
|
|
@@ -26,6 +28,8 @@ export var typography = {
|
|
|
26
28
|
body1: { fontSize: '1rem' },
|
|
27
29
|
body2: { fontSize: '0.875rem' },
|
|
28
30
|
button: { fontSize: '0.875rem' },
|
|
31
|
+
button_small: { fontSize: '0.813rem' },
|
|
29
32
|
caption: { fontSize: '0.75rem' },
|
|
33
|
+
caption_small: { fontSize: '0.625rem' },
|
|
30
34
|
overline: { fontSize: '0.5rem' }
|
|
31
35
|
};
|
package/build/utils/error.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export declare const isTokenExpired: (error: string | null) => boolean;
|
|
|
3
3
|
export declare const isTimeoutError: (error: string | null) => boolean;
|
|
4
4
|
export declare const isInternalServerError: (error: string | null) => boolean;
|
|
5
5
|
export declare const isAuthenticationVerificationFailed: (error: string | null) => boolean;
|
|
6
|
+
export declare const isNoDataFoundError: (error: string | null) => boolean;
|
package/build/utils/error.js
CHANGED
|
@@ -13,3 +13,6 @@ export var isInternalServerError = function (error) {
|
|
|
13
13
|
export var isAuthenticationVerificationFailed = function (error) {
|
|
14
14
|
return ['failed to verify the auth'].includes((error || '').trim().toLowerCase());
|
|
15
15
|
};
|
|
16
|
+
export var isNoDataFoundError = function (error) {
|
|
17
|
+
return ['no data found'].includes((error || '').trim().toLowerCase());
|
|
18
|
+
};
|
package/build/utils/string.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
|
43
43
|
};
|
|
44
44
|
export declare const removeRequestHeaders: () => void;
|
|
45
45
|
export declare const getBaseUrl: () => string;
|
|
46
|
-
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean) =>
|
|
46
|
+
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean, terminalStepName?: string) => string;
|
|
47
47
|
export declare const getEighteenYearsAgo: () => string;
|
|
48
48
|
export declare const isKW: (flag: string) => boolean;
|
|
49
49
|
export declare const isSA: (flag: string | undefined) => boolean;
|
|
@@ -78,4 +78,5 @@ export declare const formatNumberAsCurrency: (number: string) => string;
|
|
|
78
78
|
export declare const getCurrencyByCountryIso2: (countryCode?: string) => string;
|
|
79
79
|
export declare const getMobileNumberLen: (initialLen: number, number: string) => number;
|
|
80
80
|
export declare const getWebsiteLink: (isAr: boolean, countryCode: string, path: string) => string;
|
|
81
|
+
export declare function formatCode(code: string, chunkSize?: number, delimiter?: string): string;
|
|
81
82
|
export declare const isDisasterRecoveryEnv: (type?: string) => boolean;
|
package/build/utils/string.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FlowsTypes } from '../@types';
|
|
2
2
|
import { concatenateObjectValues, encryptString } from '.';
|
|
3
3
|
import { removeAxiosGlobalHeaders } from '../api';
|
|
4
|
-
import { COUNTRY_TO_CURRENCY, ENDPOINT_PATHS, ICONS_FULL_PATH, LANGUAGE_ABBREVIATIONS, TAP_WEBSITE } from '../constants';
|
|
4
|
+
import { CONNECT_FLOWS, COUNTRY_TO_CURRENCY, ENDPOINT_PATHS, ICONS_FULL_PATH, LANGUAGE_ABBREVIATIONS, TAP_WEBSITE } from '../constants';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
export var maskPhone = function (str) {
|
|
7
7
|
if (str === void 0) { str = ''; }
|
|
@@ -179,7 +179,7 @@ export var getBaseUrl = function () {
|
|
|
179
179
|
}
|
|
180
180
|
return ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
181
181
|
};
|
|
182
|
-
export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherThanSAOrKWCountry) {
|
|
182
|
+
export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherThanSAOrKWCountry, terminalStepName) {
|
|
183
183
|
if (flow === FlowsTypes.BANK) {
|
|
184
184
|
return 'BANK_BANK_DETAILS_STEP';
|
|
185
185
|
}
|
|
@@ -204,6 +204,9 @@ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherT
|
|
|
204
204
|
if (flow === FlowsTypes.PASSWORD) {
|
|
205
205
|
return 'PASSWORD_CREATE_PASSWORD_STEP';
|
|
206
206
|
}
|
|
207
|
+
if (flow === FlowsTypes.TERMINAL) {
|
|
208
|
+
return terminalStepName !== null && terminalStepName !== void 0 ? terminalStepName : CONNECT_FLOWS.terminal.terminalDeviceList;
|
|
209
|
+
}
|
|
207
210
|
return '';
|
|
208
211
|
};
|
|
209
212
|
export var getEighteenYearsAgo = function () {
|
|
@@ -346,4 +349,10 @@ export var getWebsiteLink = function (isAr, countryCode, path) {
|
|
|
346
349
|
var language = isAr ? LANGUAGE_ABBREVIATIONS.ARABIC : LANGUAGE_ABBREVIATIONS.ENGLISH;
|
|
347
350
|
return TAP_WEBSITE + language + '-' + countryCode + path;
|
|
348
351
|
};
|
|
352
|
+
export function formatCode(code, chunkSize, delimiter) {
|
|
353
|
+
var _a;
|
|
354
|
+
if (chunkSize === void 0) { chunkSize = 3; }
|
|
355
|
+
if (delimiter === void 0) { delimiter = ' - '; }
|
|
356
|
+
return ((_a = code.match(new RegExp(".{1,".concat(chunkSize, "}"), 'g'))) === null || _a === void 0 ? void 0 : _a.join(delimiter)) || code;
|
|
357
|
+
}
|
|
349
358
|
export var isDisasterRecoveryEnv = function (type) { return type === 'dr'; };
|