@tap-payments/auth-jsconnect 2.8.55-beta → 2.8.55-development
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 +1 -0
- package/build/@types/form.d.ts +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/api/entity.d.ts +2 -2
- package/build/api/entity.js +12 -4
- package/build/api/index.d.ts +2 -2
- package/build/constants/api.d.ts +0 -1
- package/build/constants/api.js +0 -2
- package/build/constants/app.d.ts +0 -2
- package/build/constants/app.js +0 -2
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +184 -165
- package/build/features/app/board/boardStore.js +52 -30
- package/build/features/app/brand/brandStore.d.ts +16 -33
- package/build/features/app/brand/brandStore.js +239 -242
- package/build/features/app/business/businessStore.d.ts +0 -5
- package/build/features/app/business/businessStore.js +76 -87
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +110 -52
- package/build/features/app/entity/entityStore.d.ts +20 -36
- package/build/features/app/entity/entityStore.js +196 -246
- package/build/features/app/individual/individualStore.d.ts +22 -38
- package/build/features/app/individual/individualStore.js +263 -266
- package/build/features/app/password/passwordStore.d.ts +40 -23
- package/build/features/app/password/passwordStore.js +226 -233
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +168 -147
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +13 -1
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +7 -1
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +7 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- 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 +8 -4
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +7 -4
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
- 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 +23 -5
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- 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 +9 -4
- package/build/features/business/screens/Activities/Activities.js +12 -3
- package/build/features/business/screens/BusinessType/BusinessType.js +10 -2
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/Customers.js +12 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
- package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
- package/build/features/business/screens/OTP/OTP.js +1 -1
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +13 -3
- package/build/features/connect/Connect.js +3 -2
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +9 -2
- package/build/features/connect/screens/CivilID/CivilID.js +1 -1
- package/build/features/connect/screens/Individual/Email.js +3 -1
- 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 +11 -8
- 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 +2 -1
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +5 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +9 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +6 -1
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +10 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
- 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 +3 -1
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -2
- 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/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +7 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +32 -15
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- 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 +67 -7
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -14
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +14 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +3 -2
- package/build/features/individual/screens/IndividualList/Email.js +3 -2
- package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +4 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- 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 +1 -0
- package/build/features/password/Password.js +75 -28
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
- package/build/features/password/screens/OTP/OTP.js +1 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- 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 +13 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +5 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
- package/build/features/signIn/SignIn.js +12 -3
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +7 -4
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +5 -5
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/utils/common.js +4 -4
- package/build/utils/locale.js +2 -1
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +34 -5
- package/package.json +2 -2
|
@@ -15,11 +15,11 @@ import { FormProvider, useForm } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import Collapse from '@mui/material/Collapse';
|
|
18
|
-
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
19
|
-
import { deepCopy, removeAllCharsFromNumber } from '../../../../utils';
|
|
18
|
+
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
|
|
19
|
+
import { deepCopy, formatNumberAsCurrency, removeAllCharsFromNumber, sendCustomEventToGTM } from '../../../../utils';
|
|
20
20
|
import { clearError, entitySelector, updateEntityCapital } from '../../../app/entity/entityStore';
|
|
21
21
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
22
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
22
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
23
23
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
24
|
import Form from '../../../../components/Form';
|
|
25
25
|
import Button from '../../../shared/Button';
|
|
@@ -39,21 +39,36 @@ var EntityCapital = function (_a) {
|
|
|
39
39
|
var isAr = useLanguage().isAr;
|
|
40
40
|
var t = useTranslation().t;
|
|
41
41
|
var dispatch = useAppDispatch();
|
|
42
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
42
43
|
var _k = data.entityCapitalData, responseBody = _k.responseBody, capitalPaid = _k.capitalPaid, capitalShareCount = _k.capitalShareCount, capitalShareValue = _k.capitalShareValue, activities = _k.activities;
|
|
43
44
|
var entity = (data.verify.responseBody || {}).entity;
|
|
44
|
-
var _l = entity || {}, data_verification = _l.data_verification, capital = _l.capital;
|
|
45
|
+
var _l = entity || {}, data_verification = _l.data_verification, capital = _l.capital, resActivities = _l.activities;
|
|
46
|
+
var resCapitalPaidValue = (_b = capital === null || capital === void 0 ? void 0 : capital.paid) === null || _b === void 0 ? void 0 : _b.toString();
|
|
47
|
+
var resCapitalShareCount = (_d = (_c = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _c === void 0 ? void 0 : _c.count) === null || _d === void 0 ? void 0 : _d.toString();
|
|
48
|
+
var resCapitalShareValue = (_f = (_e = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _e === void 0 ? void 0 : _e.value) === null || _f === void 0 ? void 0 : _f.toString();
|
|
45
49
|
var methods = useForm({
|
|
46
50
|
resolver: yupResolver(EntityCapitalValidationSchema()),
|
|
47
51
|
defaultValues: {
|
|
48
52
|
activities: activities,
|
|
49
53
|
capitalPaid: capitalPaid,
|
|
50
|
-
capitalShareCount: capitalShareCount,
|
|
54
|
+
capitalShareCount: capitalShareCount === null || capitalShareCount === void 0 ? void 0 : capitalShareCount.toString(),
|
|
51
55
|
capitalShareValue: capitalShareValue
|
|
52
56
|
},
|
|
53
57
|
mode: 'onChange'
|
|
54
58
|
});
|
|
55
59
|
useSetFromDefaultValues(methods, data.entityCapitalData, true);
|
|
56
60
|
var watch = methods.watch;
|
|
61
|
+
var isDirty = useFormDirtyCheck(methods, {
|
|
62
|
+
activities: resActivities,
|
|
63
|
+
capitalPaid: resCapitalPaidValue && formatNumberAsCurrency(resCapitalPaidValue),
|
|
64
|
+
capitalShareCount: resCapitalShareCount,
|
|
65
|
+
capitalShareValue: resCapitalShareValue && formatNumberAsCurrency(resCapitalShareValue)
|
|
66
|
+
}, [
|
|
67
|
+
{
|
|
68
|
+
name: 'activities',
|
|
69
|
+
keys: ['id']
|
|
70
|
+
}
|
|
71
|
+
]).isDirty;
|
|
57
72
|
var originalReadOnly = useFormReadOnly(methods);
|
|
58
73
|
var noneEditable = useDataNoneEditable(entity === null || entity === void 0 ? void 0 : entity.data_status, [
|
|
59
74
|
'activities',
|
|
@@ -64,11 +79,20 @@ var EntityCapital = function (_a) {
|
|
|
64
79
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
65
80
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
66
81
|
var dataVerified = useDataVerified(data_verification, ['capital.paid', 'capital.shares.count', 'capital.shares.value']);
|
|
67
|
-
var isCapitalPaidVerified = dataVerified['capital.paid'] &&
|
|
68
|
-
var isCapitalShareCountVerified = dataVerified['capital.shares.count'] &&
|
|
69
|
-
var isCapitalShareValueVerified = dataVerified['capital.shares.value'] &&
|
|
82
|
+
var isCapitalPaidVerified = dataVerified['capital.paid'] && resCapitalPaidValue === removeAllCharsFromNumber(watch('capitalPaid'));
|
|
83
|
+
var isCapitalShareCountVerified = dataVerified['capital.shares.count'] && resCapitalShareCount === ((_g = watch('capitalShareCount')) === null || _g === void 0 ? void 0 : _g.toString());
|
|
84
|
+
var isCapitalShareValueVerified = dataVerified['capital.shares.value'] && resCapitalShareValue === removeAllCharsFromNumber(watch('capitalShareValue'));
|
|
85
|
+
React.useEffect(function () {
|
|
86
|
+
sendCustomEventToGTM({
|
|
87
|
+
event: 'Send Event',
|
|
88
|
+
event_category: 'Board Flows - Entity',
|
|
89
|
+
event_action: 'Entity Activities and Capital Details Page',
|
|
90
|
+
event_label: settingsData.businessCountry.iso2
|
|
91
|
+
});
|
|
92
|
+
}, []);
|
|
70
93
|
var onSubmit = function (data) {
|
|
71
|
-
|
|
94
|
+
var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
|
|
95
|
+
dispatch(updateEntityCapital(formData));
|
|
72
96
|
};
|
|
73
97
|
var onBack = function () {
|
|
74
98
|
dispatch(handlePrevScreenStep());
|
|
@@ -80,7 +104,7 @@ var EntityCapital = function (_a) {
|
|
|
80
104
|
var handleActivitiesOpenClose = function (flag) {
|
|
81
105
|
setAnchorEl(flag);
|
|
82
106
|
};
|
|
83
|
-
var disabled = !methods.formState.isValid ||
|
|
107
|
+
var disabled = !methods.formState.isValid || uploading;
|
|
84
108
|
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
109
|
};
|
|
86
110
|
export default EntityCapital;
|
|
@@ -15,9 +15,9 @@ import { FormProvider, useForm } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
|
-
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
18
|
+
import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
|
|
19
19
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
20
|
-
import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
|
|
20
|
+
import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA, sendCustomEventToGTM } from '../../../../utils';
|
|
21
21
|
import { BusinessType, DocumentPurpose } from '../../../../@types';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Collapse from '../../../../components/Collapse';
|
|
@@ -38,22 +38,22 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
38
38
|
flexDirection: 'column'
|
|
39
39
|
}); });
|
|
40
40
|
var EntityName = function (_a) {
|
|
41
|
-
var _b;
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
41
|
+
var _b, _c;
|
|
42
|
+
var _d = React.useState(false), issueAnchorEl = _d[0], setIssueAnchorEl = _d[1];
|
|
43
|
+
var _e = React.useState(false), expiryAnchorEl = _e[0], setExpiryAnchorEl = _e[1];
|
|
44
|
+
var _f = React.useState(false), entityTypeAnchorEl = _f[0], setEntityTypeAnchorEl = _f[1];
|
|
45
|
+
var _g = useAppSelector(entitySelector), data = _g.data, loading = _g.loading, error = _g.error, uploading = _g.uploading, uploadingArticle = _g.uploadingArticle;
|
|
46
46
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
47
47
|
var isAr = useLanguage().isAr;
|
|
48
48
|
var t = useTranslation().t;
|
|
49
49
|
var dispatch = useAppDispatch();
|
|
50
|
-
var
|
|
50
|
+
var _h = data.entityNameData, legalName = _h.legalName, licenseNumber = _h.licenseNumber, licenseType = _h.licenseType, entityType = _h.entityType, issuingDate = _h.issuingDate, expiryDate = _h.expiryDate, unifiedNumber = _h.unifiedNumber, certificateId = _h.certificateId, articleId = _h.articleId;
|
|
51
51
|
var country_code = settingsData.businessCountry.iso2;
|
|
52
52
|
var isSACountry = React.useMemo(function () { return isSA(country_code); }, [country_code]);
|
|
53
53
|
var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
|
|
54
54
|
var isCR = licenseType === BusinessType.CR;
|
|
55
|
-
var
|
|
56
|
-
var
|
|
55
|
+
var _j = data.verify.responseBody || {}, entity = _j.entity, flows = _j.flows, entityTypes = _j.entityTypes;
|
|
56
|
+
var _k = entity || {}, AOA_file = _k.AOA_file, id = _k.id, documents = _k.documents, data_status = _k.data_status, data_verification = _k.data_verification, legal_name = _k.legal_name, type = _k.type, license = _k.license;
|
|
57
57
|
var getSchema = function () {
|
|
58
58
|
if (isSACountry)
|
|
59
59
|
return EntityNameValidationSchema();
|
|
@@ -80,6 +80,18 @@ var EntityName = function (_a) {
|
|
|
80
80
|
useSetFromDefaultValues(methods, data.entityNameData, true);
|
|
81
81
|
var defaultCertificateFiles = React.useMemo(function () { return getFileDetailsFromDocument(documents, DocumentPurpose.CR); }, [documents]);
|
|
82
82
|
var defaultArticleFile = React.useMemo(function () { return AOA_file && __assign(__assign({}, AOA_file), { docId: id }); }, [AOA_file]);
|
|
83
|
+
var issueDateRes = (license === null || license === void 0 ? void 0 : license.issuing_date) && convertToEnglishDateFormat(new Date(license.issuing_date));
|
|
84
|
+
var expDateRes = (license === null || license === void 0 ? void 0 : license.expiry_date) && convertToEnglishDateFormat(new Date(license.expiry_date));
|
|
85
|
+
var isDirty = useFormDirtyCheck(methods, {
|
|
86
|
+
legalName: (legal_name === null || legal_name === void 0 ? void 0 : legal_name.en) || (legal_name === null || legal_name === void 0 ? void 0 : legal_name.ar),
|
|
87
|
+
licenseNumber: license === null || license === void 0 ? void 0 : license.number,
|
|
88
|
+
licenseType: (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR,
|
|
89
|
+
entityType: type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]),
|
|
90
|
+
issuingDate: issueDateRes,
|
|
91
|
+
expiryDate: expDateRes,
|
|
92
|
+
unifiedNumber: (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number,
|
|
93
|
+
articleId: defaultArticleFile === null || defaultArticleFile === void 0 ? void 0 : defaultArticleFile.id
|
|
94
|
+
}).isDirty;
|
|
83
95
|
var originalReadOnly = useFormReadOnly(methods, { certificateId: defaultCertificateFiles, articleId: defaultArticleFile });
|
|
84
96
|
var noneEditable = useDataNoneEditable(data_status, [
|
|
85
97
|
'legal_name.en',
|
|
@@ -104,17 +116,16 @@ var EntityName = function (_a) {
|
|
|
104
116
|
'license.expiry_date',
|
|
105
117
|
'AOA_file_id'
|
|
106
118
|
]);
|
|
107
|
-
var issueDateRes = (license === null || license === void 0 ? void 0 : license.issuing_date) && convertToEnglishDateFormat(new Date(license.issuing_date));
|
|
108
|
-
var expDateRes = (license === null || license === void 0 ? void 0 : license.expiry_date) && convertToEnglishDateFormat(new Date(license.expiry_date));
|
|
109
119
|
var isLegalNameVerified = dataVerified['legal_name.en'] && dataVerified['legal_name.ar'] && ((legal_name === null || legal_name === void 0 ? void 0 : legal_name.en) === watch('legalName') || (legal_name === null || legal_name === void 0 ? void 0 : legal_name.ar) === watch('legalName'));
|
|
110
120
|
var isEntityTypeVerified = dataVerified['type'] && type === watch('entityType');
|
|
111
121
|
var isLicenseNumberVerified = dataVerified['license.number'] && (license === null || license === void 0 ? void 0 : license.number) === watch('licenseNumber');
|
|
112
|
-
var isUnifiedNumberVerified = dataVerified['license.additional_info'] && ((
|
|
122
|
+
var isUnifiedNumberVerified = dataVerified['license.additional_info'] && ((_c = license === null || license === void 0 ? void 0 : license.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) === watch('unifiedNumber');
|
|
113
123
|
var isIssuingDateVerified = dataVerified['license.issuing_date'] && issueDateRes === watch('issuingDate');
|
|
114
124
|
var isExpiryDateVerified = dataVerified['license.expiry_date'] && expDateRes === watch('expiryDate');
|
|
115
125
|
var isArticleIdVerified = dataVerified['AOA_file_id'];
|
|
116
126
|
var onSubmit = function (data) {
|
|
117
|
-
|
|
127
|
+
var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
|
|
128
|
+
dispatch(updateEntityName(formData));
|
|
118
129
|
};
|
|
119
130
|
var handleIssueDateOpenClose = function (flag) {
|
|
120
131
|
setIssueAnchorEl(flag);
|
|
@@ -126,6 +137,12 @@ var EntityName = function (_a) {
|
|
|
126
137
|
setEntityTypeAnchorEl(flag);
|
|
127
138
|
};
|
|
128
139
|
var onBack = function () {
|
|
140
|
+
sendCustomEventToGTM({
|
|
141
|
+
event: 'Send Event',
|
|
142
|
+
event_category: 'Board Flows - Entity',
|
|
143
|
+
event_action: 'Entity Details Back button',
|
|
144
|
+
event_label: settingsData.businessCountry.iso2
|
|
145
|
+
});
|
|
129
146
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
|
|
130
147
|
dispatch(handlePrevScreenStep());
|
|
131
148
|
return;
|
|
@@ -136,7 +153,7 @@ var EntityName = function (_a) {
|
|
|
136
153
|
if (error)
|
|
137
154
|
dispatch(clearError());
|
|
138
155
|
}, [methods.formState.isValid]);
|
|
139
|
-
var disabled = !methods.formState.isValid ||
|
|
156
|
+
var disabled = !methods.formState.isValid || uploading || uploadingArticle;
|
|
140
157
|
var showLicenseNumber = isKWCountry ? isCR : true;
|
|
141
158
|
var showUnifiedNumber = isSACountry ? isCR : false;
|
|
142
159
|
var disableBack = settingsData.appConfig.mode === 'content';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -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, recipient = _b.recipient;
|
|
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, recipient: recipient }));
|
|
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 ||
|
|
75
|
+
var disabled = !methods.formState.isValid || !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);
|
|
@@ -22,11 +22,13 @@ import ConnectExpressIdentityVerifyOTPScreen from './connectExpress/screens/Iden
|
|
|
22
22
|
import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
|
|
23
23
|
import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
|
|
24
24
|
import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
|
|
25
|
+
import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
|
|
25
26
|
import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
|
|
26
27
|
import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/AccountAlreadyCreated';
|
|
27
28
|
import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
|
|
28
29
|
import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerchant';
|
|
29
30
|
import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
|
|
31
|
+
import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
|
|
30
32
|
import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
|
|
31
33
|
import AuthSwitchScreen from './auth/screens/AuthSwitch';
|
|
32
34
|
import AuthMobileScreen from './auth/screens/Mobile';
|
|
@@ -57,12 +59,15 @@ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
|
57
59
|
import BusCivilIDscreen from './business/screens/CivilID';
|
|
58
60
|
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
59
61
|
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
62
|
+
import BusinessOperatorError from './business/screens/OperatorError';
|
|
60
63
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
61
64
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
65
|
+
import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
|
|
62
66
|
import PasswordOTPPage from './password/screens/OTP';
|
|
63
67
|
import SuccessPasswordPage from './password/screens/Success';
|
|
64
68
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
65
69
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
70
|
+
import PasswordOperatorError from './password/screens/OperatorError';
|
|
66
71
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
67
72
|
import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
68
73
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
@@ -72,22 +77,26 @@ import SuccessOwnerPage from './individual/screens/Success';
|
|
|
72
77
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
73
78
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
74
79
|
import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
|
|
80
|
+
import IndividualOperatorError from './individual/screens/OperatorError';
|
|
75
81
|
import BankVerifyPage from './bank/screens/Verify';
|
|
76
82
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
77
83
|
import BankSuccessPage from './bank/screens/Success';
|
|
78
84
|
import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
79
85
|
import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
|
|
80
86
|
import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
|
|
87
|
+
import BankOperatorError from './bank/screens/OperatorError';
|
|
81
88
|
import TaxVerifyPage from './tax/screens/Verify';
|
|
82
89
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
83
90
|
import TaxSuccessPage from './tax/screens/Success';
|
|
84
91
|
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
85
92
|
import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
|
|
86
93
|
import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
|
|
94
|
+
import TaxOperatorError from './tax/screens/OperatorError';
|
|
87
95
|
import SignInMobilePage from './signIn/screens/Mobile';
|
|
88
96
|
import SignInEmailPage from './signIn/screens/Email';
|
|
89
97
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
90
98
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
99
|
+
import SignInOperatorError from './signIn/screens/OperatorError';
|
|
91
100
|
import EntityVerifyPage from './entity/screens/Verify';
|
|
92
101
|
import EntityNamePage from './entity/screens/EntityName';
|
|
93
102
|
import EntityCapitalPage from './entity/screens/EntityCapital';
|
|
@@ -95,6 +104,7 @@ import EntitySuccessPage from './entity/screens/Success';
|
|
|
95
104
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
96
105
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
97
106
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
107
|
+
import EntityOperatorError from './entity/screens/OperatorError';
|
|
98
108
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
99
109
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
100
110
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
@@ -103,9 +113,11 @@ import BrandSuccessPage from './brand/screens/Success';
|
|
|
103
113
|
import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
104
114
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
105
115
|
import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
|
|
116
|
+
import BrandOperatorError from './brand/screens/OperatorError';
|
|
106
117
|
import BoardVerifyPage from './board/screens/Verify';
|
|
107
118
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
108
119
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
120
|
+
import BoardOperatorError from './board/screens/OperatorError';
|
|
109
121
|
export var connectFeatureScreens = [
|
|
110
122
|
{
|
|
111
123
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -197,6 +209,10 @@ export var connectExpressFeatureScreens = [
|
|
|
197
209
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
198
210
|
element: ConnectExpressCreateAccountLoaderScreen
|
|
199
211
|
},
|
|
212
|
+
{
|
|
213
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
214
|
+
element: ConnectExpressPreparingDataLoaderScreen
|
|
215
|
+
},
|
|
200
216
|
{
|
|
201
217
|
name: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
202
218
|
element: ConnectExpressCollectIndividualScreen
|
|
@@ -224,6 +240,10 @@ export var connectExpressFeatureScreens = [
|
|
|
224
240
|
{
|
|
225
241
|
name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
|
|
226
242
|
element: ConnectExpressAuthAccountCreatedLoaderScreen
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
246
|
+
element: ConnectExpressOperatorError
|
|
227
247
|
}
|
|
228
248
|
];
|
|
229
249
|
export var authFeatureScreens = [
|
|
@@ -336,7 +356,11 @@ export var businessFeatureScreens = [
|
|
|
336
356
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
337
357
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
338
358
|
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
339
|
-
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
359
|
+
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen },
|
|
360
|
+
{
|
|
361
|
+
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
362
|
+
element: BusinessOperatorError
|
|
363
|
+
}
|
|
340
364
|
];
|
|
341
365
|
export var passwordFeatureScreens = [
|
|
342
366
|
{
|
|
@@ -347,6 +371,10 @@ export var passwordFeatureScreens = [
|
|
|
347
371
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
348
372
|
element: CreatePasswordPage
|
|
349
373
|
},
|
|
374
|
+
{
|
|
375
|
+
name: 'PASSWORD_LOADING_DATA_STEP',
|
|
376
|
+
element: PasswordDataLoadingPage
|
|
377
|
+
},
|
|
350
378
|
{
|
|
351
379
|
name: 'PASSWORD_RESET_PASSWORD_OTP_STEP',
|
|
352
380
|
element: PasswordOTPPage
|
|
@@ -359,7 +387,11 @@ export var passwordFeatureScreens = [
|
|
|
359
387
|
name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
360
388
|
element: PasswordSuccessWithFlowPage
|
|
361
389
|
},
|
|
362
|
-
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
390
|
+
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage },
|
|
391
|
+
{
|
|
392
|
+
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
393
|
+
element: PasswordOperatorError
|
|
394
|
+
}
|
|
363
395
|
];
|
|
364
396
|
export var individualFeatureScreens = [
|
|
365
397
|
{
|
|
@@ -394,7 +426,11 @@ export var individualFeatureScreens = [
|
|
|
394
426
|
name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
395
427
|
element: IndividualSuccessWithFlowPage
|
|
396
428
|
},
|
|
397
|
-
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
429
|
+
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage },
|
|
430
|
+
{
|
|
431
|
+
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
432
|
+
element: IndividualOperatorError
|
|
433
|
+
}
|
|
398
434
|
];
|
|
399
435
|
export var bankFeatureScreens = [
|
|
400
436
|
{
|
|
@@ -417,7 +453,11 @@ export var bankFeatureScreens = [
|
|
|
417
453
|
name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
418
454
|
element: BankSuccessWithFlowPage
|
|
419
455
|
},
|
|
420
|
-
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
456
|
+
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage },
|
|
457
|
+
{
|
|
458
|
+
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
459
|
+
element: BankOperatorError
|
|
460
|
+
}
|
|
421
461
|
];
|
|
422
462
|
export var taxFeatureScreens = [
|
|
423
463
|
{
|
|
@@ -440,7 +480,11 @@ export var taxFeatureScreens = [
|
|
|
440
480
|
name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
441
481
|
element: TaxSuccessWithFlowPage
|
|
442
482
|
},
|
|
443
|
-
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
483
|
+
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage },
|
|
484
|
+
{
|
|
485
|
+
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
486
|
+
element: TaxOperatorError
|
|
487
|
+
}
|
|
444
488
|
];
|
|
445
489
|
export var signInFeatureScreens = [
|
|
446
490
|
{
|
|
@@ -458,6 +502,10 @@ export var signInFeatureScreens = [
|
|
|
458
502
|
{
|
|
459
503
|
name: 'SIGIN_PASSWORD_STEP',
|
|
460
504
|
element: SignInPasswordPage
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
508
|
+
element: SignInOperatorError
|
|
461
509
|
}
|
|
462
510
|
];
|
|
463
511
|
export var entityFeatureScreens = [
|
|
@@ -485,7 +533,11 @@ export var entityFeatureScreens = [
|
|
|
485
533
|
name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
486
534
|
element: EntitySuccessWithFlowPage
|
|
487
535
|
},
|
|
488
|
-
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
536
|
+
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage },
|
|
537
|
+
{
|
|
538
|
+
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
539
|
+
element: EntityOperatorError
|
|
540
|
+
}
|
|
489
541
|
];
|
|
490
542
|
export var brandFeatureScreens = [
|
|
491
543
|
{
|
|
@@ -516,7 +568,11 @@ export var brandFeatureScreens = [
|
|
|
516
568
|
name: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
517
569
|
element: BrandSuccessWithFlowPage
|
|
518
570
|
},
|
|
519
|
-
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
571
|
+
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage },
|
|
572
|
+
{
|
|
573
|
+
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
574
|
+
element: BrandOperatorError
|
|
575
|
+
}
|
|
520
576
|
];
|
|
521
577
|
export var boardFeatureScreens = [
|
|
522
578
|
{
|
|
@@ -530,5 +586,9 @@ export var boardFeatureScreens = [
|
|
|
530
586
|
{
|
|
531
587
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
532
588
|
element: BoardSuccessWithFlowPage
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
592
|
+
element: BoardOperatorError
|
|
533
593
|
}
|
|
534
594
|
];
|
|
@@ -2,6 +2,7 @@ import { LibConfig } from '../../@types';
|
|
|
2
2
|
export interface IndividualLibProps extends LibConfig {
|
|
3
3
|
verifyToken?: string;
|
|
4
4
|
configToken?: string;
|
|
5
|
+
loaderColor?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function IndividualElement(props: IndividualLibProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
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, props = __rest(_a, ["configToken", "verifyToken"]);
|
|
39
|
+
var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
|
|
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,8 +49,11 @@ var Individual = memo(function (_a) {
|
|
|
49
49
|
loadingScreenName: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
50
50
|
navigation: featureScreensNavigation,
|
|
51
51
|
open: open,
|
|
52
|
+
mode: props.mode,
|
|
52
53
|
internalToken: verifyToken,
|
|
53
|
-
settingLoading: settingLoading
|
|
54
|
+
settingLoading: settingLoading,
|
|
55
|
+
operatorErrorScreenName: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
56
|
+
isValidOperator: data.isValidOperator
|
|
54
57
|
});
|
|
55
58
|
React.useEffect(function () {
|
|
56
59
|
initializeGTM();
|
|
@@ -58,8 +61,8 @@ var Individual = memo(function (_a) {
|
|
|
58
61
|
title: 'Individual'
|
|
59
62
|
});
|
|
60
63
|
}, []);
|
|
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, 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, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
64
|
+
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
65
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, loaderColor: loaderColor, error: error, open: open, 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({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: individualFeatureScreens.map(function (_a, index) {
|
|
63
66
|
var Element = _a.element, name = _a.name;
|
|
64
67
|
var isActive = activeScreen.name === name;
|
|
65
68
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|