@tap-payments/auth-jsconnect 2.3.2 → 2.3.3

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 (24) hide show
  1. package/build/app/settings.js +5 -2
  2. package/build/components/ArabicDatePicker/ArabicDatePicker.js +6 -4
  3. package/build/components/ArabicDatePicker/style.css +2 -1
  4. package/build/features/app/bank/bankStore.js +17 -9
  5. package/build/features/app/brand/brandStore.js +25 -17
  6. package/build/features/app/business/businessStore.js +47 -39
  7. package/build/features/app/entity/entityStore.js +29 -21
  8. package/build/features/app/individual/individualStore.js +61 -51
  9. package/build/features/app/password/passwordStore.js +18 -10
  10. package/build/features/app/tax/taxStore.js +28 -20
  11. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +1 -1
  12. package/build/features/connect/Connect.d.ts +1 -0
  13. package/build/features/connect/Connect.js +9 -5
  14. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +1 -0
  15. package/build/features/entity/screens/EntityCapital/ActivityList.js +5 -1
  16. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +1 -1
  17. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +1 -1
  18. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +1 -1
  19. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -0
  20. package/build/features/entity/screens/EntityName/EntityTypeList.js +6 -2
  21. package/build/features/entity/screens/EntityName/ExpiryDate.js +2 -1
  22. package/build/features/entity/screens/EntityName/IssuingDate.js +2 -1
  23. package/build/features/entity/screens/EntityName/LegalName.js +1 -1
  24. package/package.json +1 -1
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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';
@@ -70,6 +70,10 @@ export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { r
70
70
  var theme = _a.theme, isSelected = _a.isSelected;
71
71
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
72
72
  });
73
+ export var MandatoryStyled = styled('span')(function (_a) {
74
+ var theme = _a.theme;
75
+ return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
76
+ });
73
77
  var EntityTypeList = function (props) {
74
78
  var theme = useTheme();
75
79
  var _a = React.useState([]), entityTypesMenuList = _a[0], setEntityTypesMenuList = _a[1];
@@ -127,7 +131,7 @@ var EntityTypeList = function (props) {
127
131
  var filteredList = entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes.filter(function (i) { return i === null || i === void 0 ? void 0 : i.toLowerCase().includes(val); });
128
132
  setEntityTypesMenuList(filteredList);
129
133
  };
130
- return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, { readOnly: props.readOnly, onChange: handleChange, value: t(getSelectedValue()), label: t('entity_type'), placeholder: t('entity_type_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: getSelectedValue(), isVerified: props.isVerified }) }) })), _jsxs(Collapse, __assign({ in: isListAvailable }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('entity_type') }) }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: props.readOnly, value: t(getSelectedValue()), placeholder: t('choose_entity_type'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { isVerified: props.isVerified, anchorEl: anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { list: entityTypesMenuList, onSelectItem: onSelectItem, renderItem: function (i) {
134
+ return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, { readOnly: props.readOnly, required: true, onChange: handleChange, value: t(getSelectedValue()), label: t('entity_type'), placeholder: t('entity_type_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: getSelectedValue(), isVerified: props.isVerified }) }) })), _jsxs(Collapse, __assign({ in: isListAvailable }, { children: [_jsx(LabelContainerStyled, { children: _jsxs(InputLabelStyled, { children: [t('entity_type'), " ", _jsx(MandatoryStyled, { children: "*" })] }) }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: props.readOnly, value: t(getSelectedValue()), placeholder: t('choose_entity_type'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { isVerified: props.isVerified, anchorEl: anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { list: entityTypesMenuList, onSelectItem: onSelectItem, renderItem: function (i) {
131
135
  return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedTypeFlag(i) }, { children: i })) })), getSelectedTypeFlag(i) && _jsx(CheckIcon, { isVerified: props.isVerified })] }));
132
136
  } })] }))] })] }))] })) })));
133
137
  };
@@ -19,6 +19,7 @@ import Text from '../../../../components/Text';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import { entitySelector, clearError } from '../../../app/entity/entityStore';
21
21
  import Calender from '../../../shared/Calender';
22
+ import { MandatoryStyled } from './EntityTypeList';
22
23
  export var InputLabelStyled = styled(Text)(function (_a) {
23
24
  var theme = _a.theme;
24
25
  return (__assign({ margin: theme.spacing(0, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
@@ -39,6 +40,6 @@ var ExpiryDate = function (_a) {
39
40
  dispatch(clearError());
40
41
  oDateControl.field.onChange(data);
41
42
  };
42
- return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('business_expiry_date') }), _jsx(Calender, { isVerified: isVerified, disabled: readOnly, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleExpiryDateChange })] })) })));
43
+ return (_jsx(Collapse, __assign({ in: !!expiryDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsxs(InputLabelStyled, { children: [t('business_expiry_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Calender, { isVerified: isVerified, disabled: readOnly, maxDate: getFutureDate(), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleExpiryDateChange })] })) })));
43
44
  };
44
45
  export default ExpiryDate;
@@ -18,6 +18,7 @@ import Text from '../../../../components/Text';
18
18
  import Calender from '../../../shared/Calender';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import { entitySelector, clearError } from '../../../app/entity/entityStore';
21
+ import { MandatoryStyled } from './EntityTypeList';
21
22
  export var InputLabelStyled = styled(Text)(function (_a) {
22
23
  var theme = _a.theme;
23
24
  return (__assign({ margin: theme.spacing(0, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
@@ -38,6 +39,6 @@ var IssuingDate = function (_a) {
38
39
  dispatch(clearError());
39
40
  oDateControl.field.onChange(data);
40
41
  };
41
- return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputLabelStyled, { children: t('issue_date') }), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleIssuingDateChange })] })) })));
42
+ return (_jsx(Collapse, __assign({ in: !!issueDate }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsxs(InputLabelStyled, { children: [t('issue_date'), _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Calender, { disabled: readOnly, isVerified: isVerified, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleIssuingDateChange })] })) })));
42
43
  };
43
44
  export default IssuingDate;
@@ -44,6 +44,6 @@ var LegalName = function (_a) {
44
44
  var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
45
45
  legalNameControl.field.onChange(value);
46
46
  };
47
- return (_jsx(Collapse, __assign({ in: !!legalName }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, onChange: handleChange, value: legalNameValue, label: t('license_name_label'), placeholder: t('license_name_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: legalNameValue, isVerified: isVerified }) }) }) })));
47
+ return (_jsx(Collapse, __assign({ in: !!legalName }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { required: true, readOnly: readOnly, onChange: handleChange, value: legalNameValue, label: t('license_name_label'), placeholder: t('license_name_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(EndAdornment, { value: legalNameValue, isVerified: isVerified }) }) }) })));
48
48
  };
49
49
  export default React.memo(LegalName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",