@tap-payments/auth-jsconnect 2.8.44-test → 2.8.45-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/form.d.ts +0 -1
- package/build/@types/redux.d.ts +0 -1
- package/build/api/axios.js +1 -2
- 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 +11 -3
- package/build/features/app/bank/bankStore.d.ts +18 -13
- package/build/features/app/bank/bankStore.js +161 -173
- 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 +204 -173
- package/build/features/app/business/businessStore.d.ts +5 -0
- package/build/features/app/business/businessStore.js +86 -69
- package/build/features/app/connectExpress/connectExpressStore.js +10 -18
- package/build/features/app/entity/entityStore.d.ts +35 -15
- package/build/features/app/entity/entityStore.js +228 -159
- package/build/features/app/individual/individualStore.d.ts +37 -21
- package/build/features/app/individual/individualStore.js +265 -253
- 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 -167
- 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 +4 -12
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- 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/BrandActivities.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- 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 +1 -1
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +1 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- 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 +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +1 -1
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +1 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/business/screens/Verify/Verify.js +1 -1
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -2
- 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 +1 -1
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- 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/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/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
- package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -1
- package/build/features/connectExpress/screens/NID/NID.js +1 -1
- package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +0 -1
- package/build/features/entity/Entity.js +4 -7
- 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 +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +1 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/screens/Verify/Verify.js +1 -1
- package/build/features/featuresScreens.js +7 -62
- package/build/features/individual/Individual.d.ts +0 -1
- package/build/features/individual/Individual.js +4 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
- 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.js +5 -11
- 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/IndividualPersonalInfo.js +3 -4
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- 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 +2 -2
- package/build/features/password/screens/Verify/Verify.js +5 -5
- package/build/features/shared/Button/FlowsButtons.js +3 -4
- package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
- 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 +2 -2
- 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 -31
- 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/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 -36
- 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 -6
- package/build/hooks/useFormDirtyCheck.js +0 -29
|
@@ -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) {
|
|
@@ -84,7 +84,7 @@ var CivilID = function (_a) {
|
|
|
84
84
|
var onBackToCountryList = function () {
|
|
85
85
|
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
86
86
|
};
|
|
87
|
-
var disabled = !methods.formState.isValid;
|
|
87
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
88
88
|
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;
|
|
89
89
|
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') }))] }))] })) })) }));
|
|
90
90
|
};
|
|
@@ -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);
|
|
@@ -80,7 +80,7 @@ var CollectBusinessInfo = function (_a) {
|
|
|
80
80
|
var onBack = function () {
|
|
81
81
|
dispatch(handlePrevScreenStep());
|
|
82
82
|
};
|
|
83
|
-
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName;
|
|
83
|
+
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
|
|
84
84
|
var disabled = brandErrChecks || brandNameChecking || isBrandNameAvailable == false;
|
|
85
85
|
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 () {
|
|
86
86
|
setListActive(true);
|
package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js
CHANGED
|
@@ -89,7 +89,7 @@ var CollectIndividualInfo = function (_a) {
|
|
|
89
89
|
}, [responseData]);
|
|
90
90
|
var isLeadEmailAvailable = (contact === null || contact === void 0 ? void 0 : contact.email) === methods.watch('email');
|
|
91
91
|
var isEmailValid = typeof isEmailAvailable === 'undefined' ? isLeadEmailAvailable : isEmailAvailable;
|
|
92
|
-
var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email;
|
|
92
|
+
var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email || !!error;
|
|
93
93
|
var disabled = emailErrChecks || emailChecking || !isEmailValid;
|
|
94
94
|
var emailReadOnly = readOnly['email'] && !((_b = methods.getFieldState('email').error) === null || _b === void 0 ? void 0 : _b.message) && !methods.getFieldState('email').isDirty;
|
|
95
95
|
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;
|
|
@@ -109,7 +109,7 @@ var Mobile = function (_a) {
|
|
|
109
109
|
};
|
|
110
110
|
var originalReadOnly = useFormReadOnly(methods);
|
|
111
111
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
112
|
-
var disabled = !methods.formState.isValid;
|
|
112
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
113
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') })))] }))] }))] })) })) }));
|
|
114
114
|
};
|
|
115
115
|
export default React.memo(Mobile);
|
|
@@ -91,7 +91,7 @@ var NID = function (_a) {
|
|
|
91
91
|
};
|
|
92
92
|
var originalReadOnly = useFormReadOnly(methods);
|
|
93
93
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
94
|
-
var disabled = !methods.formState.isValid;
|
|
94
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
95
95
|
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;
|
|
96
96
|
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') }))] }))] }))] })) })) }));
|
|
97
97
|
};
|
|
@@ -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
|
@@ -28,7 +28,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
28
28
|
var _b = data.responseData || {}, boardData = _b.boardData, leadData = _b.leadData, boardInfo = _b.boardInfo;
|
|
29
29
|
var name = (leadData || {}).name;
|
|
30
30
|
var _c = boardData || {}, business = _c.business, merchant = _c.merchant, bank = _c.bank_account, user = _c.user, individuals = _c.individuals, entity = _c.entity, brand = _c.brand;
|
|
31
|
-
var
|
|
31
|
+
var flows = (boardInfo || {}).info;
|
|
32
32
|
var boardInfoId = boardInfo === null || boardInfo === void 0 ? void 0 : boardInfo.id;
|
|
33
33
|
var boardId = boardData === null || boardData === void 0 ? void 0 : boardData.id;
|
|
34
34
|
var individualsInfo = __assign(__assign({}, individuals), (!(user === null || user === void 0 ? void 0 : user.is_authorized) && { data_state: user === null || user === void 0 ? void 0 : user.data_state }));
|
|
@@ -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 }));
|
|
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,19 +49,16 @@ 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
|
sendPageView({
|
|
60
57
|
title: 'Entity'
|
|
61
58
|
});
|
|
62
59
|
}, []);
|
|
63
|
-
var initialLoading = verifyToken
|
|
64
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
60
|
+
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
|
+
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 }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
|
|
65
62
|
var Element = _a.element, name = _a.name;
|
|
66
63
|
var isActive = activeScreen.name === name;
|
|
67
64
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -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);
|
|
@@ -80,7 +80,7 @@ var EntityCapital = function (_a) {
|
|
|
80
80
|
var handleActivitiesOpenClose = function (flag) {
|
|
81
81
|
setAnchorEl(flag);
|
|
82
82
|
};
|
|
83
|
-
var disabled = !methods.formState.isValid || uploading;
|
|
83
|
+
var disabled = !methods.formState.isValid || !!error || uploading;
|
|
84
84
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(ActivityList, { readOnly: readOnly['activities'] || noneEditable['activities'], onListOpen: function () { return handleActivitiesOpenClose(true); }, onListClose: function () { return handleActivitiesOpenClose(false); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(CapitalPaid, { readOnly: readOnly['capitalPaid'] || noneEditable['capital.paid'], isVerified: isCapitalPaidVerified }), _jsx(CapitalShareCount, { readOnly: readOnly['capitalShareCount'] || noneEditable['capital.shares.count'], isVerified: isCapitalShareCountVerified }), _jsx(CapitalShareValue, { readOnly: readOnly['capitalShareValue'] || noneEditable['capital.shares.value'], isVerified: isCapitalShareValueVerified }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
|
|
85
85
|
};
|
|
86
86
|
export default EntityCapital;
|
|
@@ -136,7 +136,7 @@ var EntityName = function (_a) {
|
|
|
136
136
|
if (error)
|
|
137
137
|
dispatch(clearError());
|
|
138
138
|
}, [methods.formState.isValid]);
|
|
139
|
-
var disabled = !methods.formState.isValid || uploading || uploadingArticle;
|
|
139
|
+
var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
|
|
140
140
|
var showLicenseNumber = isKWCountry ? isCR : true;
|
|
141
141
|
var showUnifiedNumber = isSACountry ? isCR : false;
|
|
142
142
|
var disableBack = settingsData.appConfig.mode === 'content';
|
|
@@ -21,10 +21,10 @@ var SuccessWithFlowButtons = function () {
|
|
|
21
21
|
var _a = useAppSelector(entitySelector), data = _a.data, loading = _a.loading;
|
|
22
22
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
23
|
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
-
var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals
|
|
24
|
+
var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals;
|
|
25
25
|
var onClose = function () {
|
|
26
26
|
dispatch(onCloseCompleteEntity());
|
|
27
27
|
};
|
|
28
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined
|
|
28
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined }));
|
|
29
29
|
};
|
|
30
30
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -72,7 +72,7 @@ var VerifyNumber = function (_a) {
|
|
|
72
72
|
var onSubmit = function (formData) {
|
|
73
73
|
dispatch(verifyEntityLeadOTP(deepCopy(formData)));
|
|
74
74
|
};
|
|
75
|
-
var disabled = !methods.formState.isValid || !phone || resendLoading;
|
|
75
|
+
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
76
|
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
77
77
|
};
|
|
78
78
|
export default React.memo(VerifyNumber);
|
|
@@ -27,7 +27,6 @@ import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/
|
|
|
27
27
|
import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
|
|
28
28
|
import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerchant';
|
|
29
29
|
import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
|
|
30
|
-
import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
|
|
31
30
|
import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
|
|
32
31
|
import AuthSwitchScreen from './auth/screens/AuthSwitch';
|
|
33
32
|
import AuthMobileScreen from './auth/screens/Mobile';
|
|
@@ -58,15 +57,12 @@ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
|
58
57
|
import BusCivilIDscreen from './business/screens/CivilID';
|
|
59
58
|
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
60
59
|
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
61
|
-
import BusinessOperatorError from './business/screens/OperatorError';
|
|
62
60
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
63
61
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
64
|
-
import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
|
|
65
62
|
import PasswordOTPPage from './password/screens/OTP';
|
|
66
63
|
import SuccessPasswordPage from './password/screens/Success';
|
|
67
64
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
68
65
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
69
|
-
import PasswordOperatorError from './password/screens/OperatorError';
|
|
70
66
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
71
67
|
import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
72
68
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
@@ -76,26 +72,22 @@ import SuccessOwnerPage from './individual/screens/Success';
|
|
|
76
72
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
77
73
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
78
74
|
import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
|
|
79
|
-
import IndividualOperatorError from './individual/screens/OperatorError';
|
|
80
75
|
import BankVerifyPage from './bank/screens/Verify';
|
|
81
76
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
82
77
|
import BankSuccessPage from './bank/screens/Success';
|
|
83
78
|
import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
84
79
|
import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
|
|
85
80
|
import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
|
|
86
|
-
import BankOperatorError from './bank/screens/OperatorError';
|
|
87
81
|
import TaxVerifyPage from './tax/screens/Verify';
|
|
88
82
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
89
83
|
import TaxSuccessPage from './tax/screens/Success';
|
|
90
84
|
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
91
85
|
import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
|
|
92
86
|
import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
|
|
93
|
-
import TaxOperatorError from './tax/screens/OperatorError';
|
|
94
87
|
import SignInMobilePage from './signIn/screens/Mobile';
|
|
95
88
|
import SignInEmailPage from './signIn/screens/Email';
|
|
96
89
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
97
90
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
98
|
-
import SignInOperatorError from './signIn/screens/OperatorError';
|
|
99
91
|
import EntityVerifyPage from './entity/screens/Verify';
|
|
100
92
|
import EntityNamePage from './entity/screens/EntityName';
|
|
101
93
|
import EntityCapitalPage from './entity/screens/EntityCapital';
|
|
@@ -103,7 +95,6 @@ import EntitySuccessPage from './entity/screens/Success';
|
|
|
103
95
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
104
96
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
105
97
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
106
|
-
import EntityOperatorError from './entity/screens/OperatorError';
|
|
107
98
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
108
99
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
109
100
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
@@ -112,11 +103,9 @@ import BrandSuccessPage from './brand/screens/Success';
|
|
|
112
103
|
import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
113
104
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
114
105
|
import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
|
|
115
|
-
import BrandOperatorError from './brand/screens/OperatorError';
|
|
116
106
|
import BoardVerifyPage from './board/screens/Verify';
|
|
117
107
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
118
108
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
119
|
-
import BoardOperatorError from './board/screens/OperatorError';
|
|
120
109
|
export var connectFeatureScreens = [
|
|
121
110
|
{
|
|
122
111
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -235,10 +224,6 @@ export var connectExpressFeatureScreens = [
|
|
|
235
224
|
{
|
|
236
225
|
name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
|
|
237
226
|
element: ConnectExpressAuthAccountCreatedLoaderScreen
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
241
|
-
element: ConnectExpressOperatorError
|
|
242
227
|
}
|
|
243
228
|
];
|
|
244
229
|
export var authFeatureScreens = [
|
|
@@ -351,11 +336,7 @@ export var businessFeatureScreens = [
|
|
|
351
336
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
352
337
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
353
338
|
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
354
|
-
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
355
|
-
{
|
|
356
|
-
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
357
|
-
element: BusinessOperatorError
|
|
358
|
-
}
|
|
339
|
+
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
359
340
|
];
|
|
360
341
|
export var passwordFeatureScreens = [
|
|
361
342
|
{
|
|
@@ -366,10 +347,6 @@ export var passwordFeatureScreens = [
|
|
|
366
347
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
367
348
|
element: CreatePasswordPage
|
|
368
349
|
},
|
|
369
|
-
{
|
|
370
|
-
name: 'PASSWORD_LOADING_DATA_STEP',
|
|
371
|
-
element: PasswordDataLoadingPage
|
|
372
|
-
},
|
|
373
350
|
{
|
|
374
351
|
name: 'PASSWORD_RESET_PASSWORD_OTP_STEP',
|
|
375
352
|
element: PasswordOTPPage
|
|
@@ -382,11 +359,7 @@ export var passwordFeatureScreens = [
|
|
|
382
359
|
name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
383
360
|
element: PasswordSuccessWithFlowPage
|
|
384
361
|
},
|
|
385
|
-
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
386
|
-
{
|
|
387
|
-
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
388
|
-
element: PasswordOperatorError
|
|
389
|
-
}
|
|
362
|
+
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
390
363
|
];
|
|
391
364
|
export var individualFeatureScreens = [
|
|
392
365
|
{
|
|
@@ -421,11 +394,7 @@ export var individualFeatureScreens = [
|
|
|
421
394
|
name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
422
395
|
element: IndividualSuccessWithFlowPage
|
|
423
396
|
},
|
|
424
|
-
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
425
|
-
{
|
|
426
|
-
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
427
|
-
element: IndividualOperatorError
|
|
428
|
-
}
|
|
397
|
+
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
429
398
|
];
|
|
430
399
|
export var bankFeatureScreens = [
|
|
431
400
|
{
|
|
@@ -448,11 +417,7 @@ export var bankFeatureScreens = [
|
|
|
448
417
|
name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
449
418
|
element: BankSuccessWithFlowPage
|
|
450
419
|
},
|
|
451
|
-
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
452
|
-
{
|
|
453
|
-
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
454
|
-
element: BankOperatorError
|
|
455
|
-
}
|
|
420
|
+
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
456
421
|
];
|
|
457
422
|
export var taxFeatureScreens = [
|
|
458
423
|
{
|
|
@@ -475,11 +440,7 @@ export var taxFeatureScreens = [
|
|
|
475
440
|
name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
476
441
|
element: TaxSuccessWithFlowPage
|
|
477
442
|
},
|
|
478
|
-
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
479
|
-
{
|
|
480
|
-
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
481
|
-
element: TaxOperatorError
|
|
482
|
-
}
|
|
443
|
+
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
483
444
|
];
|
|
484
445
|
export var signInFeatureScreens = [
|
|
485
446
|
{
|
|
@@ -497,10 +458,6 @@ export var signInFeatureScreens = [
|
|
|
497
458
|
{
|
|
498
459
|
name: 'SIGIN_PASSWORD_STEP',
|
|
499
460
|
element: SignInPasswordPage
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
503
|
-
element: SignInOperatorError
|
|
504
461
|
}
|
|
505
462
|
];
|
|
506
463
|
export var entityFeatureScreens = [
|
|
@@ -528,11 +485,7 @@ export var entityFeatureScreens = [
|
|
|
528
485
|
name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
529
486
|
element: EntitySuccessWithFlowPage
|
|
530
487
|
},
|
|
531
|
-
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
532
|
-
{
|
|
533
|
-
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
534
|
-
element: EntityOperatorError
|
|
535
|
-
}
|
|
488
|
+
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
536
489
|
];
|
|
537
490
|
export var brandFeatureScreens = [
|
|
538
491
|
{
|
|
@@ -563,11 +516,7 @@ export var brandFeatureScreens = [
|
|
|
563
516
|
name: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
564
517
|
element: BrandSuccessWithFlowPage
|
|
565
518
|
},
|
|
566
|
-
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
567
|
-
{
|
|
568
|
-
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
569
|
-
element: BrandOperatorError
|
|
570
|
-
}
|
|
519
|
+
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
571
520
|
];
|
|
572
521
|
export var boardFeatureScreens = [
|
|
573
522
|
{
|
|
@@ -581,9 +530,5 @@ export var boardFeatureScreens = [
|
|
|
581
530
|
{
|
|
582
531
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
583
532
|
element: BoardSuccessWithFlowPage
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
587
|
-
element: BoardOperatorError
|
|
588
533
|
}
|
|
589
534
|
];
|
|
@@ -2,7 +2,6 @@ import { LibConfig } from '../../@types';
|
|
|
2
2
|
export interface IndividualLibProps extends LibConfig {
|
|
3
3
|
verifyToken?: string;
|
|
4
4
|
configToken?: string;
|
|
5
|
-
loaderColor?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function IndividualElement(props: IndividualLibProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): {
|
|
@@ -36,7 +36,7 @@ import { individualFeatureScreens } from '../featuresScreens';
|
|
|
36
36
|
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Individual = 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(individualSelector), customLoading = _c.customLoading, individualError = _c.error, loading = _c.loading;
|
|
@@ -49,19 +49,16 @@ var Individual = memo(function (_a) {
|
|
|
49
49
|
loadingScreenName: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
|
-
mode: props.mode,
|
|
53
52
|
internalToken: verifyToken,
|
|
54
|
-
settingLoading: settingLoading
|
|
55
|
-
operatorErrorScreenName: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
56
|
-
isValidOperator: data.isValidOperator
|
|
53
|
+
settingLoading: settingLoading
|
|
57
54
|
});
|
|
58
55
|
React.useEffect(function () {
|
|
59
56
|
sendPageView({
|
|
60
57
|
title: 'Individual'
|
|
61
58
|
});
|
|
62
59
|
}, []);
|
|
63
|
-
var initialLoading = verifyToken
|
|
64
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
60
|
+
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
|
+
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, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
65
62
|
var Element = _a.element, name = _a.name;
|
|
66
63
|
var isActive = activeScreen.name === name;
|
|
67
64
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|