@tap-payments/auth-jsconnect 2.4.31-test → 2.4.32-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.
@@ -24,7 +24,6 @@ import Box from '@mui/material/Box';
24
24
  import { alpha, styled } from '@mui/material/styles';
25
25
  import { useTranslation } from 'react-i18next';
26
26
  import { useController, useFormContext } from 'react-hook-form';
27
- import { settingsSelector } from '../../../../app/settings';
28
27
  import { useLanguage, useAppSelector } from '../../../../hooks';
29
28
  import SimpleList from '../../../../components/SimpleList';
30
29
  import Collapse from '../../../../components/Collapse';
@@ -101,10 +100,8 @@ var ActivityList = function (_a) {
101
100
  var control = useFormContext().control;
102
101
  var activitiesControl = useController({ name: 'activities', control: control });
103
102
  var data = useAppSelector(entitySelector).data;
104
- var settingsData = useAppSelector(settingsSelector).data;
105
103
  var _g = data.verify.responseBody || {}, activityList = _g.activityList, entity = _g.entity;
106
104
  var controlValue = activitiesControl.field.value;
107
- var countryCode = settingsData.businessCountry;
108
105
  var handleOpenActivityMenu = function (event) {
109
106
  setActivityAnchorEl(event.currentTarget);
110
107
  };
@@ -13,24 +13,20 @@ 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 Collapse from '@mui/material/Collapse';
17
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
17
  import { settingsSelector } from '../../../../app/settings';
19
18
  import { findCurrencyByIso2, formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
20
19
  import { ScreenContainer } from '../../../shared/Containers';
21
20
  import Input from '../../../shared/Input';
22
- import { clearError, entitySelector } from '../../../app/entity/entityStore';
21
+ import { clearError } from '../../../app/entity/entityStore';
23
22
  import { EndAdornment } from '../../../shared/EndAdornment';
24
23
  var CapitalPaid = function (_a) {
25
- var _b, _c;
24
+ var _b;
26
25
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
27
26
  var t = useTranslation().t;
28
- var data = useAppSelector(entitySelector).data;
29
27
  var settingsData = useAppSelector(settingsSelector).data;
30
28
  var control = useFormContext().control;
31
29
  var dispatch = useAppDispatch();
32
- var entity = (data.verify.responseBody || {}).entity;
33
- var paid = (_b = entity === null || entity === void 0 ? void 0 : entity.capital) === null || _b === void 0 ? void 0 : _b.paid;
34
30
  var countryCode = settingsData.businessCountry.iso2;
35
31
  var handleChange = function (_a) {
36
32
  var target = _a.target;
@@ -41,9 +37,9 @@ var CapitalPaid = function (_a) {
41
37
  };
42
38
  var capitalPaidControl = useController({ control: control, name: 'capitalPaid' });
43
39
  var capitalPaidValue = capitalPaidControl.field.value;
44
- var error = (_c = capitalPaidControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
45
- return (_jsx(Collapse, __assign({ in: !!paid }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
46
- currency: t(findCurrencyByIso2(countryCode))
47
- }), 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 }) }) })) })));
40
+ var error = (_b = capitalPaidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
41
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
42
+ currency: t(findCurrencyByIso2(countryCode))
43
+ }), 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 }) }) })));
48
44
  };
49
45
  export default React.memo(CapitalPaid);
@@ -13,22 +13,18 @@ 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 Collapse from '@mui/material/Collapse';
17
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
+ import { useAppDispatch } from '../../../../hooks';
18
17
  import { removeAllCharsFromNumber } from '../../../../utils';
19
18
  import { ScreenContainer } from '../../../shared/Containers';
20
19
  import Input from '../../../shared/Input';
21
- import { clearError, entitySelector } from '../../../app/entity/entityStore';
20
+ import { clearError } from '../../../app/entity/entityStore';
22
21
  import { EndAdornment } from '../../../shared/EndAdornment';
23
22
  var CapitalShareCount = function (_a) {
24
- var _b, _c, _d;
23
+ var _b;
25
24
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
26
25
  var t = useTranslation().t;
27
- var data = useAppSelector(entitySelector).data;
28
26
  var control = useFormContext().control;
29
27
  var dispatch = useAppDispatch();
30
- var entity = (data.verify.responseBody || {}).entity;
31
- var shareCount = (_c = (_b = entity === null || entity === void 0 ? void 0 : entity.capital) === null || _b === void 0 ? void 0 : _b.shares) === null || _c === void 0 ? void 0 : _c.count;
32
28
  var handleChange = function (_a) {
33
29
  var target = _a.target;
34
30
  if (error)
@@ -38,7 +34,7 @@ var CapitalShareCount = function (_a) {
38
34
  };
39
35
  var capitalShareCountControl = useController({ control: control, name: 'capitalShareCount' });
40
36
  var capitalShareCountValue = capitalShareCountControl.field.value;
41
- var error = (_d = capitalShareCountControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
42
- return (_jsx(Collapse, __assign({ in: !!shareCount }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_count_label'), onChange: handleChange, value: capitalShareCountValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_count_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareCountValue, isVerified: isVerified }) }) })) })));
37
+ var error = (_b = capitalShareCountControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
38
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_count_label'), onChange: handleChange, value: capitalShareCountValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_count_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareCountValue, isVerified: isVerified }) }) })));
43
39
  };
44
40
  export default React.memo(CapitalShareCount);
@@ -16,21 +16,17 @@ import { useController, useFormContext } from 'react-hook-form';
16
16
  import { findCurrencyByIso2, formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
17
17
  import { settingsSelector } from '../../../../app/settings';
18
18
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
- import Collapse from '@mui/material/Collapse';
20
19
  import { ScreenContainer } from '../../../shared/Containers';
21
20
  import Input from '../../../shared/Input';
22
- import { clearError, entitySelector } from '../../../app/entity/entityStore';
21
+ import { clearError } from '../../../app/entity/entityStore';
23
22
  import { EndAdornment } from '../../../shared/EndAdornment';
24
23
  var CapitalShareValue = function (_a) {
25
- var _b, _c, _d;
24
+ var _b;
26
25
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
27
26
  var t = useTranslation().t;
28
- var data = useAppSelector(entitySelector).data;
29
27
  var settingsData = useAppSelector(settingsSelector).data;
30
28
  var control = useFormContext().control;
31
29
  var dispatch = useAppDispatch();
32
- var entity = (data.verify.responseBody || {}).entity;
33
- var shareValue = (_c = (_b = entity === null || entity === void 0 ? void 0 : entity.capital) === null || _b === void 0 ? void 0 : _b.shares) === null || _c === void 0 ? void 0 : _c.value;
34
30
  var countryCode = settingsData.businessCountry.iso2;
35
31
  var handleChange = function (_a) {
36
32
  var target = _a.target;
@@ -41,9 +37,9 @@ var CapitalShareValue = function (_a) {
41
37
  };
42
38
  var capitalShareValueControl = useController({ control: control, name: 'capitalShareValue' });
43
39
  var capitalShareValueValue = capitalShareValueControl.field.value;
44
- var error = (_d = capitalShareValueControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
45
- return (_jsx(Collapse, __assign({ in: !!shareValue }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
46
- currency: t(findCurrencyByIso2(countryCode))
47
- }), 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 }) }) })) })));
40
+ var error = (_b = capitalShareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
41
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
42
+ currency: t(findCurrencyByIso2(countryCode))
43
+ }), 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 }) }) })));
48
44
  };
49
45
  export default React.memo(CapitalShareValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.4.31-test",
3
+ "version": "2.4.32-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",