@tap-payments/auth-jsconnect 2.0.54 → 2.0.55
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 +38 -0
- package/build/@types/app.js +5 -0
- package/build/@types/form.d.ts +2 -1
- package/build/api/entity.d.ts +1 -0
- package/build/api/entity.js +8 -1
- package/build/api/index.d.ts +6 -1
- package/build/api/index.js +3 -1
- package/build/api/init.d.ts +16 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +4 -1
- package/build/app/settings.d.ts +4 -8
- package/build/app/settings.js +28 -19
- package/build/assets/locales/ar.json +5 -1
- package/build/assets/locales/en.json +5 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +23 -20
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/DatePicker/DatePicker.d.ts +2 -1
- package/build/components/DatePicker/DatePicker.js +9 -8
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/SimpleList/SimpleList.d.ts +3 -1
- package/build/components/SimpleList/SimpleList.js +19 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +5 -1
- package/build/constants/app.d.ts +11 -0
- package/build/constants/app.js +33 -32
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/features/app/bank/bankStore.d.ts +3 -0
- package/build/features/app/bank/bankStore.js +33 -4
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +45 -24
- package/build/features/app/business/businessStore.d.ts +8 -0
- package/build/features/app/business/businessStore.js +166 -157
- package/build/features/app/connect/connectStore.js +2 -2
- package/build/features/app/connectExpress/connectExpressStore.js +4 -4
- package/build/features/app/entity/entityStore.d.ts +3 -0
- package/build/features/app/entity/entityStore.js +32 -3
- package/build/features/app/individual/individualStore.d.ts +5 -0
- package/build/features/app/individual/individualStore.js +76 -41
- package/build/features/app/tax/taxStore.d.ts +3 -0
- package/build/features/app/tax/taxStore.js +33 -4
- package/build/features/bank/Bank.js +3 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +9 -5
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.js +3 -4
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -5
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +1 -1
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +16 -10
- package/build/features/brand/screens/Verify/Verify.js +7 -20
- package/build/features/business/Business.js +3 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +8 -8
- package/build/features/business/screens/Activities/ActivitiesList.js +6 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +32 -8
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -6
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +4 -16
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +4 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +8 -8
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +1 -1
- package/build/features/connect/Connect.js +3 -4
- package/build/features/connect/screens/Individual/Email.js +10 -18
- package/build/features/connect/screens/Individual/MobileNumber.js +10 -6
- package/build/features/connect/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +3 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +1 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -2
- package/build/features/connectExpress/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +1 -1
- package/build/features/entity/Entity.js +3 -4
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +8 -8
- package/build/features/entity/screens/EntityCapital/ActivityList.js +6 -4
- package/build/features/entity/screens/EntityName/EntityName.js +11 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -8
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/individual/Individual.js +3 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -6
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +17 -9
- package/build/features/individual/screens/Verify/Verify.js +1 -5
- package/build/features/password/Password.js +3 -4
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Button/FlowsButtons.js +6 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/tax/Tax.js +3 -4
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/useAppConfig.js +5 -2
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +5 -0
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface City {
|
|
|
32
32
|
name: {
|
|
33
33
|
id: string;
|
|
34
34
|
en: string;
|
|
35
|
+
ar: string;
|
|
35
36
|
};
|
|
36
37
|
state: string;
|
|
37
38
|
un_locode: string;
|
|
@@ -92,6 +93,10 @@ export declare enum BusinessType {
|
|
|
92
93
|
CR = "company",
|
|
93
94
|
FL = "freelancer"
|
|
94
95
|
}
|
|
96
|
+
export declare enum LicenseType {
|
|
97
|
+
CR = "commercial_registration",
|
|
98
|
+
FL = "freelance"
|
|
99
|
+
}
|
|
95
100
|
export interface License {
|
|
96
101
|
legal_name: {
|
|
97
102
|
ar: string;
|
|
@@ -99,9 +104,18 @@ export interface License {
|
|
|
99
104
|
};
|
|
100
105
|
license: {
|
|
101
106
|
number: string;
|
|
107
|
+
additional_info?: {
|
|
108
|
+
unified_number?: string;
|
|
109
|
+
};
|
|
110
|
+
expiry_date?: string;
|
|
111
|
+
issuing_date?: string;
|
|
112
|
+
type?: string;
|
|
102
113
|
};
|
|
103
114
|
type: string;
|
|
104
115
|
}
|
|
116
|
+
export interface EntityLicense extends License {
|
|
117
|
+
id: string;
|
|
118
|
+
}
|
|
105
119
|
export interface Activity {
|
|
106
120
|
id: string;
|
|
107
121
|
name: {
|
|
@@ -426,4 +440,28 @@ export declare type BrandDataStatus = {
|
|
|
426
440
|
activities: FieldType;
|
|
427
441
|
channel_services: FieldType;
|
|
428
442
|
};
|
|
443
|
+
export interface MerchantInfo {
|
|
444
|
+
id: string;
|
|
445
|
+
api_version: string;
|
|
446
|
+
live_mode: boolean;
|
|
447
|
+
object: string;
|
|
448
|
+
name: string;
|
|
449
|
+
country_code: string;
|
|
450
|
+
logo: string;
|
|
451
|
+
background: {
|
|
452
|
+
url: string;
|
|
453
|
+
};
|
|
454
|
+
sdk_settings: {
|
|
455
|
+
status_display_duration: number;
|
|
456
|
+
otp_resend_interval: number;
|
|
457
|
+
otp_resend_attempts: number;
|
|
458
|
+
};
|
|
459
|
+
key_type: string;
|
|
460
|
+
permissions: string[];
|
|
461
|
+
permission: {
|
|
462
|
+
card_wallet: boolean;
|
|
463
|
+
threeDSecure: boolean;
|
|
464
|
+
pci_dss: boolean;
|
|
465
|
+
};
|
|
466
|
+
}
|
|
429
467
|
export {};
|
package/build/@types/app.js
CHANGED
|
@@ -15,6 +15,11 @@ export var BusinessType;
|
|
|
15
15
|
BusinessType["CR"] = "company";
|
|
16
16
|
BusinessType["FL"] = "freelancer";
|
|
17
17
|
})(BusinessType || (BusinessType = {}));
|
|
18
|
+
export var LicenseType;
|
|
19
|
+
(function (LicenseType) {
|
|
20
|
+
LicenseType["CR"] = "commercial_registration";
|
|
21
|
+
LicenseType["FL"] = "freelance";
|
|
22
|
+
})(LicenseType || (LicenseType = {}));
|
|
18
23
|
export var FlowsTypes;
|
|
19
24
|
(function (FlowsTypes) {
|
|
20
25
|
FlowsTypes["CONNECT_EXPRESS"] = "connect_express";
|
package/build/@types/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize, City } from './app';
|
|
1
|
+
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize, City, EntityLicense } from './app';
|
|
2
2
|
export declare type MobileFormValues = {
|
|
3
3
|
mobile: string;
|
|
4
4
|
countryCode: CountryCode;
|
|
@@ -49,6 +49,7 @@ export declare type BrandActivitiesFormValues = {
|
|
|
49
49
|
export declare type BusinessTypeFormValues = {
|
|
50
50
|
licenseNumber: string;
|
|
51
51
|
entityLegalName?: string;
|
|
52
|
+
selectedEntityLicense?: EntityLicense;
|
|
52
53
|
selectedLicense?: License;
|
|
53
54
|
certificateId?: Array<string>;
|
|
54
55
|
articleId?: string;
|
package/build/api/entity.d.ts
CHANGED
|
@@ -119,5 +119,6 @@ declare const entityService: {
|
|
|
119
119
|
retrieveEntityType: () => Promise<any>;
|
|
120
120
|
updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
|
|
121
121
|
updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
|
|
122
|
+
retrieveAllEntities: (id: string) => Promise<any>;
|
|
122
123
|
};
|
|
123
124
|
export { entityService };
|
package/build/api/entity.js
CHANGED
|
@@ -83,6 +83,12 @@ var retrieveEntityType = function () {
|
|
|
83
83
|
url: "".concat(ENDPOINT_PATHS.ENTITY, "/types")
|
|
84
84
|
});
|
|
85
85
|
};
|
|
86
|
+
var retrieveAllEntities = function (id) {
|
|
87
|
+
return httpClient({
|
|
88
|
+
method: 'get',
|
|
89
|
+
url: "".concat(ENDPOINT_PATHS.BUSINESS, "/").concat(id)
|
|
90
|
+
});
|
|
91
|
+
};
|
|
86
92
|
var entityService = {
|
|
87
93
|
createEntityInfo: createEntityInfo,
|
|
88
94
|
updateEntityInfo: updateEntityInfo,
|
|
@@ -95,6 +101,7 @@ var entityService = {
|
|
|
95
101
|
updateEntityActivity: updateEntityActivity,
|
|
96
102
|
retrieveEntityType: retrieveEntityType,
|
|
97
103
|
updateEntityCapital: updateEntityCapital,
|
|
98
|
-
updateEntityAOAFile: updateEntityAOAFile
|
|
104
|
+
updateEntityAOAFile: updateEntityAOAFile,
|
|
105
|
+
retrieveAllEntities: retrieveAllEntities
|
|
99
106
|
};
|
|
100
107
|
export { entityService };
|
package/build/api/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { GetUserListBody } from './user';
|
|
|
12
12
|
import { RemoveBrandActivity } from './brand';
|
|
13
13
|
import { UploadFileBody } from './file';
|
|
14
14
|
import { DocumentUpdateBody, DocumentInfo, DocumentBody } from './document';
|
|
15
|
+
import { InitBody } from './init';
|
|
15
16
|
declare const API: {
|
|
16
17
|
locationService: {
|
|
17
18
|
getIP: () => Promise<any>;
|
|
@@ -62,6 +63,7 @@ declare const API: {
|
|
|
62
63
|
retrieveEntityType: () => Promise<any>;
|
|
63
64
|
updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
|
|
64
65
|
updateEntityAOAFile: ({ id, ...data }: UpdateEntityAOAFileBody) => Promise<any>;
|
|
66
|
+
retrieveAllEntities: (id: string) => Promise<any>;
|
|
65
67
|
};
|
|
66
68
|
availabilityServices: {
|
|
67
69
|
checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -143,7 +145,10 @@ declare const API: {
|
|
|
143
145
|
addFilesToExistingDocument: ({ id, ...data }: DocumentBody) => Promise<any>;
|
|
144
146
|
removeFilesFromDocument: ({ id, ...data }: DocumentBody) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
145
147
|
};
|
|
148
|
+
initService: {
|
|
149
|
+
getInitialData: (body: InitBody) => Promise<any>;
|
|
150
|
+
};
|
|
146
151
|
};
|
|
147
|
-
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, RemoveBrandActivity };
|
|
152
|
+
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 };
|
|
148
153
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
149
154
|
export default API;
|
package/build/api/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { userService } from './user';
|
|
|
15
15
|
import { brandService } from './brand';
|
|
16
16
|
import { fileService } from './file';
|
|
17
17
|
import { documentService } from './document';
|
|
18
|
+
import { initService } from './init';
|
|
18
19
|
var API = {
|
|
19
20
|
locationService: locationService,
|
|
20
21
|
operatorService: operatorService,
|
|
@@ -31,7 +32,8 @@ var API = {
|
|
|
31
32
|
userService: userService,
|
|
32
33
|
brandService: brandService,
|
|
33
34
|
fileService: fileService,
|
|
34
|
-
documentService: documentService
|
|
35
|
+
documentService: documentService,
|
|
36
|
+
initService: initService
|
|
35
37
|
};
|
|
36
38
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
37
39
|
export default API;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare type InitBody = {
|
|
2
|
+
type: string;
|
|
3
|
+
app_client_version: string;
|
|
4
|
+
requirer_browser: string;
|
|
5
|
+
os: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
connect_pkey?: string;
|
|
8
|
+
data_required?: {
|
|
9
|
+
country_list?: boolean;
|
|
10
|
+
merchant?: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare const initService: {
|
|
14
|
+
getInitialData: (body: InitBody) => Promise<any>;
|
|
15
|
+
};
|
|
16
|
+
export { initService };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { httpClient } from './axios';
|
|
2
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
3
|
+
var getInitialData = function (body) {
|
|
4
|
+
return httpClient({
|
|
5
|
+
method: 'post',
|
|
6
|
+
url: ENDPOINT_PATHS.INIT,
|
|
7
|
+
data: body
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var initService = {
|
|
11
|
+
getInitialData: getInitialData
|
|
12
|
+
};
|
|
13
|
+
export { initService };
|
package/build/api/lead.d.ts
CHANGED
|
@@ -39,10 +39,13 @@ export declare type UpdateLeadBody = {
|
|
|
39
39
|
step_name?: string;
|
|
40
40
|
id: string;
|
|
41
41
|
encryption_contract?: Array<string>;
|
|
42
|
+
entity?: {
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
42
45
|
name?: Name;
|
|
43
46
|
contact?: Contact;
|
|
44
47
|
send_invite?: boolean;
|
|
45
|
-
|
|
48
|
+
business_name?: BusinessName;
|
|
46
49
|
business_type?: string;
|
|
47
50
|
country_code?: string;
|
|
48
51
|
brand?: BrandInfo;
|
package/build/app/settings.d.ts
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { RootState } from './store';
|
|
2
|
-
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo, LibConfig, CountryCode } from '../@types';
|
|
2
|
+
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo, LibConfig, CountryCode, MerchantInfo } from '../@types';
|
|
3
3
|
interface SettingParams {
|
|
4
4
|
disableCountries?: boolean;
|
|
5
5
|
disableLocale?: boolean;
|
|
6
6
|
mdn: string;
|
|
7
7
|
maturity?: 'full' | 'express';
|
|
8
8
|
}
|
|
9
|
-
export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
10
|
-
countries: CountryCode[];
|
|
11
|
-
businessCountry: CountryCode;
|
|
12
|
-
locale: any;
|
|
13
|
-
deviceInfo: DeviceInfo;
|
|
14
|
-
isValidOperator: boolean;
|
|
15
|
-
}, SettingParams, {}>;
|
|
9
|
+
export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk<any, SettingParams, {}>;
|
|
16
10
|
export interface SettingsData {
|
|
17
11
|
skin: ThemeMode;
|
|
18
12
|
language: LanguageMode;
|
|
@@ -26,6 +20,8 @@ export interface SettingsData {
|
|
|
26
20
|
countries: Array<CountryCode>;
|
|
27
21
|
isValidOperator: boolean;
|
|
28
22
|
boardMaturity: boolean;
|
|
23
|
+
merchant?: MerchantInfo;
|
|
24
|
+
isMaturityExpress: boolean;
|
|
29
25
|
}
|
|
30
26
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
31
27
|
}
|
package/build/app/settings.js
CHANGED
|
@@ -53,29 +53,37 @@ import i18n from '../i18n';
|
|
|
53
53
|
import { updateLocale } from '../utils/locale';
|
|
54
54
|
import API, { setAxiosGlobalHeaders } from '../api';
|
|
55
55
|
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
var settings, _a, appConfig, language, _b, client, device, os,
|
|
57
|
-
return __generator(this, function (
|
|
58
|
-
switch (
|
|
56
|
+
var settings, _a, appConfig, language, _b, client, device, os, disableLocale, maturity, disableCountries, _c, visitorId, locale, initPayload, _d, country_list, ip_info, merchant, operator, list, _e, ip, latitude, longitude, deviceInfo, isValidOperator, countries, countryCode, isKWOrSA, businessCountry;
|
|
57
|
+
return __generator(this, function (_f) {
|
|
58
|
+
switch (_f.label) {
|
|
59
59
|
case 0:
|
|
60
60
|
settings = thunkApi.getState().settings;
|
|
61
61
|
_a = settings.data, appConfig = _a.appConfig, language = _a.language;
|
|
62
62
|
_b = getBrowserInfo(), client = _b.client, device = _b.device, os = _b.os;
|
|
63
|
-
|
|
64
|
-
return [4, Promise.all([
|
|
65
|
-
getFingerPrint(),
|
|
66
|
-
API.locationService.getIP(),
|
|
67
|
-
API.firebaseService.getLocale(disableLocale),
|
|
68
|
-
API.countryService.getCountries(disableCountries)
|
|
69
|
-
])];
|
|
63
|
+
disableLocale = params.disableLocale, maturity = params.maturity, disableCountries = params.disableCountries;
|
|
64
|
+
return [4, Promise.all([getFingerPrint(), API.firebaseService.getLocale(disableLocale)])];
|
|
70
65
|
case 1:
|
|
71
|
-
_c =
|
|
72
|
-
|
|
66
|
+
_c = _f.sent(), visitorId = _c[0].visitorId, locale = _c[1];
|
|
67
|
+
setAxiosGlobalHeaders({
|
|
68
|
+
bi: visitorId || '',
|
|
69
|
+
mdn: encryptString(params.mdn || window.location.origin),
|
|
70
|
+
authorization: encryptString(appConfig.publicKey)
|
|
71
|
+
});
|
|
72
|
+
initPayload = {
|
|
73
73
|
type: 'website',
|
|
74
74
|
app_client_version: 'js-auth-connect',
|
|
75
75
|
requirer_browser: "".concat(client === null || client === void 0 ? void 0 : client.name, " , ").concat(client === null || client === void 0 ? void 0 : client.version),
|
|
76
76
|
os: "".concat(os === null || os === void 0 ? void 0 : os.name, " , ").concat(os === null || os === void 0 ? void 0 : os.version),
|
|
77
|
-
locale: language
|
|
77
|
+
locale: language,
|
|
78
|
+
data_required: {
|
|
79
|
+
country_list: !disableCountries
|
|
80
|
+
}
|
|
78
81
|
};
|
|
82
|
+
return [4, API.initService.getInitialData(initPayload)];
|
|
83
|
+
case 2:
|
|
84
|
+
_d = _f.sent(), country_list = _d.country_list, ip_info = _d.ip_info, merchant = _d.merchant, operator = _d.operator;
|
|
85
|
+
list = (country_list || { list: [] }).list;
|
|
86
|
+
_e = ip_info || {}, ip = _e.ip, latitude = _e.latitude, longitude = _e.longitude;
|
|
79
87
|
deviceInfo = {
|
|
80
88
|
app: {
|
|
81
89
|
language: appConfig.language || 'en',
|
|
@@ -108,10 +116,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
108
116
|
source: 'browser'
|
|
109
117
|
};
|
|
110
118
|
setAxiosGlobalHeaders(__assign(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(appConfig.publicKey), mdn: encryptString(params.mdn || window.location.origin), cu: window.location.href }), (maturity && { maturity: maturity })));
|
|
111
|
-
|
|
112
|
-
case 2:
|
|
113
|
-
operatorStatus = _e.sent();
|
|
114
|
-
isValidOperator = operatorStatus === 'valid';
|
|
119
|
+
isValidOperator = operator === 'valid';
|
|
115
120
|
countries = sortCountries(list);
|
|
116
121
|
countryCode = appConfig.businessCountryCode;
|
|
117
122
|
isKWOrSA = isKW(countryCode) || isSA(countryCode);
|
|
@@ -120,7 +125,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
120
125
|
businessCountry = findCountryByIso2(countries, countryCode);
|
|
121
126
|
if (!businessCountry)
|
|
122
127
|
throw new Error('Business country not found, you have to pass a valid business country code in the lib config');
|
|
123
|
-
return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, isValidOperator: isValidOperator }];
|
|
128
|
+
return [2, __assign({ countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, isValidOperator: isValidOperator, isMaturityExpress: maturity === 'express' }, (merchant && { merchant: merchant }))];
|
|
124
129
|
}
|
|
125
130
|
});
|
|
126
131
|
}); });
|
|
@@ -131,6 +136,7 @@ var initialState = {
|
|
|
131
136
|
boardMaturity: true,
|
|
132
137
|
open: true,
|
|
133
138
|
isTapOrigin: true,
|
|
139
|
+
isMaturityExpress: false,
|
|
134
140
|
skin: getStoredData(LOCAL_STORAGE_KEYS.themeMode) || 'light',
|
|
135
141
|
language: getStoredData(LOCAL_STORAGE_KEYS.languageMode) || 'en',
|
|
136
142
|
featureScreensNavigation: [],
|
|
@@ -250,11 +256,14 @@ export var settingsSlice = createSlice({
|
|
|
250
256
|
state.error = null;
|
|
251
257
|
});
|
|
252
258
|
builder.addCase(fetchAppSettingsSync.fulfilled, function (state, action) {
|
|
253
|
-
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo, isValidOperator = _a.isValidOperator;
|
|
259
|
+
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo, isValidOperator = _a.isValidOperator, merchant = _a.merchant, isMaturityExpress = _a.isMaturityExpress;
|
|
254
260
|
state.data.countries = countries;
|
|
255
261
|
state.data.businessCountry = businessCountry;
|
|
256
262
|
state.data.deviceInfo = deviceInfo;
|
|
257
263
|
state.data.isValidOperator = isValidOperator;
|
|
264
|
+
if (merchant)
|
|
265
|
+
state.data.merchant = merchant;
|
|
266
|
+
state.data.isMaturityExpress = isMaturityExpress;
|
|
258
267
|
if (locale)
|
|
259
268
|
updateLocale(locale, businessCountry.iso2);
|
|
260
269
|
state.loading = false;
|
|
@@ -392,5 +392,9 @@
|
|
|
392
392
|
"file_delete_error": "حدث خطأ ما في حذف الملف. حاول مرة اخرى",
|
|
393
393
|
"file_download_error": "حدث خطأ ما في تحميل الملف. حاول مرة اخرى",
|
|
394
394
|
"title_brand_logo": "لوجو العلامة التجارية",
|
|
395
|
-
"description_brand_logo": "JPG or PNG files up to 4mb."
|
|
395
|
+
"description_brand_logo": "JPG or PNG files up to 4mb.",
|
|
396
|
+
"powered_by": "بواسطة",
|
|
397
|
+
"add_other": "أخرى",
|
|
398
|
+
"choose_entity_license": "اختر ترخيص المنشأة",
|
|
399
|
+
"choose_license_entity": "- الرجاء الاختيار -"
|
|
396
400
|
}
|
|
@@ -422,5 +422,9 @@
|
|
|
422
422
|
"file_delete_error": "Something went wrong with deleting file. Please try again",
|
|
423
423
|
"file_download_error": "Something went wrong with downloading file. Please try again",
|
|
424
424
|
"title_brand_logo": "Brand Logo",
|
|
425
|
-
"description_brand_logo": "JPG or PNG files up to 4mb."
|
|
425
|
+
"description_brand_logo": "JPG or PNG files up to 4mb.",
|
|
426
|
+
"powered_by": "Powered by",
|
|
427
|
+
"add_other": "Other",
|
|
428
|
+
"choose_entity_license": "Choose Entity License",
|
|
429
|
+
"choose_license_entity": "- Please select -"
|
|
426
430
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { MerchantInfo } from '../../@types';
|
|
2
3
|
export interface AnimationFlowProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
children: React.ReactNode;
|
|
5
6
|
isTapOrigin?: boolean;
|
|
6
|
-
footer?: React.ReactNode;
|
|
7
7
|
type?: 'PUPOP' | 'BOTTOMSHEET';
|
|
8
8
|
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
loading?: boolean;
|
|
@@ -13,5 +13,7 @@ export interface AnimationFlowProps {
|
|
|
13
13
|
onClose?: () => void;
|
|
14
14
|
onConfirm?: () => void;
|
|
15
15
|
pointerEvents?: 'auto' | 'none';
|
|
16
|
+
merchantInfo?: MerchantInfo;
|
|
17
|
+
isMaturityExpress?: boolean;
|
|
16
18
|
}
|
|
17
|
-
export default function AnimationFlow({ open, children, breakpoint, type,
|
|
19
|
+
export default function AnimationFlow({ open, children, breakpoint, type, loading, error, isTapOrigin, screenId, animationType, onClose, onConfirm, pointerEvents, merchantInfo, isMaturityExpress }: AnimationFlowProps): JSX.Element;
|
|
@@ -16,7 +16,7 @@ import BottomSheet from './BottomSheet';
|
|
|
16
16
|
import Loader from './Loader';
|
|
17
17
|
import Error from './Error';
|
|
18
18
|
export default function AnimationFlow(_a) {
|
|
19
|
-
var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type,
|
|
19
|
+
var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type, loading = _a.loading, error = _a.error, isTapOrigin = _a.isTapOrigin, screenId = _a.screenId, animationType = _a.animationType, onClose = _a.onClose, onConfirm = _a.onConfirm, _b = _a.pointerEvents, pointerEvents = _b === void 0 ? 'auto' : _b, merchantInfo = _a.merchantInfo, isMaturityExpress = _a.isMaturityExpress;
|
|
20
20
|
var small = useScreen(breakpoint).small;
|
|
21
21
|
if (loading) {
|
|
22
22
|
return _jsx(Loader, {});
|
|
@@ -25,10 +25,10 @@ export default function AnimationFlow(_a) {
|
|
|
25
25
|
return _jsx(Error, { error: error });
|
|
26
26
|
}
|
|
27
27
|
if (type === 'PUPOP') {
|
|
28
|
-
return (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm,
|
|
28
|
+
return (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open, isTapOrigin: isTapOrigin, animationType: animationType, merchantInfo: merchantInfo, isMaturityExpress: isMaturityExpress }, { children: children })));
|
|
29
29
|
}
|
|
30
30
|
if (type === 'BOTTOMSHEET') {
|
|
31
|
-
return (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open }, { children: children })));
|
|
31
|
+
return (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo }, { children: children })));
|
|
32
32
|
}
|
|
33
|
-
return small ? (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, screenId: screenId }, { children: children }))) : (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open,
|
|
33
|
+
return small ? (_jsx(BottomSheet, __assign({ pointerEvents: pointerEvents, open: open, screenId: screenId, isMaturityExpress: isMaturityExpress, merchantInfo: merchantInfo }, { children: children }))) : (_jsx(Dialog, __assign({ pointerEvents: pointerEvents, onClose: onClose, onConfirm: onConfirm, open: open, isTapOrigin: isTapOrigin, animationType: animationType, merchantInfo: merchantInfo, isMaturityExpress: isMaturityExpress }, { children: children })));
|
|
34
34
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BottomSheetProps as MainBottomSheetProps } from 'react-spring-bottom-sheet';
|
|
3
3
|
import 'react-spring-bottom-sheet/dist/style.css';
|
|
4
|
+
import { MerchantInfo } from '../../@types';
|
|
4
5
|
export interface BottomSheetProps extends MainBottomSheetProps {
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
open: boolean;
|
|
7
8
|
screenId?: string;
|
|
8
9
|
pointerEvents?: 'none' | 'auto';
|
|
10
|
+
isMaturityExpress?: boolean;
|
|
11
|
+
merchantInfo?: MerchantInfo;
|
|
9
12
|
}
|
|
10
|
-
declare const _default: React.MemoExoticComponent<({ open, children, screenId, pointerEvents, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
13
|
+
declare const _default: React.MemoExoticComponent<({ open, children, screenId, pointerEvents, isMaturityExpress, merchantInfo, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
11
14
|
export default _default;
|
|
@@ -20,30 +20,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import { BottomSheet } from 'react-spring-bottom-sheet';
|
|
26
26
|
import { styled } from '@mui/material/styles';
|
|
27
|
+
import Box from '@mui/material/Box';
|
|
27
28
|
import 'react-spring-bottom-sheet/dist/style.css';
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
import { ICONS_NAMES } from '../../constants';
|
|
30
|
+
import { useLanguage } from '../../hooks';
|
|
31
|
+
import { PoweredByFooter } from '../../features/shared/Footer';
|
|
32
|
+
import LogoBadge from '../LogoBadge';
|
|
33
|
+
var BottomSheetStyled = styled(BottomSheet, { shouldForwardProp: function (prop) { return prop !== 'isMaturityExpress'; } })(function (_a) {
|
|
34
|
+
var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress;
|
|
30
35
|
return ({
|
|
31
|
-
'[data-rsbs-header]:before': {
|
|
32
|
-
width: '75px',
|
|
33
|
-
height: '5px'
|
|
34
|
-
},
|
|
36
|
+
'[data-rsbs-header]:before': __assign({ width: '75px', height: '5px' }, (isMaturityExpress && { width: '0px', height: '0px' })),
|
|
35
37
|
'[data-rsbs-backdrop]': {
|
|
36
38
|
backgroundColor: 'transparent'
|
|
37
39
|
},
|
|
38
|
-
'[data-rsbs-header]': {
|
|
39
|
-
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
width: '100vw'
|
|
42
|
-
},
|
|
43
|
-
'[data-rsbs-overlay]': {
|
|
44
|
-
backgroundColor: theme.palette.background.paper,
|
|
45
|
-
zIndex: 9999
|
|
46
|
-
},
|
|
40
|
+
'[data-rsbs-header]': __assign({ paddingBottom: theme.spacing(6), position: 'absolute', width: '100vw' }, (isMaturityExpress && { display: 'none' })),
|
|
41
|
+
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999 }, (isMaturityExpress && { maxHeight: 'calc(100vh - 80px)', marginBottom: theme.spacing(5.625), paddingTop: theme.spacing(5) })),
|
|
47
42
|
'[data-rsbs-scroll]': {
|
|
48
43
|
'&::-webkit-scrollbar': {
|
|
49
44
|
width: '0px'
|
|
@@ -59,13 +54,21 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
|
|
|
59
54
|
}
|
|
60
55
|
});
|
|
61
56
|
});
|
|
57
|
+
var FooterStyled = styled(Box)(function (_a) {
|
|
58
|
+
var theme = _a.theme;
|
|
59
|
+
return (__assign(__assign({ bottom: theme.spacing(-5.625), position: 'fixed', height: theme.spacing(5.625), display: 'flex' }, theme.typography.caption), { justifyContent: 'center', alignItems: 'center', width: '100vw', background: '#E6E7E9', borderTop: '1px solid rgba(156, 160, 169, 0.3)' }));
|
|
60
|
+
});
|
|
62
61
|
var BottomSheetComponent = function (_a) {
|
|
63
|
-
var open = _a.open, children = _a.children, screenId = _a.screenId, _b = _a.pointerEvents, pointerEvents = _b === void 0 ? 'auto' : _b, rest = __rest(_a, ["open", "children", "screenId", "pointerEvents"]);
|
|
62
|
+
var open = _a.open, children = _a.children, screenId = _a.screenId, _b = _a.pointerEvents, pointerEvents = _b === void 0 ? 'auto' : _b, isMaturityExpress = _a.isMaturityExpress, merchantInfo = _a.merchantInfo, rest = __rest(_a, ["open", "children", "screenId", "pointerEvents", "isMaturityExpress", "merchantInfo"]);
|
|
64
63
|
var sheetRef = React.useRef(null);
|
|
64
|
+
var isAr = useLanguage().isAr;
|
|
65
|
+
var logo = (merchantInfo || {}).logo;
|
|
65
66
|
var getMinHeight = function (maxHeight) {
|
|
66
67
|
var el = document.getElementById('main-feature-container');
|
|
68
|
+
var footer = document.getElementById('bottom-sheet-powered_by_footer');
|
|
67
69
|
var height = el ? el.clientHeight : 0;
|
|
68
|
-
|
|
70
|
+
var footerHeight = footer ? footer.clientHeight + 20 : 0;
|
|
71
|
+
return (height || maxHeight * 0.7) + footerHeight;
|
|
69
72
|
};
|
|
70
73
|
React.useEffect(function () {
|
|
71
74
|
if (sheetRef.current && screenId) {
|
|
@@ -78,9 +81,9 @@ var BottomSheetComponent = function (_a) {
|
|
|
78
81
|
}, 500);
|
|
79
82
|
}
|
|
80
83
|
}, [screenId]);
|
|
81
|
-
return (
|
|
84
|
+
return (_jsxs(BottomSheetStyled, __assign({ isMaturityExpress: isMaturityExpress, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
82
85
|
var maxHeight = _a.maxHeight;
|
|
83
86
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
84
|
-
} }, rest, { children: children })));
|
|
87
|
+
} }, rest, { children: [isMaturityExpress && _jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON }), children, isMaturityExpress && (_jsx(FooterStyled, { children: _jsx(PoweredByFooter, { id: 'bottom-sheet-powered_by_footer', sx: { margin: '0px' }, textSx: { color: 'rgba(63, 66, 77, 0.6)' }, icon: isAr ? ICONS_NAMES.LOGO_WITH_NAME_DARK_AR_ICON : ICONS_NAMES.LOGO_WITH_NAME_DARK_EN_ICON }) }))] })));
|
|
85
88
|
};
|
|
86
89
|
export default React.memo(BottomSheetComponent);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DialogProps as MUIDialogProps } from '@mui/material/Dialog';
|
|
3
|
+
import { MerchantInfo } from '../../@types';
|
|
3
4
|
export interface DialogProps extends MUIDialogProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
isTapOrigin?: boolean;
|
|
6
7
|
children: React.ReactNode;
|
|
7
|
-
footer?: React.ReactNode;
|
|
8
8
|
transitionDuration?: number;
|
|
9
9
|
animationType?: 'slide' | 'fade' | 'collapse';
|
|
10
10
|
onClose?: () => void;
|
|
11
11
|
onConfirm?: () => void;
|
|
12
12
|
pointerEvents?: 'none' | 'auto';
|
|
13
|
+
merchantInfo?: MerchantInfo;
|
|
14
|
+
isMaturityExpress?: boolean;
|
|
13
15
|
}
|
|
14
|
-
declare const _default: React.MemoExoticComponent<({ open, children,
|
|
16
|
+
declare const _default: React.MemoExoticComponent<({ open, children, transitionDuration, isTapOrigin, animationType, onClose, onConfirm, pointerEvents, merchantInfo, isMaturityExpress, ...rest }: DialogProps) => JSX.Element>;
|
|
15
17
|
export default _default;
|
|
@@ -29,11 +29,12 @@ import Box from '@mui/material/Box';
|
|
|
29
29
|
import { styled } from '@mui/material/styles';
|
|
30
30
|
import { DIALOG_ID, ICONS_NAMES } from '../../constants';
|
|
31
31
|
import { useLanguage } from '../../hooks';
|
|
32
|
+
import DialogContainer from '../../features/shared/Dialog';
|
|
33
|
+
import { CustomFooter, PoweredByFooter } from '../../features/shared/Footer';
|
|
32
34
|
import Slide from '../Slide';
|
|
33
35
|
import LogoBadge from '../LogoBadge';
|
|
34
36
|
import Icon from '../Icon';
|
|
35
37
|
import Collapse from '../Collapse';
|
|
36
|
-
import DialogContainer from '../../features/shared/Dialog';
|
|
37
38
|
var Transition = React.forwardRef(function Transition(props, ref) {
|
|
38
39
|
return _jsx(Slide, __assign({ direction: 'up', ref: ref }, props));
|
|
39
40
|
});
|
|
@@ -50,11 +51,11 @@ var PaperStyled = styled(Paper)(function (_a) {
|
|
|
50
51
|
maxWidth: theme.spacing(46.875)
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
|
-
var DialogContentStyled = styled(DialogContent)(function (_a) {
|
|
54
|
-
var theme = _a.theme;
|
|
54
|
+
var DialogContentStyled = styled(DialogContent, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
|
|
55
|
+
var theme = _a.theme, isTapOrigin = _a.isTapOrigin;
|
|
55
56
|
return ({
|
|
56
57
|
padding: theme.spacing(0),
|
|
57
|
-
|
|
58
|
+
marginTop: isTapOrigin ? theme.spacing(3.75) : theme.spacing(4.375),
|
|
58
59
|
width: '100%',
|
|
59
60
|
'&::-webkit-scrollbar': {
|
|
60
61
|
width: '0px'
|
|
@@ -74,7 +75,6 @@ var LogoIconBoxStyled = styled(Box)(function (_a) {
|
|
|
74
75
|
var theme = _a.theme;
|
|
75
76
|
return (_b = {
|
|
76
77
|
paddingTop: theme.spacing(3.125),
|
|
77
|
-
paddingBottom: theme.spacing(2.5),
|
|
78
78
|
width: '100%',
|
|
79
79
|
display: 'flex',
|
|
80
80
|
justifyContent: 'center'
|
|
@@ -92,20 +92,43 @@ var LogoIconStyled = styled(Icon)(function (_a) {
|
|
|
92
92
|
padding: theme.spacing(0)
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
|
+
var LanguageFooterStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'showLanguage'; } })(function (_a) {
|
|
96
|
+
var theme = _a.theme, showLanguage = _a.showLanguage;
|
|
97
|
+
return ({
|
|
98
|
+
position: 'fixed',
|
|
99
|
+
bottom: theme.spacing(7.5),
|
|
100
|
+
left: '50%',
|
|
101
|
+
transform: 'translateX(-50%)',
|
|
102
|
+
opacity: showLanguage ? 1 : 0,
|
|
103
|
+
transition: 'opacity 300ms'
|
|
104
|
+
});
|
|
105
|
+
});
|
|
95
106
|
var Dialog = function (_a) {
|
|
96
|
-
var open = _a.open, children = _a.children,
|
|
107
|
+
var open = _a.open, children = _a.children, transitionDuration = _a.transitionDuration, isTapOrigin = _a.isTapOrigin, _b = _a.animationType, animationType = _b === void 0 ? 'slide' : _b, onClose = _a.onClose, onConfirm = _a.onConfirm, _c = _a.pointerEvents, pointerEvents = _c === void 0 ? 'auto' : _c, merchantInfo = _a.merchantInfo, isMaturityExpress = _a.isMaturityExpress, rest = __rest(_a, ["open", "children", "transitionDuration", "isTapOrigin", "animationType", "onClose", "onConfirm", "pointerEvents", "merchantInfo", "isMaturityExpress"]);
|
|
97
108
|
var isAr = useLanguage().isAr;
|
|
98
109
|
var animation = {};
|
|
99
110
|
if (animationType === 'slide') {
|
|
100
111
|
Object.assign(animation, { TransitionComponent: Transition });
|
|
101
112
|
}
|
|
113
|
+
var logo = (merchantInfo || {}).logo;
|
|
114
|
+
var _d = React.useState(false), showLanguage = _d[0], setShowLanguage = _d[1];
|
|
115
|
+
React.useEffect(function () {
|
|
116
|
+
if (isMaturityExpress) {
|
|
117
|
+
setTimeout(function () {
|
|
118
|
+
setShowLanguage(true);
|
|
119
|
+
}, transitionDuration || 500);
|
|
120
|
+
}
|
|
121
|
+
}, []);
|
|
102
122
|
return (_jsxs(MuiDialog, __assign({ id: DIALOG_ID, PaperProps: {
|
|
103
123
|
elevation: 0
|
|
104
124
|
}, sx: {
|
|
105
125
|
'& .MuiDialog-paper': {
|
|
106
126
|
overflowY: 'visible'
|
|
107
127
|
},
|
|
128
|
+
'&.MuiDialog-root': {
|
|
129
|
+
marginBottom: isMaturityExpress ? '60px' : '0px'
|
|
130
|
+
},
|
|
108
131
|
pointerEvents: pointerEvents
|
|
109
|
-
}, hideBackdrop: true, PaperComponent: PaperStyled, open: open, transitionDuration: transitionDuration || 500, keepMounted: true, "aria-describedby": 'dialog-slide-description' }, rest, animation, { children: [_jsx(DialogContainer, __assign({ isTapOrigin: isTapOrigin, onClose: onClose, onConfirm: onConfirm }, { children: _jsxs(DialogContentStyled, { children: [_jsxs(Collapse, __assign({ in: !isTapOrigin }, { children: [_jsx(LogoBadge, { src: ICONS_NAMES.LOGO_ICON }), _jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_AR : ICONS_NAMES.TAP_EN, alt: 'tap logo' }) })] })), children] }) })),
|
|
132
|
+
}, hideBackdrop: true, PaperComponent: PaperStyled, open: open, transitionDuration: transitionDuration || 500, keepMounted: true, "aria-describedby": 'dialog-slide-description' }, rest, animation, { children: [_jsx(DialogContainer, __assign({ isTapOrigin: isTapOrigin, onClose: onClose, onConfirm: onConfirm }, { children: _jsxs(DialogContentStyled, __assign({ isTapOrigin: isTapOrigin }, { children: [_jsxs(Collapse, __assign({ in: !isTapOrigin }, { children: [_jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON }), !isMaturityExpress && (_jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_AR : ICONS_NAMES.TAP_EN, alt: 'tap logo' }) }))] })), children] })) })), isMaturityExpress ? _jsx(PoweredByFooter, {}) : _jsx(CustomFooter, {}), _jsx(LanguageFooterStyled, __assign({ showLanguage: showLanguage }, { children: _jsx(CustomFooter, {}) }))] })));
|
|
110
133
|
};
|
|
111
134
|
export default React.memo(Dialog);
|
|
@@ -9,6 +9,7 @@ export interface DatePickerProps extends CalendarProps {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
dir?: string;
|
|
12
|
+
isDob?: boolean;
|
|
12
13
|
}
|
|
13
|
-
declare const _default: React.MemoExoticComponent<({ onDateChange, disabled, readOnly, onClick, onDatePicked, dir, defaultValue, ...rest }: DatePickerProps) => JSX.Element>;
|
|
14
|
+
declare const _default: React.MemoExoticComponent<({ onDateChange, disabled, readOnly, onClick, onDatePicked, dir, defaultValue, isDob, ...rest }: DatePickerProps) => JSX.Element>;
|
|
14
15
|
export default _default;
|