@tap-payments/auth-jsconnect 2.8.58-development → 2.8.59-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +0 -1
- package/build/@types/form.d.ts +0 -1
- package/build/@types/redux.d.ts +0 -1
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +4 -12
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +2 -0
- package/build/constants/app.js +2 -0
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +165 -184
- package/build/features/app/board/boardStore.js +30 -52
- package/build/features/app/brand/brandStore.d.ts +33 -16
- package/build/features/app/brand/brandStore.js +242 -239
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +87 -76
- package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
- package/build/features/app/connectExpress/connectExpressStore.js +52 -110
- package/build/features/app/entity/entityStore.d.ts +36 -20
- package/build/features/app/entity/entityStore.js +246 -196
- package/build/features/app/individual/individualStore.d.ts +38 -22
- package/build/features/app/individual/individualStore.js +266 -263
- package/build/features/app/password/passwordStore.d.ts +23 -40
- package/build/features/app/password/passwordStore.js +233 -226
- package/build/features/app/tax/taxStore.d.ts +7 -13
- package/build/features/app/tax/taxStore.js +147 -168
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +26 -4
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/bank/Bank.d.ts +0 -1
- package/build/features/bank/Bank.js +4 -7
- package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/bank/screens/Verify/Verify.js +5 -5
- package/build/features/board/Board.js +4 -8
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
- package/build/features/brand/Brand.d.ts +0 -1
- package/build/features/brand/Brand.js +4 -7
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +35 -8
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +18 -5
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +7 -2
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/brand/screens/Verify/Verify.js +1 -1
- package/build/features/business/Business.js +4 -9
- package/build/features/business/screens/Activities/Activities.js +3 -12
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -10
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +26 -4
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +36 -9
- package/build/features/business/screens/Customers/Customers.js +3 -12
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +18 -5
- package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -13
- package/build/features/business/screens/Verify/Verify.js +3 -13
- package/build/features/connect/Connect.js +2 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +1 -3
- package/build/features/connect/screens/Individual/Individual.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +8 -11
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +1 -2
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
- package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +26 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +7 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
- package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NID/TAC.d.ts +7 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/entity/Entity.d.ts +0 -1
- package/build/features/entity/Entity.js +4 -7
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
- package/build/features/entity/screens/EntityName/EntityName.js +15 -32
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +35 -8
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +7 -67
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +26 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
- package/build/features/individual/screens/IndividualList/Email.js +2 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
- package/build/features/individual/screens/IndividualList/UserList.js +9 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +26 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/individual/screens/Verify/Verify.js +1 -1
- package/build/features/password/Password.d.ts +0 -1
- package/build/features/password/Password.js +28 -75
- package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Address/CountryList.d.ts +23 -7
- package/build/features/shared/Address/InputSelect.d.ts +23 -7
- package/build/features/shared/Button/FlowsButtons.js +3 -13
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
- package/build/features/shared/UploadFile/FileUpload.d.ts +7 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +7 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +7 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +7 -2
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +7 -2
- package/build/features/signIn/SignIn.js +3 -12
- package/build/features/tax/Tax.d.ts +0 -1
- package/build/features/tax/Tax.js +4 -7
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/useVerifyToken.d.ts +2 -5
- package/build/hooks/useVerifyToken.js +5 -10
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +1 -2
- package/build/utils/string.d.ts +2 -5
- package/build/utils/string.js +5 -34
- package/package.json +2 -2
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
- package/build/features/bank/screens/OperatorError/index.js +0 -2
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/board/screens/OperatorError/index.d.ts +0 -3
- package/build/features/board/screens/OperatorError/index.js +0 -2
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
- package/build/features/brand/screens/OperatorError/index.js +0 -2
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/business/screens/OperatorError/index.d.ts +0 -3
- package/build/features/business/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -9
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
- package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
- package/build/features/entity/screens/OperatorError/index.js +0 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
- package/build/features/individual/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/password/screens/OperatorError/index.d.ts +0 -3
- package/build/features/password/screens/OperatorError/index.js +0 -2
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
- package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
- package/build/features/signIn/screens/OperatorError/index.js +0 -2
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
- package/build/features/tax/screens/OperatorError/index.js +0 -2
- package/build/hooks/useFormDirtyCheck.d.ts +0 -10
- package/build/hooks/useFormDirtyCheck.js +0 -66
|
@@ -29,7 +29,6 @@ import BrandList from './BrandList';
|
|
|
29
29
|
import EntityList from './EntityList';
|
|
30
30
|
import LicenseNumber from './LicenseNumber';
|
|
31
31
|
import EntityLegalName from './EntityLegalName';
|
|
32
|
-
import LicenseType from './EntityLicenseType';
|
|
33
32
|
var ListType;
|
|
34
33
|
(function (ListType) {
|
|
35
34
|
ListType["BrandList"] = "BrandList";
|
|
@@ -65,8 +64,7 @@ var AuthenticationList = function (_a) {
|
|
|
65
64
|
var dispatch = useAppDispatch();
|
|
66
65
|
var onSubmit = function (formData) {
|
|
67
66
|
if (isAddEntity) {
|
|
68
|
-
var
|
|
69
|
-
var data_1 = { licenseNumber: licenseNumber, legalName: legalName, brandInfo: brandInfo_1, licenseType: licenseType };
|
|
67
|
+
var data_1 = { licenseNumber: formData.licenseNumber, legalName: formData.legalName, brandInfo: formData.brandInfo };
|
|
70
68
|
dispatch(createEntity(deepCopy(data_1)));
|
|
71
69
|
return;
|
|
72
70
|
}
|
|
@@ -78,7 +76,6 @@ var AuthenticationList = function (_a) {
|
|
|
78
76
|
setIsAddEntity(false);
|
|
79
77
|
methods.setValue('licenseNumber', '');
|
|
80
78
|
methods.setValue('legalName', '');
|
|
81
|
-
methods.setValue('licenseType', '');
|
|
82
79
|
methods.setValue('entityInfo', undefined, { shouldValidate: true });
|
|
83
80
|
return;
|
|
84
81
|
}
|
|
@@ -99,6 +96,6 @@ var AuthenticationList = function (_a) {
|
|
|
99
96
|
};
|
|
100
97
|
var isBrandList = listActive === ListType.BrandList;
|
|
101
98
|
var isEntityList = listActive === ListType.EntityList;
|
|
102
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { list: brandList || [], show: !isAddEntity && !isEntityList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityList, { countryList: settingsData.countries || [], show: !isBrandList, handleAddEntity: function (flag) { return setIsAddEntity(flag); }, onListOpen: function () { return handleMenuClick(ListType.EntityList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAddEntity && !isBrandList && !isEntityList }, { children: [_jsx(EntityLegalName, {}), _jsx(
|
|
99
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { list: brandList || [], show: !isAddEntity && !isEntityList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityList, { countryList: settingsData.countries || [], show: !isBrandList, handleAddEntity: function (flag) { return setIsAddEntity(flag); }, onListOpen: function () { return handleMenuClick(ListType.EntityList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAddEntity && !isBrandList && !isEntityList }, { children: [_jsx(EntityLegalName, {}), _jsx(LicenseNumber, {})] })), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: isAddEntity ? t('create_new_entity') : t('next') })) }))] })) })) }));
|
|
103
100
|
};
|
|
104
101
|
export default React.memo(AuthenticationList);
|
|
@@ -81,7 +81,6 @@ var EntityList = function (_a) {
|
|
|
81
81
|
if (filteredEntityList.length) {
|
|
82
82
|
setValue('entityInfo', filteredEntityList[0], { shouldValidate: true });
|
|
83
83
|
setValue('licenseNumber', '');
|
|
84
|
-
setValue('licenseType', '');
|
|
85
84
|
setValue('legalName', '');
|
|
86
85
|
handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(false);
|
|
87
86
|
}
|
|
@@ -122,12 +121,8 @@ var EntityList = function (_a) {
|
|
|
122
121
|
selectedEntityControl.field.onChange(entity);
|
|
123
122
|
if (entity.id === ADD_ENTITY)
|
|
124
123
|
handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(true);
|
|
125
|
-
else
|
|
126
|
-
setValue('licenseNumber', '');
|
|
127
|
-
setValue('legalName', '');
|
|
128
|
-
setValue('licenseType', '');
|
|
124
|
+
else
|
|
129
125
|
handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(false);
|
|
130
|
-
}
|
|
131
126
|
onCloseEntityList();
|
|
132
127
|
};
|
|
133
128
|
var selectedEntity = selectedEntityControl.field.value;
|
|
@@ -3,18 +3,15 @@ export declare const AuthenticationListValidationSchema: yup.ObjectSchema<import
|
|
|
3
3
|
brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
4
4
|
entityInfo: any;
|
|
5
5
|
licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
-
licenseType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
7
6
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
7
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
8
|
brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
10
9
|
entityInfo: any;
|
|
11
10
|
licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
12
|
-
licenseType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
13
11
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
14
12
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
13
|
brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
16
14
|
entityInfo: any;
|
|
17
15
|
licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
18
|
-
licenseType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
19
16
|
legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
20
17
|
}>>>;
|
|
@@ -34,16 +34,6 @@ export var AuthenticationListValidationSchema = yup.object().shape({
|
|
|
34
34
|
.required('');
|
|
35
35
|
})
|
|
36
36
|
.required(''),
|
|
37
|
-
licenseType: yup
|
|
38
|
-
.string()
|
|
39
|
-
.when('entityInfo', function (entityInfo) {
|
|
40
|
-
var isAddEntity = (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id) === ADD_ENTITY;
|
|
41
|
-
if (!isAddEntity) {
|
|
42
|
-
return yup.string().optional();
|
|
43
|
-
}
|
|
44
|
-
return yup.string().required('choose_license_type');
|
|
45
|
-
})
|
|
46
|
-
.required(''),
|
|
47
37
|
legalName: yup
|
|
48
38
|
.string()
|
|
49
39
|
.when('entityInfo', function (entityInfo) {
|
|
@@ -53,7 +53,7 @@ import { ScreenContainer } from '../../../shared/Containers';
|
|
|
53
53
|
import BusinessCountry from '../../../shared/BusinessCountry';
|
|
54
54
|
import Button from '../../../shared/Button';
|
|
55
55
|
import Collapse from '../../../../components/Collapse';
|
|
56
|
-
import { findCountryByIso2, isKW, isOtherThanKWOrSA
|
|
56
|
+
import { findCountryByIso2, isKW, isOtherThanKWOrSA } from '../../../../utils';
|
|
57
57
|
import { handleNextScreenStep, handleSetCountryByIso2, settingsSelector } from '../../../../app/settings';
|
|
58
58
|
import { clearError, connectExpressSelector, setDefaultCountryCode, storeIsStartFromBusinessCountry, updateBusinessCountryAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
59
59
|
var BusinessCountryScreen = function (_a) {
|
|
@@ -81,12 +81,6 @@ var BusinessCountryScreen = function (_a) {
|
|
|
81
81
|
return [2];
|
|
82
82
|
countryCode = findCountryByIso2(settingsData.countries, iso2);
|
|
83
83
|
dispatch(handleSetCountryByIso2(iso2));
|
|
84
|
-
sendCustomEventToGTM({
|
|
85
|
-
event: 'Send Event',
|
|
86
|
-
event_category: 'User Registration Flow',
|
|
87
|
-
event_action: 'Country selection page view',
|
|
88
|
-
event_label: iso2
|
|
89
|
-
});
|
|
90
84
|
if (!data.leadId) return [3, 2];
|
|
91
85
|
return [4, dispatch(updateBusinessCountryAsync(iso2))];
|
|
92
86
|
case 1:
|
|
@@ -89,7 +89,7 @@ var CivilID = function (_a) {
|
|
|
89
89
|
var onBackToCountryList = function () {
|
|
90
90
|
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
91
91
|
};
|
|
92
|
-
var disabled = !methods.formState.isValid;
|
|
92
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
93
93
|
var isLeadIdentityIdAvailable = (_c = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.identification) === null || _c === void 0 ? void 0 : _c.id;
|
|
94
94
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: methods.formState.isValid ? 7.5 : 0, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable && !methods.formState.isValid : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] })) })) }));
|
|
95
95
|
};
|
|
@@ -48,7 +48,7 @@ var CivilID = function (_a) {
|
|
|
48
48
|
var onBack = function () {
|
|
49
49
|
dispatch(handlePrevScreenStep());
|
|
50
50
|
};
|
|
51
|
-
var disabled = !methods.formState.isValid;
|
|
51
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
52
52
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: 5, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBack, disabled: disabled, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
53
53
|
};
|
|
54
54
|
export default React.memo(CivilID);
|
|
@@ -87,7 +87,7 @@ var CollectBusinessInfo = function (_a) {
|
|
|
87
87
|
var onBack = function () {
|
|
88
88
|
dispatch(handlePrevScreenStep());
|
|
89
89
|
};
|
|
90
|
-
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName;
|
|
90
|
+
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
|
|
91
91
|
var disabled = brandErrChecks || brandNameChecking || isBrandNameAvailable == false;
|
|
92
92
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'], show: true, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(LicenseList, { readOnly: readOnly['selectedLicense'], onListOpen: function () {
|
|
93
93
|
setListActive(true);
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<
|
|
2
|
+
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
5
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
|
|
6
|
+
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
7
|
+
htmlColor?: string | undefined;
|
|
8
|
+
inheritViewBox?: boolean | undefined;
|
|
9
|
+
shapeRendering?: string | undefined;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
11
|
+
titleAccess?: string | undefined;
|
|
12
|
+
viewBox?: string | undefined;
|
|
13
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
|
|
3
14
|
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
4
|
-
},
|
|
5
|
-
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<
|
|
15
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
16
|
+
export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
19
|
+
color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
|
|
20
|
+
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
21
|
+
htmlColor?: string | undefined;
|
|
22
|
+
inheritViewBox?: boolean | undefined;
|
|
23
|
+
shapeRendering?: string | undefined;
|
|
24
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
25
|
+
titleAccess?: string | undefined;
|
|
26
|
+
viewBox?: string | undefined;
|
|
27
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
|
|
6
28
|
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
7
|
-
},
|
|
29
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
8
30
|
type LicenseTypeProps = {
|
|
9
31
|
show: boolean;
|
|
10
32
|
readOnly?: boolean;
|
|
@@ -3,9 +3,14 @@ import { BoxProps } from '@mui/material/Box';
|
|
|
3
3
|
interface TACContainerStyledProps extends BoxProps {
|
|
4
4
|
readOnly?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const TACContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").
|
|
6
|
+
export declare const TACContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
component?: React.ElementType<any> | undefined;
|
|
9
|
+
ref?: React.Ref<unknown> | undefined;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
11
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
12
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
},
|
|
13
|
+
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & TACContainerStyledProps, {}, {}>;
|
|
9
14
|
interface TACProps {
|
|
10
15
|
show: boolean;
|
|
11
16
|
readOnly?: boolean;
|
package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js
CHANGED
|
@@ -96,7 +96,7 @@ var CollectIndividualInfo = function (_a) {
|
|
|
96
96
|
}, [responseData]);
|
|
97
97
|
var isLeadEmailAvailable = (contact === null || contact === void 0 ? void 0 : contact.email) === methods.watch('email');
|
|
98
98
|
var isEmailValid = typeof isEmailAvailable === 'undefined' ? isLeadEmailAvailable : isEmailAvailable;
|
|
99
|
-
var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email;
|
|
99
|
+
var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email || !!error;
|
|
100
100
|
var disabled = emailErrChecks || emailChecking || !isEmailValid;
|
|
101
101
|
var emailReadOnly = readOnly['email'] && !((_b = methods.getFieldState('email').error) === null || _b === void 0 ? void 0 : _b.message) && !methods.getFieldState('email').isDirty;
|
|
102
102
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Name, { readOnly: readOnly['name'], show: !listActive }), _jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, onListOpen: function () { return handleMenuListClick(); }, onListClose: function () { return handleMenuListClick(); }, countries: settingsData.countries }), _jsx(Email, { readOnly: emailReadOnly, show: !listActive, fetchingEmail: function (v) { return setEmailChecking(v); }, emailChecking: emailChecking }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
@@ -53,7 +53,6 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
53
53
|
import axios from 'axios';
|
|
54
54
|
import { styled } from '@mui/material/styles';
|
|
55
55
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
56
|
-
import { removeAllOtherThanCharsNumbersAtAndDot } from '../../../../utils';
|
|
57
56
|
import Collapse from '../../../../components/Collapse';
|
|
58
57
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
59
58
|
import Input from '../../../shared/Input';
|
|
@@ -89,8 +88,7 @@ var Email = function (_a) {
|
|
|
89
88
|
});
|
|
90
89
|
}); }, 500);
|
|
91
90
|
var handleEmailChange = function (event) {
|
|
92
|
-
|
|
93
|
-
emailControl.field.onChange(value);
|
|
91
|
+
emailControl.field.onChange(event.target.value);
|
|
94
92
|
};
|
|
95
93
|
React.useEffect(function () {
|
|
96
94
|
var isValid = emailValue && !error && emailValue.length > 3;
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { isNetworkError } from '../../../../utils';
|
|
16
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
5
17
|
import { connectExpressSelector, createAccountAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
6
18
|
import CreateAccountLoading from '../../../shared/CreateAccountLoading';
|
|
19
|
+
import Button from '../../../shared/Button';
|
|
7
20
|
var CreateAccountLoader = function (_a) {
|
|
8
21
|
var dispatch = useAppDispatch();
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
22
|
+
var isAr = useLanguage().isAr;
|
|
23
|
+
var t = useTranslation().t;
|
|
24
|
+
var _b = useAppSelector(connectExpressSelector), error = _b.error, loading = _b.loading;
|
|
12
25
|
React.useEffect(function () {
|
|
13
|
-
dispatch(createAccountAsync(
|
|
26
|
+
dispatch(createAccountAsync());
|
|
14
27
|
}, []);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}, [isNE]);
|
|
22
|
-
return _jsx(CreateAccountLoading, { error: isNE && isRetryCount <= 3 ? '' : error });
|
|
28
|
+
var onReTry = function () {
|
|
29
|
+
dispatch(createAccountAsync());
|
|
30
|
+
};
|
|
31
|
+
var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
|
|
32
|
+
return (_jsx(CreateAccountLoading, __assign({ error: error }, { children: isNE && (_jsx(Button, __assign({ onClick: onReTry, disableBack: true, isAr: isAr, loading: loading }, { children: t('try_again') }))) })));
|
|
23
33
|
};
|
|
24
34
|
export default React.memo(CreateAccountLoader);
|
|
@@ -30,7 +30,7 @@ import MobileNumber from './MobileNumber';
|
|
|
30
30
|
import { PhoneValidationSchema } from './validation';
|
|
31
31
|
import { ICONS_NAMES } from '../../../../constants';
|
|
32
32
|
import TAC from './TAC';
|
|
33
|
-
import { deepCopy
|
|
33
|
+
import { deepCopy } from '../../../../utils';
|
|
34
34
|
var FormStyled = styled(Form)(function () { return ({
|
|
35
35
|
display: 'flex',
|
|
36
36
|
flexDirection: 'column'
|
|
@@ -96,13 +96,6 @@ var Mobile = function (_a) {
|
|
|
96
96
|
};
|
|
97
97
|
var onBack = function () {
|
|
98
98
|
var screen = isKuwait ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP';
|
|
99
|
-
var eventAction = isKuwait ? 'PACI Click' : 'Abser Click';
|
|
100
|
-
sendCustomEventToGTM({
|
|
101
|
-
event: 'Send Event',
|
|
102
|
-
event_category: 'User Registration Flow',
|
|
103
|
-
event_action: eventAction,
|
|
104
|
-
event_label: settingData.businessCountry.iso2
|
|
105
|
-
});
|
|
106
99
|
dispatch(handlePrevScreenStep(screen));
|
|
107
100
|
};
|
|
108
101
|
var onBackToCountryList = function () {
|
|
@@ -116,7 +109,7 @@ var Mobile = function (_a) {
|
|
|
116
109
|
};
|
|
117
110
|
var originalReadOnly = useFormReadOnly(methods);
|
|
118
111
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
119
|
-
var disabled = !methods.formState.isValid;
|
|
112
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
120
113
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, countries: settingData.countries, onListOpen: handleCountryOpen, onListClose: handleCountryClose }) }), _jsxs(Collapse, __assign({ in: !anchor }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: (isLeadIdPassed ? !isLeadIdentityIdAvailable : !methods.formState.isValid) && !isOther }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), isKuwait ? (_jsx(MobileButton, __assign({ disabled: loading, onClick: function () { return onBack(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (_jsx(AbsherButton, __assign({ disabled: loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') })))] }))] }))] })) })) }));
|
|
121
114
|
};
|
|
122
115
|
export default React.memo(Mobile);
|
|
@@ -96,7 +96,7 @@ var NID = function (_a) {
|
|
|
96
96
|
};
|
|
97
97
|
var originalReadOnly = useFormReadOnly(methods);
|
|
98
98
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
99
|
-
var disabled = !methods.formState.isValid;
|
|
99
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
100
100
|
var isLeadIdentityIdAvailable = (_c = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.identification) === null || _c === void 0 ? void 0 : _c.id;
|
|
101
101
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse, readOnly: readOnly['nid'] }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose, readOnly: readOnly['dob'] }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable && !methods.formState.isValid : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] }))] })) })) }));
|
|
102
102
|
};
|
|
@@ -3,9 +3,14 @@ import { BoxProps } from '@mui/material/Box';
|
|
|
3
3
|
interface TACContainerStyledProps extends BoxProps {
|
|
4
4
|
readOnly?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const TACContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").
|
|
6
|
+
export declare const TACContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
component?: React.ElementType<any> | undefined;
|
|
9
|
+
ref?: React.Ref<unknown> | undefined;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
11
|
+
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
12
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
},
|
|
13
|
+
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & TACContainerStyledProps, {}, {}>;
|
|
9
14
|
interface TACProps {
|
|
10
15
|
show: boolean;
|
|
11
16
|
readOnly?: boolean;
|
|
@@ -56,7 +56,7 @@ var NID = function (_a) {
|
|
|
56
56
|
var onBack = function () {
|
|
57
57
|
dispatch(handlePrevScreenStep());
|
|
58
58
|
};
|
|
59
|
-
var disabled = !methods.formState.isValid;
|
|
59
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
60
60
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBack, disabled: disabled, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
61
61
|
};
|
|
62
62
|
export default React.memo(NID);
|
package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js
CHANGED
|
@@ -36,6 +36,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
36
36
|
var name = _a.name;
|
|
37
37
|
return name !== FlowsTypes.PASSWORD;
|
|
38
38
|
}); }, [flows]);
|
|
39
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, loading: loading, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individualsInfo, user: __assign({ names: { en: name } }, user), onClose: isScopeAuthentication ? onClose : undefined,
|
|
39
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, loading: loading, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individualsInfo, user: __assign({ names: { en: name } }, user), onClose: isScopeAuthentication ? onClose : undefined, status: status }));
|
|
40
40
|
};
|
|
41
41
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -2,7 +2,6 @@ import { LibConfig } from '../../@types';
|
|
|
2
2
|
export interface EntityLibProps extends LibConfig {
|
|
3
3
|
verifyToken?: string;
|
|
4
4
|
configToken?: string;
|
|
5
|
-
loaderColor?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function EntityElement(props: EntityLibProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export declare function renderEntityLib(config: EntityLibProps, elementId: string): {
|
|
@@ -36,7 +36,7 @@ import { entityFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { entitySelector, verifyLeadToken } from '../app/entity/entityStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Entity = memo(function (_a) {
|
|
39
|
-
var configToken = _a.configToken, verifyToken = _a.verifyToken,
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
41
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
42
42
|
var _c = useAppSelector(entitySelector), customLoading = _c.customLoading, entityError = _c.error, loading = _c.loading;
|
|
@@ -49,11 +49,8 @@ var Entity = memo(function (_a) {
|
|
|
49
49
|
loadingScreenName: 'ENTITY_LOADING_DATA_STEP',
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
|
-
mode: props.mode,
|
|
53
52
|
internalToken: verifyToken,
|
|
54
|
-
settingLoading: settingLoading
|
|
55
|
-
operatorErrorScreenName: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
56
|
-
isValidOperator: data.isValidOperator
|
|
53
|
+
settingLoading: settingLoading
|
|
57
54
|
});
|
|
58
55
|
React.useEffect(function () {
|
|
59
56
|
initializeGTM();
|
|
@@ -61,8 +58,8 @@ var Entity = memo(function (_a) {
|
|
|
61
58
|
title: 'Entity'
|
|
62
59
|
});
|
|
63
60
|
}, []);
|
|
64
|
-
var initialLoading = verifyToken
|
|
65
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
61
|
+
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
62
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
|
|
66
63
|
var Element = _a.element, name = _a.name;
|
|
67
64
|
var isActive = activeScreen.name === name;
|
|
68
65
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
4
|
-
}, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "
|
|
4
|
+
}, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
5
5
|
component?: React.ElementType<any> | undefined;
|
|
6
6
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
7
7
|
isSelected?: boolean | undefined;
|
|
@@ -9,7 +9,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
11
11
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
12
|
-
}, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "
|
|
12
|
+
}, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
13
13
|
component?: React.ElementType<any> | undefined;
|
|
14
14
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
15
15
|
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -14,17 +14,16 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
-
import {
|
|
18
|
-
import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
|
|
17
|
+
import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
|
|
19
18
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
19
|
import Input from '../../../shared/Input';
|
|
21
|
-
import { clearError } from '../../../app/entity/entityStore';
|
|
20
|
+
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
22
21
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
23
22
|
var CapitalPaid = function (_a) {
|
|
24
23
|
var _b;
|
|
25
24
|
var readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
26
25
|
var t = useTranslation().t;
|
|
27
|
-
var
|
|
26
|
+
var data = useAppSelector(entitySelector).data;
|
|
28
27
|
var control = useFormContext().control;
|
|
29
28
|
var dispatch = useAppDispatch();
|
|
30
29
|
var handleChange = function (_a) {
|
|
@@ -34,14 +33,11 @@ var CapitalPaid = function (_a) {
|
|
|
34
33
|
var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
|
|
35
34
|
capitalPaidControl.field.onChange(value);
|
|
36
35
|
};
|
|
37
|
-
var getCurrency = React.useMemo(function () {
|
|
38
|
-
return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
|
|
39
|
-
}, [settingsData.businessCountry.iso2]);
|
|
40
36
|
var capitalPaidControl = useController({ control: control, name: 'capitalPaid' });
|
|
41
37
|
var capitalPaidValue = capitalPaidControl.field.value;
|
|
42
38
|
var error = (_b = capitalPaidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
43
39
|
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
|
|
44
|
-
currency:
|
|
40
|
+
currency: t(data.currency)
|
|
45
41
|
}), required: true, onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
|
|
46
42
|
};
|
|
47
43
|
export default React.memo(CapitalPaid);
|
|
@@ -13,18 +13,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import { formatNumberAsCurrency,
|
|
16
|
+
import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
18
|
-
import { settingsSelector } from '../../../../app/settings';
|
|
19
18
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
19
|
import Input from '../../../shared/Input';
|
|
21
|
-
import { clearError } from '../../../app/entity/entityStore';
|
|
20
|
+
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
22
21
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
23
22
|
var CapitalShareValue = function (_a) {
|
|
24
23
|
var _b;
|
|
25
24
|
var readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
26
25
|
var t = useTranslation().t;
|
|
27
|
-
var
|
|
26
|
+
var data = useAppSelector(entitySelector).data;
|
|
28
27
|
var control = useFormContext().control;
|
|
29
28
|
var dispatch = useAppDispatch();
|
|
30
29
|
var handleChange = function (_a) {
|
|
@@ -34,14 +33,11 @@ var CapitalShareValue = function (_a) {
|
|
|
34
33
|
var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
|
|
35
34
|
capitalShareValueControl.field.onChange(value);
|
|
36
35
|
};
|
|
37
|
-
var getCurrency = React.useMemo(function () {
|
|
38
|
-
return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
|
|
39
|
-
}, [settingsData.businessCountry.iso2]);
|
|
40
36
|
var capitalShareValueControl = useController({ control: control, name: 'capitalShareValue' });
|
|
41
37
|
var capitalShareValueValue = capitalShareValueControl.field.value;
|
|
42
38
|
var error = (_b = capitalShareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
43
39
|
return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
|
|
44
|
-
currency:
|
|
40
|
+
currency: t(data.currency)
|
|
45
41
|
}), required: true, onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
|
|
46
42
|
};
|
|
47
43
|
export default React.memo(CapitalShareValue);
|