@tap-payments/auth-jsconnect 2.11.0-development → 2.11.0
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/form.d.ts +2 -2
- package/build/@types/terminal.d.ts +32 -44
- package/build/api/account.d.ts +2 -2
- package/build/api/account.js +7 -4
- package/build/api/auth.d.ts +8 -2
- package/build/api/auth.js +7 -3
- package/build/api/axios.d.ts +1 -1
- package/build/api/headers.d.ts +5 -0
- package/build/api/headers.js +3 -0
- package/build/api/index.d.ts +6 -6
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +5 -2
- package/build/api/terminal.d.ts +3 -6
- package/build/api/terminal.js +22 -12
- package/build/assets/currencies/AEDSymbol.js +1 -1
- package/build/assets/currencies/SARSymbol.js +1 -1
- package/build/assets/locales/ar.json +5 -0
- package/build/assets/locales/en.json +8 -2
- package/build/components/DeviceCard/DeviceCard.d.ts +3 -2
- package/build/components/DeviceCard/DeviceCard.js +9 -10
- package/build/components/Tooltip/Tooltip.js +1 -1
- 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/api.d.ts +2 -0
- package/build/constants/api.js +4 -0
- package/build/constants/app.d.ts +4 -2
- package/build/constants/app.js +137 -38
- package/build/constants/flows.d.ts +2 -1
- package/build/constants/flows.js +2 -1
- package/build/features/app/auth/authStore.js +64 -54
- package/build/features/app/bank/bankStore.js +24 -20
- package/build/features/app/board/boardStore.js +11 -7
- package/build/features/app/brand/brandStore.js +22 -18
- package/build/features/app/business/businessStore.js +30 -26
- package/build/features/app/connect/connectStore.d.ts +6 -5
- package/build/features/app/connect/connectStore.js +48 -31
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
- package/build/features/app/connectExpress/connectExpressStore.js +42 -16
- package/build/features/app/entity/entityStore.js +21 -17
- package/build/features/app/individual/individualStore.js +34 -28
- package/build/features/app/password/passwordStore.js +44 -46
- package/build/features/app/signIn/signInStore.js +12 -16
- package/build/features/app/tax/taxStore.js +20 -16
- package/build/features/app/terminal/terminalStore.d.ts +7 -7
- package/build/features/app/terminal/terminalStore.js +89 -62
- package/build/features/auth/Auth.d.ts +1 -1
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/auth/screens/AuthenticationList/EntityList.js +9 -1
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
- package/build/features/business/screens/BusinessType/LicenseList.js +5 -5
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +9 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -11
- package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
- package/build/features/entity/screens/EntityName/EntityName.js +14 -14
- package/build/features/entity/screens/EntityName/validation.d.ts +47 -45
- package/build/features/entity/screens/EntityName/validation.js +99 -95
- package/build/features/featuresScreens.js +63 -3
- package/build/features/shared/OTPVerifySecurityError/OTPVerifySecurityError.js +9 -0
- package/build/features/shared/OTPVerifySecurityError/index.d.ts +2 -0
- package/build/features/shared/OTPVerifySecurityError/index.js +2 -0
- package/build/features/terminal/Terminal.js +2 -2
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +8 -9
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +5 -6
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +9 -9
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +59 -14
- package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.d.ts +3 -0
- package/build/features/terminal/screens/{TerminalListPage/TerminalListPage.js → POSDeviceListPage/POSDeviceListPage.js} +13 -10
- 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/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +3 -3
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +2 -2
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +15 -15
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +5 -7
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +12 -11
- package/build/features/terminal/screens/Verify/Verify.js +6 -2
- 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 +2 -2
- package/build/features/terminal/screens/shared/index.js +2 -2
- package/build/features/terminal/screens/shared/styles.d.ts +1 -1
- package/build/features/terminal/screens/shared/styles.js +1 -1
- package/build/features/terminal/screens/shared/utils.d.ts +4 -4
- package/build/features/terminal/screens/shared/utils.js +9 -9
- package/build/utils/common.js +13 -6
- package/build/utils/error.d.ts +3 -0
- package/build/utils/error.js +9 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +1 -0
- package/build/utils/validation.js +1 -1
- package/package.json +3 -3
- package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
- package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
- package/build/features/terminal/screens/shared/TerminalList.js +0 -25
- /package/build/features/{terminal/screens/TerminalListPage/TerminalListPage.d.ts → shared/OTPVerifySecurityError/OTPVerifySecurityError.d.ts} +0 -0
package/build/@types/form.d.ts
CHANGED
|
@@ -104,8 +104,8 @@ export interface IndividualPersonalInfoFormValues extends IndividualEmailMobileF
|
|
|
104
104
|
gender: string | null;
|
|
105
105
|
nid: string;
|
|
106
106
|
issuedCountry: CountryCode | undefined;
|
|
107
|
-
expiryDate: string;
|
|
108
|
-
dob: string;
|
|
107
|
+
expiryDate: string | undefined;
|
|
108
|
+
dob: string | undefined;
|
|
109
109
|
placeOfBirthCountry: CountryCode | undefined;
|
|
110
110
|
placeOfBirthCity: City | undefined;
|
|
111
111
|
nationality: CountryCode | undefined;
|
|
@@ -3,13 +3,6 @@ declare type Name = {
|
|
|
3
3
|
};
|
|
4
4
|
export interface TerminalDeviceInfo {
|
|
5
5
|
id: string;
|
|
6
|
-
status: string;
|
|
7
|
-
object?: string;
|
|
8
|
-
live_mode: boolean;
|
|
9
|
-
api_version?: string;
|
|
10
|
-
feature_version?: string;
|
|
11
|
-
serial_number: string;
|
|
12
|
-
linked: boolean;
|
|
13
6
|
display_name: string;
|
|
14
7
|
model: {
|
|
15
8
|
id: string;
|
|
@@ -27,39 +20,7 @@ export interface TerminalDeviceInfo {
|
|
|
27
20
|
image: string;
|
|
28
21
|
image_url: string;
|
|
29
22
|
};
|
|
30
|
-
|
|
31
|
-
id: string;
|
|
32
|
-
brand: {
|
|
33
|
-
id: string;
|
|
34
|
-
name: {
|
|
35
|
-
text: string;
|
|
36
|
-
lang: string;
|
|
37
|
-
}[];
|
|
38
|
-
logo: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
terminal?: {
|
|
42
|
-
id: string;
|
|
43
|
-
legacy_id: string;
|
|
44
|
-
name: Name;
|
|
45
|
-
device: {
|
|
46
|
-
id: string;
|
|
47
|
-
created: string;
|
|
48
|
-
display_name: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
platform?: {
|
|
52
|
-
id: string;
|
|
53
|
-
segment: string;
|
|
54
|
-
brand?: {
|
|
55
|
-
id: string;
|
|
56
|
-
name: {
|
|
57
|
-
text: string;
|
|
58
|
-
lang: string;
|
|
59
|
-
}[];
|
|
60
|
-
logo: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
23
|
+
serial_number: string;
|
|
63
24
|
}
|
|
64
25
|
export interface TerminalInfo {
|
|
65
26
|
acceptance_status?: string;
|
|
@@ -71,11 +32,22 @@ export interface TerminalInfo {
|
|
|
71
32
|
};
|
|
72
33
|
brand?: {
|
|
73
34
|
id: string;
|
|
35
|
+
logo?: string;
|
|
36
|
+
};
|
|
37
|
+
billingplatform?: {
|
|
38
|
+
id: string;
|
|
74
39
|
};
|
|
75
40
|
charges?: {
|
|
76
41
|
status: string;
|
|
77
42
|
status_message: string;
|
|
78
43
|
};
|
|
44
|
+
device?: {
|
|
45
|
+
id: string;
|
|
46
|
+
created: string;
|
|
47
|
+
display_name: string;
|
|
48
|
+
reference: string;
|
|
49
|
+
logo?: string;
|
|
50
|
+
};
|
|
79
51
|
feature_version?: string;
|
|
80
52
|
id: string;
|
|
81
53
|
legacy_id: string;
|
|
@@ -89,7 +61,7 @@ export interface TerminalInfo {
|
|
|
89
61
|
platform?: {
|
|
90
62
|
brand: {
|
|
91
63
|
id: string;
|
|
92
|
-
logo
|
|
64
|
+
logo?: string;
|
|
93
65
|
name: {
|
|
94
66
|
text: string;
|
|
95
67
|
lang: string;
|
|
@@ -107,10 +79,26 @@ export interface TerminalInfo {
|
|
|
107
79
|
wallet?: {
|
|
108
80
|
id: string;
|
|
109
81
|
};
|
|
110
|
-
|
|
82
|
+
linked: boolean;
|
|
83
|
+
terminal_device: TerminalDeviceInfo;
|
|
84
|
+
}
|
|
85
|
+
export interface POSInfo {
|
|
86
|
+
id: string;
|
|
87
|
+
object: string;
|
|
88
|
+
live_mode: boolean;
|
|
89
|
+
reference: string;
|
|
90
|
+
display_name: string;
|
|
91
|
+
merchant: {
|
|
111
92
|
id: string;
|
|
112
|
-
|
|
113
|
-
|
|
93
|
+
legacy_id: string;
|
|
94
|
+
brand: {
|
|
95
|
+
id: string;
|
|
96
|
+
name: {
|
|
97
|
+
lang: string;
|
|
98
|
+
text: string;
|
|
99
|
+
}[];
|
|
100
|
+
logo: string;
|
|
101
|
+
};
|
|
114
102
|
};
|
|
115
103
|
}
|
|
116
104
|
export {};
|
package/build/api/account.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export declare type ExpressCreateAccountBody = {
|
|
|
19
19
|
declare const accountService: {
|
|
20
20
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
|
21
21
|
expressCreateAccount: (data: ExpressCreateAccountBody) => Promise<any>;
|
|
22
|
-
checkAccountAvailability: (individualId: string) => Promise<any>;
|
|
23
|
-
checkAccountAvailabilityStatus: (individualId: string) => Promise<any>;
|
|
22
|
+
checkAccountAvailability: (individualId: string, authSession?: string) => Promise<any>;
|
|
23
|
+
checkAccountAvailabilityStatus: (individualId: string, authSession?: string) => Promise<any>;
|
|
24
24
|
checkMigrationStatus: (jobId: string) => Promise<any>;
|
|
25
25
|
};
|
|
26
26
|
export { accountService };
|
package/build/api/account.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
2
|
import { httpClient } from './axios';
|
|
3
|
+
import { getAuthHeaders } from './headers';
|
|
3
4
|
var createAccount = function (data) {
|
|
4
5
|
return httpClient({
|
|
5
6
|
method: 'post',
|
|
@@ -14,16 +15,18 @@ var expressCreateAccount = function (data) {
|
|
|
14
15
|
data: data
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
|
-
var checkAccountAvailability = function (individualId) {
|
|
18
|
+
var checkAccountAvailability = function (individualId, authSession) {
|
|
18
19
|
return httpClient({
|
|
19
20
|
method: 'get',
|
|
20
|
-
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts")
|
|
21
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts"),
|
|
22
|
+
headers: getAuthHeaders(authSession)
|
|
21
23
|
});
|
|
22
24
|
};
|
|
23
|
-
var checkAccountAvailabilityStatus = function (individualId) {
|
|
25
|
+
var checkAccountAvailabilityStatus = function (individualId, authSession) {
|
|
24
26
|
return httpClient({
|
|
25
27
|
method: 'get',
|
|
26
|
-
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts?data=status")
|
|
28
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(individualId, "/accounts?data=status"),
|
|
29
|
+
headers: getAuthHeaders(authSession)
|
|
27
30
|
});
|
|
28
31
|
};
|
|
29
32
|
var checkMigrationStatus = function (jobId) {
|
package/build/api/auth.d.ts
CHANGED
|
@@ -18,12 +18,18 @@ export declare type CivilID = {
|
|
|
18
18
|
country_code: string;
|
|
19
19
|
};
|
|
20
20
|
export declare type TerminalCredential = {
|
|
21
|
-
terminal
|
|
21
|
+
terminal?: {
|
|
22
22
|
id: string;
|
|
23
23
|
terminal_device?: {
|
|
24
24
|
id: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
merchant?: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
device: {
|
|
31
|
+
id: string;
|
|
32
|
+
};
|
|
27
33
|
};
|
|
28
34
|
export declare type CreateAuthBody = {
|
|
29
35
|
country: string;
|
|
@@ -128,7 +134,7 @@ export declare type getExpressTokenVerifyParams = {
|
|
|
128
134
|
export declare type ConfigBody = Pick<ConfigInfo, 'scope' | 'data' | 'lead' | 'board' | 'interface' | 'redirect' | 'post'>;
|
|
129
135
|
declare const authService: {
|
|
130
136
|
createAuth: (data: CreateAuthBody | CreateKYCAuthBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
131
|
-
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody
|
|
137
|
+
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody) => Promise<any>;
|
|
132
138
|
createPassword: (data: CreatePasswordBody) => Promise<any>;
|
|
133
139
|
verifyExpressAuth: (data: VerifyAuthExpressOTPBody) => Promise<any>;
|
|
134
140
|
getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
|
package/build/api/auth.js
CHANGED
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import
|
|
12
|
+
import { httpClient } from './axios';
|
|
13
13
|
import { ENDPOINT_PATHS } from '../constants';
|
|
14
14
|
var createAuth = function (data, config) {
|
|
15
15
|
return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.AUTH), data: data }, config));
|
|
@@ -17,8 +17,12 @@ var createAuth = function (data, config) {
|
|
|
17
17
|
var createExpressAuth = function (data, config) {
|
|
18
18
|
return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.CREATE_EXPRESS_AUTH_PATH), data: data }, config));
|
|
19
19
|
};
|
|
20
|
-
var verifyAuth = function (data
|
|
21
|
-
return
|
|
20
|
+
var verifyAuth = function (data) {
|
|
21
|
+
return httpClient({
|
|
22
|
+
method: 'put',
|
|
23
|
+
url: "".concat(ENDPOINT_PATHS.AUTH),
|
|
24
|
+
data: data
|
|
25
|
+
});
|
|
22
26
|
};
|
|
23
27
|
var createPassword = function (data) {
|
|
24
28
|
return httpClient({
|
package/build/api/axios.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
declare const instance: import("axios").AxiosInstance;
|
|
3
3
|
export declare const setAxiosGlobalHeaders: (headers: Record<string, string>) => void;
|
|
4
4
|
export declare const removeAxiosGlobalHeaders: (arr: Array<string>) => void;
|
|
5
|
-
export declare const getAxiosHeaders: () =>
|
|
5
|
+
export declare const getAxiosHeaders: () => Record<string, any>;
|
|
6
6
|
export declare const httpClient: (config: AxiosRequestConfig) => Promise<any>;
|
|
7
7
|
export default instance;
|
package/build/api/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ declare const API: {
|
|
|
21
21
|
};
|
|
22
22
|
operatorService: {
|
|
23
23
|
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
24
|
-
confirm: (data: ConfirmBody) => Promise<any>;
|
|
24
|
+
confirm: (data: ConfirmBody, authSession?: string) => Promise<any>;
|
|
25
25
|
};
|
|
26
26
|
countryService: {
|
|
27
27
|
getCountries: (disableCountries?: boolean | undefined) => Promise<any> | {
|
|
@@ -32,7 +32,7 @@ declare const API: {
|
|
|
32
32
|
};
|
|
33
33
|
authService: {
|
|
34
34
|
createAuth: (data: CreateAuthBody | CreateKYCAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
35
|
-
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody
|
|
35
|
+
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody) => Promise<any>;
|
|
36
36
|
createPassword: (data: CreatePasswordBody) => Promise<any>;
|
|
37
37
|
verifyExpressAuth: (data: VerifyAuthExpressOTPBody) => Promise<any>;
|
|
38
38
|
getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
@@ -91,8 +91,8 @@ declare const API: {
|
|
|
91
91
|
accountService: {
|
|
92
92
|
createAccount: (data: CreateAccountBody) => Promise<any>;
|
|
93
93
|
expressCreateAccount: (data: ExpressCreateAccountBody) => Promise<any>;
|
|
94
|
-
checkAccountAvailability: (individualId: string) => Promise<any>;
|
|
95
|
-
checkAccountAvailabilityStatus: (individualId: string) => Promise<any>;
|
|
94
|
+
checkAccountAvailability: (individualId: string, authSession?: string | undefined) => Promise<any>;
|
|
95
|
+
checkAccountAvailabilityStatus: (individualId: string, authSession?: string | undefined) => Promise<any>;
|
|
96
96
|
checkMigrationStatus: (jobId: string) => Promise<any>;
|
|
97
97
|
};
|
|
98
98
|
dataService: {
|
|
@@ -166,9 +166,9 @@ declare const API: {
|
|
|
166
166
|
getInitialData: (body: InitBody) => Promise<any>;
|
|
167
167
|
};
|
|
168
168
|
terminalService: {
|
|
169
|
-
retrieveTerminalDeviceList: (merchants: string[]) => Promise<any>;
|
|
170
169
|
unlinkTerminalDevice: ({ deviceId, ...payload }: UnlinkTerminalDeviceProps) => Promise<any>;
|
|
171
|
-
retrieveTerminalList: (
|
|
170
|
+
retrieveTerminalList: (merchants: string[], getTerminalDevice?: boolean) => Promise<any>;
|
|
171
|
+
retrievePOSDevices: (merchants: string[]) => Promise<any>;
|
|
172
172
|
};
|
|
173
173
|
};
|
|
174
174
|
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody, CreateNafathAuthBody, GetUserListSegmentBody, CreateKYCAuthBody, GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps };
|
package/build/api/operator.d.ts
CHANGED
|
@@ -17,6 +17,6 @@ export declare type ConfirmBody = {
|
|
|
17
17
|
};
|
|
18
18
|
declare const operatorService: {
|
|
19
19
|
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
20
|
-
confirm: (data: ConfirmBody) => Promise<any>;
|
|
20
|
+
confirm: (data: ConfirmBody, authSession?: string) => Promise<any>;
|
|
21
21
|
};
|
|
22
22
|
export { operatorService };
|
package/build/api/operator.js
CHANGED
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { ENDPOINT_PATHS } from '../constants';
|
|
38
38
|
import { httpClient } from './axios';
|
|
39
|
+
import { getAuthHeaders } from './headers';
|
|
39
40
|
var validateOperator = function (body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
41
|
var data, error_1;
|
|
41
42
|
return __generator(this, function (_a) {
|
|
@@ -59,11 +60,13 @@ var validateOperator = function (body) { return __awaiter(void 0, void 0, void 0
|
|
|
59
60
|
}
|
|
60
61
|
});
|
|
61
62
|
}); };
|
|
62
|
-
var confirm = function (data) {
|
|
63
|
+
var confirm = function (data, authSession) {
|
|
64
|
+
if (authSession === void 0) { authSession = ''; }
|
|
63
65
|
return httpClient({
|
|
64
66
|
method: 'post',
|
|
65
67
|
url: "".concat(ENDPOINT_PATHS.CONNECT, "/confirm"),
|
|
66
|
-
data: data
|
|
68
|
+
data: data,
|
|
69
|
+
headers: getAuthHeaders(authSession)
|
|
67
70
|
});
|
|
68
71
|
};
|
|
69
72
|
var operatorService = {
|
package/build/api/terminal.d.ts
CHANGED
|
@@ -9,10 +9,7 @@ export interface GenerateAuthLinkNewTerminalProps {
|
|
|
9
9
|
export interface UnlinkTerminalDeviceProps {
|
|
10
10
|
deviceId: string;
|
|
11
11
|
initiator: string;
|
|
12
|
-
|
|
13
|
-
id: string;
|
|
14
|
-
};
|
|
15
|
-
merchant: {
|
|
12
|
+
device: {
|
|
16
13
|
id: string;
|
|
17
14
|
};
|
|
18
15
|
}
|
|
@@ -21,8 +18,8 @@ export interface LinkTerminalDeviceProps {
|
|
|
21
18
|
action: string;
|
|
22
19
|
}
|
|
23
20
|
declare const terminalService: {
|
|
24
|
-
retrieveTerminalDeviceList: (merchants: string[]) => Promise<any>;
|
|
25
21
|
unlinkTerminalDevice: ({ deviceId, ...payload }: UnlinkTerminalDeviceProps) => Promise<any>;
|
|
26
|
-
retrieveTerminalList: (
|
|
22
|
+
retrieveTerminalList: (merchants: string[], getTerminalDevice?: boolean) => Promise<any>;
|
|
23
|
+
retrievePOSDevices: (merchants: string[]) => Promise<any>;
|
|
27
24
|
};
|
|
28
25
|
export { terminalService };
|
package/build/api/terminal.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
13
|
var t = {};
|
|
3
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -11,21 +22,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
22
|
};
|
|
12
23
|
import { ENDPOINT_PATHS } from '../constants';
|
|
13
24
|
import { httpClient } from './axios';
|
|
14
|
-
var
|
|
25
|
+
var retrieveTerminalList = function (merchants, getTerminalDevice) {
|
|
26
|
+
if (getTerminalDevice === void 0) { getTerminalDevice = true; }
|
|
15
27
|
return httpClient({
|
|
16
28
|
method: 'post',
|
|
17
|
-
url: "".concat(ENDPOINT_PATHS.TERMINAL, "/
|
|
18
|
-
data: {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}).catch(function () { });
|
|
29
|
+
url: "".concat(ENDPOINT_PATHS.TERMINAL, "/list"),
|
|
30
|
+
data: __assign({ merchants: merchants }, (getTerminalDevice && { terminal_device: true }))
|
|
31
|
+
});
|
|
22
32
|
};
|
|
23
|
-
var
|
|
33
|
+
var retrievePOSDevices = function (merchants) {
|
|
24
34
|
return httpClient({
|
|
25
35
|
method: 'post',
|
|
26
|
-
url: "".concat(ENDPOINT_PATHS.
|
|
36
|
+
url: "".concat(ENDPOINT_PATHS.MERCHANT, "/pos/device/list"),
|
|
27
37
|
data: {
|
|
28
|
-
|
|
38
|
+
merchants: merchants
|
|
29
39
|
}
|
|
30
40
|
});
|
|
31
41
|
};
|
|
@@ -33,13 +43,13 @@ var unlinkTerminalDevice = function (_a) {
|
|
|
33
43
|
var deviceId = _a.deviceId, payload = __rest(_a, ["deviceId"]);
|
|
34
44
|
return httpClient({
|
|
35
45
|
method: 'put',
|
|
36
|
-
url: "".concat(ENDPOINT_PATHS.TERMINAL, "/
|
|
46
|
+
url: "".concat(ENDPOINT_PATHS.TERMINAL, "/").concat(deviceId, "/unlink"),
|
|
37
47
|
data: payload
|
|
38
48
|
});
|
|
39
49
|
};
|
|
40
50
|
var terminalService = {
|
|
41
|
-
retrieveTerminalDeviceList: retrieveTerminalDeviceList,
|
|
42
51
|
unlinkTerminalDevice: unlinkTerminalDevice,
|
|
43
|
-
retrieveTerminalList: retrieveTerminalList
|
|
52
|
+
retrieveTerminalList: retrieveTerminalList,
|
|
53
|
+
retrievePOSDevices: retrievePOSDevices
|
|
44
54
|
};
|
|
45
55
|
export { terminalService };
|
|
@@ -23,6 +23,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
var AEDSymbol = function (_a) {
|
|
25
25
|
var _b = _a.height, height = _b === void 0 ? 10 : _b, svgProps = __rest(_a, ["height"]);
|
|
26
|
-
return (_jsx("span", __assign({ style: { padding: '0 2px' } }, { children: _jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', height: height, fill: 'currentColor', viewBox: '0 0 344.84 299.91' }, svgProps, { children: _jsx("path", { d: 'M342.14,140.96l2.7,2.54v-7.72c0-17-11.92-30.84-26.56-30.84h-23.41C278.49,36.7,222.69,0,139.68,0c-52.86,0-59.65,0-109.71,0,0,0,15.03,12.63,15.03,52.4v52.58h-27.68c-5.38,0-10.43-2.08-14.61-6.01l-2.7-2.54v7.72c0,17.01,11.92,30.84,26.56,30.84h18.44s0,29.99,0,29.99h-27.68c-5.38,0-10.43-2.07-14.61-6.01l-2.7-2.54v7.71c0,17,11.92,30.82,26.56,30.82h18.44s0,54.89,0,54.89c0,38.65-15.03,50.06-15.03,50.06h109.71c85.62,0,139.64-36.96,155.38-104.98h32.46c5.38,0,10.43,2.07,14.61,6l2.7,2.54v-7.71c0-17-11.92-30.83-26.56-30.83h-18.9c.32-4.88.49-9.87.49-15s-.18-10.11-.51-14.99h28.17c5.37,0,10.43,2.07,14.61,6.01ZM89.96,15.01h45.86c61.7,0,97.44,27.33,108.1,89.94l-153.96.02V15.01ZM136.21,284.93h-46.26v-89.98l153.87-.02c-9.97,56.66-42.07,88.38-107.61,90ZM247.34,149.96c0,5.13-.11,10.13-.34,14.99l-157.04.02v-29.99l157.05-.02c.22,4.84.33,9.83.33,15Z' }) })) })));
|
|
26
|
+
return (_jsx("span", __assign({ style: { padding: '0 2px' } }, { children: _jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', height: height, fill: 'currentColor', viewBox: '0 0 344.84 299.91', style: { display: 'inline' } }, svgProps, { children: _jsx("path", { d: 'M342.14,140.96l2.7,2.54v-7.72c0-17-11.92-30.84-26.56-30.84h-23.41C278.49,36.7,222.69,0,139.68,0c-52.86,0-59.65,0-109.71,0,0,0,15.03,12.63,15.03,52.4v52.58h-27.68c-5.38,0-10.43-2.08-14.61-6.01l-2.7-2.54v7.72c0,17.01,11.92,30.84,26.56,30.84h18.44s0,29.99,0,29.99h-27.68c-5.38,0-10.43-2.07-14.61-6.01l-2.7-2.54v7.71c0,17,11.92,30.82,26.56,30.82h18.44s0,54.89,0,54.89c0,38.65-15.03,50.06-15.03,50.06h109.71c85.62,0,139.64-36.96,155.38-104.98h32.46c5.38,0,10.43,2.07,14.61,6l2.7,2.54v-7.71c0-17-11.92-30.83-26.56-30.83h-18.9c.32-4.88.49-9.87.49-15s-.18-10.11-.51-14.99h28.17c5.37,0,10.43,2.07,14.61,6.01ZM89.96,15.01h45.86c61.7,0,97.44,27.33,108.1,89.94l-153.96.02V15.01ZM136.21,284.93h-46.26v-89.98l153.87-.02c-9.97,56.66-42.07,88.38-107.61,90ZM247.34,149.96c0,5.13-.11,10.13-.34,14.99l-157.04.02v-29.99l157.05-.02c.22,4.84.33,9.83.33,15Z' }) })) })));
|
|
27
27
|
};
|
|
28
28
|
export default AEDSymbol;
|
|
@@ -23,6 +23,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
var SARSymbol = function (_a) {
|
|
25
25
|
var _b = _a.height, height = _b === void 0 ? 10 : _b, svgProps = __rest(_a, ["height"]);
|
|
26
|
-
return (_jsx("span", __assign({ style: { padding: '0 2px' } }, { children: _jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', height: height, fill: 'currentColor', viewBox: '0 0 1124.14 1256.39' }, svgProps, { children: _jsx("path", { d: 'M699.62 1113.02a460.24 460.24 0 0 0-38.4 143.37l424.51-90.24a460.44 460.44 0 0 0 38.4-143.37l-424.51 90.24zM1085.73 895.8a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.33v-135.2l292.27-62.11a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.27V66.13a466.56 466.56 0 0 0-132.25 110.99v403.35l-132.25 28.11V0A466.4 466.4 0 0 0 396.7 110.99v525.69l-295.92 62.88a460.46 460.46 0 0 0-38.42 143.37l334.33-71.05v170.26l-358.3 76.14a460.16 460.16 0 0 0-38.4 143.37l375.03-79.7a119.13 119.13 0 0 0 73.83-49.24l68.78-101.97v-.02a65.72 65.72 0 0 0 11.3-36.97V743.77l132.25-28.11v270.4l424.53-90.28z' }) })) })));
|
|
26
|
+
return (_jsx("span", __assign({ style: { padding: '0 2px' } }, { children: _jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', height: height, fill: 'currentColor', viewBox: '0 0 1124.14 1256.39', style: { display: 'inline' } }, svgProps, { children: _jsx("path", { d: 'M699.62 1113.02a460.24 460.24 0 0 0-38.4 143.37l424.51-90.24a460.44 460.44 0 0 0 38.4-143.37l-424.51 90.24zM1085.73 895.8a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.33v-135.2l292.27-62.11a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.27V66.13a466.56 466.56 0 0 0-132.25 110.99v403.35l-132.25 28.11V0A466.4 466.4 0 0 0 396.7 110.99v525.69l-295.92 62.88a460.46 460.46 0 0 0-38.42 143.37l334.33-71.05v170.26l-358.3 76.14a460.16 460.16 0 0 0-38.4 143.37l375.03-79.7a119.13 119.13 0 0 0 73.83-49.24l68.78-101.97v-.02a65.72 65.72 0 0 0 11.3-36.97V743.77l132.25-28.11v270.4l424.53-90.28z' }) })) })));
|
|
27
27
|
};
|
|
28
28
|
export default SARSymbol;
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"capital_paid_hint": "00000",
|
|
138
138
|
"capital_paid_input_label": "رأس المال المدفوع",
|
|
139
139
|
"capital_paid_label": "رأس المال المدفوع ({{currency}})",
|
|
140
|
+
"capital_paid_input_label": "رأس المال المدفوع",
|
|
140
141
|
"capital_paid_required": "Please Enter paid amount",
|
|
141
142
|
"capital_share_count_hint": "00000",
|
|
142
143
|
"capital_share_count_label": "عدد اسهم رأس المال",
|
|
@@ -144,6 +145,7 @@
|
|
|
144
145
|
"capital_share_value_hint": "00000",
|
|
145
146
|
"capital_share_value_input_label": "قيمة السهم",
|
|
146
147
|
"capital_share_value_label": "قيمة السهم ({{currency}})",
|
|
148
|
+
"capital_share_value_input_label": "قيمة السهم",
|
|
147
149
|
"capital_share_value_required": "Please Enter share value",
|
|
148
150
|
"category": "الفئة",
|
|
149
151
|
"category_name": "اسم الفئة",
|
|
@@ -284,6 +286,7 @@
|
|
|
284
286
|
"expected_customers_to_serve": "عدد العملاء شهريا",
|
|
285
287
|
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
286
288
|
"expected_sales_monthly": "البيع المتوقع في الشهر؟ ({{currency}})",
|
|
289
|
+
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
287
290
|
"expected_sales_yearly": "ما هي المبيعات المتوقعة لعملك شهريًا؟",
|
|
288
291
|
"expected_served_monthly": "عدد العملاء شهريا",
|
|
289
292
|
"expiry_date": "تاريخ الإنتهاء",
|
|
@@ -493,6 +496,7 @@
|
|
|
493
496
|
"please_choose_is_authorized": "الرجاء التأكيد إذا كنت أنت المستخدم المصرح له",
|
|
494
497
|
"please_choose_relative_pep": "هل أنت أو أحد أقاربك شخص مكشوف علنًا (PEP)",
|
|
495
498
|
"please_enter_actual_income": "ما هو دخلك الشهري ({{currency}}) ؟ ",
|
|
499
|
+
"monthly_income": "ما هو دخلك الشهري؟ ",
|
|
496
500
|
"please_enter_employer_name": "يرجى إدخال اسم منشأه العمل الخاص بك",
|
|
497
501
|
"please_try_again_after_few_minutes": "يمكنك محاولة تسجيل الدخول مرة أخرى بعد {{minutes}} دقيقة",
|
|
498
502
|
"powered_by": "بواسطة",
|
|
@@ -566,6 +570,7 @@
|
|
|
566
570
|
"signup_welcoming": "مرحبًا {{username}} ،",
|
|
567
571
|
"signup_welcoming_hi": "مرحبا,",
|
|
568
572
|
"social_media_label": "وسائل التواصل الاجتماعي",
|
|
573
|
+
"something_went_wrong": "حدث خطأ. يرجى المحاولة لاحقاً",
|
|
569
574
|
"source_country_label": "الدولة",
|
|
570
575
|
"start_with_number": "هل يمكنك التحقق من رقم الجوال الذي تم إدخاله. (ملاحظة - يبدأ رقم الجوال بـ 5 أو 05)",
|
|
571
576
|
"step_required_by_rayah": "هذه الخطوة مطلوبة لبدء التحقق مع خدمة يقين من شركة علم",
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
"capital_paid_hint": "00000",
|
|
137
137
|
"capital_paid_input_label": "Capital Paid",
|
|
138
138
|
"capital_paid_label": "Capital Paid ({{currency}})",
|
|
139
|
+
"capital_paid_input_label": "Capital Paid",
|
|
139
140
|
"capital_paid_required": "Please Enter paid amount",
|
|
140
141
|
"capital_share_count_hint": "00000",
|
|
141
142
|
"capital_share_count_label": "Capital Share Count",
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
"capital_share_value_hint": "00000",
|
|
144
145
|
"capital_share_value_input_label": "Capital Share Value",
|
|
145
146
|
"capital_share_value_label": "Capital Share Value ({{currency}})",
|
|
147
|
+
"capital_share_value_input_label": "Capital Share Value",
|
|
146
148
|
"capital_share_value_required": "Please Enter share value",
|
|
147
149
|
"category": "Category",
|
|
148
150
|
"category_name": "Category name",
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
"expected_customers_to_serve": "Customers served per month",
|
|
293
295
|
"expected_sale_per_month": "Expected sale per month?",
|
|
294
296
|
"expected_sales_monthly": "Expected sale per month? ({{currency}})",
|
|
297
|
+
"expected_sale_per_month": "Expected sale per month?",
|
|
295
298
|
"expected_sales_yearly": "What is the expected sales for your business per month?",
|
|
296
299
|
"expected_served_monthly": "Customers served per month",
|
|
297
300
|
"expiry_date": "Date of expiry",
|
|
@@ -336,7 +339,7 @@
|
|
|
336
339
|
"iban_input_placeholder": "{{countrycode}}44#################0",
|
|
337
340
|
"id_placeholder": 2345566666,
|
|
338
341
|
"ide_not_valid_url": "May you please verify the entered website address.",
|
|
339
|
-
"ide_opt_sent_title": "A One Time Passcode (OTP) has been
|
|
342
|
+
"ide_opt_sent_title": "A One Time Passcode (OTP) has been sent to mobile number",
|
|
340
343
|
"ide_otp_resend_label": "Resend OTP",
|
|
341
344
|
"ide_otp_waiting_title": "Please be patient as we are processing... ",
|
|
342
345
|
"ide_registered_mobile_status_message": "Registered mobile ",
|
|
@@ -393,6 +396,7 @@
|
|
|
393
396
|
"kyc_token_invalid": "May you please verify link of which you are trying to open.",
|
|
394
397
|
"kyc_users_description": "Please select an authorized registered ID to approve with {{provider}}",
|
|
395
398
|
"kyc_verification": "Know Your Customer (KYC)",
|
|
399
|
+
"kyc_privacy_policy": "Privacy Policy",
|
|
396
400
|
"language": "العربية",
|
|
397
401
|
"license_info": "License information",
|
|
398
402
|
"license_name_hint": "Enter legal name",
|
|
@@ -454,7 +458,7 @@
|
|
|
454
458
|
"other": "other",
|
|
455
459
|
"otp_authentication": "Authentication",
|
|
456
460
|
"otp_authentication_description": "Verify with OTP for a Hassle-Free Experience",
|
|
457
|
-
"otp_email_sent_title": "A One Time Passcode (OTP) has been
|
|
461
|
+
"otp_email_sent_title": "A One Time Passcode (OTP) has been sent to your email ",
|
|
458
462
|
"otp_min_length": "Please enter the 6 digit OTP",
|
|
459
463
|
"otp_provider": "Absher",
|
|
460
464
|
"otp_required": "Please enter the required OTP",
|
|
@@ -509,6 +513,7 @@
|
|
|
509
513
|
"please_choose_is_authorized": "Please tell us if you are the authorized user",
|
|
510
514
|
"please_choose_relative_pep": "Are you or one of your relatives a Publicly Exposed Person (PEP)",
|
|
511
515
|
"please_enter_actual_income": "Monthly income ({{currency}})",
|
|
516
|
+
"monthly_income": "Monthly income",
|
|
512
517
|
"please_enter_employer_name": "Please enter the name of your employer",
|
|
513
518
|
"please_try_again_after_few_minutes": "You can try to login again after {{minutes}} mins",
|
|
514
519
|
"powered_by": "Powered by",
|
|
@@ -588,6 +593,7 @@
|
|
|
588
593
|
"signup_welcoming": "Hello {{username}},",
|
|
589
594
|
"signup_welcoming_hi": "Hello,",
|
|
590
595
|
"social_media_label": "Social Media",
|
|
596
|
+
"something_went_wrong": "Something went wrong. Please try again later",
|
|
591
597
|
"start_with_number": "May you please verify the entered mobile. (Note - mobile numbers start with 5 or 05",
|
|
592
598
|
"step_required_by_rayah": "This step is required in order to initiate a verification with Yaqeen service from Elm.",
|
|
593
599
|
"subtitle_drop": "choose file",
|
|
@@ -12,7 +12,8 @@ export interface DeviceCardProps extends CardProps {
|
|
|
12
12
|
loading?: boolean;
|
|
13
13
|
arrow?: boolean;
|
|
14
14
|
endAdornment?: React.ReactNode;
|
|
15
|
+
titleSx?: React.CSSProperties;
|
|
15
16
|
}
|
|
16
|
-
export declare const DeviceCard: ({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, ...rest }: DeviceCardProps) => JSX.Element;
|
|
17
|
-
declare const _default: React.MemoExoticComponent<({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, ...rest }: DeviceCardProps) => JSX.Element>;
|
|
17
|
+
export declare const DeviceCard: ({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, titleSx, ...rest }: DeviceCardProps) => JSX.Element;
|
|
18
|
+
declare const _default: React.MemoExoticComponent<({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, titleSx, ...rest }: DeviceCardProps) => JSX.Element>;
|
|
18
19
|
export default _default;
|
|
@@ -23,13 +23,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { memo } from 'react';
|
|
25
25
|
import { useTranslation } from 'react-i18next';
|
|
26
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
26
|
+
import { alpha, styled, useTheme } from '@mui/material/styles';
|
|
27
27
|
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
|
28
28
|
import Card from '@mui/material/Card';
|
|
29
29
|
import Box from '@mui/material/Box';
|
|
30
|
-
import Typography from '@mui/material/Typography';
|
|
31
30
|
import Icon from '../Icon';
|
|
32
31
|
import Loader from '../Loader';
|
|
32
|
+
import TruncatedTooltipText from '../TruncatedTooltipText';
|
|
33
33
|
var DeviceCardContainer = styled(Card, { shouldForwardProp: function (prop) { return !['showBorder'].includes(prop.toString()); } })(function (_a) {
|
|
34
34
|
var _b = _a.theme, spacing = _b.spacing, _c = _b.palette, background = _c.background, components = _c.components, showBorder = _a.showBorder;
|
|
35
35
|
return (__assign({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: spacing(2), borderRadius: spacing(0.5), boxShadow: 'none', width: '100%', backgroundColor: background.default, minHeight: spacing(14.125), position: 'relative' }, (showBorder && {
|
|
@@ -41,7 +41,8 @@ var DeviceDetails = styled(Box)(function (_a) {
|
|
|
41
41
|
return ({
|
|
42
42
|
display: 'flex',
|
|
43
43
|
alignItems: 'center',
|
|
44
|
-
gap: spacing(3.125)
|
|
44
|
+
gap: spacing(3.125),
|
|
45
|
+
width: '90%'
|
|
45
46
|
});
|
|
46
47
|
});
|
|
47
48
|
var DeviceImage = styled(Icon)(function (_a) {
|
|
@@ -57,13 +58,10 @@ var DeviceInfo = styled(Box)(function (_a) {
|
|
|
57
58
|
return ({
|
|
58
59
|
display: 'flex',
|
|
59
60
|
flexDirection: 'column',
|
|
60
|
-
gap: spacing(1)
|
|
61
|
+
gap: spacing(1),
|
|
62
|
+
width: '80%'
|
|
61
63
|
});
|
|
62
64
|
});
|
|
63
|
-
var DeviceTitle = styled(Typography)(function (_a) {
|
|
64
|
-
var _b = _a.theme, typography = _b.typography, palette = _b.palette;
|
|
65
|
-
return (__assign(__assign({}, typography.subtitle1), { color: palette.components.deviceCard.title, fontWeight: typography.fontWeightBold }));
|
|
66
|
-
});
|
|
67
65
|
var DeviceIdInfo = styled(Box)(function (_a) {
|
|
68
66
|
var _b = _a.theme, typography = _b.typography, palette = _b.palette, spacing = _b.spacing;
|
|
69
67
|
return (__assign(__assign({}, typography.caption_small), { color: alpha(palette.text.primary, 0.6), display: 'flex', flexDirection: 'column', gap: spacing(0.5) }));
|
|
@@ -88,8 +86,9 @@ var ArrowIcon = styled(ArrowForwardIosIcon)(function (_a) {
|
|
|
88
86
|
})));
|
|
89
87
|
});
|
|
90
88
|
export var DeviceCard = function (_a) {
|
|
91
|
-
var image = _a.image, name = _a.name, deviceId = _a.deviceId, deviceIdLabel = _a.deviceIdLabel, isLinked = _a.isLinked, pairedWith = _a.pairedWith, onClick = _a.onClick, badge = _a.badge, border = _a.border, arrow = _a.arrow, loading = _a.loading, endAdornment = _a.endAdornment, rest = __rest(_a, ["image", "name", "deviceId", "deviceIdLabel", "isLinked", "pairedWith", "onClick", "badge", "border", "arrow", "loading", "endAdornment"]);
|
|
89
|
+
var image = _a.image, name = _a.name, deviceId = _a.deviceId, deviceIdLabel = _a.deviceIdLabel, isLinked = _a.isLinked, pairedWith = _a.pairedWith, onClick = _a.onClick, badge = _a.badge, border = _a.border, arrow = _a.arrow, loading = _a.loading, endAdornment = _a.endAdornment, titleSx = _a.titleSx, rest = __rest(_a, ["image", "name", "deviceId", "deviceIdLabel", "isLinked", "pairedWith", "onClick", "badge", "border", "arrow", "loading", "endAdornment", "titleSx"]);
|
|
92
90
|
var t = useTranslation().t;
|
|
91
|
+
var _b = useTheme(), typography = _b.typography, palette = _b.palette;
|
|
93
92
|
var getEndComponent = function () {
|
|
94
93
|
if (endAdornment)
|
|
95
94
|
return endAdornment;
|
|
@@ -98,6 +97,6 @@ export var DeviceCard = function (_a) {
|
|
|
98
97
|
if (arrow)
|
|
99
98
|
return _jsx(ArrowIcon, {});
|
|
100
99
|
};
|
|
101
|
-
return (_jsxs(DeviceCardContainer, __assign({ onClick: onClick, sx: { cursor: onClick ? 'pointer' : 'default' }, showBorder: border }, rest, { children: [_jsxs(DeviceDetails, { children: [image && _jsx(DeviceImage, { src: image, alt: 'Device' }), _jsxs(DeviceInfo, { children: [_jsx(
|
|
100
|
+
return (_jsxs(DeviceCardContainer, __assign({ onClick: onClick, sx: { cursor: onClick ? 'pointer' : 'default' }, showBorder: border }, rest, { children: [_jsxs(DeviceDetails, { children: [image && _jsx(DeviceImage, { src: image, alt: 'Device' }), _jsxs(DeviceInfo, { children: [_jsx(TruncatedTooltipText, { text: name, style: __assign(__assign(__assign({}, typography.subtitle1), { color: palette.components.deviceCard.title, fontWeight: typography.fontWeightBold }), titleSx) }), _jsxs(DeviceIdInfo, { children: [pairedWith && (_jsxs("span", { children: [t('terminal_paired_with'), ": ", _jsx(DeviceIdBold, { children: pairedWith })] })), _jsxs("span", { children: [t(deviceIdLabel !== null && deviceIdLabel !== void 0 ? deviceIdLabel : 'terminal_device_id'), ": ", _jsx(DeviceIdBold, { children: deviceId })] })] })] })] }), badge && _jsx(Badge, __assign({ active: isLinked }, { children: isLinked ? t('terminal_linked') : t('terminal_unlinked') })), _jsx(Box, __assign({ display: 'flex', alignItems: 'center' }, { children: getEndComponent() }))] })));
|
|
102
101
|
};
|
|
103
102
|
export default memo(DeviceCard);
|
|
@@ -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)), zIndex: 2147483647 }),
|
|
37
37
|
_b);
|
|
38
38
|
});
|
|
39
39
|
var TextStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|