@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/build/@types/form.d.ts +0 -1
  2. package/build/@types/redux.d.ts +0 -1
  3. package/build/api/axios.js +1 -2
  4. package/build/api/entity.d.ts +2 -2
  5. package/build/api/entity.js +4 -12
  6. package/build/api/index.d.ts +2 -2
  7. package/build/constants/api.d.ts +1 -0
  8. package/build/constants/api.js +2 -0
  9. package/build/constants/app.d.ts +2 -0
  10. package/build/constants/app.js +77 -3
  11. package/build/features/app/bank/bankStore.d.ts +18 -13
  12. package/build/features/app/bank/bankStore.js +161 -173
  13. package/build/features/app/board/boardStore.js +30 -52
  14. package/build/features/app/brand/brandStore.d.ts +33 -16
  15. package/build/features/app/brand/brandStore.js +204 -173
  16. package/build/features/app/business/businessStore.d.ts +5 -0
  17. package/build/features/app/business/businessStore.js +86 -69
  18. package/build/features/app/connectExpress/connectExpressStore.js +10 -18
  19. package/build/features/app/entity/entityStore.d.ts +35 -15
  20. package/build/features/app/entity/entityStore.js +228 -159
  21. package/build/features/app/individual/individualStore.d.ts +37 -21
  22. package/build/features/app/individual/individualStore.js +265 -253
  23. package/build/features/app/password/passwordStore.d.ts +23 -40
  24. package/build/features/app/password/passwordStore.js +233 -226
  25. package/build/features/app/tax/taxStore.d.ts +7 -13
  26. package/build/features/app/tax/taxStore.js +147 -167
  27. package/build/features/auth/Auth.js +5 -1
  28. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  29. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  30. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  31. package/build/features/auth/screens/OperatorError/index.js +2 -0
  32. package/build/features/bank/Bank.d.ts +0 -1
  33. package/build/features/bank/Bank.js +3 -4
  34. package/build/features/bank/screens/BankDetails/BankDetails.js +4 -12
  35. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  36. package/build/features/bank/screens/Verify/Verify.js +5 -5
  37. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
  38. package/build/features/brand/Brand.d.ts +0 -1
  39. package/build/features/brand/Brand.js +3 -4
  40. package/build/features/brand/screens/BrandActivities/BrandActivities.js +1 -1
  41. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
  42. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  43. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  44. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  45. package/build/features/brand/screens/BrandInfo/BrandInfo.js +1 -1
  46. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +1 -1
  47. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  48. package/build/features/brand/screens/Verify/Verify.js +1 -1
  49. package/build/features/business/screens/Activities/Activities.js +1 -1
  50. package/build/features/business/screens/BusinessType/BusinessType.js +1 -1
  51. package/build/features/business/screens/CivilID/CivilID.js +1 -1
  52. package/build/features/business/screens/Customers/Customers.js +1 -1
  53. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
  54. package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
  55. package/build/features/business/screens/OTP/OTP.js +1 -1
  56. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  57. package/build/features/business/screens/Verify/Verify.js +1 -1
  58. package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
  59. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -2
  60. package/build/features/connect/screens/CivilID/CivilID.js +1 -1
  61. package/build/features/connect/screens/Individual/Email.js +1 -3
  62. package/build/features/connect/screens/Individual/Individual.js +1 -1
  63. package/build/features/connect/screens/Merchant/BrandList.js +3 -3
  64. package/build/features/connect/screens/Merchant/Merchant.js +1 -1
  65. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  66. package/build/features/connect/screens/Mobile/Mobile.js +1 -1
  67. package/build/features/connect/screens/NID/NID.js +1 -1
  68. package/build/features/connectExpress/ConnectExpress.js +22 -20
  69. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
  70. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
  71. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
  72. package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
  73. package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
  74. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
  75. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
  76. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
  77. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  78. package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -1
  79. package/build/features/connectExpress/screens/NID/NID.js +1 -1
  80. package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
  81. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  82. package/build/features/entity/Entity.d.ts +0 -1
  83. package/build/features/entity/Entity.js +3 -4
  84. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
  85. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
  86. package/build/features/entity/screens/EntityCapital/EntityCapital.js +1 -1
  87. package/build/features/entity/screens/EntityName/EntityName.js +1 -1
  88. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  89. package/build/features/entity/screens/Verify/Verify.js +1 -1
  90. package/build/features/featuresScreens.js +5 -5
  91. package/build/features/individual/Individual.d.ts +0 -1
  92. package/build/features/individual/Individual.js +3 -4
  93. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -14
  94. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
  95. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  96. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
  97. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
  98. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  99. package/build/features/individual/screens/IndividualList/IndividualList.js +5 -11
  100. package/build/features/individual/screens/IndividualList/UserList.js +9 -13
  101. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  102. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +3 -4
  103. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
  104. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  105. package/build/features/individual/screens/Verify/Verify.js +1 -1
  106. package/build/features/password/Password.d.ts +0 -1
  107. package/build/features/password/Password.js +28 -73
  108. package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
  109. package/build/features/password/screens/OTP/OTP.js +1 -1
  110. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  111. package/build/features/password/screens/Verify/Verify.js +5 -5
  112. package/build/features/shared/Button/FlowsButtons.js +3 -4
  113. package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
  114. package/build/features/shared/Containers/FeatureContainer.js +3 -3
  115. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
  116. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
  117. package/build/features/tax/Tax.d.ts +0 -1
  118. package/build/features/tax/Tax.js +3 -4
  119. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  120. package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
  121. package/build/features/tax/screens/Verify/Verify.js +5 -5
  122. package/build/hooks/index.d.ts +0 -1
  123. package/build/hooks/index.js +0 -1
  124. package/build/hooks/useVerifyToken.d.ts +2 -3
  125. package/build/hooks/useVerifyToken.js +2 -2
  126. package/build/utils/common.js +4 -4
  127. package/build/utils/locale.js +1 -2
  128. package/build/utils/string.d.ts +2 -5
  129. package/build/utils/string.js +5 -34
  130. package/package.json +2 -2
  131. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -31
  132. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
  133. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -36
  134. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
  135. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
  136. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
  137. package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
  138. package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
  139. package/build/hooks/useFormDirtyCheck.d.ts +0 -6
  140. package/build/hooks/useFormDirtyCheck.js +0 -29
@@ -1,76 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { useFormContext, useController } from 'react-hook-form';
16
- import { styled, alpha } from '@mui/material/styles';
17
- import InfoIcon from '@mui/icons-material/Info';
18
- import Box from '@mui/material/Box';
19
- import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
20
- import { ScreenContainer } from '../../../shared/Containers';
21
- import { useAppSelector, useAppDispatch } from '../../../../hooks';
22
- import Collapse from '../../../../components/Collapse';
23
- import RadioGroup from '../../../../components/RadioGroup';
24
- import RadioLabel from '../../../../components/RadioLabel';
25
- import Text from '../../../../components/Text';
26
- import Mandatory from '../../../shared/Mandatory';
27
- import CheckIcon from '../../../shared/CheckIcon';
28
- import { individualSelector, clearError } from '../../../app/individual/individualStore';
29
- var LabelTextStyled = styled(Text)(function (_a) {
30
- var theme = _a.theme;
31
- return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), marginBlockEnd: theme.spacing(0.625) }));
32
- });
33
- var RadioGroupStyled = styled(RadioGroup)(function (_a) {
34
- var theme = _a.theme;
35
- return ({
36
- marginInlineStart: theme.spacing(0.25)
37
- });
38
- });
39
- export var InfoIconStyled = styled(InfoIcon)(function (_a) {
40
- var theme = _a.theme;
41
- return ({
42
- width: theme.spacing(2.75),
43
- height: theme.spacing(2.125),
44
- cursor: 'pointer',
45
- color: alpha(theme.palette.text.primary, 0.4)
46
- });
47
- });
48
- export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
49
- var theme = _a.theme;
50
- return ({
51
- width: theme.spacing(2.75),
52
- height: theme.spacing(2.125),
53
- cursor: 'pointer',
54
- color: alpha(theme.palette.text.primary, 0.4)
55
- });
56
- });
57
- var RadioLabelStyled = styled('span')(function () { return ({
58
- display: 'flex'
59
- }); });
60
- var IsAuthorizedSwitch = function (_a) {
61
- var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
62
- var control = useFormContext().control;
63
- var t = useTranslation().t;
64
- var authorizedControl = useController({ name: 'isAuthorized', control: control });
65
- var error = useAppSelector(individualSelector).error;
66
- var dispatch = useAppDispatch();
67
- var handleOnChange = function (_a) {
68
- var target = _a.target;
69
- if (error)
70
- dispatch(clearError());
71
- authorizedControl.field.onChange(target.value === 'yes');
72
- };
73
- var authorizedValue = authorizedControl.field.value;
74
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsx(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: _jsxs(LabelTextStyled, { children: [t('is_authorized_user_label'), _jsx(Mandatory, {})] }) })), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: authorizedValue ? 'yes' : 'no', onChange: readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: _jsxs(RadioLabelStyled, { children: [t('yes'), authorizedValue && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) }), _jsx(RadioLabel, { value: 'no', label: _jsxs(RadioLabelStyled, { children: [t('no'), authorizedValue === false && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) })] }))] })) })));
75
- };
76
- export default React.memo(IsAuthorizedSwitch);
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const PrepareDataLoading: () => import("react/jsx-runtime").JSX.Element;
3
- declare const _default: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
4
- export default _default;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { useAppSelector } from '../../../../hooks';
4
- import DataLoading from '../../../shared/DataLoading';
5
- import { individualSelector } from '../../../app/individual/individualStore';
6
- export var PrepareDataLoading = function () {
7
- var error = useAppSelector(individualSelector).error;
8
- return _jsx(DataLoading, { error: error });
9
- };
10
- export default memo(PrepareDataLoading);
@@ -1,2 +0,0 @@
1
- import PrepareDataLoading from './PrepareDataLoading';
2
- export default PrepareDataLoading;
@@ -1,2 +0,0 @@
1
- import PrepareDataLoading from './PrepareDataLoading';
2
- export default PrepareDataLoading;
@@ -1,6 +0,0 @@
1
- import { FieldValues, UseFormReturn } from 'react-hook-form';
2
- type UseFormWithDirtyCheck = {
3
- isDirty: boolean;
4
- };
5
- export declare const useFormDirtyCheck: <TFieldValues extends FieldValues>(method: UseFormReturn<TFieldValues, any, undefined>, backendData: TFieldValues) => UseFormWithDirtyCheck;
6
- export {};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import _ from 'lodash';
3
- export var useFormDirtyCheck = function (method, backendData) {
4
- var _a = React.useState(false), isDirty = _a[0], setIsDirty = _a[1];
5
- var data = method.watch();
6
- var isValidData = function (data, backendData) {
7
- if (data === undefined)
8
- return false;
9
- if (Array.isArray(data) && !data.length)
10
- return false;
11
- if (data === '' && !backendData)
12
- return false;
13
- return true;
14
- };
15
- var deepComparison = function (data, backendData) {
16
- for (var key in backendData) {
17
- var formValue = data === null || data === void 0 ? void 0 : data[key];
18
- var backEndValue = backendData === null || backendData === void 0 ? void 0 : backendData[key];
19
- if (isValidData(formValue, backEndValue) && !_.isEqual(formValue, backEndValue))
20
- return true;
21
- }
22
- return false;
23
- };
24
- React.useEffect(function () {
25
- var isDirty = deepComparison(data, backendData);
26
- setIsDirty(isDirty);
27
- }, [data, backendData]);
28
- return { isDirty: isDirty };
29
- };