@tap-payments/auth-jsconnect 2.3.80-test → 2.3.85-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/build/features/app/brand/brandStore.d.ts +3 -3
  2. package/build/features/app/brand/brandStore.js +133 -114
  3. package/build/features/app/connectExpress/connectExpressStore.d.ts +3 -3
  4. package/build/features/app/connectExpress/connectExpressStore.js +80 -76
  5. package/build/features/app/entity/entityStore.d.ts +3 -3
  6. package/build/features/app/entity/entityStore.js +130 -120
  7. package/build/features/app/individual/individualStore.d.ts +4 -4
  8. package/build/features/app/individual/individualStore.js +227 -219
  9. package/build/features/app/tax/taxStore.d.ts +2 -2
  10. package/build/features/app/tax/taxStore.js +59 -55
  11. package/build/features/brand/screens/BrandActivities/BrandActivities.js +3 -2
  12. package/build/features/brand/screens/BrandInfo/BrandInfo.js +7 -6
  13. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +5 -4
  14. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +5 -4
  15. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -9
  16. package/build/features/entity/screens/EntityCapital/EntityCapital.js +3 -2
  17. package/build/features/entity/screens/EntityName/EntityName.js +3 -2
  18. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +19 -18
  19. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +3 -2
  20. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +3 -2
  21. package/build/features/shared/Button/IndividualActionButtons.js +2 -2
  22. package/build/features/tax/screens/TaxDetails/TaxDetails.js +4 -3
  23. package/package.json +1 -1
@@ -15,7 +15,7 @@ import { ScreenContainer } from '../../../shared/Containers';
15
15
  import { FormProvider, useForm } from 'react-hook-form';
16
16
  import Form from '../../../../components/Form';
17
17
  import { styled } from '@mui/material/styles';
18
- import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { BrandActivitiesValidationSchema } from './validation';
21
21
  import Button from '../../../shared/Button';
@@ -70,8 +70,9 @@ var BrandActivities = function (_a) {
70
70
  'terms'
71
71
  ]);
72
72
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
73
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
73
74
  var onSubmit = function (data) {
74
- dispatch(updateBrandActivities(data));
75
+ dispatch(updateBrandActivities(getFelids(data)));
75
76
  };
76
77
  var onBack = function () {
77
78
  dispatch(handlePrevScreenStep());
@@ -15,7 +15,7 @@ import React from 'react';
15
15
  import { FormProvider, useForm } from 'react-hook-form';
16
16
  import Form from '../../../../components/Form';
17
17
  import { styled } from '@mui/material/styles';
18
- import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { BrandValidationSchema } from './validation';
21
21
  import Button from '../../../shared/Button';
@@ -60,8 +60,13 @@ var BrandInfo = function (_a) {
60
60
  mode: 'onChange'
61
61
  });
62
62
  useSetFromDefaultValues(methods, data.brandData, true);
63
+ var defaultBrandLogoFile = React.useMemo(function () { return logo_details && __assign(__assign({}, logo_details), { docId: '' }); }, [logo_details]);
64
+ var originalReadOnly = useFormReadOnly(methods, { brandLogoId: defaultBrandLogoFile });
65
+ var noneEditable = useDataNoneEditable(data_status, ['name', 'segment.type', 'segment.teams', 'channel_services']);
66
+ var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
67
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
63
68
  var onSubmit = function (data) {
64
- dispatch(updateBrand(data));
69
+ dispatch(updateBrand(getFelids(data)));
65
70
  };
66
71
  var onBack = function () {
67
72
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
@@ -87,10 +92,6 @@ var BrandInfo = function (_a) {
87
92
  var handleMenuClick = function (flag) {
88
93
  setListActive(flag);
89
94
  };
90
- var defaultBrandLogoFile = React.useMemo(function () { return logo_details && __assign(__assign({}, logo_details), { docId: '' }); }, [logo_details]);
91
- var originalReadOnly = useFormReadOnly(methods, { brandLogoId: defaultBrandLogoFile });
92
- var noneEditable = useDataNoneEditable(data_status, ['name', 'segment.type', 'segment.teams', 'channel_services']);
93
- var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
94
95
  var isSegmentsListActive = listActive === ListType.SegmentsList;
95
96
  var isTeamSizeListActive = listActive === ListType.TeamSizeList;
96
97
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'] || noneEditable['name'], show: !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(BrandLogo, { defaultFile: defaultBrandLogoFile, readOnly: readOnly['brandLogoId'], show: !listActive }), _jsx(Segments, { readOnly: readOnly['segment'] || noneEditable['segment.type'], show: !isTeamSizeListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { readOnly: readOnly['teamSize'] || noneEditable['segment.teams'], show: !isSegmentsListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(SalesChannels, { readOnly: readOnly['salesChannels'] || noneEditable['channel_services'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') }))] }))] })) })) }));
@@ -14,7 +14,7 @@ import * as React from 'react';
14
14
  import { useForm, FormProvider } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
- import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
17
+ import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
18
18
  import { isSA } from '../../../../utils';
19
19
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
20
  import Form from '../../../../components/Form';
@@ -49,6 +49,9 @@ var CollectBusinessInfo = function (_a) {
49
49
  mode: 'onChange'
50
50
  });
51
51
  useSetFromDefaultValues(methods, data.businessData);
52
+ var originalReadOnly = useFormReadOnly(methods);
53
+ var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
54
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
52
55
  React.useEffect(function () {
53
56
  if (error)
54
57
  dispatch(clearError());
@@ -64,13 +67,11 @@ var CollectBusinessInfo = function (_a) {
64
67
  licenseNumber: data.licenseNumber,
65
68
  termAndConditionChecked: data.termAndConditionChecked
66
69
  };
67
- dispatch(updateLeadBusinessDataAsync(dataValues));
70
+ dispatch(updateLeadBusinessDataAsync(getFelids(dataValues)));
68
71
  };
69
72
  var onBack = function () {
70
73
  dispatch(handlePrevScreenStep());
71
74
  };
72
- var originalReadOnly = useFormReadOnly(methods);
73
- var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
74
75
  var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
75
76
  var disabled = brandErrChecks || brandNameChecking || isBrandNameAvailable == false;
76
77
  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 () {
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
15
15
  import { useForm, FormProvider } from 'react-hook-form';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { styled } from '@mui/material/styles';
18
- import { useAppDispatch, useAppSelector, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useExcludeReadOnlyFelids, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
19
19
  import { AuthForType } from '../../../../@types';
20
20
  import { useLanguage } from '../../../../hooks';
21
21
  import { isKW } from '../../../../utils';
@@ -56,12 +56,15 @@ var CollectIndividualInfo = function (_a) {
56
56
  mode: 'onChange'
57
57
  });
58
58
  useSetFromDefaultValues(methods, individualData, true);
59
+ var originalReadOnly = useFormReadOnly(methods);
60
+ var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
61
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
59
62
  React.useEffect(function () {
60
63
  if (countryCode.iso2 !== methods.getValues('countryCode.iso2'))
61
64
  methods.setValue('countryCode', countryCode);
62
65
  }, [countryCode]);
63
66
  var onSubmit = function (formData) {
64
- dispatch(updateLeadIndividualAsync(formData));
67
+ dispatch(updateLeadIndividualAsync(getFelids(formData)));
65
68
  };
66
69
  var onBack = function () {
67
70
  var _a;
@@ -81,8 +84,6 @@ var CollectIndividualInfo = function (_a) {
81
84
  if (isEmailAvailable === false)
82
85
  methods.setError('email', { message: 'tap_js_email_already_exist' });
83
86
  }, [responseData]);
84
- var originalReadOnly = useFormReadOnly(methods);
85
- var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
86
87
  var isLeadEmailAvailable = (contact === null || contact === void 0 ? void 0 : contact.email) === methods.watch('email');
87
88
  var isEmailValid = typeof isEmailAvailable === 'undefined' ? isLeadEmailAvailable : isEmailAvailable;
88
89
  var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email || !!error;
@@ -67,9 +67,8 @@ var InputStyled = styled(Input)(function () { return ({
67
67
  }); });
68
68
  var cancelToken = null;
69
69
  var Email = function (_a) {
70
- var _b;
70
+ var _b, _c, _d, _e;
71
71
  var show = _a.show, fetchingEmail = _a.fetchingEmail, emailChecking = _a.emailChecking, readOnly = _a.readOnly;
72
- var _c = React.useState(''), storedEmail = _c[0], setStoredEmail = _c[1];
73
72
  var dispatch = useAppDispatch();
74
73
  var data = useAppSelector(connectExpressSelector).data;
75
74
  var t = useTranslation().t;
@@ -77,6 +76,7 @@ var Email = function (_a) {
77
76
  var emailControl = useController({ name: 'email', control: control });
78
77
  var emailValue = emailControl.field.value;
79
78
  var error = (_b = emailControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
79
+ var email = (_e = (_d = (_c = data.responseData) === null || _c === void 0 ? void 0 : _c.leadData) === null || _d === void 0 ? void 0 : _d.contact) === null || _e === void 0 ? void 0 : _e.email;
80
80
  var checkEmail = debounce(function (value) { return __awaiter(void 0, void 0, void 0, function () {
81
81
  var onSuccess;
82
82
  return __generator(this, function (_a) {
@@ -92,15 +92,9 @@ var Email = function (_a) {
92
92
  var handleEmailChange = function (event) {
93
93
  emailControl.field.onChange(event.target.value);
94
94
  };
95
- React.useEffect(function () {
96
- var _a, _b, _c;
97
- var email = (_c = (_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.leadData) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.email;
98
- if (!!email)
99
- setStoredEmail(email);
100
- }, [data.responseData]);
101
95
  React.useEffect(function () {
102
96
  var isValid = emailValue && !error && emailValue.length > 3;
103
- if (isValid && emailValue != storedEmail) {
97
+ if (isValid && emailValue != email) {
104
98
  fetchingEmail(true);
105
99
  checkEmail(emailValue);
106
100
  }
@@ -15,7 +15,7 @@ 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 } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
19
19
  import { clearError, entitySelector, updateEntityCapital } from '../../../app/entity/entityStore';
20
20
  import { yupResolver } from '@hookform/resolvers/yup';
21
21
  import { handlePrevScreenStep } from '../../../../app/settings';
@@ -58,8 +58,9 @@ var EntityCapital = function (_a) {
58
58
  'capital.shares.value'
59
59
  ]);
60
60
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
61
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
61
62
  var onSubmit = function (data) {
62
- dispatch(updateEntityCapital(data));
63
+ dispatch(updateEntityCapital(getFelids(data)));
63
64
  };
64
65
  var onBack = function () {
65
66
  dispatch(handlePrevScreenStep());
@@ -15,7 +15,7 @@ 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 } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
19
19
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
20
  import { getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
21
21
  import { BusinessType, DocumentPurpose } from '../../../../@types';
@@ -83,8 +83,9 @@ var EntityName = function (_a) {
83
83
  'AOA_file_id'
84
84
  ]);
85
85
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
86
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
86
87
  var onSubmit = function (data) {
87
- dispatch(updateEntityName(data));
88
+ dispatch(updateEntityName(getFelids(data)));
88
89
  };
89
90
  var handleIssueDateOpenClose = function (flag) {
90
91
  setIssueAnchorEl(flag);
@@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next';
17
17
  import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
18
18
  import Box from '@mui/material/Box';
19
19
  import { alpha, styled } from '@mui/material/styles';
20
- import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
20
+ import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
21
21
  import { DocumentPurpose, IndividualType } from '../../../../@types';
22
22
  import { isSA } from '../../../../utils';
23
23
  import Form from '../../../../components/Form';
@@ -80,10 +80,27 @@ var AdditionalIndividualInfo = function (_a) {
80
80
  mode: 'onChange'
81
81
  });
82
82
  useSetFromDefaultValues(methods, data.individualData, true);
83
+ var defaultCivilIdFiles = React.useMemo(function () { return getFileDetailsFromDocument(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT); }, [user === null || user === void 0 ? void 0 : user.documents]);
84
+ var defaultSignatureFiles = React.useMemo(function () { return getFileDetailsFromDocument(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE); }, [user === null || user === void 0 ? void 0 : user.documents]);
85
+ var originalReadOnly = useFormReadOnly(methods, {
86
+ isPEP: typeof isPEP === 'boolean',
87
+ isInfluencer: typeof isInfluencer === 'boolean',
88
+ civilID: defaultCivilIdFiles,
89
+ signatureFileId: defaultSignatureFiles
90
+ });
91
+ var noneEditable = useDataNoneEditable(user === null || user === void 0 ? void 0 : user.data_status, [
92
+ 'occupation',
93
+ 'source_of_income',
94
+ 'monthly_income',
95
+ 'is_relative_PEP',
96
+ 'is_influencer'
97
+ ]);
98
+ var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
99
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
83
100
  var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
84
101
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
85
102
  var onSubmit = function (data) {
86
- dispatch(updateIndividualInfo(data));
103
+ dispatch(updateIndividualInfo(getFelids(data)));
87
104
  };
88
105
  var onBack = function () {
89
106
  dispatch(handleCurrentActiveScreen('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
@@ -106,22 +123,6 @@ var AdditionalIndividualInfo = function (_a) {
106
123
  return t('type_board_member');
107
124
  return t('type_user');
108
125
  };
109
- var defaultCivilIdFiles = React.useMemo(function () { return getFileDetailsFromDocument(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.IDENTITY_DOCUMENT); }, [user === null || user === void 0 ? void 0 : user.documents]);
110
- var defaultSignatureFiles = React.useMemo(function () { return getFileDetailsFromDocument(user === null || user === void 0 ? void 0 : user.documents, DocumentPurpose.CUSTOMER_SIGNATURE); }, [user === null || user === void 0 ? void 0 : user.documents]);
111
- var originalReadOnly = useFormReadOnly(methods, {
112
- isPEP: typeof isPEP === 'boolean',
113
- isInfluencer: typeof isInfluencer === 'boolean',
114
- civilID: defaultCivilIdFiles,
115
- signatureFileId: defaultSignatureFiles
116
- });
117
- var noneEditable = useDataNoneEditable(user === null || user === void 0 ? void 0 : user.data_status, [
118
- 'occupation',
119
- 'source_of_income',
120
- 'monthly_income',
121
- 'is_relative_PEP',
122
- 'is_influencer'
123
- ]);
124
- var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
125
126
  var showSignatureFile = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
126
127
  var showOccupationFile = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
127
128
  var showSourceOfIncome = (user === null || user === void 0 ? void 0 : user.type) === IndividualType.USER || (user === null || user === void 0 ? void 0 : user.type) === IndividualType.BUYER;
@@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next';
17
17
  import { handleCurrentActiveScreen, handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
18
18
  import Box from '@mui/material/Box';
19
19
  import { alpha, styled } from '@mui/material/styles';
20
- import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
20
+ import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
21
21
  import { IndividualType } from '../../../../@types';
22
22
  import Form from '../../../../components/Form';
23
23
  import Collapse from '../../../../components/Collapse';
@@ -101,8 +101,9 @@ var IndividualPersonalInfo = function (_a) {
101
101
  'nationality'
102
102
  ]);
103
103
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
104
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
104
105
  var onSubmit = function (data) {
105
- dispatch(updateIndividualPersonalInfo(data));
106
+ dispatch(updateIndividualPersonalInfo(getFelids(data)));
106
107
  };
107
108
  React.useEffect(function () {
108
109
  if (error)
@@ -16,7 +16,7 @@ import { useForm, FormProvider } from 'react-hook-form';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import { settingsSelector } from '../../../../app/settings';
19
- import { useAppDispatch, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
19
+ import { useAppDispatch, useExcludeReadOnlyFelids, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
20
20
  import { useLanguage, useAppSelector } from '../../../../hooks';
21
21
  import Form from '../../../../components/Form';
22
22
  import Collapse from '../../../../components/Collapse';
@@ -49,8 +49,9 @@ var PhoneInfo = function (_a) {
49
49
  var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
50
50
  var originalReadOnly = useFormReadOnly(methods);
51
51
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
52
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
52
53
  var onSubmit = function (formData) {
53
- dispatch(updatePhoneInfo(formData));
54
+ dispatch(updatePhoneInfo(getFelids(formData)));
54
55
  };
55
56
  React.useEffect(function () {
56
57
  if (error && methods.formState.isValid)
@@ -26,7 +26,7 @@ var ArrowIconStyled = styled(Icon, { shouldForwardProp: function (prop) { return
26
26
  height: theme.spacing(2),
27
27
  transform: isAr ? 'scaleX(-1)' : 'scaleX(1)',
28
28
  marginInlineEnd: theme.spacing(-0.375),
29
- verticalAlign: 'middle'
29
+ verticalAlign: 'unset'
30
30
  });
31
31
  });
32
32
  var CheckIconStyled = styled(CheckIcon)(function (_a) {
@@ -67,7 +67,7 @@ var Image = styled('img')(function (_a) {
67
67
  height: theme.spacing(3),
68
68
  fontSize: theme.spacing(3),
69
69
  marginInlineStart: theme.spacing(1),
70
- verticalAlign: 'middle'
70
+ verticalAlign: 'sub'
71
71
  });
72
72
  });
73
73
  var TextStyled = styled('span')(function () { return ({
@@ -16,7 +16,7 @@ import { useForm, FormProvider } from 'react-hook-form';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import Form from '../../../../components/Form';
19
- import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
19
+ import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
20
20
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
21
21
  import { DocumentPurpose } from '../../../../@types';
22
22
  import { getFileDetailsFromDocument, isSA } from '../../../../utils';
@@ -53,11 +53,12 @@ var TaxDetails = function () {
53
53
  var originalReadOnly = useFormReadOnly(methods, { documentId: defaultTaxFiles });
54
54
  var noneEditable = useDataNoneEditable(entity === null || entity === void 0 ? void 0 : entity.data_status, ['tax_number', 'documents', 'is_vat_acknowledged']);
55
55
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
56
+ var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
56
57
  var t = useTranslation().t;
57
58
  var isAr = useLanguage().isAr;
58
59
  var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
59
60
  var onSubmit = function (data) {
60
- dispatch(updateTaxInfo(data));
61
+ dispatch(updateTaxInfo(getFelids(data)));
61
62
  };
62
63
  var onBack = function () {
63
64
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
@@ -66,6 +67,6 @@ var TaxDetails = function () {
66
67
  }
67
68
  dispatch(retrieveBoardStatus());
68
69
  };
69
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(VATId, { readOnly: readOnly['vatId'] || noneEditable['tax_number'] }), _jsx(TaxDocument, { show: isSACountry, defaultFiles: defaultTaxFiles, readOnly: readOnly['documentId'] || noneEditable['documents'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['documentId'] || noneEditable['is_vat_acknowledged'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid || uploading, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
70
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(VATId, { readOnly: readOnly['vatId'] || noneEditable['tax_number'] }), _jsx(TaxDocument, { show: isSACountry, defaultFiles: defaultTaxFiles, readOnly: readOnly['documentId'] || noneEditable['documents'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_vat_acknowledged'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid || uploading, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
70
71
  };
71
72
  export default TaxDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.3.80-test",
3
+ "version": "2.3.85-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",