@tap-payments/auth-jsconnect 2.4.48-test → 2.4.51-test
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 +8 -6
- package/build/api/index.d.ts +3 -2
- package/build/api/lead.d.ts +4 -0
- package/build/api/lead.js +9 -1
- package/build/app/settings.d.ts +2 -1
- package/build/app/settings.js +6 -1
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -1
- package/build/features/app/connectExpress/connectExpressStore.d.ts +16 -0
- package/build/features/app/connectExpress/connectExpressStore.js +45 -1
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +4 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +4 -7
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +4 -7
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +4 -7
- package/build/features/brand/screens/BrandInfo/Segments.js +2 -10
- package/build/features/brand/screens/BrandInfo/TeamSize.js +2 -10
- package/build/features/business/screens/Activities/ActivitiesList.js +11 -8
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +3 -6
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -6
- package/build/features/business/screens/Customers/CustomerLocations.js +4 -7
- package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -7
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +4 -7
- package/build/features/connect/Connect.js +1 -0
- package/build/features/connect/screens/Merchant/BrandList.js +2 -7
- package/build/features/connect/screens/Merchant/Segments.js +2 -7
- package/build/features/connect/screens/Merchant/TeamSize.js +2 -7
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -0
- package/build/features/connectExpress/ConnectExpress.js +17 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +4 -7
- package/build/features/entity/screens/EntityCapital/ActivityList.js +11 -8
- package/build/features/entity/screens/EntityName/EntityTypeList.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +2 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +2 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +2 -10
- package/build/features/shared/Input/Input.d.ts +2 -3
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +27 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -577,18 +577,20 @@ export type IndividualDataVerification = {
|
|
|
577
577
|
relation: string;
|
|
578
578
|
status: string;
|
|
579
579
|
};
|
|
580
|
-
export
|
|
580
|
+
export interface CommonDataLayer {
|
|
581
581
|
event: string;
|
|
582
|
+
}
|
|
583
|
+
export interface DataLayer extends CommonDataLayer {
|
|
582
584
|
event_category: string;
|
|
583
585
|
event_action: string;
|
|
584
586
|
event_label?: string;
|
|
585
587
|
event_value?: number | string;
|
|
586
588
|
event_noninteraction?: number;
|
|
587
|
-
}
|
|
588
|
-
export
|
|
589
|
+
}
|
|
590
|
+
export interface CountryTrackingData extends CommonDataLayer {
|
|
589
591
|
website_country?: string;
|
|
590
|
-
}
|
|
591
|
-
export
|
|
592
|
+
}
|
|
593
|
+
export interface LeadIdentificationData extends CommonDataLayer {
|
|
592
594
|
lead_ID?: string;
|
|
593
|
-
}
|
|
595
|
+
}
|
|
594
596
|
export {};
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
|
|
2
2
|
import { ValidateOperatorBody } from './operator';
|
|
3
3
|
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody } from './auth';
|
|
4
|
-
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
|
|
4
|
+
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody, ExpressLeadVerifyBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
6
|
import { EntityInfoBody, EntityBankUpdateBody, BankDocumentInfo, UpdateEntityBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, UpdateEntityAOAFileBody, RemoveEntityActivity } from './entity';
|
|
7
7
|
import { CreateAccountBody, ExpressCreateAccountBody } from './account';
|
|
@@ -49,6 +49,7 @@ declare const API: {
|
|
|
49
49
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
50
50
|
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
51
51
|
updateLeadExpress: ({ id, ...data }: UpdateLeadBody) => Promise<any>;
|
|
52
|
+
verifyExpressLeadToken: (data: ExpressLeadVerifyBody) => Promise<any>;
|
|
52
53
|
};
|
|
53
54
|
entityService: {
|
|
54
55
|
createEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -152,6 +153,6 @@ declare const API: {
|
|
|
152
153
|
getInitialData: (body: InitBody) => Promise<any>;
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
|
-
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 };
|
|
156
|
+
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 };
|
|
156
157
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
157
158
|
export default API;
|
package/build/api/lead.d.ts
CHANGED
|
@@ -71,6 +71,9 @@ export type LeadVerifyBody = {
|
|
|
71
71
|
verify_token: string;
|
|
72
72
|
service_name: string;
|
|
73
73
|
};
|
|
74
|
+
export type ExpressLeadVerifyBody = {
|
|
75
|
+
token: string;
|
|
76
|
+
};
|
|
74
77
|
export interface LeadOTPVerifyBody extends LeadVerifyBody {
|
|
75
78
|
data: string;
|
|
76
79
|
step_name: string;
|
|
@@ -101,5 +104,6 @@ declare const leadService: {
|
|
|
101
104
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
102
105
|
retrieveLeadIdentity: (leadId: string) => Promise<any>;
|
|
103
106
|
updateLeadExpress: ({ id, ...data }: UpdateLeadBody) => Promise<any>;
|
|
107
|
+
verifyExpressLeadToken: (data: ExpressLeadVerifyBody) => Promise<any>;
|
|
104
108
|
};
|
|
105
109
|
export { leadService };
|
package/build/api/lead.js
CHANGED
|
@@ -42,6 +42,13 @@ var getLeadById = function (leadId) {
|
|
|
42
42
|
var verifyLeadToken = function (data, config) {
|
|
43
43
|
return instance.put("".concat(ENDPOINT_PATHS.TOKEN_VERIFY), data, config);
|
|
44
44
|
};
|
|
45
|
+
var verifyExpressLeadToken = function (data) {
|
|
46
|
+
return httpClient({
|
|
47
|
+
method: 'put',
|
|
48
|
+
url: "".concat(ENDPOINT_PATHS.CONNECT, "/verify"),
|
|
49
|
+
data: data
|
|
50
|
+
});
|
|
51
|
+
};
|
|
45
52
|
var verifyLeadOTP = function (data, config) {
|
|
46
53
|
return instance.put("".concat(ENDPOINT_PATHS.TOKEN_VERIFY), data, config);
|
|
47
54
|
};
|
|
@@ -63,6 +70,7 @@ var leadService = {
|
|
|
63
70
|
verifyLeadOTP: verifyLeadOTP,
|
|
64
71
|
retrieveEntityList: retrieveEntityList,
|
|
65
72
|
retrieveLeadIdentity: retrieveLeadIdentity,
|
|
66
|
-
updateLeadExpress: updateLeadExpress
|
|
73
|
+
updateLeadExpress: updateLeadExpress,
|
|
74
|
+
verifyExpressLeadToken: verifyExpressLeadToken
|
|
67
75
|
};
|
|
68
76
|
export { leadService };
|
package/build/app/settings.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
40
40
|
handleOpen: (state: import("immer/dist/internal").WritableDraft<SettingsState>, action: ActionState<boolean>) => void;
|
|
41
41
|
handleSkin: (state: SettingsState, action: ActionState<ThemeMode>) => void;
|
|
42
42
|
handleLanguage: (state: SettingsState, action: ActionState<LanguageMode>) => void;
|
|
43
|
+
handlePublicKey: (state: SettingsState, action: ActionState<string>) => void;
|
|
43
44
|
handleNextScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
44
45
|
handleCurrentActiveScreen: (state: SettingsState, action: ActionState<string>) => void;
|
|
45
46
|
handlePrevScreenStep: (state: SettingsState, action: ActionState<string | undefined>) => void;
|
|
@@ -47,7 +48,7 @@ export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsSta
|
|
|
47
48
|
handleSetAppConfig: (state: SettingsState, action: ActionState<LibConfig>) => void;
|
|
48
49
|
handleSetCountryByIso2: (state: SettingsState, action: ActionState<string>) => void;
|
|
49
50
|
}, "settings">;
|
|
50
|
-
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, "settings/handleSkin">, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, "settings/handleLanguage">, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], "settings/handleActiveFlowScreens">, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handleNextScreenStep">, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handlePrevScreenStep">, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleCurrentActiveScreen">, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, "settings/handleSetAppConfig">, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleOpen">, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleSetCountryByIso2">, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleIsTapOrigin">, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handelBoardMaturity">;
|
|
51
|
+
export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, "settings/handleSkin">, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, "settings/handleLanguage">, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], "settings/handleActiveFlowScreens">, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handleNextScreenStep">, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "settings/handlePrevScreenStep">, handleCurrentActiveScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleCurrentActiveScreen">, handleSetAppConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<LibConfig, "settings/handleSetAppConfig">, handleOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleOpen">, handleSetCountryByIso2: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handleSetCountryByIso2">, handleIsTapOrigin: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handleIsTapOrigin">, handelBoardMaturity: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "settings/handelBoardMaturity">, handlePublicKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "settings/handlePublicKey">;
|
|
51
52
|
declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
|
|
52
53
|
export default _default;
|
|
53
54
|
export declare const settingsSelector: (state: RootState) => SettingsState;
|
package/build/app/settings.js
CHANGED
|
@@ -175,6 +175,11 @@ export var settingsSlice = createSlice({
|
|
|
175
175
|
i18n.changeLanguage(action.payload);
|
|
176
176
|
storeData(LOCAL_STORAGE_KEYS.languageMode, action.payload);
|
|
177
177
|
},
|
|
178
|
+
handlePublicKey: function (state, action) {
|
|
179
|
+
if (!action.payload)
|
|
180
|
+
return;
|
|
181
|
+
state.data.appConfig.publicKey = action.payload;
|
|
182
|
+
},
|
|
178
183
|
handleNextScreenStep: function (state, action) {
|
|
179
184
|
var next = state.data.activeScreen.next;
|
|
180
185
|
var appConfig = state.data.appConfig;
|
|
@@ -276,6 +281,6 @@ export var settingsSlice = createSlice({
|
|
|
276
281
|
});
|
|
277
282
|
}
|
|
278
283
|
});
|
|
279
|
-
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin, handelBoardMaturity = _a.handelBoardMaturity;
|
|
284
|
+
export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep, handleCurrentActiveScreen = _a.handleCurrentActiveScreen, handleSetAppConfig = _a.handleSetAppConfig, handleOpen = _a.handleOpen, handleSetCountryByIso2 = _a.handleSetCountryByIso2, handleIsTapOrigin = _a.handleIsTapOrigin, handelBoardMaturity = _a.handelBoardMaturity, handlePublicKey = _a.handlePublicKey;
|
|
280
285
|
export default settingsSlice.reducer;
|
|
281
286
|
export var settingsSelector = function (state) { return state.settings; };
|
package/build/constants/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
2
|
import { MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, FlowsTypes, ActionState, CountryCode, AuthForType, BusinessDataFormValues, AsyncThunkParams } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
|
+
interface VerifyLeadTokenProps {
|
|
5
|
+
token: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
|
+
data: any;
|
|
9
|
+
token: string;
|
|
10
|
+
}, VerifyLeadTokenProps, {
|
|
11
|
+
state?: unknown;
|
|
12
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
13
|
+
extra?: unknown;
|
|
14
|
+
rejectValue?: unknown;
|
|
15
|
+
serializedErrorType?: unknown;
|
|
16
|
+
pendingMeta?: unknown;
|
|
17
|
+
fulfilledMeta?: unknown;
|
|
18
|
+
rejectedMeta?: unknown;
|
|
19
|
+
}>;
|
|
4
20
|
export declare const retrieveLeadIdentityByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
21
|
data: any;
|
|
6
22
|
countryCode: CountryCode;
|
|
@@ -56,12 +56,45 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
|
-
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen } from '../../../app/settings';
|
|
59
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleOpen, handlePublicKey } from '../../../app/settings';
|
|
60
60
|
import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@types';
|
|
61
61
|
import API from '../../../api';
|
|
62
62
|
import { CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
64
|
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA } from '../../../utils';
|
|
65
|
+
export var verifyLeadToken = createAsyncThunk('expressVerifyLeadToken', function (_a, thunkApi) {
|
|
66
|
+
var token = _a.token;
|
|
67
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
68
|
+
var payload, data, _b, lead_id, post, public_key;
|
|
69
|
+
return __generator(this, function (_c) {
|
|
70
|
+
switch (_c.label) {
|
|
71
|
+
case 0:
|
|
72
|
+
payload = {
|
|
73
|
+
token: token
|
|
74
|
+
};
|
|
75
|
+
return [4, API.leadService.verifyExpressLeadToken(payload)];
|
|
76
|
+
case 1:
|
|
77
|
+
data = _c.sent();
|
|
78
|
+
_b = data || {}, lead_id = _b.lead_id, post = _b.post, public_key = _b.public_key;
|
|
79
|
+
if (public_key)
|
|
80
|
+
thunkApi.dispatch(handlePublicKey(public_key));
|
|
81
|
+
if (post === null || post === void 0 ? void 0 : post.url)
|
|
82
|
+
thunkApi.dispatch(setPostUrl(post.url));
|
|
83
|
+
if (!lead_id) return [3, 3];
|
|
84
|
+
thunkApi.dispatch(setIsLeadIdPassed(true));
|
|
85
|
+
thunkApi.dispatch(setLeadId(lead_id));
|
|
86
|
+
return [4, thunkApi.dispatch(retrieveLeadIdentityByIdAsync(lead_id))];
|
|
87
|
+
case 2:
|
|
88
|
+
_c.sent();
|
|
89
|
+
_c.label = 3;
|
|
90
|
+
case 3: return [2, {
|
|
91
|
+
data: data,
|
|
92
|
+
token: token
|
|
93
|
+
}];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
65
98
|
export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
99
|
var _a, settings, connectExpress, countryCode, showBoard, data, phone, status, board_id, board_info_id, isRegistered, _b, boardInfo, boardData, error_1;
|
|
67
100
|
var _c, _d;
|
|
@@ -806,6 +839,17 @@ export var connectSlice = createSlice({
|
|
|
806
839
|
},
|
|
807
840
|
extraReducers: function (builder) {
|
|
808
841
|
builder
|
|
842
|
+
.addCase(verifyLeadToken.pending, function (state) {
|
|
843
|
+
state.customLoading = true;
|
|
844
|
+
state.error = null;
|
|
845
|
+
})
|
|
846
|
+
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
847
|
+
state.customLoading = false;
|
|
848
|
+
})
|
|
849
|
+
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
850
|
+
state.customLoading = false;
|
|
851
|
+
state.error = action.error.message;
|
|
852
|
+
})
|
|
809
853
|
.addCase(retrieveLeadIdentityByIdAsync.pending, function (state) {
|
|
810
854
|
state.error = null;
|
|
811
855
|
state.customLoading = true;
|
|
@@ -36,7 +36,7 @@ import { alpha, styled } from '@mui/material/styles';
|
|
|
36
36
|
import InfoIcon from '@mui/icons-material/Info';
|
|
37
37
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
38
38
|
import Text from '../../../../components/Text';
|
|
39
|
-
import
|
|
39
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
40
40
|
import Tooltip from '../../../../components/Tooltip';
|
|
41
41
|
import { useTranslation } from 'react-i18next';
|
|
42
42
|
import { useController, useFormContext } from 'react-hook-form';
|
|
@@ -57,13 +57,10 @@ export var MandatoryStyled = styled('span')(function (_a) {
|
|
|
57
57
|
var theme = _a.theme;
|
|
58
58
|
return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
|
|
59
59
|
});
|
|
60
|
-
var InputStyled = styled(
|
|
61
|
-
var theme = _a.theme
|
|
60
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
61
|
+
var theme = _a.theme;
|
|
62
62
|
return ({
|
|
63
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
64
|
-
'& .MuiInputBase-input': {
|
|
65
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
66
|
-
}
|
|
63
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
67
64
|
});
|
|
68
65
|
});
|
|
69
66
|
export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
@@ -31,7 +31,7 @@ import Text from '../../../../components/Text';
|
|
|
31
31
|
import Collapse from '../../../../components/Collapse';
|
|
32
32
|
import Tooltip from '../../../../components/Tooltip';
|
|
33
33
|
import SimpleList from '../../../../components/SimpleList';
|
|
34
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
35
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
36
36
|
import { brandSelector, clearError } from '../../../app/brand/brandStore';
|
|
37
37
|
import Search from '../../../shared/Search';
|
|
@@ -46,13 +46,10 @@ export var BaseLabelStyled = styled(Text)(function (_a) {
|
|
|
46
46
|
var theme = _a.theme;
|
|
47
47
|
return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
48
48
|
});
|
|
49
|
-
var InputStyled = styled(
|
|
50
|
-
var theme = _a.theme
|
|
49
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
50
|
+
var theme = _a.theme;
|
|
51
51
|
return ({
|
|
52
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
53
|
-
'& .MuiInputBase-input': {
|
|
54
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
55
|
-
}
|
|
52
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
56
53
|
});
|
|
57
54
|
});
|
|
58
55
|
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
@@ -31,17 +31,14 @@ import SimpleList from '../../../../components/SimpleList';
|
|
|
31
31
|
import Collapse from '../../../../components/Collapse';
|
|
32
32
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
33
33
|
import { brandSelector, clearError } from '../../../app/brand/brandStore';
|
|
34
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
import { InputLabelStyled, NameContainer } from './CustomerBase';
|
|
38
|
-
var InputStyled = styled(
|
|
39
|
-
var theme = _a.theme
|
|
38
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
39
|
+
var theme = _a.theme;
|
|
40
40
|
return ({
|
|
41
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
42
|
-
'& .MuiInputBase-input': {
|
|
43
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
44
|
-
}
|
|
41
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
45
42
|
});
|
|
46
43
|
});
|
|
47
44
|
var ListItemContainer = styled(Box)(function (_a) {
|
|
@@ -24,17 +24,14 @@ import ExpandIcon from '../../../../components/ExpandIcon';
|
|
|
24
24
|
import { brandSelector, clearError } from '../../../app/brand/brandStore';
|
|
25
25
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
26
26
|
import Search from '../../../shared/Search';
|
|
27
|
-
import
|
|
27
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
28
28
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
29
29
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
30
30
|
import { InputLabelStyled, NameContainer } from './CustomerBase';
|
|
31
|
-
var InputStyled = styled(
|
|
32
|
-
var theme = _a.theme
|
|
31
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
32
|
+
var theme = _a.theme;
|
|
33
33
|
return ({
|
|
34
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
35
|
-
'& .MuiInputBase-input': {
|
|
36
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
37
|
-
}
|
|
34
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
38
35
|
});
|
|
39
36
|
});
|
|
40
37
|
var ListItem = styled(Box)(function (_a) {
|
|
@@ -21,17 +21,9 @@ import Text from '../../../../components/Text';
|
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
23
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import
|
|
24
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
25
25
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
26
|
import { brandSelector } from '../../../app/brand/brandStore';
|
|
27
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
28
|
-
var readOnly = _a.readOnly;
|
|
29
|
-
return ({
|
|
30
|
-
'& .MuiInputBase-input': {
|
|
31
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
27
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
36
28
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
37
29
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
@@ -69,7 +61,7 @@ var Segments = function (_a) {
|
|
|
69
61
|
onCloseList();
|
|
70
62
|
segmentControl.field.onChange(segment);
|
|
71
63
|
};
|
|
72
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(
|
|
64
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_any_segment'), value: (isAr ? (_c = segment === null || segment === void 0 ? void 0 : segment.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
65
|
var _a, _b;
|
|
74
66
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
75
67
|
} }) }))] })) })));
|
|
@@ -21,17 +21,9 @@ import Collapse from '../../../../components/Collapse';
|
|
|
21
21
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
22
22
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
23
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import
|
|
24
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
25
25
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
26
|
import { brandSelector } from '../../../app/brand/brandStore';
|
|
27
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
28
|
-
var readOnly = _a.readOnly;
|
|
29
|
-
return ({
|
|
30
|
-
'& .MuiInputBase-input': {
|
|
31
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
27
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
36
28
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
37
29
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
@@ -69,7 +61,7 @@ var TeamSize = function (_a) {
|
|
|
69
61
|
onCloseList();
|
|
70
62
|
teamSizeControl.field.onChange(teamSize);
|
|
71
63
|
};
|
|
72
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(
|
|
64
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('team_size_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_team_size'), value: (isAr ? (_c = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: teamSizeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
65
|
var _a, _b;
|
|
74
66
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
75
67
|
} }) }))] })) })));
|
|
@@ -32,21 +32,24 @@ import Text from '../../../../components/Text';
|
|
|
32
32
|
import { isExist, groupSectionWithSelectedActivitiesAtBeginning, hasVerifiedValue, filterActivitiesByName } from '../../../../utils';
|
|
33
33
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
34
34
|
import Search from '../../../shared/Search';
|
|
35
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
36
|
import Input from '../../../shared/Input';
|
|
36
37
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
37
38
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
38
|
-
var InputStyled = styled(
|
|
39
|
-
var theme = _a.theme
|
|
39
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
40
|
+
var theme = _a.theme;
|
|
40
41
|
return ({
|
|
41
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
42
|
-
'& .MuiInputBase-input': {
|
|
43
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
44
|
-
}
|
|
42
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
45
43
|
});
|
|
46
44
|
});
|
|
47
|
-
var SelectedInputStyled = styled(
|
|
48
|
-
var anchorEl = _a.anchorEl;
|
|
45
|
+
var SelectedInputStyled = styled(Input, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
46
|
+
var theme = _a.theme, anchorEl = _a.anchorEl, readOnly = _a.readOnly;
|
|
49
47
|
return ({
|
|
48
|
+
paddingInlineEnd: theme.spacing(2.5),
|
|
49
|
+
'& .MuiInputBase-input': {
|
|
50
|
+
cursor: readOnly ? 'default' : 'pointer',
|
|
51
|
+
WebkitTextFillColor: 'inherit'
|
|
52
|
+
},
|
|
50
53
|
'&.MuiInputBase-root': {
|
|
51
54
|
'&.MuiInput-root': __assign({ borderTop: 'none' }, (!anchorEl && {
|
|
52
55
|
borderBottom: 'none'
|
|
@@ -29,7 +29,7 @@ import { styled } from '@mui/material/styles';
|
|
|
29
29
|
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
30
30
|
import { BusinessType } from '../../../../@types';
|
|
31
31
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import
|
|
32
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
35
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
@@ -39,13 +39,10 @@ import Collapse from '../../../../components/Collapse';
|
|
|
39
39
|
import { isKW, isOtherLicense } from '../../../../utils';
|
|
40
40
|
import { settingsSelector } from '../../../../app/settings';
|
|
41
41
|
import { OTHER_CR_LICENSE } from '../../../../constants';
|
|
42
|
-
var InputStyled = styled(
|
|
42
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
44
|
return ({
|
|
45
|
-
marginBottom: theme.spacing(2.5)
|
|
46
|
-
'& .MuiInputBase-input': {
|
|
47
|
-
cursor: 'pointer'
|
|
48
|
-
}
|
|
45
|
+
marginBottom: theme.spacing(2.5)
|
|
49
46
|
});
|
|
50
47
|
});
|
|
51
48
|
var LicenseContainer = styled(Box)(function () { return ({
|
|
@@ -29,7 +29,7 @@ import { styled } from '@mui/material/styles';
|
|
|
29
29
|
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
30
30
|
import { BusinessType } from '../../../../@types';
|
|
31
31
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import
|
|
32
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
35
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
@@ -39,13 +39,10 @@ import Collapse from '../../../../components/Collapse';
|
|
|
39
39
|
import { isOtherLicense, isSA } from '../../../../utils';
|
|
40
40
|
import { OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../../constants';
|
|
41
41
|
import { settingsSelector } from '../../../../app/settings';
|
|
42
|
-
var InputStyled = styled(
|
|
42
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
44
|
return ({
|
|
45
|
-
marginBottom: theme.spacing(2.5)
|
|
46
|
-
'& .MuiInputBase-input': {
|
|
47
|
-
cursor: 'pointer'
|
|
48
|
-
}
|
|
45
|
+
marginBottom: theme.spacing(2.5)
|
|
49
46
|
});
|
|
50
47
|
});
|
|
51
48
|
var LicenseContainer = styled(Box)(function () { return ({
|
|
@@ -32,7 +32,7 @@ import Text from '../../../../components/Text';
|
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
35
|
-
import
|
|
35
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
36
36
|
import Tooltip from '../../../../components/Tooltip';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
38
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
@@ -73,13 +73,10 @@ export var BaseLabelStyled = styled(Text)(function (_a) {
|
|
|
73
73
|
var theme = _a.theme;
|
|
74
74
|
return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
75
75
|
});
|
|
76
|
-
var InputStyled = styled(
|
|
77
|
-
var theme = _a.theme
|
|
76
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
77
|
+
var theme = _a.theme;
|
|
78
78
|
return ({
|
|
79
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
80
|
-
'& .MuiInputBase-input': {
|
|
81
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
82
|
-
}
|
|
79
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
83
80
|
});
|
|
84
81
|
});
|
|
85
82
|
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
@@ -35,14 +35,11 @@ import { InputLabelStyled, NameContainer } from './CustomerLocations';
|
|
|
35
35
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
import Search from '../../../shared/Search';
|
|
38
|
-
import
|
|
39
|
-
var InputStyled = styled(
|
|
40
|
-
var theme = _a.theme
|
|
38
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
39
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
40
|
+
var theme = _a.theme;
|
|
41
41
|
return ({
|
|
42
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
42
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
46
43
|
});
|
|
47
44
|
});
|
|
48
45
|
var ListItemContainer = styled(Box)(function (_a) {
|
|
@@ -24,16 +24,13 @@ import { businessSelector, clearError } from '../../../app/business/businessStor
|
|
|
24
24
|
import { findCurrencyByIso2, isExist } from '../../../../utils';
|
|
25
25
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
26
26
|
import Search from '../../../shared/Search';
|
|
27
|
-
import
|
|
27
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
28
28
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
29
29
|
import { InputLabelStyled, NameContainer } from './CustomerLocations';
|
|
30
|
-
var InputStyled = styled(
|
|
31
|
-
var theme = _a.theme
|
|
30
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
31
|
+
var theme = _a.theme;
|
|
32
32
|
return ({
|
|
33
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
34
|
-
'& .MuiInputBase-input': {
|
|
35
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
36
|
-
}
|
|
33
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
37
34
|
});
|
|
38
35
|
});
|
|
39
36
|
var ListItem = styled(Box)(function (_a) {
|
|
@@ -58,6 +58,7 @@ var Connect = memo(function (props) {
|
|
|
58
58
|
event_value: (_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2
|
|
59
59
|
});
|
|
60
60
|
sendCustomDimension({
|
|
61
|
+
event: 'PageView',
|
|
61
62
|
website_country: (_c = data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2
|
|
62
63
|
});
|
|
63
64
|
}
|
|
@@ -29,18 +29,13 @@ import Box from '@mui/material/Box';
|
|
|
29
29
|
import { styled } from '@mui/material/styles';
|
|
30
30
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
31
31
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import
|
|
32
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
35
|
import Text from '../../../../components/Text';
|
|
36
36
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
37
|
import Collapse from '../../../../components/Collapse';
|
|
38
38
|
import { mapSalesChannel } from '../../../../utils';
|
|
39
|
-
var InputStyled = styled(Input)(function () { return ({
|
|
40
|
-
'& .MuiInputBase-input': {
|
|
41
|
-
cursor: 'pointer'
|
|
42
|
-
}
|
|
43
|
-
}); });
|
|
44
39
|
var BrandContainer = styled(Box)(function () { return ({
|
|
45
40
|
display: 'flex'
|
|
46
41
|
}); });
|
|
@@ -99,7 +94,7 @@ var BrandList = function (_a) {
|
|
|
99
94
|
}), { shouldValidate: true });
|
|
100
95
|
onCloseBrandList();
|
|
101
96
|
};
|
|
102
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(
|
|
97
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputSelect, { label: t('select_brand_label'), onClick: !!anchorEl ? onCloseBrandList : onOpenBrandList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_brand'), value: t(getBrandName(selectedBrand)) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'id', space: 140, list: list, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
103
98
|
return (_jsxs(_Fragment, { children: [_jsx(BrandContainer, { children: _jsx(BrandNameText, __assign({ isSelected: getBrandId(item) === getBrandId(selectedBrand) }, { children: isOtherBrand(item) ? t(getBrandName(item)) : getBrandName(item) })) }), getBrandId(item) === getBrandId(selectedBrand) && _jsx(CheckIcon, {})] }));
|
|
104
99
|
} }) }))] }) })));
|
|
105
100
|
};
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
13
13
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
14
14
|
import Collapse from '../../../../components/Collapse';
|
|
15
15
|
import { ScreenContainer } from '../../../../features/shared/Containers';
|
|
16
|
-
import
|
|
16
|
+
import InputSelect from '../../../../features/shared/InputSelect';
|
|
17
17
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
@@ -24,11 +24,6 @@ import CheckIcon from '../../../shared/CheckIcon';
|
|
|
24
24
|
import Box from '@mui/material/Box';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
26
|
import Text from '../../../../components/Text';
|
|
27
|
-
var InputStyled = styled(Input)(function () { return ({
|
|
28
|
-
'& .MuiInputBase-input': {
|
|
29
|
-
cursor: 'pointer'
|
|
30
|
-
}
|
|
31
|
-
}); });
|
|
32
27
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
33
28
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
34
29
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
@@ -63,7 +58,7 @@ var Segments = function (_a) {
|
|
|
63
58
|
onCloseList();
|
|
64
59
|
segmentControl.field.onChange(segment);
|
|
65
60
|
};
|
|
66
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(
|
|
61
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
67
62
|
var _a, _b;
|
|
68
63
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
69
64
|
} }) }))] })) })));
|
|
@@ -22,13 +22,8 @@ import Collapse from '../../../../components/Collapse';
|
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
23
23
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
24
24
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import
|
|
25
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
26
26
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
27
|
-
var InputStyled = styled(Input)(function () { return ({
|
|
28
|
-
'& .MuiInputBase-input': {
|
|
29
|
-
cursor: 'pointer'
|
|
30
|
-
}
|
|
31
|
-
}); });
|
|
32
27
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
33
28
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
34
29
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
@@ -63,7 +58,7 @@ var TeamSize = function (_a) {
|
|
|
63
58
|
onCloseList();
|
|
64
59
|
teamSizeControl.field.onChange(teamSize);
|
|
65
60
|
};
|
|
66
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(
|
|
61
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('team_size_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_team_size'), value: (isAr ? (_d = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: teamSizeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
67
62
|
var _a, _b;
|
|
68
63
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIcon, {})] }));
|
|
69
64
|
} }) }))] })) })));
|
|
@@ -25,13 +25,13 @@ import React, { memo } from 'react';
|
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { FeatureContainer } from '../shared/Containers';
|
|
27
27
|
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useAppDispatch } from '../../hooks';
|
|
28
|
-
import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
|
|
28
|
+
import { handleCurrentActiveScreen, handleLanguage, settingsSelector } from '../../app/settings';
|
|
29
29
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
30
30
|
import { store } from '../../app/store';
|
|
31
|
-
import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard } from '../app/connectExpress/connectExpressStore';
|
|
31
|
+
import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard, verifyLeadToken } from '../app/connectExpress/connectExpressStore';
|
|
32
32
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
33
33
|
import Collapse from '../../components/Collapse';
|
|
34
|
-
import { isKW, findOrCreateElementAndInject } from '../../utils';
|
|
34
|
+
import { isKW, findOrCreateElementAndInject, getParameterByName } from '../../utils';
|
|
35
35
|
import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
|
|
36
36
|
import { connectExpressFeatureScreens } from '../featuresScreens';
|
|
37
37
|
import Background from '../shared/Background';
|
|
@@ -53,10 +53,20 @@ var ConnectExpress = memo(function (_a) {
|
|
|
53
53
|
dispatch(setShowBoard(showBoard));
|
|
54
54
|
}, []);
|
|
55
55
|
React.useEffect(function () {
|
|
56
|
-
if (data.isValidOperator && props.open && !settingLoading
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
if (data.isValidOperator && props.open && !settingLoading) {
|
|
57
|
+
var token = getParameterByName('token');
|
|
58
|
+
if (token) {
|
|
59
|
+
var lang = getParameterByName('lang');
|
|
60
|
+
if (lang)
|
|
61
|
+
dispatch(handleLanguage(lang));
|
|
62
|
+
dispatch(verifyLeadToken({ token: token }));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (leadId) {
|
|
66
|
+
dispatch(setIsLeadIdPassed(true));
|
|
67
|
+
dispatch(setLeadId(leadId));
|
|
68
|
+
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
69
|
+
}
|
|
60
70
|
}
|
|
61
71
|
}, [data.isValidOperator, settingLoading]);
|
|
62
72
|
React.useEffect(function () {
|
|
@@ -36,18 +36,15 @@ import Text from '../../../../components/Text';
|
|
|
36
36
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
37
|
import Collapse from '../../../../components/Collapse';
|
|
38
38
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
39
|
-
import
|
|
39
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
40
40
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
41
41
|
import { connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
|
|
42
42
|
import LicenseNumber from './LicenseNumber';
|
|
43
43
|
import LicenseType from './LicenseType';
|
|
44
|
-
var InputStyled = styled(
|
|
45
|
-
var theme = _a.theme
|
|
44
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
46
|
return ({
|
|
47
|
-
marginBottom: theme.spacing(2.5)
|
|
48
|
-
'& .MuiInputBase-input': {
|
|
49
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
50
|
-
}
|
|
47
|
+
marginBottom: theme.spacing(2.5)
|
|
51
48
|
});
|
|
52
49
|
});
|
|
53
50
|
var LicenseContainer = styled(Box)(function () { return ({
|
|
@@ -33,20 +33,23 @@ import { isExist, groupSectionWithSelectedActivitiesAtBeginning, hasVerifiedValu
|
|
|
33
33
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
34
34
|
import Search from '../../../shared/Search';
|
|
35
35
|
import Input from '../../../shared/Input';
|
|
36
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
36
37
|
import { entitySelector } from '../../../app/entity/entityStore';
|
|
37
38
|
import CheckIcon from '../../../../features/shared/CheckIcon';
|
|
38
|
-
var InputStyled = styled(
|
|
39
|
-
var theme = _a.theme
|
|
39
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
40
|
+
var theme = _a.theme;
|
|
40
41
|
return ({
|
|
41
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
42
|
-
'& .MuiInputBase-input': {
|
|
43
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
44
|
-
}
|
|
42
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
45
43
|
});
|
|
46
44
|
});
|
|
47
|
-
var SelectedInputStyled = styled(
|
|
48
|
-
var anchorEl = _a.anchorEl;
|
|
45
|
+
var SelectedInputStyled = styled(Input, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
46
|
+
var theme = _a.theme, anchorEl = _a.anchorEl, readOnly = _a.readOnly;
|
|
49
47
|
return ({
|
|
48
|
+
paddingInlineEnd: theme.spacing(2.5),
|
|
49
|
+
'& .MuiInputBase-input': {
|
|
50
|
+
cursor: readOnly ? 'default' : 'pointer',
|
|
51
|
+
WebkitTextFillColor: 'inherit'
|
|
52
|
+
},
|
|
50
53
|
'&.MuiInputBase-root': {
|
|
51
54
|
'&.MuiInput-root': __assign({ borderTop: 'none' }, (!anchorEl && {
|
|
52
55
|
borderBottom: 'none'
|
|
@@ -22,7 +22,7 @@ import Text from '../../../../components/Text';
|
|
|
22
22
|
import Collapse from '../../../../components/Collapse';
|
|
23
23
|
import SimpleList from '../../../../components/SimpleList';
|
|
24
24
|
import { hasVerifiedValue, removeAllOtherThanAlphabet } from '../../../../utils';
|
|
25
|
-
import
|
|
25
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
26
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
27
27
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
28
28
|
import Search from '../../../shared/Search';
|
|
@@ -33,13 +33,10 @@ export var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
33
33
|
var theme = _a.theme;
|
|
34
34
|
return (__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
|
|
35
35
|
});
|
|
36
|
-
var InputStyled = styled(
|
|
37
|
-
var theme = _a.theme
|
|
36
|
+
var InputStyled = styled(InputSelect)(function (_a) {
|
|
37
|
+
var theme = _a.theme;
|
|
38
38
|
return ({
|
|
39
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
40
|
-
'& .MuiInputBase-input': {
|
|
41
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
42
|
-
}
|
|
39
|
+
paddingInlineEnd: theme.spacing(2.5)
|
|
43
40
|
});
|
|
44
41
|
});
|
|
45
42
|
export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
@@ -22,21 +22,13 @@ import Collapse from '../../../../components/Collapse';
|
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
23
23
|
import SimpleList from '../../../../components/SimpleList';
|
|
24
24
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
25
|
-
import
|
|
25
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
26
26
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
27
27
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
28
28
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
29
29
|
var Container = styled(Box)(function () { return ({
|
|
30
30
|
display: 'flex'
|
|
31
31
|
}); });
|
|
32
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
33
|
-
var readOnly = _a.readOnly;
|
|
34
|
-
return ({
|
|
35
|
-
'& .MuiInputBase-input': {
|
|
36
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
32
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
41
33
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
42
34
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -88,7 +80,7 @@ var MonthlyIncome = function (props) {
|
|
|
88
80
|
};
|
|
89
81
|
var income = monthlyIncomeControl.field.value;
|
|
90
82
|
var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
91
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(
|
|
83
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: t('please_enter_actual_income', {
|
|
92
84
|
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
93
85
|
}), readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
94
86
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIcon, { isVerified: isMonthlyIncomeVerified(item) })] }));
|
|
@@ -20,21 +20,13 @@ import Text from '../../../../components/Text';
|
|
|
20
20
|
import SimpleList from '../../../../components/SimpleList';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
23
|
-
import
|
|
23
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
24
24
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
25
25
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
26
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
27
27
|
var Container = styled(Box)(function () { return ({
|
|
28
28
|
display: 'flex'
|
|
29
29
|
}); });
|
|
30
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
31
|
-
var readOnly = _a.readOnly;
|
|
32
|
-
return ({
|
|
33
|
-
'& .MuiInputBase-input': {
|
|
34
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
30
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
39
31
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
40
32
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -75,7 +67,7 @@ var Occupation = function (props) {
|
|
|
75
67
|
};
|
|
76
68
|
var occupation = occupationControl.field.value;
|
|
77
69
|
var error = (_b = occupationControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
78
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(
|
|
70
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputSelect, { required: true, label: t('occupation_title'), readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { isVerified: props.isVerified, anchorEl: anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name.ar : occupation === null || occupation === void 0 ? void 0 : occupation.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
79
71
|
var _a, _b;
|
|
80
72
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) }), item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) && _jsx(CheckIcon, { isVerified: props.isVerified })] }));
|
|
81
73
|
} }) }))] })) })));
|
|
@@ -22,17 +22,9 @@ import Collapse from '../../../../components/Collapse';
|
|
|
22
22
|
import SimpleList from '../../../../components/SimpleList';
|
|
23
23
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
24
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
-
import
|
|
25
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
26
26
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
27
27
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
28
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
29
|
-
var readOnly = _a.readOnly;
|
|
30
|
-
return ({
|
|
31
|
-
'& .MuiInputBase-input': {
|
|
32
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
28
|
var Container = styled(Box)(function () { return ({
|
|
37
29
|
display: 'flex'
|
|
38
30
|
}); });
|
|
@@ -82,7 +74,7 @@ var SourceOfIncome = function (props) {
|
|
|
82
74
|
};
|
|
83
75
|
var source = sourceIncomeControl.field.value;
|
|
84
76
|
var error = (_b = sourceIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
85
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(
|
|
77
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputSelect, { required: true, label: t('tap_js_source_of_income'), readOnly: props.readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', warningMessage: error && t(error), endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isSourceIncomeVerified(source), anchorEl: anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
86
78
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIcon, { isVerified: isSourceIncomeVerified(item) })] }));
|
|
87
79
|
} }) }))] })) })));
|
|
88
80
|
};
|
|
@@ -30,21 +30,13 @@ import Collapse from '../../../../components/Collapse';
|
|
|
30
30
|
import Text from '../../../../components/Text';
|
|
31
31
|
import SimpleList from '../../../../components/SimpleList';
|
|
32
32
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
33
|
-
import
|
|
33
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
34
34
|
import { getCityList, individualSelector } from '../../../app/individual/individualStore';
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -104,7 +96,7 @@ var BirthCity = React.forwardRef(function (_a, ref) {
|
|
|
104
96
|
var _a, _b;
|
|
105
97
|
return isAr ? (_a = city === null || city === void 0 ? void 0 : city.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = city === null || city === void 0 ? void 0 : city.name) === null || _b === void 0 ? void 0 : _b.en;
|
|
106
98
|
};
|
|
107
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
99
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('place_birth_city_label'), readOnly: readOnly, placeholder: t('choose_place_birth_city'), value: getName(cityValue) || '', warningMessage: error && t(error), onClick: cityLoading ? undefined : !!anchorEl ? function () { return onCloseCitySelect(); } : onOpenCitySelect, endAdornment: cityLoading ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : (_jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified })) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en'], list: locationCities, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
108
100
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) }, { children: getName(item) })) }), item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
109
101
|
} }) }))] })) })));
|
|
110
102
|
});
|
|
@@ -31,20 +31,12 @@ import Collapse from '../../../../components/Collapse';
|
|
|
31
31
|
import Text from '../../../../components/Text';
|
|
32
32
|
import SimpleList from '../../../../components/SimpleList';
|
|
33
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -77,7 +69,7 @@ var BirthCountry = React.forwardRef(function (_a, ref) {
|
|
|
77
69
|
};
|
|
78
70
|
var location = placeOfBirthCountryControl.field.value;
|
|
79
71
|
var error = (_b = placeOfBirthCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
80
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('place_of_birth_country_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_place_of_birth_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
81
73
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
82
74
|
} }) }))] })) })));
|
|
83
75
|
});
|
|
@@ -31,20 +31,12 @@ import Collapse from '../../../../components/Collapse';
|
|
|
31
31
|
import Text from '../../../../components/Text';
|
|
32
32
|
import SimpleList from '../../../../components/SimpleList';
|
|
33
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -77,7 +69,7 @@ var IssuedCountry = React.forwardRef(function (_a, ref) {
|
|
|
77
69
|
};
|
|
78
70
|
var location = issuedCountryControl.field.value;
|
|
79
71
|
var error = (_b = issuedCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
80
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('issued_country_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_issued_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
81
73
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
82
74
|
} }) }))] })) })));
|
|
83
75
|
});
|
|
@@ -31,20 +31,12 @@ import Collapse from '../../../../components/Collapse';
|
|
|
31
31
|
import Text from '../../../../components/Text';
|
|
32
32
|
import SimpleList from '../../../../components/SimpleList';
|
|
33
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
35
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
@@ -77,7 +69,7 @@ var Nationality = React.forwardRef(function (_a, ref) {
|
|
|
77
69
|
};
|
|
78
70
|
var location = nationalityControl.field.value;
|
|
79
71
|
var error = (_b = nationalityControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
80
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('nationality_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_nationality'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
81
73
|
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
82
74
|
} }) }))] })) })));
|
|
83
75
|
});
|
|
@@ -19,10 +19,9 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
|
|
|
19
19
|
hide?: boolean | undefined;
|
|
20
20
|
warningType?: "alert" | "error" | "hint" | undefined;
|
|
21
21
|
} & {} & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
22
|
-
interface
|
|
22
|
+
export interface CustomInputProps extends InputProps {
|
|
23
23
|
label?: string;
|
|
24
24
|
required?: boolean;
|
|
25
25
|
labelSx?: SxProps<Theme>;
|
|
26
26
|
}
|
|
27
|
-
export default function CustomInput({ label, required, placeholder, labelSx, ...props }:
|
|
28
|
-
export {};
|
|
27
|
+
export default function CustomInput({ label, required, placeholder, labelSx, ...props }: CustomInputProps): JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomInputProps } from '../Input';
|
|
3
|
+
export declare const InputStyled: import("@emotion/styled").StyledComponent<CustomInputProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
4
|
+
export default function InputSelect(props: CustomInputProps): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import Input from '../Input';
|
|
15
|
+
2;
|
|
16
|
+
export var InputStyled = styled(Input)(function (_a) {
|
|
17
|
+
var readOnly = _a.readOnly;
|
|
18
|
+
return ({
|
|
19
|
+
'& .MuiInputBase-input': {
|
|
20
|
+
cursor: readOnly ? 'default' : 'pointer',
|
|
21
|
+
WebkitTextFillColor: 'inherit'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
export default function InputSelect(props) {
|
|
26
|
+
return _jsx(InputStyled, __assign({ disabled: true }, props));
|
|
27
|
+
}
|